HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/beerten.komma.nl/wwwroot/vendor/kms/js/vendor.es5.js
function _typeof(t){return(_typeof="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})(t)}(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1:function(t,e,n){n("5WJX"),n("DWi2"),n("vFQT"),n("Qjfq"),n("ZNhe"),n("hOyB"),n("hVuo"),n("vDqi"),n("EVdn"),n("MIQu"),n("Vn+K"),n("NvoQ"),t.exports=n("7bfH")},"121P":function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)}})?r.apply(e,o):r)||(t.exports=i)},"2SVd":function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},"4tak":function(t,e){!function(t){"use strict";var e,n,r,o,i,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e){var n,r=t.dom,o=t.selection.getSelectedBlocks();o.length&&(n=r.getAttrib(o[0],"dir"),u.each(o,function(t){r.getParent(t.parentNode,'*[dir="'+e+'"]',r.getRoot())||r.setAttrib(t,"dir",n!==e?e:null)}),t.nodeChanged())},c=function(t){t.addCommand("mceDirectionLTR",function(){s(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){s(t,"rtl")})},l=function(t){return function(){return t}},f=l(!1),d=l(!0),h=function(){return m},m=(e=function(t){return t.isNone()},o={fold:function(t,e){return t()},is:f,isSome:f,isNone:d,getOr:r=function(t){return t},getOrThunk:n=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(void 0),or:r,orThunk:n,map:h,each:function(){},bind:h,exists:f,forall:d,filter:h,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(o),o),p=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:l(t)}},g=p,v=function(t){return"function"===function(t){if(null===t)return"null";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}(t)},b=(Array.prototype.slice,v(Array.from)&&Array.from,t.Node.ATTRIBUTE_NODE,t.Node.CDATA_SECTION_NODE,t.Node.COMMENT_NODE,t.Node.DOCUMENT_NODE,t.Node.DOCUMENT_TYPE_NODE,t.Node.DOCUMENT_FRAGMENT_NODE,t.Node.ELEMENT_NODE,t.Node.TEXT_NODE),y=(t.Node.PROCESSING_INSTRUCTION_NODE,t.Node.ENTITY_REFERENCE_NODE,t.Node.ENTITY_NODE,t.Node.NOTATION_NODE,void 0!==t.window?t.window:Function("return this;")(),i=b,function(t){return function(t){return t.dom().nodeType}(t)===i}),x=function(e,n){var r=e.dom(),o=t.window.getComputedStyle(r).getPropertyValue(n),i=""!==o||function(t){var e=y(t)?t.dom().parentNode:t.dom();return null!=e&&e.ownerDocument.body.contains(e)}(e)?o:w(r,n);return null===i?void 0:i},w=function(t,e){return function(t){return void 0!==t.style&&v(t.style.getPropertyValue)}(t)?t.style.getPropertyValue(e):""},C=function(t,e){return function(n){var r=function(t){var r=g(t.element);n.setActive(("rtl"===x(r,"direction")?"rtl":"ltr")===e)};return t.on("NodeChange",r),function(){return t.off("NodeChange",r)}}},_=function(t){t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return t.execCommand("mceDirectionLTR")},onSetup:C(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return t.execCommand("mceDirectionRTL")},onSetup:C(t,"rtl")})};a.add("directionality",function(t){c(t),_(t)})}(window)},"5WJX":function(t,e,n){(function(e){!function(n){"use strict";var r=function(){},o=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},i=function(t){return function(){return t}},a=function(t){return t};function u(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 s=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},c=i(!1),l=i(!0),f=function(){return d},d=function(){var t=function(t){return t.isNone()},e=function(t){return t()},n=function(t){return t},o={fold:function(t,e){return t()},is:c,isSome:c,isNone:l,getOr:n,getOrThunk:e,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:n,orThunk:e,map:f,each:r,bind:f,exists:c,forall:l,filter:f,equals:t,equals_:t,toArray:function(){return[]},toString:i("none()")};return Object.freeze&&Object.freeze(o),o}(),h=function t(e){var n=i(e),r=function(){return a},o=function(t){return t(e)},a={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:l,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return t(n(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?a:d},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,function(t){return n(e,t)})}};return a},m={some:h,none:f,from:function(t){return null==t?d:h(t)}},p=function(t){return function(e){return function(t){if(null===t)return"null";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}(e)===t}},g=p("string"),v=p("object"),b=p("array"),y=p("null"),x=p("boolean"),w=p("function"),C=p("number"),_=Array.prototype.slice,k=Array.prototype.indexOf,S=Array.prototype.push,T=function(t,e){return k.call(t,e)},E=function(t,e){return T(t,e)>-1},O=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return!0;return!1},D=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},N=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},A=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}},M=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},I=function(t,e,n){return function(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])}(t,function(t){n=e(n,t)}),n},z=function(t,e,n){return N(t,function(t){n=e(n,t)}),n},B=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return m.some(o)}return m.none()},R=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return m.some(n);return m.none()},P=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!b(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);S.apply(e,t[n])}return e}(D(t,e))},L=function(t,e){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n],n))return!1;return!0},H=function(t){var e=_.call(t,0);return e.reverse(),e},F=function(t,e){return M(t,function(t){return!E(e,t)})},V=function(t){return 0===t.length?m.none():m.some(t[0])},j=function(t){return 0===t.length?m.none():m.some(t[t.length-1])},U=w(Array.from)?Array.from:function(t){return _.call(t)},W=Object.keys,q=Object.hasOwnProperty,Y=function(t,e){for(var n=W(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},$=function(t,e){return G(t,function(t,n){return{k:n,v:e(t,n)}})},G=function(t,e){var n={};return Y(t,function(t,r){var o=e(t,r);n[o.k]=o.v}),n},K=function(t){return function(e,n){t[n]=e}},X=function(t,e){var n={},r={};return function(t,e,n,r){Y(t,function(t,o){(e(t,o)?n:r)(t,o)})}(t,e,K(n),K(r)),{t:n,f:r}},J=function(t,e){return Q(t,e)?m.from(t[e]):m.none()},Q=function(t,e){return q.call(t,e)},Z=function(){return(Z=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:i(t)}},et={fromHtml:function(t,e){var r=(e||n.document).createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw n.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return tt(r.childNodes[0])},fromTag:function(t,e){var r=(e||n.document).createElement(t);return tt(r)},fromText:function(t,e){var r=(e||n.document).createTextNode(t);return tt(r)},fromDom:tt,fromPoint:function(t,e,n){var r=t.dom();return m.from(r.elementFromPoint(e,n)).map(tt)}},nt=function t(e){var n=e,r=function(){return n};return{get:r,set:function(t){n=t},clone:function(){return t(r())}}},rt=function(){return ot(0,0)},ot=function(t,e){return{major:t,minor:e}},it=function(t,e){var n=String(e).toLowerCase();return 0===t.length?rt():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return ot(r(1),r(2))}(t,n)},at=rt,ut=function(t,e){return function(){return e===t}},st=function(t){var e=t.current;return{current:e,version:t.version,isEdge:ut("Edge",e),isChrome:ut("Chrome",e),isIE:ut("IE",e),isOpera:ut("Opera",e),isFirefox:ut("Firefox",e),isSafari:ut("Safari",e)}},ct=function(){return st({current:void 0,version:at()})},lt=st,ft=(i("Edge"),i("Chrome"),i("IE"),i("Opera"),i("Firefox"),i("Safari"),function(t,e){return function(){return e===t}}),dt=function(t){var e=t.current;return{current:e,version:t.version,isWindows:ft("Windows",e),isiOS:ft("iOS",e),isAndroid:ft("Android",e),isOSX:ft("OSX",e),isLinux:ft("Linux",e),isSolaris:ft("Solaris",e),isFreeBSD:ft("FreeBSD",e),isChromeOS:ft("ChromeOS",e)}},ht=function(){return dt({current:void 0,version:at()})},mt=dt,pt=(i("Windows"),i("iOS"),i("Android"),i("Linux"),i("OSX"),i("Solaris"),i("FreeBSD"),i("ChromeOS"),function(t,e){var n=String(e).toLowerCase();return B(t,function(t){return t.search(n)})}),gt=function(t,e){return-1!==t.indexOf(e)},vt=function(t,e){return function(t,e,n){return""===e||!(t.length<e.length)&&t.substr(0,0+e.length)===e}(t,e)},bt=function(t){return t.replace(/^\s+|\s+$/g,"")},yt=function(t){return t.replace(/\s+$/g,"")},xt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,wt=function(t){return function(e){return gt(e,t)}},Ct=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return gt(t,"edge/")&&gt(t,"chrome")&&gt(t,"safari")&&gt(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,xt],search:function(t){return gt(t,"chrome")&&!gt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return gt(t,"msie")||gt(t,"trident")}},{name:"Opera",versionRegexes:[xt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:wt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:wt("firefox")},{name:"Safari",versionRegexes:[xt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(gt(t,"safari")||gt(t,"mobile/"))&&gt(t,"applewebkit")}}],_t=[{name:"Windows",search:wt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return gt(t,"iphone")||gt(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]+).*/]}],kt={browsers:i(Ct),oses:i(_t)},St=nt(function(t,e){var n=kt.browsers(),r=kt.oses(),o=function(t,e){return pt(t,e).map(function(t){var n=it(t.versionRegexes,e);return{current:t.name,version:n}})}(n,t).fold(ct,lt),a=function(t,e){return pt(t,e).map(function(t){var n=it(t.versionRegexes,e);return{current:t.name,version:n}})}(r,t).fold(ht,mt);return{browser:o,os:a,deviceType:function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),a=t.isiOS()&&!o,u=t.isiOS()||t.isAndroid(),s=u||r("(pointer:coarse)"),c=o||!a&&u&&r("(min-device-width:768px)"),l=a||u&&!c,f=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!l&&!c&&!f;return{isiPad:i(o),isiPhone:i(a),isTablet:i(c),isPhone:i(l),isTouch:i(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:i(f),isDesktop:i(d)}}(a,o,t,e)}}(n.navigator.userAgent,function(t){return n.window.matchMedia(t).matches})),Tt=function(){return St.get()},Et=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+e.length+" arguments");var r={};return N(t,function(t,n){r[t]=i(e[n])}),r}},Ot=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},Dt=(n.Node.ATTRIBUTE_NODE,n.Node.CDATA_SECTION_NODE,n.Node.COMMENT_NODE,n.Node.DOCUMENT_NODE),Nt=(n.Node.DOCUMENT_TYPE_NODE,n.Node.DOCUMENT_FRAGMENT_NODE,n.Node.ELEMENT_NODE),At=n.Node.TEXT_NODE,Mt=(n.Node.PROCESSING_INSTRUCTION_NODE,n.Node.ENTITY_REFERENCE_NODE,n.Node.ENTITY_NODE,n.Node.NOTATION_NODE,Nt),It=Dt,zt=function(t,e){var n=t.dom();if(n.nodeType!==Mt)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")},Bt=function(t){return t.nodeType!==Mt&&t.nodeType!==It||0===t.childElementCount},Rt=function(t,e){return t.dom()===e.dom()},Pt=Tt().browser.isIE()?function(t,e){return function(t,e){return function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(t,e,n.Node.DOCUMENT_POSITION_CONTAINED_BY)}(t.dom(),e.dom())}:function(t,e){var n=t.dom(),r=e.dom();return n!==r&&n.contains(r)},Lt=function(t){return et.fromDom(t.dom().ownerDocument)},Ht=function(t){return et.fromDom(t.dom().ownerDocument.defaultView)},Ft=function(t){return m.from(t.dom().parentNode).map(et.fromDom)},Vt=function(t){return m.from(t.dom().previousSibling).map(et.fromDom)},jt=function(t){return m.from(t.dom().nextSibling).map(et.fromDom)},Ut=function(t){return H(Ot(t,Vt))},Wt=function(t){return Ot(t,jt)},qt=function(t){return D(t.dom().childNodes,et.fromDom)},Yt=function(t,e){var n=t.dom().childNodes;return m.from(n[e]).map(et.fromDom)},$t=function(t){return Yt(t,0)},Gt=function(t){return Yt(t,t.dom().childNodes.length-1)},Kt=(Et("element","offset"),function(t,e){Ft(t).each(function(n){n.dom().insertBefore(e.dom(),t.dom())})}),Xt=function(t,e){jt(t).fold(function(){Ft(t).each(function(t){Qt(t,e)})},function(t){Kt(t,e)})},Jt=function(t,e){$t(t).fold(function(){Qt(t,e)},function(n){t.dom().insertBefore(e.dom(),n.dom())})},Qt=function(t,e){t.dom().appendChild(e.dom())},Zt=function(t,e){N(e,function(e){Qt(t,e)})},te=function(t){t.dom().textContent="",N(qt(t),function(t){ee(t)})},ee=function(t){var e=t.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},ne=function(t){var e,n=qt(t);n.length>0&&(e=t,N(n,function(t){Kt(e,t)})),ee(t)},re=(void 0!==n.window?n.window:Function("return this;")(),function(t){return t.dom().nodeName.toLowerCase()}),oe=function(t){return function(e){return e.dom().nodeType===t}},ie=oe(Nt),ae=oe(At),ue=function(t){var e=ae(t)?t.dom().parentNode:t.dom();return null!=e&&e.ownerDocument.body.contains(e)},se=function t(e,n){return{left:i(e),top:i(n),translate:function(r,o){return t(e+r,n+o)}}},ce=function(t,e){return void 0!==t?t:void 0!==e?e:0},le=function(t){var e=t.dom(),n=e.ownerDocument.body;return n===e?se(n.offsetLeft,n.offsetTop):ue(t)?function(t){var e=t.getBoundingClientRect();return se(e.left,e.top)}(e):se(0,0)},fe=Tt().browser.isSafari(),de=function(t){var e=void 0!==t?t.dom():n.document,r=e.body.scrollLeft||e.documentElement.scrollLeft,o=e.body.scrollTop||e.documentElement.scrollTop;return se(r,o)},he=function(t,e,r){(void 0!==r?r.dom():n.document).defaultView.scrollTo(t,e)},me=function(t,e){fe&&w(t.dom().scrollIntoViewIfNeeded)?t.dom().scrollIntoViewIfNeeded(!1):t.dom().scrollIntoView(e)},pe=function(t,e,n,r){return{x:i(t),y:i(e),width:i(n),height:i(r),right:i(t+n),bottom:i(e+r)}},ge=function(t){var e=void 0===t?n.window:t,r=e.document,o=de(et.fromDom(r));return function(t){var e=void 0===t?n.window:t;return m.from(e.visualViewport)}(e).fold(function(){var t=e.document.documentElement,n=t.clientWidth,r=t.clientHeight;return pe(o.left(),o.top(),n,r)},function(t){return pe(Math.max(t.pageLeft,o.left()),Math.max(t.pageTop,o.top()),t.width,t.height)})},ve=function(t){return function(e){return!!e&&e.nodeType===t}},be=ve(1),ye=function(t){var e=t.map(function(t){return t.toLowerCase()});return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return E(e,n)}return!1}},xe=function(t){return function(e){if(be(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},we=ye(["textarea","input"]),Ce=ve(3),_e=ve(8),ke=ve(9),Se=ve(11),Te=ye(["br"]),Ee=xe("true"),Oe=xe("false"),De={isText:Ce,isElement:be,isComment:_e,isDocument:ke,isDocumentFragment:Se,isBr:Te,isContentEditableTrue:Ee,isContentEditableFalse:Oe,isRestrictedNode:function(t){return!!t&&!Object.getPrototypeOf(t)},matchNodeNames:ye,hasPropValue:function(t,e){return function(n){return be(n)&&n[t]===e}},hasAttribute:function(t,e){return function(e){return be(e)&&e.hasAttribute(t)}},hasAttributeValue:function(t,e){return function(n){return be(n)&&n.getAttribute(t)===e}},matchStyleValues:function(t,e){var n=e.toLowerCase().split(" ");return function(e){var r;if(be(e))for(r=0;r<n.length;r++){var o=e.ownerDocument.defaultView.getComputedStyle(e,null);if((o?o.getPropertyValue(t):null)===n[r])return!0}return!1}},isBogus:function(t){return be(t)&&t.hasAttribute("data-mce-bogus")},isBogusAll:function(t){return be(t)&&"all"===t.getAttribute("data-mce-bogus")},isTable:function(t){return be(t)&&"TABLE"===t.tagName},isTextareaOrInput:we},Ne=function(t){return void 0!==t.style&&w(t.style.getPropertyValue)},Ae=function(t,e,r){if(!(g(r)||x(r)||C(r)))throw n.console.error("Invalid call to Attr.set. Key ",e,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,r+"")},Me=function(t,e,n){Ae(t.dom(),e,n)},Ie=function(t,e){var n=t.dom();Y(e,function(t,e){Ae(n,e,t)})},ze=function(t,e){var n=t.dom().getAttribute(e);return null===n?void 0:n},Be=function(t,e){t.dom().removeAttribute(e)},Re=function(t,e){var r=t.dom(),o=n.window.getComputedStyle(r).getPropertyValue(e),i=""!==o||ue(t)?o:Pe(r,e);return null===i?void 0:i},Pe=function(t,e){return Ne(t)?t.style.getPropertyValue(e):""},Le=function(t,e){var n=t.dom(),r=Pe(n,e);return m.from(r).filter(function(t){return t.length>0})},He=Tt().browser,Fe=function(t){return B(t,ie)},Ve=function(t,e){return t.children&&E(t.children,e)},je={getPos:function(t,e,n){var r,o,i=0,a=0,u=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&"static"===Re(et.fromDom(t),"position"))return{x:i=(o=e.getBoundingClientRect()).left+(u.documentElement.scrollLeft||t.scrollLeft)-u.documentElement.clientLeft,y:a=o.top+(u.documentElement.scrollTop||t.scrollTop)-u.documentElement.clientTop};for(r=e;r&&r!==n&&r.nodeType&&!Ve(r,n);)i+=r.offsetLeft||0,a+=r.offsetTop||0,r=r.offsetParent;for(r=e.parentNode;r&&r!==n&&r.nodeType&&!Ve(r,n);)i-=r.scrollLeft||0,a-=r.scrollTop||0,r=r.parentNode;a+=function(t){return He.isFirefox()&&"table"===re(t)?Fe(qt(t)).filter(function(t){return"caption"===re(t)}).bind(function(t){return Fe(Wt(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}(et.fromDom(e))}return{x:i,y:a}}},Ue={},We={exports:Ue};!function(t,n,r,o){!function(t){"object"==_typeof(n)&&void 0!==r?r.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof o&&o;if(!s&&c)return c(u,!0);if(a)return a(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[u]={exports:{}};e[u][0].call(f.exports,function(t){return i(e[u][1][t]||t)},f,f.exports,t,e,n,r)}return n[u].exports}for(var a="function"==typeof o&&o,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var t=s(h);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new p(t,e)),1!==l.length||f||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,e,n){(function(t){!function(n){var r=setTimeout;function o(){}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 a(t,e){for(;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(t){return void s(e.promise,t)}u(e.promise,r)}else(1===t._state?u:s)(e.promise,t._value)})):t._deferreds.push(e)}function u(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 c(t);if("function"==typeof n)return void f((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){s(t,e)}var r,o}function s(t,e){t._state=2,t._value=e,c(t)}function c(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++)a(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,u(e,t))},function(t){n||(n=!0,s(e,t))})}catch(t){if(n)return;n=!0,s(e,t)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(o);return a(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,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){o(i,t)},n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}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 t?function(e){t(e)}:function(t){r(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},void 0!==e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(t,e,n){(function(e,r){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},s=0;function c(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n.setImmediate="function"==typeof e?e:function(t){var e=s++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o(function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))}),e},n.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)})}(0,Ue,We,void 0);var qe,Ye,$e,Ge,Ke=We.exports.boltExport,Xe=function t(e){var r=m.none(),o=[],i=function(t){a()?u(t):o.push(t)},a=function(){return r.isSome()},u=function(t){r.each(function(e){n.setTimeout(function(){t(e)},0)})};return e(function(t){r=m.some(t),function(t){N(t,u)}(o),o=[]}),{get:i,map:function(e){return t(function(t){i(function(n){t(e(n))})})},isReady:a}},Je=Xe,Qe=function(t){n.setTimeout(function(){throw t},0)},Ze=function t(e){var n=function(t){e().then(t,Qe)};return{map:function(n){return t(function(){return e().then(n)})},bind:function(n){return t(function(){return e().then(function(t){return n(t).toPromise()})})},anonBind:function(n){return t(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return Je(n)},toCached:function(){var n=null;return t(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}},tn={nu:function(t){return Ze(function(){return new Ke(t)})},pure:function(t){return Ze(function(){return Ke.resolve(t)})}},en=function(t){return function(t,e){return e(function(e){var n=[],r=0;0===t.length?e([]):N(t,function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=t.length&&e(n)}}(i))})})}(t,tn.nu)},nn=function t(e){return{is:function(t){return e===t},isValue:l,isError:c,getOr:i(e),getOrThunk:i(e),getOrDie:i(e),or:function(n){return t(e)},orThunk:function(n){return t(e)},fold:function(t,n){return n(e)},map:function(n){return t(n(e))},mapError:function(n){return t(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return m.some(e)}}},rn=function t(e){return{is:c,isValue:c,isError:l,getOr:a,getOrThunk:function(t){return t()},getOrDie:function(){return(t=String(e),function(){throw new Error(t)})();var t},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(n){return t(e)},mapError:function(n){return t(n(e))},each:r,bind:function(n){return t(e)},exists:c,forall:l,toOption:m.none}},on={value:nn,error:rn,fromOption:function(t,e){return t.fold(function(){return rn(e)},nn)}},an=window.Promise?window.Promise:function(){function t(t,e){return function(){t.apply(e,arguments)}}var e=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=function(e){if("object"!=_typeof(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,t(a,this),t(u,this))},o=r.immediateFn||"function"==typeof n.setImmediate&&n.setImmediate||function(t){n.setTimeout(t,1)};function i(t){var e=this;null!==this._state?o(function(){var n=e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void t.reject(e)}t.resolve(r)}else(e._state?t.resolve:t.reject)(e._value)}):this._deferreds.push(t)}function a(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==_typeof(e)||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void l(t(n,e),t(a,this),t(u,this))}this._state=!0,this._value=e,s.call(this)}catch(t){u.call(this,t)}}function u(t){this._state=!1,this._value=t,s.call(this)}function s(){for(var t=0,e=this._deferreds.length;t<e;t++)i.call(this,this._deferreds[t]);this._deferreds=null}function c(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function l(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(t){if(r)return;r=!0,n(t)}}return r.prototype.catch=function(t){return this.then(null,t)},r.prototype.then=function(t,e){var n=this;return new r(function(r,o){i.call(n,new c(t,e,r,o))})},r.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&e(arguments[0])?arguments[0]:arguments);return new r(function(e,n){if(0===t.length)return e([]);var r=t.length;function o(i,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){o(i,t)},n)}t[i]=a,0==--r&&e(t)}catch(t){n(t)}}for(var i=0;i<t.length;i++)o(i,t[i])})},r.resolve=function(t){return t&&"object"==_typeof(t)&&t.constructor===r?t:new r(function(e){e(t)})},r.reject=function(t){return new r(function(e,n){n(t)})},r.race=function(t){return new r(function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)})},r}(),un=function(t,e){return"number"!=typeof e&&(e=0),n.setTimeout(t,e)},sn=function(t,e){return"number"!=typeof e&&(e=1),n.setInterval(t,e)},cn=function(t,e){var r,o;return(o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];n.clearTimeout(r),r=un(function(){t.apply(this,o)},e)}).stop=function(){n.clearTimeout(r)},o},ln={requestAnimationFrame:function(t,e){qe?qe.then(t):qe=new an(function(t){e||(e=n.document.body),function(t,e){var r,o=n.window.requestAnimationFrame,i=["ms","moz","webkit"];for(r=0;r<i.length&&!o;r++)o=n.window[i[r]+"RequestAnimationFrame"];o||(o=function(t){n.window.setTimeout(t,0)}),o(t,e)}(t,e)}).then(t)},setTimeout:un,setInterval:sn,setEditorTimeout:function(t,e,n){return un(function(){t.removed||e()},n)},setEditorInterval:function(t,e,r){var o;return o=sn(function(){t.removed?n.clearInterval(o):e()},r)},debounce:cn,throttle:cn,clearInterval:function(t){return n.clearInterval(t)},clearTimeout:function(t){return n.clearTimeout(t)}},fn=n.navigator.userAgent,dn=Tt(),hn=dn.browser,mn=dn.os,pn=dn.deviceType,gn=/WebKit/.test(fn)&&!hn.isEdge(),vn="FormData"in n.window&&"FileReader"in n.window&&"URL"in n.window&&!!n.URL.createObjectURL,bn=-1!==fn.indexOf("Windows Phone"),yn={opera:hn.isOpera(),webkit:gn,ie:!(!hn.isIE()&&!hn.isEdge())&&hn.version.major,gecko:hn.isFirefox(),mac:mn.isOSX()||mn.isiOS(),iOS:pn.isiPad()||pn.isiPhone(),android:mn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:n.window.getSelection&&"Range"in n.window,documentMode:hn.isIE()?n.document.documentMode||7:10,fileApi:vn,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!hn.isIE(),desktop:pn.isDesktop(),windowsPhone:bn,browser:{current:hn.current,version:hn.version,isChrome:hn.isChrome,isEdge:hn.isEdge,isFirefox:hn.isFirefox,isIE:hn.isIE,isOpera:hn.isOpera,isSafari:hn.isSafari},os:{current:mn.current,version:mn.version,isAndroid:mn.isAndroid,isChromeOS:mn.isChromeOS,isFreeBSD:mn.isFreeBSD,isiOS:mn.isiOS,isLinux:mn.isLinux,isOSX:mn.isOSX,isSolaris:mn.isSolaris,isWindows:mn.isWindows},deviceType:{isDesktop:pn.isDesktop,isiPad:pn.isiPad,isiPhone:pn.isiPhone,isPhone:pn.isPhone,isTablet:pn.isTablet,isTouch:pn.isTouch,isWebView:pn.isWebView}},xn=Array.isArray,wn=function(t,e,n){var r,o;if(!t)return 0;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 0}else for(r in t)if(t.hasOwnProperty(r)&&!1===e.call(n,t[r],r,t))return 0;return 1},Cn=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},_n={isArray:xn,toArray:function(t){var e,n,r=t;if(!xn(t))for(r=[],e=0,n=t.length;e<n;e++)r[e]=t[e];return r},each:wn,map:function(t,e){var n=[];return wn(t,function(r,o){n.push(e(r,o,t))}),n},filter:function(t,e){var n=[];return wn(t,function(r,o){e&&!e(r,o,t)||n.push(r)}),n},indexOf:function(t,e){var n,r;if(t)for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},reduce:function(t,e,n,r){var o=0;for(arguments.length<3&&(n=t[0]);o<t.length;o++)n=e.call(r,n,t[o],o);return n},findIndex:Cn,find:function(t,e,n){var r=Cn(t,e,n);if(-1!==r)return t[r]},last:function(t){return t[t.length-1]}},kn=/^\s*|\s*$/g,Sn=function(t){return null==t?"":(""+t).replace(kn,"")},Tn=function(t,e){return e?!("array"!==e||!_n.isArray(t))||_typeof(t)===e:void 0!==t},En={trim:Sn,isArray:_n.isArray,is:Tn,toArray:_n.toArray,makeMap:function(t,e,n){var r;for(e=e||",","string"==typeof(t=t||[])&&(t=t.split(e)),n=n||{},r=t.length;r--;)n[t[r]]={};return n},each:_n.each,map:_n.map,grep:_n.filter,inArray:_n.indexOf,hasOwn:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},extend:function(t,e){for(var n,r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u,s=arguments;for(n=1,r=s.length;n<r;n++)for(o in e=s[n])e.hasOwnProperty(o)&&void 0!==(u=e[o])&&(t[o]=u);return t},create:function(t,e,n){var r,o,i,a,u,s=0;if(t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t),i=t[3].match(/(^|\.)(\w+)$/i)[2],!(o=this.createNS(t[3].replace(/\.\w+$/,""),n))[i]){if("static"===t[2])return o[i]=e,void(this.onCreate&&this.onCreate(t[2],t[3],o[i]));e[i]||(e[i]=function(){},s=1),o[i]=e[i],this.extend(o[i].prototype,e),t[5]&&(r=this.resolve(t[5]).prototype,a=t[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=s?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],this.each(r,function(t,e){o[i].prototype[e]=r[e]}),this.each(e,function(t,e){r[e]?o[i].prototype[e]=function(){return this.parent=r[e],t.apply(this,arguments)}:e!==i&&(o[i].prototype[e]=t)})),this.each(e.static,function(t,e){o[i][e]=t})}},walk:function t(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),_n.each(e,function(e,i){if(!1===n.call(o,e,i,r))return!1;t(e,n,r,o)}))},createNS:function(t,e){var r,o;for(e=e||n.window,t=t.split("."),r=0;r<t.length;r++)e[o=t[r]]||(e[o]={}),e=e[o];return e},resolve:function(t,e){var r,o;for(e=e||n.window,r=0,o=(t=t.split(".")).length;r<o&&(e=e[t[r]]);r++);return e},explode:function(t,e){return!t||Tn(t,"array")?t:_n.map(t.split(e||","),Sn)},_addCacheSuffix:function(t){var e=yn.cacheSuffix;return e&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t}},On=function(t){var e;return function(n){return(e=e||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}(t,i(!0))).hasOwnProperty(re(n))}},Dn=On(["h1","h2","h3","h4","h5","h6"]),Nn=On(["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"]),An=function(t){return ie(t)&&!Nn(t)},Mn=function(t){return ie(t)&&"br"===re(t)},In=On(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),zn=On(["ul","ol","dl"]),Bn=On(["li","dd","dt"]),Rn=On(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),Pn=On(["thead","tbody","tfoot"]),Ln=On(["td","th"]),Hn=On(["pre","script","textarea","style"]),Fn=function(t){return t&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},Vn={trimNode:function t(e,n){var r,o=n.childNodes;if(!De.isElement(n)||!Fn(n)){for(r=o.length-1;r>=0;r--)t(e,o[r]);if(!1===De.isDocument(n)){if(De.isText(n)&&n.nodeValue.length>0){var i=En.trim(n.nodeValue).length;if(e.isBlock(n.parentNode)||i>0)return;if(0===i&&function(t){var e=t.previousSibling&&"SPAN"===t.previousSibling.nodeName,n=t.nextSibling&&"SPAN"===t.nextSibling.nodeName;return e&&n}(n))return}else if(De.isElement(n)&&(1===(o=n.childNodes).length&&Fn(o[0])&&n.parentNode.insertBefore(o[0],n),o.length||Rn(et.fromDom(n))))return;e.remove(n)}return n}}},jn=En.makeMap,Un=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wn=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qn=/[<>&\"\']/g,Yn=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,$n={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:"Ÿ"};$e={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Ge={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};var Gn=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)),$e[r]||(o="&"+t[n+1]+";",i[r]=o,i[o]=r);return i}};Ye=Gn("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);var Kn=function(t,e){return t.replace(e?Un:Wn,function(t){return $e[t]||t})},Xn=function(t,e){return t.replace(e?Un:Wn,function(t){return t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":$e[t]||"&#"+t.charCodeAt(0)+";"})},Jn=function(t,e,n){return n=n||Ye,t.replace(e?Un:Wn,function(t){return $e[t]||n[t]||t})},Qn={encodeRaw:Kn,encodeAllRaw:function(t){return(""+t).replace(qn,function(t){return $e[t]||t})},encodeNumeric:Xn,encodeNamed:Jn,getEncodeFunc:function(t,e){var n=Gn(e)||Ye,r=jn(t.replace(/\+/g,","));return r.named&&r.numeric?function(t,e){return t.replace(e?Un:Wn,function(t){return void 0!==$e[t]?$e[t]:void 0!==n[t]?n[t]:t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"})}:r.named?e?function(t,e){return Jn(t,e,n)}:Jn:r.numeric?Xn:Kn},decode:function(t){return t.replace(Yn,function(t,e){return e?(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10))>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):$n[e]||String.fromCharCode(e):Ge[t]||Ye[t]||function(t){var e;return(e=et.fromTag("div").dom()).innerHTML=t,e.textContent||e.innerText||t}(t)})}},Zn={},tr={},er=En.makeMap,nr=En.each,rr=En.extend,or=En.explode,ir=En.inArray,ar=function(t,e){return(t=En.trim(t))?t.split(e||" "):[]},ur=function(t){var e,n,r,o,i,a,u={},s=function(t,n,r){var o,i,a,s=function(t,e){var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e||{};return o};for(n=n||"","string"==typeof(r=r||[])&&(r=ar(r)),o=(t=ar(t)).length;o--;)a={attributes:s(i=ar([e,n].join(" "))),attributesOrder:i,children:s(r,tr)},u[t[o]]=a},c=function(t,e){var n,r,o,i;for(n=(t=ar(t)).length,e=ar(e);n--;)for(r=u[t[n]],o=0,i=e.length;o<i;o++)r.attributes[e[o]]={},r.attributesOrder.push(e[o])};return Zn[t]?Zn[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",r=[r,a="acronym applet basefont big font strike tt"].join(" "),nr(ar(a),function(t){s(t,"",r)}),n=[n,i="center dir isindex noframes"].join(" "),o=[n,r].join(" "),nr(ar(i),function(t){s(t,"",o)})),o=o||[n,r].join(" "),s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),s("address dt dd div caption","",o),s("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),s("blockquote","cite",o),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",o),s("dl","","dt dd"),s("a","href target rel media hreflang type",r),s("q","cite",r),s("ins del","cite datetime",o),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",o),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),s("param","name value"),s("map","name",[o,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",o),s("th","colspan rowspan headers scope abbr",o),s("form","accept-charset action autocomplete enctype method name novalidate target",o),s("fieldset","disabled form name",[o,"legend"].join(" ")),s("label","form for",r),s("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"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?o:r),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[o,"li"].join(" ")),s("noscript","",o),"html4"!==t&&(s("wbr"),s("ruby","",[r,"rt rp"].join(" ")),s("figcaption","",o),s("mark rt rp summary bdi","",r),s("canvas","width height",o),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[r,"option"].join(" ")),s("article section nav aside main header footer","",o),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[o,"figcaption"].join(" ")),s("time","datetime",r),s("dialog","open",o),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",r),s("progress","value max",r),s("meter","value min max low high optimum",r),s("details","open",[o,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(c("script","language xml:space"),c("style","xml:space"),c("object","declare classid code codebase codetype archive standby align border hspace vspace"),c("embed","align name hspace vspace"),c("param","valuetype type"),c("a","charset name rev shape coords"),c("br","clear"),c("applet","codebase archive code object alt name width height align hspace vspace"),c("img","name longdesc align border hspace vspace"),c("iframe","longdesc frameborder marginwidth marginheight scrolling align"),c("font basefont","size color face"),c("input","usemap align"),c("select"),c("textarea"),c("h1 h2 h3 h4 h5 h6 div p legend caption","align"),c("ul","type compact"),c("li","type"),c("ol dl menu dir","compact"),c("pre","width xml:space"),c("hr","align noshade size width"),c("isindex","prompt"),c("table","summary width frame rules cellspacing cellpadding align bgcolor"),c("col","width align char charoff valign"),c("colgroup","width align char charoff valign"),c("thead","align char charoff valign"),c("tr","align char charoff valign bgcolor"),c("th","axis align char charoff valign nowrap bgcolor width height"),c("form","accept"),c("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),c("tfoot","align char charoff valign"),c("tbody","align char charoff valign"),c("area","nohref"),c("body","background bgcolor text link vlink alink")),"html4"!==t&&(c("input button select textarea","autofocus"),c("input textarea","placeholder"),c("a","download"),c("link script img","crossorigin"),c("img","loading"),c("iframe","sandbox seamless allowfullscreen loading")),nr(ar("a form meter progress dfn"),function(t){u[t]&&delete u[t].children[t]}),delete u.caption.children.table,delete u.script,Zn[t]=u,u)},sr=function(t,e){var n;return t&&(n={},"string"==typeof t&&(t={"*":t}),nr(t,function(t,r){n[r]=n[r.toUpperCase()]="map"===e?er(t,/[, ]/):or(t,/[, ]/)})),n};function cr(t){var e,n,r,o,i,a,u,s,c,l,f,d,h,m={},p={},g=[],v={},b={},y=function(e,n,r){var o=t[e];return o?o=er(o,/[, ]/,er(o.toUpperCase(),/[, ]/)):(o=Zn[e])||(o=er(n," ",er(n.toUpperCase()," ")),o=rr(o,r),Zn[e]=o),o};r=ur((t=t||{}).schema),!1===t.verify_html&&(t.valid_elements="*[*]"),e=sr(t.valid_styles),n=sr(t.invalid_styles,"map"),s=sr(t.valid_classes,"map"),o=y("whitespace_elements","pre script noscript style textarea video audio iframe object code"),i=y("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=y("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),u=y("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),l=y("non_empty_elements","td th iframe video audio object script pre code",a),f=y("move_caret_before_on_enter_elements","table",l),d=y("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"),c=y("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",d),h=y("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),nr((t.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(t){b[t]=new RegExp("</"+t+"[^>]*>","gi")});var x=function(t){return new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$")},w=function(t){var e,n,r,o,i,a,u,s,c,l,f,d,h,p,v,b,y,w,C,_=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,S=/[*?+]/;if(t)for(t=ar(t,","),m["@"]&&(b=m["@"].attributes,y=m["@"].attributesOrder),e=0,n=t.length;e<n;e++)if(i=_.exec(t[e])){if(p=i[1],c=i[2],v=i[3],s=i[5],a={attributes:d={},attributesOrder:h=[]},"#"===p&&(a.paddEmpty=!0),"-"===p&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),b){for(w in b)d[w]=b[w];h.push.apply(h,y)}if(s)for(r=0,o=(s=ar(s,"|")).length;r<o;r++)if(i=k.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),p=i[3],C=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f){delete d[l],h.splice(ir(h,l),1);continue}p&&("="===p&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:l,value:C}),u.defaultValue=C),":"===p&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:l,value:C}),u.forcedValue=C),"<"===p&&(u.validValues=er(C,"?"))),S.test(l)?(a.attributePatterns=a.attributePatterns||[],u.pattern=x(l),a.attributePatterns.push(u)):(d[l]||h.push(l),d[l]=u)}b||"@"!==c||(b=d,y=h),v&&(a.outputName=c,m[v]=a),S.test(c)?(a.pattern=x(c),g.push(a)):m[c]=a}},C=function(t){m={},g=[],w(t),nr(r,function(t,e){p[e]=t.children})},_=function(t){var e=/^(~)?(.+)$/;t&&(Zn.text_block_elements=Zn.block_elements=null,nr(ar(t,","),function(t){var n=e.exec(t),r="~"===n[1],o=r?"span":"div",i=n[2];if(p[i]=p[o],v[i]=o,r||(c[i.toUpperCase()]={},c[i]={}),!m[i]){var a=m[o];delete(a=rr({},a)).removeEmptyAttrs,delete a.removeEmpty,m[i]=a}nr(p,function(t,e){t[o]&&(p[e]=t=rr({},p[e]),t[i]=t[o])})}))},k=function(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;Zn[t.schema]=null,e&&nr(ar(e,","),function(t){var e,r,o=n.exec(t);o&&(r=o[1],e=r?p[o[2]]:p[o[2]]={"#comment":{}},e=p[o[2]],nr(ar(o[3],"|"),function(t){"-"===r?delete e[t]:e[t]={}}))})},S=function(t){var e,n=m[t];if(n)return n;for(e=g.length;e--;)if((n=g[e]).pattern.test(t))return n};return t.valid_elements?C(t.valid_elements):(nr(r,function(t,e){m[e]={attributes:t.attributes,attributesOrder:t.attributesOrder},p[e]=t.children}),"html5"!==t.schema&&nr(ar("strong/b em/i"),function(t){t=ar(t,"/"),m[t[1]].outputName=t[0]}),nr(ar("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(t){m[t]&&(m[t].removeEmpty=!0)}),nr(ar("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(t){m[t].paddEmpty=!0}),nr(ar("span"),function(t){m[t].removeEmptyAttrs=!0})),_(t.custom_elements),k(t.valid_children),w(t.extended_valid_elements),k("+ol[ul|ol],+ul[ul|ol]"),nr({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,e){m[e]&&(m[e].parentsRequired=ar(t))}),t.invalid_elements&&nr(or(t.invalid_elements),function(t){m[t]&&delete m[t]}),S("span")||w("span[!data-mce-type|*]"),{children:p,elements:m,getValidStyles:function(){return e},getValidClasses:function(){return s},getBlockElements:function(){return c},getInvalidStyles:function(){return n},getShortEndedElements:function(){return a},getTextBlockElements:function(){return d},getTextInlineElements:function(){return h},getBoolAttrs:function(){return u},getElementRule:S,getSelfClosingElements:function(){return i},getNonEmptyElements:function(){return l},getMoveCaretBeforeOnEnterElements:function(){return f},getWhiteSpaceElements:function(){return o},getSpecialElements:function(){return b},isValidChild:function(t,e){var n=p[t.toLowerCase()];return!(!n||!n[e.toLowerCase()])},isValid:function(t,e){var n,r,o=S(t);if(o){if(!e)return!0;if(o.attributes[e])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(t))return!0}return!1},getCustomElements:function(){return v},addValidElements:w,setValidElements:C,addCustomElements:_,addValidChildren:k}}var lr,fr,dr,hr,mr,pr,gr,vr,br,yr,xr,wr,Cr,_r,kr,Sr,Tr,Er,Or=function(t,e,n,r){var o=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+o(e)+o(n)+o(r)},Dr=function(t,e){var n,r,o,i,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,u=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,s=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,l={};for(t=t||{},e&&(o=e.getValidStyles(),i=e.getInvalidStyles()),r="\\\" \\' \\; \\: ; : \ufeff".split(" "),n=0;n<r.length;n++)l[r[n]]="\ufeff"+n,l["\ufeff"+n]=r[n];return{toHex:function(t){return t.replace(a,Or)},parse:function(e){var r,o,i,f,d,h,m,p={},g=t.url_converter,v=t.url_converter_scope||this,b=function(t,e,r){var o,i,a,u;if((o=p[t+"-top"+e])&&(i=p[t+"-right"+e])&&(a=p[t+"-bottom"+e])&&(u=p[t+"-left"+e])){var s=[o,i,a,u];for(n=s.length-1;n--&&s[n]===s[n+1];);n>-1&&r||(p[t+e]=-1===n?s[0]:s.join(" "),delete p[t+"-top"+e],delete p[t+"-right"+e],delete p[t+"-bottom"+e],delete p[t+"-left"+e])}},y=function(t){var e,n=p[t];if(n){for(e=(n=n.split(" ")).length;e--;)if(n[e]!==n[0])return!1;return p[t]=n[0],!0}},x=function(t){return f=!0,l[t]},w=function(t,e){return f&&(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))},_=function(t){return t.replace(/\\[0-9a-f]+/gi,C)},k=function(e,n,r,o,i,a){if(i=i||a)return"'"+(i=w(i)).replace(/\'/g,"\\'")+"'";if(n=w(n||r||o),!t.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!t.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return g&&(n=g.call(v,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,x).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(t){return t.replace(/[;:]/g,x)});r=s.exec(e);)if(s.lastIndex=r.index+r[0].length,o=r[1].replace(c,"").toLowerCase(),i=r[2].replace(c,""),o&&i){if(o=_(o),i=_(i),-1!==o.indexOf("\ufeff")||-1!==o.indexOf('"'))continue;if(!t.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(i)))continue;"font-weight"===o&&"700"===i?i="bold":"color"!==o&&"background-color"!==o||(i=i.toLowerCase()),i=(i=i.replace(a,Or)).replace(u,k),p[o]=f?w(i,!0):i}b("border","",!0),b("border","-width"),b("border","-color"),b("border","-style"),b("padding",""),b("margin",""),"border",h="border-style",m="border-color",y(d="border-width")&&y(h)&&y(m)&&(p.border=p[d]+" "+p[h]+" "+p[m],delete p[d],delete p[h],delete p[m]),"medium none"===p.border&&delete p.border,"none"===p["border-image"]&&delete p["border-image"]}return p},serialize:function(t,e){var n,r,a="",u=function(e){var n,r,i,u;if(n=o[e])for(r=0,i=n.length;r<i;r++)e=n[r],(u=t[e])&&(a+=(a.length>0?" ":"")+e+": "+u+";")},s=function(t,e){var n;return!((n=i["*"])&&n[t]||(n=i[e])&&n[t])};if(e&&o)u("*"),u(e);else for(n in t)!(r=t[n])||i&&!s(n,e)||(a+=(a.length>0?" ":"")+n+": "+r+";");return a}}},Nr="mce-data-",Ar=/^(?:mouse|contextmenu)|click/,Mr={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1,mozPressure:1},Ir=function(){return!1},zr=function(){return!0},Br=function(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent&&t.attachEvent("on"+e,n)},Rr=function(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent&&t.detachEvent("on"+e,n)},Pr=function(t,e){var r,o=e||{};for(r in t)Mr[r]||(o[r]=t[r]);if(o.target||(o.target=o.srcElement||n.document),yn.experimentalShadowDom&&(o.target=function(t,e){if(t.composedPath){var n=t.composedPath();if(n&&n.length>0)return n[0]}return e}(t,o.target)),t&&Ar.test(t.type)&&void 0===t.pageX&&void 0!==t.clientX){var i=o.target.ownerDocument||n.document,a=i.documentElement,u=i.body;o.pageX=t.clientX+(a&&a.scrollLeft||u&&u.scrollLeft||0)-(a&&a.clientLeft||u&&u.clientLeft||0),o.pageY=t.clientY+(a&&a.scrollTop||u&&u.scrollTop||0)-(a&&a.clientTop||u&&u.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=zr,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=zr,t&&(t.stopPropagation?t.stopPropagation():t.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=zr,o.stopPropagation()},!1===function(t){return t.isDefaultPrevented===zr||t.isDefaultPrevented===Ir}(o)&&(o.isDefaultPrevented=Ir,o.isPropagationStopped=Ir,o.isImmediatePropagationStopped=Ir),void 0===o.metaKey&&(o.metaKey=!1),o},Lr=function(t,e,n){var r=t.document,o={type:"ready"};if(n.domLoaded)e(o);else{var i=function r(){Rr(t,"DOMContentLoaded",r),Rr(t,"load",r),n.domLoaded||(n.domLoaded=!0,e(o))};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():Br(t,"DOMContentLoaded",i),Br(t,"load",i)}},Hr=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Nr+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in n.document.documentElement,this.hasFocusIn="onfocusin"in n.document.documentElement,this.count=1}return t.prototype.bind=function(t,e,r,o){var i,a,u,s,c,l,f,d=this,h=n.window,m=function(t){d.executeHandlers(Pr(t||h.event),i)};if(t&&3!==t.nodeType&&8!==t.nodeType){t[d.expando]?i=t[d.expando]:(i=d.count++,t[d.expando]=i,d.events[i]={}),o=o||t;var p=e.split(" ");for(u=p.length;u--;)l=m,c=f=!1,"DOMContentLoaded"===(s=p[u])&&(s="ready"),d.domLoaded&&"ready"===s&&"complete"===t.readyState?r.call(o,Pr({type:s})):(d.hasMouseEnterLeave||(c=d.mouseEnterLeave[s])&&(l=function(t){var e,n;if(e=t.currentTarget,(n=t.relatedTarget)&&e.contains)n=e.contains(n);else for(;n&&n!==e;)n=n.parentNode;n||((t=Pr(t||h.event)).type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=e,d.executeHandlers(t,i))}),d.hasFocusIn||"focusin"!==s&&"focusout"!==s||(f=!0,c="focusin"===s?"focus":"blur",l=function(t){(t=Pr(t||h.event)).type="focus"===t.type?"focusin":"focusout",d.executeHandlers(t,i)}),(a=d.events[i][s])?"ready"===s&&d.domLoaded?r(Pr({type:s})):a.push({func:r,scope:o}):(d.events[i][s]=a=[{func:r,scope:o}],a.fakeName=c,a.capture=f,a.nativeHandler=l,"ready"===s?Lr(t,l,d):Br(t,c||s,l,f)));return t=a=0,r}},t.prototype.unbind=function(t,e,n){var r,o,i,a,u,s;if(!t||3===t.nodeType||8===t.nodeType)return this;if(r=t[this.expando]){if(s=this.events[r],e){var c=e.split(" ");for(i=c.length;i--;)if(o=s[u=c[i]]){if(n)for(a=o.length;a--;)if(o[a].func===n){var l=o.nativeHandler,f=o.fakeName,d=o.capture;(o=o.slice(0,a).concat(o.slice(a+1))).nativeHandler=l,o.fakeName=f,o.capture=d,s[u]=o}n&&0!==o.length||(delete s[u],Rr(t,o.fakeName||u,o.nativeHandler,o.capture))}}else{for(u in s)o=s[u],Rr(t,o.fakeName||u,o.nativeHandler,o.capture);s={}}for(u in s)return this;delete this.events[r];try{delete t[this.expando]}catch(e){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=Pr(null,n);o.type=e,o.target=t;do{(r=t[this.expando])&&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)for(this.unbind(t),e=(n=t.getElementsByTagName("*")).length;e--;)(t=n[e])[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,r,o,i,a=this.events[e];if(n=a&&a[t.type])for(r=0,o=n.length;r<o;r++)if((i=n[r])&&!1===i.func.call(i.scope,t)&&t.preventDefault(),t.isImmediatePropagationStopped())return},t.Event=new t,t}(),Fr="sizzle"+-new Date,Vr=n.window.document,jr=0,Ur=0,Wr=ko(),qr=ko(),Yr=ko(),$r=function(t,e){return t===e&&(xr=!0),0},Gr="undefined",Kr=1<<31,Xr={}.hasOwnProperty,Jr=[],Qr=Jr.pop,Zr=Jr.push,to=Jr.push,eo=Jr.slice,no=Jr.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},ro="[\\x20\\t\\r\\n\\f]",oo="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",io="\\["+ro+"*("+oo+")(?:"+ro+"*([*^$|!~]?=)"+ro+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+oo+"))|)"+ro+"*\\]",ao=":("+oo+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+io+")*)|.*)\\)|)",uo=new RegExp("^"+ro+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ro+"+$","g"),so=new RegExp("^"+ro+"*,"+ro+"*"),co=new RegExp("^"+ro+"*([>+~]|"+ro+")"+ro+"*"),lo=new RegExp("="+ro+"*([^\\]'\"]*?)"+ro+"*\\]","g"),fo=new RegExp(ao),ho=new RegExp("^"+oo+"$"),mo={ID:new RegExp("^#("+oo+")"),CLASS:new RegExp("^\\.("+oo+")"),TAG:new RegExp("^("+oo+"|[*])"),ATTR:new RegExp("^"+io),PSEUDO:new RegExp("^"+ao),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ro+"*(even|odd|(([+-]|)(\\d*)n|)"+ro+"*(?:([+-]|)"+ro+"*(\\d+)|))"+ro+"*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^"+ro+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ro+"*((?:-\\d)?\\d*)"+ro+"*\\)|)(?=[^-]|$)","i")},po=/^(?:input|select|textarea|button)$/i,go=/^h\d$/i,vo=/^[^{]+\{\s*\[native \w/,bo=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yo=/[+~]/,xo=/'|\\/g,wo=new RegExp("\\\\([\\da-f]{1,6}"+ro+"?|("+ro+")|.)","ig"),Co=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{to.apply(Jr=eo.call(Vr.childNodes),Vr.childNodes),Jr[Vr.childNodes.length].nodeType}catch(t){to={apply:Jr.length?function(t,e){Zr.apply(t,eo.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}var _o=function(t,e,n,r){var o,i,a,u,s,c,l,f,d,h;if((e?e.ownerDocument||e:Vr)!==Cr&&wr(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(u=(e=e||Cr).nodeType)&&9!==u)return[];if(kr&&!r){if(o=bo.exec(t))if(a=o[1]){if(9===u){if(!(i=e.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(e.ownerDocument&&(i=e.ownerDocument.getElementById(a))&&Er(e,i)&&i.id===a)return n.push(i),n}else{if(o[2])return to.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&fr.getElementsByClassName)return to.apply(n,e.getElementsByClassName(a)),n}if(fr.qsa&&(!Sr||!Sr.test(t))){if(f=l=Fr,d=e,h=9===u&&t,1===u&&"object"!==e.nodeName.toLowerCase()){for(c=pr(t),(l=e.getAttribute("id"))?f=l.replace(xo,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+Mo(c[s]);d=yo.test(t)&&No(e.parentNode)||e,h=c.join(",")}if(h)try{return to.apply(n,d.querySelectorAll(h)),n}catch(t){}finally{l||e.removeAttribute("id")}}}return vr(t.replace(uo,"$1"),e,n,r)};function ko(){var t=[];return function e(n,r){return t.push(n+" ")>dr.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function So(t){return t[Fr]=!0,t}function To(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Kr)-(~t.sourceIndex||Kr);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function Eo(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function Oo(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function Do(t){return So(function(e){return e=+e,So(function(n,r){for(var o,i=t([],n.length,e),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function No(t){return t&&_typeof(t.getElementsByTagName)!==Gr&&t}for(lr in fr=_o.support={},mr=_o.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},wr=_o.setDocument=function(t){var e,n=t?t.ownerDocument||t:Vr,r=n.defaultView;return n!==Cr&&9===n.nodeType&&n.documentElement?(Cr=n,_r=n.documentElement,kr=!mr(n),r&&r!==function(t){try{return t.top}catch(t){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",function(){wr()},!1):r.attachEvent&&r.attachEvent("onunload",function(){wr()})),fr.attributes=!0,fr.getElementsByTagName=!0,fr.getElementsByClassName=vo.test(n.getElementsByClassName),fr.getById=!0,dr.find.ID=function(t,e){if(_typeof(e.getElementById)!==Gr&&kr){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},dr.filter.ID=function(t){var e=t.replace(wo,Co);return function(t){return t.getAttribute("id")===e}},dr.find.TAG=fr.getElementsByTagName?function(t,e){if(_typeof(e.getElementsByTagName)!==Gr)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},dr.find.CLASS=fr.getElementsByClassName&&function(t,e){if(kr)return e.getElementsByClassName(t)},Tr=[],Sr=[],fr.disconnectedMatch=!0,Sr=Sr.length&&new RegExp(Sr.join("|")),Tr=Tr.length&&new RegExp(Tr.join("|")),e=vo.test(_r.compareDocumentPosition),Er=e||vo.test(_r.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)for(;e=e.parentNode;)if(e===t)return!0;return!1},$r=e?function(t,e){if(t===e)return xr=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!fr.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===Vr&&Er(Vr,t)?-1:e===n||e.ownerDocument===Vr&&Er(Vr,e)?1:yr?no.call(yr,t)-no.call(yr,e):0:4&r?-1:1)}:function(t,e){if(t===e)return xr=!0,0;var r,o=0,i=t.parentNode,a=e.parentNode,u=[t],s=[e];if(!i||!a)return t===n?-1:e===n?1:i?-1:a?1:yr?no.call(yr,t)-no.call(yr,e):0;if(i===a)return To(t,e);for(r=t;r=r.parentNode;)u.unshift(r);for(r=e;r=r.parentNode;)s.unshift(r);for(;u[o]===s[o];)o++;return o?To(u[o],s[o]):u[o]===Vr?-1:s[o]===Vr?1:0},n):Cr},_o.matches=function(t,e){return _o(t,null,null,e)},_o.matchesSelector=function(t,e){if((t.ownerDocument||t)!==Cr&&wr(t),e=e.replace(lo,"='$1']"),fr.matchesSelector&&kr&&(!Tr||!Tr.test(e))&&(!Sr||!Sr.test(e)))try{var n=(void 0).call(t,e);if(n||fr.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return _o(e,Cr,null,[t]).length>0},_o.contains=function(t,e){return(t.ownerDocument||t)!==Cr&&wr(t),Er(t,e)},_o.attr=function(t,e){(t.ownerDocument||t)!==Cr&&wr(t);var n=dr.attrHandle[e.toLowerCase()],r=n&&Xr.call(dr.attrHandle,e.toLowerCase())?n(t,e,!kr):void 0;return void 0!==r?r:fr.attributes||!kr?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},_o.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},_o.uniqueSort=function(t){var e,n=[],r=0,o=0;if(xr=!fr.detectDuplicates,yr=!fr.sortStable&&t.slice(0),t.sort($r),xr){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return yr=null,t},hr=_o.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+=hr(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=hr(e);return n},(dr=_o.selectors={cacheLength:50,createPseudo:So,match:mo,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(wo,Co),t[3]=(t[3]||t[4]||t[5]||"").replace(wo,Co),"~="===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]||_o.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]&&_o.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return mo.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&fo.test(n)&&(e=pr(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(wo,Co).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=Wr[t+" "];return e||(e=new RegExp("(^|"+ro+")"+t+"("+ro+"|$)"))&&Wr(t,function(t){return e.test("string"==typeof t.className&&t.className||_typeof(t.getAttribute)!==Gr&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var o=_o.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),a="last"!==t.slice(-4),u="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,s){var c,l,f,d,h,m,p=i!==a?"nextSibling":"previousSibling",g=e.parentNode,v=u&&e.nodeName.toLowerCase(),b=!s&&!u;if(g){if(i){for(;p;){for(f=e;f=f[p];)if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;m=p="only"===t&&!m&&"nextSibling"}return!0}if(m=[a?g.firstChild:g.lastChild],a&&b){for(h=(c=(l=g[Fr]||(g[Fr]={}))[t]||[])[0]===jr&&c[1],d=c[0]===jr&&c[2],f=h&&g.childNodes[h];f=++h&&f&&f[p]||(d=h=0)||m.pop();)if(1===f.nodeType&&++d&&f===e){l[t]=[jr,h,d];break}}else if(b&&(c=(e[Fr]||(e[Fr]={}))[t])&&c[0]===jr)d=c[1];else for(;(f=++h&&f&&f[p]||(d=h=0)||m.pop())&&((u?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[Fr]||(f[Fr]={}))[t]=[jr,d]),f!==e)););return(d-=o)===r||d%r==0&&d/r>=0}}},PSEUDO:function(t,e){var n,r=dr.pseudos[t]||dr.setFilters[t.toLowerCase()]||_o.error("unsupported pseudo: "+t);return r[Fr]?r(e):r.length>1?(n=[t,t,"",e],dr.setFilters.hasOwnProperty(t.toLowerCase())?So(function(t,n){for(var o,i=r(t,e),a=i.length;a--;)t[o=no.call(t,i[a])]=!(n[o]=i[a])}):function(t){return r(t,0,n)}):r}},pseudos:{not:So(function(t){var e=[],n=[],r=gr(t.replace(uo,"$1"));return r[Fr]?So(function(t,e,n,o){for(var i,a=r(t,null,o,[]),u=t.length;u--;)(i=a[u])&&(t[u]=!(e[u]=i))}):function(t,o,i){return e[0]=t,r(e,null,i,n),!n.pop()}}),has:So(function(t){return function(e){return _o(t,e).length>0}}),contains:So(function(t){return t=t.replace(wo,Co),function(e){return(e.textContent||e.innerText||hr(e)).indexOf(t)>-1}}),lang:So(function(t){return ho.test(t||"")||_o.error("unsupported lang: "+t),t=t.replace(wo,Co).toLowerCase(),function(e){var n;do{if(n=kr?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(t){var e=n.window.location&&n.window.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===_r},focus:function(t){return t===Cr.activeElement&&(!Cr.hasFocus||Cr.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!dr.pseudos.empty(t)},header:function(t){return go.test(t.nodeName)},input:function(t){return po.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:Do(function(){return[0]}),last:Do(function(t,e){return[e-1]}),eq:Do(function(t,e,n){return[n<0?n+e:n]}),even:Do(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:Do(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:Do(function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t}),gt:Do(function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t})}}).pseudos.nth=dr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})dr.pseudos[lr]=Eo(lr);for(lr in{submit:!0,reset:!0})dr.pseudos[lr]=Oo(lr);function Ao(){}function Mo(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Io(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=Ur++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,a){var u,s,c=[jr,i];if(a){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,a))return!0}else for(;e=e[r];)if(1===e.nodeType||o){if((u=(s=e[Fr]||(e[Fr]={}))[r])&&u[0]===jr&&u[1]===i)return c[2]=u[2];if(s[r]=c,c[2]=t(e,n,a))return!0}}}function zo(t){return t.length>1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function Bo(t,e,n,r,o){for(var i,a=[],u=0,s=t.length,c=null!=e;u<s;u++)(i=t[u])&&(n&&!n(i,r,o)||(a.push(i),c&&e.push(u)));return a}function Ro(t,e,n,r,o,i){return r&&!r[Fr]&&(r=Ro(r)),o&&!o[Fr]&&(o=Ro(o,i)),So(function(i,a,u,s){var c,l,f,d=[],h=[],m=a.length,p=i||function(t,e,n){for(var r=0,o=e.length;r<o;r++)_o(t,e[r],n);return n}(e||"*",u.nodeType?[u]:u,[]),g=!t||!i&&e?p:Bo(p,d,t,u,s),v=n?o||(i?t:m||r)?[]:a:g;if(n&&n(g,v,u,s),r)for(c=Bo(v,h),r(c,[],u,s),l=c.length;l--;)(f=c[l])&&(v[h[l]]=!(g[h[l]]=f));if(i){if(o||t){if(o){for(c=[],l=v.length;l--;)(f=v[l])&&c.push(g[l]=f);o(null,v=[],c,s)}for(l=v.length;l--;)(f=v[l])&&(c=o?no.call(i,f):d[l])>-1&&(i[c]=!(a[c]=f))}}else v=Bo(v===a?v.splice(m,v.length):v),o?o(null,a,v,s):to.apply(a,v)})}function Po(t){for(var e,n,r,o=t.length,i=dr.relative[t[0].type],a=i||dr.relative[" "],u=i?1:0,s=Io(function(t){return t===e},a,!0),c=Io(function(t){return no.call(e,t)>-1},a,!0),l=[function(t,n,r){return!i&&(r||n!==br)||((e=n).nodeType?s(t,n,r):c(t,n,r))}];u<o;u++)if(n=dr.relative[t[u].type])l=[Io(zo(l),n)];else{if((n=dr.filter[t[u].type].apply(null,t[u].matches))[Fr]){for(r=++u;r<o&&!dr.relative[t[r].type];r++);return Ro(u>1&&zo(l),u>1&&Mo(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(uo,"$1"),n,u<r&&Po(t.slice(u,r)),r<o&&Po(t=t.slice(r)),r<o&&Mo(t))}l.push(n)}return zo(l)}Ao.prototype=dr.filters=dr.pseudos,dr.setFilters=new Ao,pr=_o.tokenize=function(t,e){var n,r,o,i,a,u,s,c=qr[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],s=dr.preFilter;a;){for(i in n&&!(r=so.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=co.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(uo," ")}),a=a.slice(n.length)),dr.filter)dr.filter.hasOwnProperty(i)&&(!(r=mo[i].exec(a))||s[i]&&!(r=s[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return e?a.length:a?_o.error(t):qr(t,u).slice(0)},gr=_o.compile=function(t,e){var n,r=[],o=[],i=Yr[t+" "];if(!i){for(e||(e=pr(t)),n=e.length;n--;)(i=Po(e[n]))[Fr]?r.push(i):o.push(i);(i=Yr(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,i,a,u,s){var c,l,f,d=0,h="0",m=o&&[],p=[],g=br,v=o||r&&dr.find.TAG("*",s),b=jr+=null==g?1:Math.random()||.1,y=v.length;for(s&&(br=i!==Cr&&i);h!==y&&null!=(c=v[h]);h++){if(r&&c){for(l=0;f=t[l++];)if(f(c,i,a)){u.push(c);break}s&&(jr=b)}n&&((c=!f&&c)&&d--,o&&m.push(c))}if(d+=h,n&&h!==d){for(l=0;f=e[l++];)f(m,p,i,a);if(o){if(d>0)for(;h--;)m[h]||p[h]||(p[h]=Qr.call(u));p=Bo(p)}to.apply(u,p),s&&!o&&p.length>0&&d+e.length>1&&_o.uniqueSort(u)}return s&&(jr=b,br=g),m};return n?So(o):o}(o,r))).selector=t}return i},vr=_o.select=function(t,e,n,r){var o,i,a,u,s,c="function"==typeof t&&t,l=!r&&pr(t=c.selector||t);if(n=n||[],1===l.length){if((i=l[0]=l[0].slice(0)).length>2&&"ID"===(a=i[0]).type&&fr.getById&&9===e.nodeType&&kr&&dr.relative[i[1].type]){if(!(e=(dr.find.ID(a.matches[0].replace(wo,Co),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(i.shift().value.length)}for(o=mo.needsContext.test(t)?0:i.length;o--&&(a=i[o],!dr.relative[u=a.type]);)if((s=dr.find[u])&&(r=s(a.matches[0].replace(wo,Co),yo.test(i[0].type)&&No(e.parentNode)||e))){if(i.splice(o,1),!(t=r.length&&Mo(i)))return to.apply(n,r),n;break}}return(c||gr(t,l))(r,e,!kr,n,yo.test(t)&&No(e.parentNode)||e),n},fr.sortStable=Fr.split("").sort($r).join("")===Fr,fr.detectDuplicates=!!xr,wr(),fr.sortDetached=!0;var Lo=n.document,Ho=Array.prototype.push,Fo=Array.prototype.slice,Vo=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,jo=Hr.Event,Uo=En.makeMap("children,contents,next,prev"),Wo=function(t){return void 0!==t},qo=function(t){return"string"==typeof t},Yo=function(t,e){var n,r,o;for(o=(e=e||Lo).createElement("div"),n=e.createDocumentFragment(),o.innerHTML=t;r=o.firstChild;)n.appendChild(r);return n},$o=function t(e,n,r,o){var i;if(qo(n))n=Yo(n,ui(e[0]));else if(n.length&&!n.nodeType){if(n=fi.makeArray(n),o)for(i=n.length-1;i>=0;i--)t(e,n[i],r,o);else for(i=0;i<n.length;i++)t(e,n[i],r,o);return e}if(n.nodeType)for(i=e.length;i--;)r.call(e[i],n);return e},Go=function(t,e){return t&&e&&-1!==(" "+t.className+" ").indexOf(" "+e+" ")},Ko=function(t,e,n){var r,o;return e=fi(e)[0],t.each(function(){n&&r===this.parentNode?o.appendChild(this):(r=this.parentNode,o=e.cloneNode(!1),this.parentNode.insertBefore(o,this),o.appendChild(this))}),t},Xo=En.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Jo=En.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),Qo={for:"htmlFor",class:"className",readonly:"readOnly"},Zo={float:"cssFloat"},ti={},ei={},ni=function(t,e){return new fi.fn.init(t,e)},ri=/^\s*|\s*$/g,oi=function(t){return null==t?"":(""+t).replace(ri,"")},ii=function(t,e){var n,r,o,i;if(t)if(void 0===(n=t.length)){for(r in t)if(t.hasOwnProperty(r)&&(i=t[r],!1===e.call(i,r,i)))break}else for(o=0;o<n&&(i=t[o],!1!==e.call(i,o,i));o++);return t},ai=function(t,e){var n=[];return ii(t,function(t,r){e(r,t)&&n.push(r)}),n},ui=function(t){return t?9===t.nodeType?t:t.ownerDocument:Lo};ni.fn=ni.prototype={constructor:ni,selector:"",context:null,length:0,init:function(t,e){var r,o;if(!t)return this;if(t.nodeType)return this.context=this[0]=t,this.length=1,this;if(e&&e.nodeType)this.context=e;else{if(e)return fi(t).attr(e);this.context=e=n.document}if(qo(t)){if(this.selector=t,!(r="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Vo.exec(t)))return fi(e).find(t);if(r[1])for(o=Yo(t,ui(e)).firstChild;o;)Ho.call(this,o),o=o.nextSibling;else{if(!(o=ui(e).getElementById(r[2])))return this;if(o.id!==r[2])return this.find(t);this.length=1,this[0]=o}}else this.add(t,!1);return this},toArray:function(){return En.toArray(this)},add:function(t,e){var n,r;if(qo(t))return this.add(fi(t));if(!1!==e)for(n=fi.unique(this.toArray().concat(fi.makeArray(t))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else Ho.apply(this,fi.makeArray(t));return this},attr:function(t,e){var n,r=this;if("object"==_typeof(t))ii(t,function(t,e){r.attr(t,e)});else{if(!Wo(e)){if(r[0]&&1===r[0].nodeType){if((n=ti[t])&&n.get)return n.get(r[0],t);if(Jo[t])return r.prop(t)?t:void 0;null===(e=r[0].getAttribute(t,2))&&(e=void 0)}return e}this.each(function(){var n;if(1===this.nodeType){if((n=ti[t])&&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("object"==_typeof(t=Qo[t]||t))ii(t,function(t,e){n.prop(t,e)});else{if(!Wo(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()})},a=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t})};if("object"==_typeof(t))ii(t,function(t,e){o.css(t,e)});else if(Wo(e))t=i(t),"number"!=typeof e||Xo[t]||(e=e.toString()+"px"),o.each(function(){var n=this.style;if((r=ei[t])&&r.set)r.set(this,e);else{try{this.style[Zo[t]||t]=e}catch(t){}null!==e&&""!==e||(n.removeProperty?n.removeProperty(a(t)):n.removeAttribute(t))}});else{if(n=o[0],(r=ei[t])&&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(a(t))}catch(t){return}}return o},remove:function(){for(var t,e=this.length;e--;)t=this[e],jo.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var t,e=this.length;e--;)for(t=this[e];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(t){var e;if(Wo(t)){e=this.length;try{for(;e--;)this[e].innerHTML=t}catch(n){fi(this[e]).empty().append(t)}return this}return this[0]?this[0].innerHTML:""},text:function(t){var e;if(Wo(t)){for(e=this.length;e--;)"innerText"in this[e]?this[e].innerText=t:this[0].textContent=t;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return $o(this,arguments,function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)})},prepend:function(){return $o(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?$o(t,arguments,function(t){this.parentNode.insertBefore(t,this)}):t},after:function(){var t=this;return t[0]&&t[0].parentNode?$o(t,arguments,function(t){this.parentNode.insertBefore(t,this.nextSibling)},!0):t},appendTo:function(t){return fi(t).append(this),this},prependTo:function(t){return fi(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return Ko(this,t)},wrapAll:function(t){return Ko(this,t,!0)},wrapInner:function(t){return this.each(function(){fi(this).contents().wrapAll(t)}),this},unwrap:function(){return this.parent().each(function(){fi(this).replaceWith(this.childNodes)})},clone:function(){var t=[];return this.each(function(){t.push(this.cloneNode(!0))}),fi(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?n:(-1!==t.indexOf(" ")?ii(t.split(" "),function(){n.toggleClass(this,e)}):n.each(function(n,r){var o,i;(i=Go(r,t))!==e&&(o=r.className,i?r.className=oi((" "+o+" ").replace(" "+t+" "," ")):r.className+=o?" "+t:t)}),n)},hasClass:function(t){return Go(this[0],t)},each:function(t){return ii(this,t)},on:function(t,e){return this.each(function(){jo.bind(this,t,e)})},off:function(t,e){return this.each(function(){jo.unbind(this,t,e)})},trigger:function(t){return this.each(function(){"object"==_typeof(t)?jo.fire(this,t.type,t):jo.fire(this,t)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new fi(Fo.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++)fi.find(t,this[e],r);return fi(r)},filter:function(t){return fi("function"==typeof t?ai(this.toArray(),function(e,n){return t(n,e)}):fi.filter(t,this.toArray()))},closest:function(t){var e=[];return t instanceof fi&&(t=t[0]),this.each(function(n,r){for(;r;){if("string"==typeof t&&fi(r).is(t)){e.push(r);break}if(r===t){e.push(r);break}r=r.parentNode}}),fi(e)},offset:function(t){var e,n,r,o,i=0,a=0;return t?this.css(t):((e=this[0])&&(r=(n=e.ownerDocument).documentElement,e.getBoundingClientRect&&(i=(o=e.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:Ho,sort:Array.prototype.sort,splice:Array.prototype.splice},En.extend(ni,{extend:En.extend,makeArray:function(t){return(e=t)&&e===e.window||t.nodeType?[t]:En.toArray(t);var e},inArray:function(t,e){var n;if(e.indexOf)return e.indexOf(t);for(n=e.length;n--;)if(e[n]===t)return n;return-1},isArray:En.isArray,each:ii,trim:oi,grep:ai,find:_o,expr:_o.selectors,unique:_o.uniqueSort,text:_o.getText,contains:_o.contains,filter:function(t,e,n){var r=e.length;for(n&&(t=":not("+t+")");r--;)1!==e[r].nodeType&&e.splice(r,1);return 1===e.length?fi.find.matchesSelector(e[0],t)?[e[0]]:[]:fi.find.matches(t,e)}});var si=function(t,e,n){var r=[],o=t[e];for("string"!=typeof n&&n instanceof fi&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&fi(o).is(n))break}1===o.nodeType&&r.push(o),o=o[e]}return r},ci=function(t,e,n,r){var o=[];for(r instanceof fi&&(r=r[0]);t;t=t[e])if(!n||t.nodeType===n){if(void 0!==r){if(t===r)break;if("string"==typeof r&&fi(t).is(r))break}o.push(t)}return o},li=function(t,e,n){for(t=t[e];t;t=t[e])if(t.nodeType===n)return t;return null};ii({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return si(t,"parentNode")},next:function(t){return li(t,"nextSibling",1)},prev:function(t){return li(t,"previousSibling",1)},children:function(t){return ci(t.firstChild,"nextSibling",1)},contents:function(t){return En.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},function(t,e){ni.fn[t]=function(n){var r=[];this.each(function(){var t=e.call(r,this,n,r);t&&(fi.isArray(t)?r.push.apply(r,t):r.push(t))}),this.length>1&&(Uo[t]||(r=fi.unique(r)),0===t.indexOf("parents")&&(r=r.reverse()));var o=fi(r);return n?o.filter(n):o}}),ii({parentsUntil:function(t,e){return si(t,"parentNode",e)},nextUntil:function(t,e){return ci(t,"nextSibling",1,e).slice(1)},prevUntil:function(t,e){return ci(t,"previousSibling",1,e).slice(1)}},function(t,e){ni.fn[t]=function(n,r){var o=[];this.each(function(){var t=e.call(o,this,n,o);t&&(fi.isArray(t)?o.push.apply(o,t):o.push(t))}),this.length>1&&(o=fi.unique(o),0!==t.indexOf("parents")&&"prevUntil"!==t||(o=o.reverse()));var i=fi(o);return r?i.filter(r):i}}),ni.fn.is=function(t){return!!t&&this.filter(t).length>0},ni.fn.init.prototype=ni.fn,ni.overrideDefaults=function(t){var e,n=function n(r,o){return e=e||t(),0===arguments.length&&(r=e.element),o||(o=e.context),new n.fn.init(r,o)};return fi.extend(n,this),n},ni.attrHooks=ti,ni.cssHooks=ei;var fi=ni,di=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])return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},t.prototype.findPreviousNode=function(t,e,n,r){var o,i,a;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[e];a;a=a[e])if(!a[e])return a;return o}if((i=t.parentNode)&&i!==this.rootNode)return i}},t}(),hi=En.each,mi=En.grep,pi=yn.ie,gi=/^([a-z0-9],?)+$/i,vi=/^[ \t\r\n]*$/,bi=function(t,e,n){var r=e.keep_values,o={set:function(t,r,o){e.url_converter&&(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 t.serialize(t.parse(n),e[0].nodeName)}}};return r&&(i.href=i.src=o),i},yi=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)},xi=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};function wi(t,e){var r,u=this;void 0===e&&(e={});var s={},c=n.window,l={},f=0,d=function(t,e){void 0===e&&(e={});var r,u=0,s={};r=e.maxLoadTime||5e3;var c=function(e){t.getElementsByTagName("head")[0].appendChild(e)},l=function(o,i,a){var l,f,d,h,m=function(t){h.status=t,h.passed=[],h.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},p=function(){for(var t=h.passed,e=t.length;e--;)t[e]();m(2)},g=function(){for(var t=h.failed,e=t.length;e--;)t[e]();m(3)},v=function(t,e){t()||((new Date).getTime()-d<r?ln.setTimeout(e):g())},b=function e(){v(function(){for(var e,n,r=t.styleSheets,o=r.length;o--;)if((n=(e=r[o]).ownerNode?e.ownerNode:e.owningElement)&&n.id===l.id)return p(),!0},e)};if(o=En._addCacheSuffix(o),s[o]?h=s[o]:(h={passed:[],failed:[]},s[o]=h),i&&h.passed.push(i),a&&h.failed.push(a),1!==h.status)if(2!==h.status)if(3!==h.status){if(h.status=1,(l=t.createElement("link")).rel="stylesheet",l.type="text/css",l.id="u"+u++,l.async=!1,l.defer=!1,d=(new Date).getTime(),e.contentCssCors&&(l.crossOrigin="anonymous"),e.referrerPolicy&&Me(et.fromDom(l),"referrerpolicy",e.referrerPolicy),"onload"in l&&!((y=n.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(y[1],10)<536))l.onload=b,l.onerror=g;else{if(n.navigator.userAgent.indexOf("Firefox")>0)return(f=t.createElement("style")).textContent='@import "'+o+'"',function t(){v(function(){try{var t=f.sheet.cssRules;return p(),!!t}catch(t){}},t)}(),void c(f);b()}var y;c(l),l.href=o}else g();else p()},f=function(t){return tn.nu(function(e){l(t,o(e,i(on.value(t))),o(e,i(on.error(t))))})},d=function(t){return t.fold(a,a)};return{load:l,loadAll:function(t,e,n){en(D(t,f)).get(function(t){var r=A(t,function(t){return t.isValue()});r.fail.length>0?n(r.fail.map(d)):e(r.pass.map(d))})},_setReferrerPolicy:function(t){e.referrerPolicy=t}}}(t,{contentCssCors:e.contentCssCors,referrerPolicy:e.referrerPolicy}),h=[],m=e.schema?e.schema:cr({}),p=Dr({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope},e.schema),v=e.ownEvents?new Hr:Hr.Event,b=m.getBlockElements(),y=fi.overrideDefaults(function(){return{context:t,element:Y.getRoot()}}),x=function(e){if(e&&t&&"string"==typeof e){var n=t.getElementById(e);return n&&n.id!==e?t.getElementsByName(e)[1]:n}return e},w=function(t){return"string"==typeof t&&(t=x(t)),y(t)},C=function(t,e,n){var o,i,a=w(t);return a.length&&(i=(o=r[e])&&o.get?o.get(a,e):a.attr(e)),void 0===i&&(i=n||""),i},_=function(t){var e=x(t);return e?e.attributes:[]},k=function(t,n,o){var i,a;""===o&&(o=null);var u=w(t);i=u.attr(n),u.length&&((a=r[n])&&a.set?a.set(u,o,n):u.attr(n,o),i!==o&&e.onSetAttrib&&e.onSetAttrib({attrElm:u,attrName:n,attrValue:o}))},S=function(){return e.root_element||t.body},T=function(e,n){return je.getPos(t.body,x(e),n)},E=function(t,e,n){var r=w(t);return n?r.css(e):("float"===(e=e.replace(/-(\D)/g,function(t,e){return e.toUpperCase()}))&&(e=yn.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[e]:void 0)},O=function(t){var e,n;return t=x(t),e=E(t,"width"),n=E(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,e){var n;if(!t)return!1;if(!Array.isArray(t)){if("*"===e)return 1===t.nodeType;if(gi.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 _o(e,i[0].ownerDocument||i[0],null,i).length>0},M=function(t,e,n,r){var o,i=[],a=x(t);for(r=void 0===r,n=n||("BODY"!==S().nodeName?S().parentNode:null),En.is(e,"string")&&(o=e,e="*"===e?function(t){return 1===t.nodeType}:function(t){return N(t,o)});a&&a!==n&&a.nodeType&&9!==a.nodeType;){if(!e||"function"==typeof e&&e(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},I=function(t,e,n){var r=e;if(t)for("string"==typeof e&&(r=function(t){return N(t,e)}),t=t[n];t;t=t[n])if("function"==typeof r&&r(t))return t;return null},z=function(t,e,n){var r,o="string"==typeof t?x(t):t;if(!o)return!1;if(En.isArray(o)&&(o.length||0===o.length))return r=[],hi(o,function(t,o){t&&("string"==typeof t&&(t=x(t)),r.push(e.call(n,t,o)))}),r;var i=n||u;return e.call(i,o)},B=function(t,e){w(t).each(function(t,n){hi(e,function(t,e){k(n,e,t)})})},R=function(t,e){var n=w(t);pi?n.each(function(t,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+e,n.removeChild(n.firstChild)}catch(t){fi("<div></div>").html("<br>"+e).contents().slice(1).appendTo(n)}return e}}):n.html(e)},P=function(e,n,r,o,i){return z(e,function(e){var a="string"==typeof n?t.createElement(n):n;return B(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&R(a,o)),i?a:e.appendChild(a)})},L=function(e,n,r){return P(t.createElement(e),e,n,r,!0)},H=Qn.decode,F=Qn.encodeAllRaw,V=function(t,e){var n=w(t);return e?n.each(function(){for(var t;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,e,n){w(t).toggleClass(e,n).each(function(){""===this.className&&fi(this).attr("class",null)})},U=function(t,e,n){return z(e,function(e){return En.is(e,"array")&&(t=t.cloneNode(!0)),n&&hi(mi(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},W=function(){return t.createRange()},q=function(t){if(t&&De.isElement(t)){var e=t.getAttribute("data-mce-contenteditable");return e&&"inherit"!==e?e:"inherit"!==t.contentEditable?t.contentEditable:null}return null},Y={doc:t,settings:e,win:c,files:l,stdMode:!0,boxModel:!0,styleSheetLoader:d,boundEvents:h,styles:p,schema:m,events:v,isBlock:function(t){if("string"==typeof t)return!!b[t];if(t){var e=t.nodeType;if(e)return!(1!==e||!b[t.nodeName])}return!1},$:y,$$:w,root:null,clone:function(e,n){if(!pi||1!==e.nodeType||n)return e.cloneNode(n);if(!n){var r=t.createElement(e.nodeName);return hi(_(e),function(t){k(r,t.nodeName,C(e,t.nodeName))}),r}return null},getRoot:S,getViewPort:function(t){var e=ge(t);return{x:e.x(),y:e.y(),w:e.width(),h:e.height()}},getRect:function(t){var e,n;return t=x(t),e=T(t),n=O(t),{x:e.x,y:e.y,w:n.w,h:n.h}},getSize:O,getParent:function(t,e,n){var r=M(t,e,n,!1);return r&&r.length>0?r[0]:null},getParents:M,get:x,getNext:function(t,e){return I(t,e,"nextSibling")},getPrev:function(t,e){return I(t,e,"previousSibling")},select:function(n,r){return _o(n,x(r)||e.root_element||t,[])},is:N,add:P,create:L,createHTML:function(t,e,n){var r,o="";for(r in o+="<"+t,e)e.hasOwnProperty(r)&&null!==e[r]&&void 0!==e[r]&&(o+=" "+r+'="'+F(e[r])+'"');return void 0!==n?o+">"+n+"</"+t+">":o+" />"},createFragment:function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();for(e&&(r.innerHTML=e);n=r.firstChild;)o.appendChild(n);return o},remove:V,setStyle:function(t,n,r){var o=g(n)?w(t).css(n,r):w(t).css(n);e.update_styles&&yi(p,o)},getStyle:E,setStyles:function(t,n){var r=w(t).css(n);e.update_styles&&yi(p,r)},removeAllAttribs:function(t){return z(t,function(t){var e,n=t.attributes;for(e=n.length-1;e>=0;e--)t.removeAttributeNode(n.item(e))})},setAttrib:k,setAttribs:B,getAttrib:C,getPos:T,parseStyle:function(t){return p.parse(t)},serializeStyle:function(t,e){return p.serialize(t,e)},addStyle:function(e){var r,o;if(Y!==wi.DOM&&t===n.document){if(s[e])return;s[e]=!0}(o=t.getElementById("mceDefaultStyles"))||((o=t.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=t.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=e:o.appendChild(t.createTextNode(e))},loadCSS:function(r){var o;Y===wi.DOM||t!==n.document?(r||(r=""),o=t.getElementsByTagName("head")[0],hi(r.split(","),function(t){var n;t=En._addCacheSuffix(t),l[t]||(l[t]=!0,n=L("link",Z(Z({rel:"stylesheet",type:"text/css",href:t},e.contentCssCors?{crossOrigin:"anonymous"}:{}),e.referrerPolicy?{referrerPolicy:e.referrerPolicy}:{})),o.appendChild(n))})):wi.DOM.loadCSS(r)},addClass:function(t,e){w(t).addClass(e)},removeClass:function(t,e){j(t,e,!1)},hasClass:function(t,e){return w(t).hasClass(e)},toggleClass:j,show:function(t){w(t).show()},hide:function(t){w(t).hide()},isHidden:function(t){return"none"===w(t).css("display")},uniqueId:function(t){return(t||"mce_")+f++},setHTML:R,getOuterHTML:function(t){var e="string"==typeof t?x(t):t;return De.isElement(e)?e.outerHTML:fi("<div></div>").append(fi(e).clone()).html()},setOuterHTML:function(t,e){w(t).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=e)}catch(t){}V(fi(this).html(e),!0)})},decode:H,encode:F,insertAfter:function(t,e){var n=x(e);return z(t,function(t){var e,r;return e=n.parentNode,(r=n.nextSibling)?e.insertBefore(t,r):e.appendChild(t),t})},replace:U,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=L(e),hi(_(t),function(e){k(n,e.nodeName,C(t,e.nodeName))}),U(n,t,!0)),n||t},findCommonAncestor:function(t,e){for(var n,r=t;r;){for(n=e;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&t.ownerDocument?t.ownerDocument.documentElement:r},toHex:function(t){return p.toHex(En.trim(t))},run:z,getAttribs:_,isEmpty:function(t,e){var n,r,o,i,a=0;if(t=t.firstChild){var u=new di(t,t.parentNode),s=m?m.getWhiteSpaceElements():{};e=e||(m?m.getNonEmptyElements():null);do{if(o=t.nodeType,De.isElement(t)){var c=t.getAttribute("data-mce-bogus");if(c){t=u.next("all"===c);continue}if(i=t.nodeName.toLowerCase(),e&&e[i]){if("br"===i){a++,t=u.next();continue}return!1}for(n=(r=_(t)).length;n--;)if("name"===(i=r[n].nodeName)||"data-mce-bookmark"===i)return!1}if(8===o)return!1;if(3===o&&!vi.test(t.nodeValue))return!1;if(3===o&&t.parentNode&&s[t.parentNode.nodeName]&&vi.test(t.nodeValue))return!1;t=u.next()}while(t)}return a<=1},createRng:W,nodeIndex:xi,split:function(t,e,n){var r,o,i,a=W();if(t&&e)return a.setStart(t.parentNode,xi(t)),a.setEnd(e.parentNode,xi(e)),r=a.extractContents(),(a=W()).setStart(e.parentNode,xi(e)+1),a.setEnd(t.parentNode,xi(t)+1),o=a.extractContents(),(i=t.parentNode).insertBefore(Vn.trimNode(Y,r),t),n?i.insertBefore(n,t):i.insertBefore(e,t),i.insertBefore(Vn.trimNode(Y,o),t),V(t),n||e},bind:function n(r,o,i,a){if(En.isArray(r)){for(var u=r.length,s=[];u--;)s[u]=n(r[u],o,i,a);return s}return!e.collect||r!==t&&r!==c||h.push([r,o,i,a]),v.bind(r,o,i,a||Y)},unbind:function e(n,r,o){var i;if(En.isArray(n)){i=n.length;for(var a=[];i--;)a[i]=e(n[i],r,o);return a}if(h&&(n===t||n===c))for(i=h.length;i--;){var u=h[i];n!==u[0]||r&&r!==u[1]||o&&o!==u[2]||v.unbind(u[0],u[1],u[2])}return v.unbind(n,r,o)},fire:function(t,e,n){return v.fire(t,e,n)},getContentEditable:q,getContentEditableParent:function(t){for(var e=S(),n=null;t&&t!==e&&null===(n=q(t));t=t.parentNode);return n},destroy:function(){if(h)for(var t=h.length;t--;){var e=h[t];v.unbind(e[0],e[1],e[2])}_o.setDocument&&_o.setDocument()},isChildOf:function(t,e){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},dumpRng:function(t){return"startContainer: "+t.startContainer.nodeName+", startOffset: "+t.startOffset+", endContainer: "+t.endContainer.nodeName+", endOffset: "+t.endOffset}};return r=bi(p,e,function(){return Y}),Y}!function(t){t.DOM=t(n.document),t.nodeIndex=xi}(wi||(wi={}));var Ci=wi,_i=Ci.DOM,ki=En.each,Si=En.grep,Ti=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,r){var o,i,a=_i;i=a.uniqueId(),(o=n.document.createElement("script")).id=i,o.type="text/javascript",o.src=En._addCacheSuffix(t),this.settings.referrerPolicy&&a.setAttrib(o,"referrerpolicy",this.settings.referrerPolicy),o.onload=function(){a.remove(i),o&&(o.onreadystatechange=o.onload=o=null),e()},o.onerror=function(){w(r)?r():void 0!==n.console&&n.console.log&&n.console.log("Failed to load script: "+t)},(n.document.getElementsByTagName("head")[0]||n.document.body).appendChild(o)},t.prototype.isDone=function(t){return 2===this.states[t]},t.prototype.markDone=function(t){this.states[t]=2},t.prototype.add=function(t,e,n,r){void 0===this.states[t]&&(this.queue.push(t),this.states[t]=0),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,i=this,a=[],u=function(t,e){ki(i.scriptLoadedCallbacks[e],function(e){w(e[t])&&e[t].call(e.scope)}),i.scriptLoadedCallbacks[e]=void 0};i.queueLoadedCallbacks.push({success:e,failure:r,scope:n||this}),(o=function(){var e=Si(t);if(t.length=0,ki(e,function(t){2!==i.states[t]?3!==i.states[t]?1!==i.states[t]&&(i.states[t]=1,i.loading++,i.loadScript(t,function(){i.states[t]=2,i.loading--,u("success",t),o()},function(){i.states[t]=3,i.loading--,a.push(t),u("failure",t),o()})):u("failure",t):u("success",t)}),!i.loading){var n=i.queueLoadedCallbacks.slice(0);i.queueLoadedCallbacks.length=0,ki(n,function(t){0===a.length?w(t.success)&&t.success.call(t.scope):w(t.failure)&&t.failure.call(t.scope,a)})}})()},t.ScriptLoader=new t,t}(),Ei={},Oi=nt("en"),Di=function(){return J(Ei,Oi.get())},Ni={getData:function(){return $(Ei,function(t){return Z({},t)})},setCode:function(t){t&&Oi.set(t)},getCode:function(){return Oi.get()},add:function(t,e){var n=Ei[t];n||(Ei[t]=n={}),Y(e,function(t,e){n[e.toLowerCase()]=t})},translate:function(t){var e,n=Di().getOr({}),r=function(t){return w(t)?Object.prototype.toString.call(t):o(t)?"":""+t},o=function(t){return""===t||null==t},i=function(t){var e=r(t);return J(n,e.toLowerCase()).map(r).getOr(e)},a=function(t){return t.replace(/{context:\w+}$/,"")},u=function(t){return t};if(o(t))return u("");if(v(e=t)&&Q(e,"raw"))return u(r(t.raw));if(function(t){return b(t)&&t.length>1}(t)){var s=t.slice(1);return u(a(i(t[0]).replace(/\{([0-9]+)\}/g,function(t,e){return Q(s,e)?r(s[e]):t})))}return u(a(i(t)))},isRtl:function(){return Di().bind(function(t){return J(t,"_dir")}).exists(function(t){return"rtl"===t})},hasCode:function(t){return Q(Ei,t)}};function Ai(){var t=this,e=[],n={},r={},o=[],i=function(t,e){var n=M(o,function(n){return n.name===t&&n.state===e});N(n,function(t){return t.callback()})},a=function(t){var e;return r[t]&&(e=r[t].dependencies),e||[]},u=function(t,e){return"object"==_typeof(e)?e:"string"==typeof t?{prefix:"",resource:e,suffix:""}:{prefix:t.prefix,resource:e,suffix:t.suffix}},s=function(t,e,i){void 0===i&&(i="added"),Q(r,t)&&"added"===i?e():Q(n,t)&&"loaded"===i?e():o.push({name:t,state:i,callback:e})};return{items:e,urls:n,lookup:r,_listeners:o,get:function(t){if(r[t])return r[t].instance},dependencies:a,requireLangPack:function(t,e){!1!==Ai.languageLoad&&s(t,function(){var r=Ni.getCode();!r||e&&-1===(","+(e||"")+",").indexOf(","+r+",")||Ti.ScriptLoader.add(n[t]+"/langs/"+r+".js")},"loaded")},add:function(t,n,o){var a=n;return e.push(a),r[t]={instance:a,dependencies:o},i(t,"added"),a},remove:function(t){delete n[t],delete r[t]},createUrl:u,addComponents:function(e,n){var r=t.urls[e];N(n,function(t){Ti.ScriptLoader.add(r+"/"+t)})},load:function t(e,o,s,c,l){if(!n[e]){var f="string"==typeof o?o:o.prefix+o.resource+o.suffix;0!==f.indexOf("/")&&-1===f.indexOf("://")&&(f=Ai.baseURL+"/"+f),n[e]=f.substring(0,f.lastIndexOf("/"));var d=function(){i(e,"loaded"),function(e,n,r,o){var i=a(e);N(i,function(e){var r=u(n,e);t(r.resource,r,void 0,void 0)}),r&&(o?r.call(o):r.call(Ti))}(e,o,s,c)};r[e]?d():Ti.ScriptLoader.add(f,d,c,l)}},waitFor:s}}!function(t){t.PluginManager=t(),t.ThemeManager=t()}(Ai||(Ai={}));var Mi=Ai,Ii=function(t,e){var r=null;return{cancel:function(){null!==r&&(n.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null===r&&(r=n.setTimeout(function(){t.apply(null,o),r=null},e))}}},zi=function(t,e){var r=null;return{cancel:function(){null!==r&&(n.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&n.clearTimeout(r),r=n.setTimeout(function(){t.apply(null,o),r=null},e)}}},Bi=function(t,e){var n=ze(t,e);return void 0===n||""===n?[]:n.split(" ")},Ri=function(t){return void 0!==t.dom().classList},Pi=function(t,e){Ri(t)?t.dom().classList.add(e):function(t,e){(function(t,e,n){var r=Bi(t,e).concat([n]);Me(t,e,r.join(" "))})(t,"class",e)}(t,e)},Li=function(t,e){return Ri(t)&&t.dom().classList.contains(e)},Hi=function(t,e){return function(t,e){var r=void 0===e?n.document:e.dom();return Bt(r)?[]:D(r.querySelectorAll(t),et.fromDom)}(e,t)};function Fi(t,e,n,r,o){return t(n,r)?m.some(n):w(o)&&o(n)?m.none():e(n,r,o)}var Vi=function(t,e,n){for(var r=t.dom(),o=w(n)?n:i(!1);r.parentNode;){r=r.parentNode;var a=et.fromDom(r);if(e(a))return m.some(a);if(o(a))break}return m.none()},ji=function(t,e,n){return Fi(function(t,e){return e(t)},Vi,t,e,n)},Ui=function(t,e,n){return Vi(t,function(t){return zt(t,e)},n)},Wi=function(t,e){return function(t,e){var r=void 0===e?n.document:e.dom();return Bt(r)?m.none():m.from(r.querySelector(t)).map(et.fromDom)}(e,t)},qi=function(t,e,n){return Fi(zt,Ui,t,e,n)},Yi=i("mce-annotation"),$i=i("data-mce-annotation"),Gi=i("data-mce-annotation-uid"),Ki=function(t,e){var n=t.selection.getRng(),r=et.fromDom(n.startContainer),o=et.fromDom(t.getBody()),i=e.fold(function(){return"."+Yi()},function(t){return"["+$i()+'="'+t+'"]'}),a=Yt(r,n.startOffset).getOr(r),u=qi(a,i,function(t){return Rt(t,o)}),s=function(t,e){return function(t,e){var n=t.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(e)}(t,e)?m.some(ze(t,e)):m.none()};return u.bind(function(e){return s(e,""+Gi()).bind(function(n){return s(e,""+$i()).map(function(e){var r=Xi(t,n);return{uid:n,name:e,elements:r}})})})},Xi=function(t,e){var n=et.fromDom(t.getBody());return Hi(n,"["+Gi()+'="'+e+'"]')},Ji=0,Qi=function(t,e){var r,o,i=Lt(t).dom(),a=et.fromDom(i.createDocumentFragment()),u=(r=e,(o=(i||n.document).createElement("div")).innerHTML=r,qt(et.fromDom(o)));Zt(a,u),te(t),Qt(t,a)},Zi=function(t,e){return et.fromDom(t.dom().cloneNode(e))},ta=function(t){return Zi(t,!1)},ea=function(t){return Zi(t,!0)},na=function(t){return"\ufeff"===t},ra="\ufeff",oa=function(t){return t.replace(new RegExp("\ufeff","g"),"")},ia=De.isElement,aa=De.isText,ua=function(t){return aa(t)&&(t=t.parentNode),ia(t)&&t.hasAttribute("data-mce-caret")},sa=function(t){return aa(t)&&na(t.data)},ca=function(t){return ua(t)||sa(t)},la=function(t){return t.firstChild!==t.lastChild||!De.isBr(t.firstChild)},fa=function(t){var e=t.container();return!(!t||!De.isText(e))&&(e.data.charAt(t.offset())===ra||t.isAtStart()&&sa(e.previousSibling))},da=function(t){var e=t.container();return!(!t||!De.isText(e))&&(e.data.charAt(t.offset()-1)===ra||t.isAtEnd()&&sa(e.nextSibling))},ha=function(t,e,r){var o,i,a;return(o=e.ownerDocument.createElement(t)).setAttribute("data-mce-caret",r?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(((a=n.document.createElement("br")).setAttribute("data-mce-bogus","1"),a)),i=e.parentNode,r?i.insertBefore(o,e):e.nextSibling?i.insertBefore(o,e.nextSibling):i.appendChild(o),o},ma=function(t){return aa(t)&&t.data[0]===ra},pa=function(t){return aa(t)&&t.data[t.data.length-1]===ra},ga=function(t){return t&&t.hasAttribute("data-mce-caret")?(n=(e=t.getElementsByTagName("br"))[e.length-1],De.isBogus(n)&&n.parentNode.removeChild(n),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null;var e,n},va=De.isContentEditableTrue,ba=De.isContentEditableFalse,ya=De.isBr,xa=De.isText,wa=De.matchNodeNames(["script","style","textarea"]),Ca=De.matchNodeNames(["img","input","textarea","hr","iframe","video","audio","object"]),_a=De.matchNodeNames(["table"]),ka=ca,Sa=function(t){return!ka(t)&&(xa(t)?!wa(t.parentNode):Ca(t)||ya(t)||_a(t)||Ta(t))},Ta=function(t){return!1===function(t){return De.isElement(t)&&"true"===t.getAttribute("unselectable")}(t)&&ba(t)},Ea=function(t,e){return Sa(t)&&function(t,e){for(t=t.parentNode;t&&t!==e;t=t.parentNode){if(Ta(t))return!1;if(va(t))return!0}return!0}(t,e)},Oa=Math.round,Da=function(t){return t?{left:Oa(t.left),top:Oa(t.top),bottom:Oa(t.bottom),right:Oa(t.right),width:Oa(t.width),height:Oa(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Na=function(t,e){return t=Da(t),e?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t},Aa=function(t,e,n){return t>=0&&t<=Math.min(e.height,n.height)/2},Ma=function(t,e){return t.bottom-t.height/2<e.top||!(t.top>e.bottom)&&Aa(e.top-t.bottom,t,e)},Ia=function(t,e){return t.top>e.bottom||!(t.bottom<e.top)&&Aa(e.bottom-t.top,t,e)},za=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},Ba=function(t){var e=t.startContainer,n=t.startOffset;return e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null},Ra=function(t,e){return 1===t.nodeType&&t.hasChildNodes()&&(e>=t.childNodes.length&&(e=t.childNodes.length-1),t=t.childNodes[e]),t},Pa=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),La=function(t){return"string"==typeof t&&t.charCodeAt(0)>=768&&Pa.test(t)},Ha=function(t,e,n){return t.isSome()&&e.isSome()?m.some(n(t.getOrDie(),e.getOrDie())):m.none()},Fa=[].slice,Va=De.isElement,ja=Sa,Ua=De.matchStyleValues("display","block table"),Wa=De.matchStyleValues("float","left right"),qa=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Fa.call(arguments);return function(t){for(var e=0;e<n.length;e++)if(!n[e](t))return!1;return!0}}(Va,ja,s(Wa)),Ya=s(De.matchStyleValues("white-space","pre pre-line pre-wrap")),$a=De.isText,Ga=De.isBr,Ka=Ci.nodeIndex,Xa=Ra,Ja=function(t){return"createRange"in t?t.createRange():Ci.DOM.createRng()},Qa=function(t){return t&&/[\r\n\t ]/.test(t)},Za=function(t){return!!t.setStart&&!!t.setEnd},tu=function(t){var e,n=t.startContainer,r=t.startOffset;return!!(Qa(t.toString())&&Ya(n.parentNode)&&De.isText(n)&&(e=n.data,Qa(e[r-1])||Qa(e[r+1])))},eu=function(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom},nu=function t(e){var n,r;return n=(r=e.getClientRects()).length>0?Da(r[0]):Da(e.getBoundingClientRect()),!Za(e)&&Ga(e)&&eu(n)?function(t){var e,n=t.ownerDocument,r=Ja(n),o=n.createTextNode(" "),i=t.parentNode;return i.insertBefore(o,t),r.setStart(o,0),r.setEnd(o,1),e=Da(r.getBoundingClientRect()),i.removeChild(o),e}(e):eu(n)&&Za(e)?function(e){var n=e.startContainer,r=e.endContainer,o=e.startOffset,i=e.endOffset;if(n===r&&De.isText(r)&&0===o&&1===i){var a=e.cloneRange();return a.setEndAfter(r),t(a)}return null}(e):n},ru=function(t,e){var n=Na(t,e);return n.width=1,n.right=n.left+1,n},ou=function(t){var e,n,r=[],o=function(t){var e,n;0!==t.height&&(r.length>0&&(e=t,n=r[r.length-1],e.left===n.left&&e.top===n.top&&e.bottom===n.bottom&&e.right===n.right)||r.push(t))},i=function(t,e){var n=Ja(t.ownerDocument);if(e<t.data.length){if(La(t.data[e]))return r;if(La(t.data[e-1])&&(n.setStart(t,e),n.setEnd(t,e+1),!tu(n)))return o(ru(nu(n),!1)),r}e>0&&(n.setStart(t,e-1),n.setEnd(t,e),tu(n)||o(ru(nu(n),!1))),e<t.data.length&&(n.setStart(t,e),n.setEnd(t,e+1),tu(n)||o(ru(nu(n),!0)))};if($a(t.container()))return i(t.container(),t.offset()),r;if(Va(t.container()))if(t.isAtEnd())n=Xa(t.container(),t.offset()),$a(n)&&i(n,n.data.length),qa(n)&&!Ga(n)&&o(ru(nu(n),!1));else{if(n=Xa(t.container(),t.offset()),$a(n)&&i(n,0),qa(n)&&t.isAtEnd())return o(ru(nu(n),!1)),r;e=Xa(t.container(),t.offset()-1),qa(e)&&!Ga(e)&&(Ua(e)||Ua(n)||!qa(n))&&o(ru(nu(e),!1)),qa(n)&&o(ru(nu(n),!0))}return r};function iu(t,e,n){var r=function(){return n||(n=ou(iu(t,e))),n};return{container:i(t),offset:i(e),toRange:function(){var n;return(n=Ja(t.ownerDocument)).setStart(t,e),n.setEnd(t,e),n},getClientRects:r,isVisible:function(){return r().length>0},isAtStart:function(){return $a(t),0===e},isAtEnd:function(){return $a(t)?e>=t.data.length:e>=t.childNodes.length},isEqual:function(n){return n&&t===n.container()&&e===n.offset()},getNode:function(n){return Xa(t,n?e-1:e)}}}!function(t){t.fromRangeStart=function(e){return t(e.startContainer,e.startOffset)},t.fromRangeEnd=function(e){return t(e.endContainer,e.endOffset)},t.after=function(e){return t(e.parentNode,Ka(e)+1)},t.before=function(e){return t(e.parentNode,Ka(e))},t.isAbove=function(t,e){return Ha(V(e.getClientRects()),j(t.getClientRects()),Ma).getOr(!1)},t.isBelow=function(t,e){return Ha(j(e.getClientRects()),V(t.getClientRects()),Ia).getOr(!1)},t.isAtStart=function(t){return!!t&&t.isAtStart()},t.isAtEnd=function(t){return!!t&&t.isAtEnd()},t.isTextPosition=function(t){return!!t&&De.isText(t.container())},t.isElementPosition=function(e){return!1===t.isTextPosition(e)}}(iu||(iu={}));var au,uu=iu,su=De.isText,cu=De.isBogus,lu=Ci.nodeIndex,fu=function t(e){return e?_n.reduce(e.childNodes,function(e,n){return cu(n)&&"BR"!==n.nodeName?e=e.concat(t(n)):e.push(n),e},[]):[]},du=function(t){return function(e){return t===e}},hu=function(t){return(su(t)?"text()":t.nodeName.toLowerCase())+"["+function(t){var e,n,r;return e=fu(function t(e){var n=e.parentNode;return cu(n)?t(n):n}(t)),n=_n.findIndex(e,du(t),t),e=e.slice(0,n+1),r=_n.reduce(e,function(t,n,r){return su(n)&&su(e[r-1])&&t++,t},0),e=_n.filter(e,De.matchNodeNames([t.nodeName])),(n=_n.findIndex(e,du(t),t))-r}(t)+"]"},mu=function(t,e){var n,r,o,i,a,u=[];return n=e.container(),r=e.offset(),su(n)?o=function(t,e){for(;(t=t.previousSibling)&&su(t);)e+=t.data.length;return e}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(hu(n)),a=function(t,e,n){var r=[];for(e=e.parentNode;e!==t;e=e.parentNode)r.push(e);return r}(t,n),a=_n.filter(a,s(De.isBogus)),(u=u.concat(_n.map(a,function(t){return hu(t)}))).reverse().join("/")+","+o},pu=function(t,e){var n,r,o;return e?(n=e.split(","),e=n[0].split("/"),o=n.length>1?n[1]:"before",(r=_n.reduce(e,function(t,e){return(e=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(e))?("text()"===e[1]&&(e[1]="#text"),function(t,e,n){var r=fu(t);return r=_n.filter(r,function(t,e){return!su(t)||!su(r[e-1])}),(r=_n.filter(r,De.matchNodeNames([e])))[n]}(t,e[1],parseInt(e[2],10))):null},t))?su(r)?function(t,e){for(var n,r=t,o=0;su(r);){if(n=r.data.length,e>=o&&e<=o+n){t=r,e-=o;break}if(!su(r.nextSibling)){t=r,e=n;break}o+=n,r=r.nextSibling}return su(t)&&e>t.data.length&&(e=t.data.length),uu(t,e)}(r,parseInt(o,10)):(o="after"===o?lu(r)+1:lu(r),uu(r.parentNode,o)):null):null},gu=function(t,e){De.isText(e)&&0===e.data.length&&t.remove(e)},vu=function(t,e,n){De.isDocumentFragment(n)?function(t,e,n){var r=m.from(n.firstChild),o=m.from(n.lastChild);e.insertNode(n),r.each(function(e){return gu(t,e.previousSibling)}),o.each(function(e){return gu(t,e.nextSibling)})}(t,e,n):function(t,e,n){e.insertNode(n),gu(t,n.previousSibling),gu(t,n.nextSibling)}(t,e,n)},bu=De.isContentEditableFalse,yu=function(t,e,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],s=[],c=0,l=t.getRoot();for(De.isText(a)?s.push(n?function(t,e,n){var r,o;for(o=t(e.data.slice(0,n)).length,r=e.previousSibling;r&&De.isText(r);r=r.previousSibling)o+=t(r.data).length;return o}(e,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(c=1,u=Math.max(0,i.length-1)),s.push(t.nodeIndex(i[u],n)+c));a&&a!==l;a=a.parentNode)s.push(t.nodeIndex(a,n));return s},xu=function(t,e,n){var r=0;return En.each(t.select(e),function(t){if("all"!==t.getAttribute("data-mce-bogus"))return t!==n&&void r++}),r},wu=function(t,e){var n,r,o,i=e?"start":"end";n=t[i+"Container"],r=t[i+"Offset"],De.isElement(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(e?r:r-1,o.length-1)])&&(r=e?0:n.childNodes.length,t["set"+(e?"Start":"End")](n,r))},Cu=function(t){return wu(t,!0),wu(t,!1),t},_u=function(t,e){var n;if(De.isElement(t)&&(t=Ra(t,e),bu(t)))return t;if(ca(t)){if(De.isText(t)&&ua(t)&&(t=t.parentNode),n=t.previousSibling,bu(n))return n;if(n=t.nextSibling,bu(n))return n}},ku=function(t,e,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(bu(r)||"IMG"===o)return{name:o,index:xu(n.dom,o,r)};var a=function(t){return _u(t.startContainer,t.startOffset)||_u(t.endContainer,t.endOffset)}(i);return a?{name:o=a.tagName,index:xu(n.dom,o,a)}:function(t,e,n,r){var o=e.dom,i={};return i.start=yu(o,t,n,r,!0),e.isCollapsed()||(i.end=yu(o,t,n,r,!1)),i}(t,n,e,i)},Su=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)},Tu=function(t,e){var n=t.dom,r=t.getRng(),o=n.uniqueId(),i=t.isCollapsed(),a=t.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:xu(n,u,a)};var s=Cu(r.cloneRange());if(!i){s.collapse(!1);var c=Su(n,o+"_end",e);vu(n,s,c)}(r=Cu(r)).collapse(!0);var l=Su(n,o+"_start",e);return vu(n,r,l),t.moveToBookmark({id:o,keep:1}),{id:o}},Eu={getBookmark:function(t,e,n){return 2===e?ku(oa,n,t):3===e?function(t){var e=t.getRng();return{start:mu(t.dom.getRoot(),uu.fromRangeStart(e)),end:mu(t.dom.getRoot(),uu.fromRangeEnd(e))}}(t):e?function(t){return{rng:t.getRng()}}(t):Tu(t,!1)},getUndoBookmark:u(ku,a,!0),getPersistentBookmark:Tu},Ou=function(t,e,n){void 0===n&&(n=c);var r=new di(t,e),o=function(t){var e;do{e=r[t]()}while(e&&!De.isText(e)&&!n(e));return m.from(e).filter(De.isText)};return{current:function(){return m.from(r.current()).filter(De.isText)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},Du=function(t,e){var n=e||function(e){return t.isBlock(e)||De.isBr(e)||De.isContentEditableFalse(e)},r=function t(e,n,r,o){if(De.isText(e)){var i=o(e,n,e.data);if(-1!==i)return m.some({container:e,offset:i})}return r().bind(function(e){return t(e.container,e.offset,r,o)})};return{backwards:function(t,e,o,i){var a=Ou(t,i,n);return r(t,e,function(){return a.prev().map(function(t){return{container:t,offset:t.length}})},o).getOrNull()},forwards:function(t,e,o,i){var a=Ou(t,i,n);return r(t,e,function(){return a.next().map(function(t){return{container:t,offset:0}})},o).getOrNull()}}},Nu=function(t){return De.isElement(t)&&"_mce_caret"===t.id},Au=function(t,e){for(;e&&e!==t;){if("_mce_caret"===e.id)return e;e=e.parentNode}return null},Mu=De.isElement,Iu=De.isText,zu=function(t){var e=t.parentNode;e&&e.removeChild(t)},Bu=function(t,e){0===e.length?zu(t):t.nodeValue=e},Ru=function(t){var e=oa(t);return{count:t.length-e.length,text:e}},Pu=function(t,e){return Lu(t),e},Lu=function(t){if(Mu(t)&&ca(t)&&(la(t)?t.removeAttribute("data-mce-caret"):zu(t)),Iu(t)){var e=oa(function(t){try{return t.nodeValue}catch(t){return""}}(t));Bu(t,e)}},Hu={removeAndReposition:function(t,e){return uu.isTextPosition(e)?function(t,e){return Iu(t)&&e.container()===t?function(t,e){var n=Ru(t.data.substr(0,e.offset())),r=Ru(t.data.substr(e.offset())),o=n.text+r.text;return o.length>0?(Bu(t,o),uu(t,e.offset()-n.count)):e}(t,e):Pu(t,e)}(t,e):function(t,e){return e.container()===t.parentNode?function(t,e){var n=e.container(),r=function(t,e){var n=T(t,e);return-1===n?m.none():m.some(n)}(U(n.childNodes),t).map(function(t){return t<e.offset()?uu(n,e.offset()-1):e}).getOr(e);return Lu(t),r}(t,e):Pu(t,e)}(t,e)},remove:Lu},Fu=Ci.DOM,Vu=function(t,e,n){var r=t.getParam(e,n);if(-1!==r.indexOf("=")){var o=t.getParam(e,"","hash");return o.hasOwnProperty(t.id)?o[t.id]:n}return r},ju=function(t){return t.getParam("content_security_policy","")},Uu=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},Wu=function(t){return t.getParam("forced_root_block_attrs",{})},qu=function(t){return t.getParam("automatic_uploads",!0,"boolean")},Yu=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},$u=function(t){return t.getParam("images_upload_url","","string")},Gu=function(t){return t.getParam("images_upload_base_path","","string")},Ku=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},Xu=function(t){return t.getParam("images_upload_handler",null,"function")},Ju=function(t){return t.getParam("content_css_cors",!1,"boolean")},Qu=function(t){return t.getParam("referrer_policy","","string")},Zu=function(t){return t.getParam("language","en","string")},ts=function(t){return t.getParam("indent_use_margin",!1)},es=Tt().browser,ns=De.isContentEditableFalse,rs=function(t,e,n){var r,o,i,a,u,s=Na(e.getBoundingClientRect(),n);return"BODY"===t.tagName?(r=t.ownerDocument.documentElement,o=t.scrollLeft||r.scrollLeft,i=t.scrollTop||r.scrollTop):(u=t.getBoundingClientRect(),o=t.scrollLeft-u.left,i=t.scrollTop-u.top),s.left+=o,s.right+=o,s.top+=i,s.bottom+=i,s.width=1,(a=e.offsetWidth-e.clientWidth)>0&&(n&&(a*=-1),s.left+=a,s.right+=a),s},os=function(){return es.isIE()||es.isEdge()||es.isFirefox()},is=function(t){return ns(t)||De.isTable(t)&&os()},as=De.isContentEditableFalse,us=De.matchStyleValues("display","block table table-cell table-caption list-item"),ss=ca,cs=ua,ls=De.isElement,fs=Sa,ds=function(t){return t>0},hs=function(t){return t<0},ms=function(t,e){for(var n;n=t(e);)if(!cs(n))return n;return null},ps=function(t,e,n,r,o){var i=new di(t,r);if(hs(e)){if((as(t)||cs(t))&&n(t=ms(i.prev,!0)))return t;for(;t=ms(i.prev,o);)if(n(t))return t}if(ds(e)){if((as(t)||cs(t))&&n(t=ms(i.next,!0)))return t;for(;t=ms(i.next,o);)if(n(t))return t}return null},gs=function(t,e){for(;t&&t!==e;){if(us(t))return t;t=t.parentNode}return null},vs=function(t,e,n){return gs(t.container(),n)===gs(e.container(),n)},bs=function(t,e){var n,r;return e?(n=e.container(),r=e.offset(),ls(n)?n.childNodes[r+t]:null):null},ys=function(t,e){var n=e.ownerDocument.createRange();return t?(n.setStartBefore(e),n.setEndBefore(e)):(n.setStartAfter(e),n.setEndAfter(e)),n},xs=function(t,e,n){return gs(e,t)===gs(n,t)},ws=function(t,e,n){var r,o;for(o=t?"previousSibling":"nextSibling";n&&n!==e;){if(r=n[o],ss(r)&&(r=r[o]),as(r)){if(xs(e,r,n))return r;break}if(fs(r))break;n=n.parentNode}return null},Cs=u(ys,!0),_s=u(ys,!1),ks=function(t,e,n){var r,o,i,a,s=u(ws,!0,e),c=u(ws,!1,e);if(o=n.startContainer,i=n.startOffset,ua(o)){if(ls(o)||(o=o.parentNode),"before"===(a=o.getAttribute("data-mce-caret"))&&(r=o.nextSibling,is(r)))return Cs(r);if("after"===a&&(r=o.previousSibling,is(r)))return _s(r)}if(!n.collapsed)return n;if(De.isText(o)){if(ss(o)){if(1===t){if(r=c(o))return Cs(r);if(r=s(o))return _s(r)}if(-1===t){if(r=s(o))return _s(r);if(r=c(o))return Cs(r)}return n}if(pa(o)&&i>=o.data.length-1)return 1===t&&(r=c(o))?Cs(r):n;if(ma(o)&&i<=1)return-1===t&&(r=s(o))?_s(r):n;if(i===o.data.length)return(r=c(o))?Cs(r):n;if(0===i)return(r=s(o))?_s(r):n}return n},Ss=function(t,e){return m.from(bs(t?0:-1,e)).filter(as)},Ts=function(t,e,n){var r=ks(t,e,n);return-1===t?iu.fromRangeStart(r):iu.fromRangeEnd(r)},Es=function(t){return m.from(t.getNode()).map(et.fromDom)},Os=function(t,e){for(;e=t(e);)if(e.isVisible())return e;return e},Ds=function(t,e){var n=vs(t,e);return!(n||!De.isBr(t.getNode()))||n};!function(t){t[t.Backwards=-1]="Backwards",t[t.Forwards=1]="Forwards"}(au||(au={}));var Ns=De.isContentEditableFalse,As=De.isText,Ms=De.isElement,Is=De.isBr,zs=Sa,Bs=function(t){return Ca(t)||function(t){return!!Ta(t)&&!0!==z(U(t.getElementsByTagName("*")),function(t,e){return t||va(e)},!1)}(t)},Rs=Ea,Ps=function(t,e){return t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null},Ls=function(t,e){if(ds(t)){if(zs(e.previousSibling)&&!As(e.previousSibling))return uu.before(e);if(As(e))return uu(e,0)}if(hs(t)){if(zs(e.nextSibling)&&!As(e.nextSibling))return uu.after(e);if(As(e))return uu(e,e.data.length)}return hs(t)?Is(e)?uu.before(e):uu.after(e):uu.before(e)},Hs=function t(e,n,r){var o,a,u,s,c;if(!Ms(r)||!n)return null;if(n.isEqual(uu.after(r))&&r.lastChild){if(c=uu.after(r.lastChild),hs(e)&&zs(r.lastChild)&&Ms(r.lastChild))return Is(r.lastChild)?uu.before(r.lastChild):c}else c=n;var l=c.container(),f=c.offset();if(As(l)){if(hs(e)&&f>0)return uu(l,--f);if(ds(e)&&f<l.length)return uu(l,++f);o=l}else{if(hs(e)&&f>0&&(a=Ps(l,f-1),zs(a)))return!Bs(a)&&(u=ps(a,e,Rs,a))?As(u)?uu(u,u.data.length):uu.after(u):As(a)?uu(a,a.data.length):uu.before(a);if(ds(e)&&f<l.childNodes.length&&(a=Ps(l,f),zs(a)))return Is(a)?function(e,n){var r=n.nextSibling;return r&&zs(r)?As(r)?uu(r,0):uu.before(r):t(au.Forwards,uu.after(n),e)}(r,a):!Bs(a)&&(u=ps(a,e,Rs,a))?As(u)?uu(u,0):uu.before(u):As(a)?uu(a,0):uu.after(a);o=a||c.getNode()}return(ds(e)&&c.isAtEnd()||hs(e)&&c.isAtStart())&&(o=ps(o,e,i(!0),r,!0),Rs(o,r))?Ls(e,o):(a=ps(o,e,Rs,r),!(s=_n.last(M(function(t,e){for(var n=[];t&&t!==e;)n.push(t),t=t.parentNode;return n}(l,r),Ns)))||a&&s.contains(a)?a?Ls(e,a):null:c=ds(e)?uu.after(s):uu.before(s))},Fs=function(t){return{next:function(e){return Hs(au.Forwards,e,t)},prev:function(e){return Hs(au.Backwards,e,t)}}},Vs=function(t){return uu.isTextPosition(t)?0===t.offset():Sa(t.getNode())},js=function(t){if(uu.isTextPosition(t)){var e=t.container();return t.offset()===e.data.length}return Sa(t.getNode(!0))},Us=function(t,e){return!uu.isTextPosition(t)&&!uu.isTextPosition(e)&&t.getNode()===e.getNode(!0)},Ws=function(t,e,n){var r=Fs(e);return m.from(t?r.next(n):r.prev(n))},qs=function(t,e,n){return Ws(t,e,n).bind(function(r){return vs(n,r,e)&&function(t,e,n){return t?!Us(e,n)&&(r=e,!(!uu.isTextPosition(r)&&De.isBr(r.getNode())))&&js(e)&&Vs(n):!Us(n,e)&&Vs(e)&&js(n);var r}(t,n,r)?Ws(t,e,r):m.some(r)})},Ys=function(t,e){var n,r=t?e.firstChild:e.lastChild;return De.isText(r)?m.some(uu(r,t?0:r.data.length)):r?Sa(r)?m.some(t?uu.before(r):(n=r,De.isBr(n)?uu.before(n):uu.after(n))):function(t,e,n){var r=t?uu.before(n):uu.after(n);return Ws(t,e,r)}(t,e,r):m.none()},$s=u(Ws,!0),Gs=u(Ws,!1),Ks={fromPosition:Ws,nextPosition:$s,prevPosition:Gs,navigate:qs,navigateIgnore:function t(e,n,r,o){return qs(e,n,r).bind(function(r){return o(r)?t(e,n,r,o):m.some(r)})},positionIn:Ys,firstPositionIn:u(Ys,!0),lastPositionIn:u(Ys,!1)},Xs=function(t,e){return De.isElement(e)&&t.isBlock(e)&&!e.innerHTML&&!yn.ie&&(e.innerHTML='<br data-mce-bogus="1" />'),e},Js=function(t,e){return Ks.lastPositionIn(t).fold(function(){return!1},function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0})},Qs=function(t,e,n){return!(!1!==e.hasChildNodes()||!Au(t,e)||(function(t,e){var n=t.ownerDocument.createTextNode(ra);t.appendChild(n),e.setStart(n,0),e.setEnd(n,0)}(e,n),0))},Zs=function(t,e,n,r){var o,i,a,u,s=n[e?"start":"end"],c=t.getRoot();if(s){for(a=s[0],i=c,o=s.length-1;o>=1;o--){if(u=i.childNodes,Qs(c,i,r))return!0;if(s[o]>u.length-1)return!!Qs(c,i,r)||Js(i,r);i=u[s[o]]}3===i.nodeType&&(a=Math.min(s[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(s[0],i.childNodes.length)),e?r.setStart(i,a):r.setEnd(i,a)}return!0},tc=function(t){return De.isText(t)&&t.data.length>0},ec=function(t,e,n){var r,o,i,a,u,s,c=t.get(n.id+"_"+e),l=n.keep;if(c){if(r=c.parentNode,"start"===e?(l?c.hasChildNodes()?(r=c.firstChild,o=1):tc(c.nextSibling)?(r=c.nextSibling,o=0):tc(c.previousSibling)?(r=c.previousSibling,o=c.previousSibling.data.length):(r=c.parentNode,o=t.nodeIndex(c)+1):o=t.nodeIndex(c),u=r,s=o):(l?c.hasChildNodes()?(r=c.firstChild,o=1):tc(c.previousSibling)?(r=c.previousSibling,o=c.previousSibling.data.length):(r=c.parentNode,o=t.nodeIndex(c)):o=t.nodeIndex(c),u=r,s=o),!l){for(a=c.previousSibling,i=c.nextSibling,En.each(En.grep(c.childNodes),function(t){De.isText(t)&&(t.nodeValue=t.nodeValue.replace(/\uFEFF/g,""))});c=t.get(n.id+"_"+e);)t.remove(c,!0);a&&i&&a.nodeType===i.nodeType&&De.isText(a)&&!yn.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),t.remove(i),u=a,s=o)}return m.some(uu(u,s))}return m.none()},nc={getBookmark:function(t,e,n){return Eu.getBookmark(t,e,n)},moveToBookmark:function(t,e){(function(t,e){var n=t.dom;if(e){if(function(t){return En.isArray(t.start)}(e))return function(t,e){var n=t.createRng();return Zs(t,!0,e,n)&&Zs(t,!1,e,n)?m.some(n):m.none()}(n,e);if("string"==typeof e.start)return m.some(function(t,e){var n,r;return n=t.createRng(),r=pu(t.getRoot(),e.start),n.setStart(r.container(),r.offset()),r=pu(t.getRoot(),e.end),n.setEnd(r.container(),r.offset()),n}(n,e));if(e.hasOwnProperty("id"))return function(t,e){var n=ec(t,"start",e),r=ec(t,"end",e);return Ha(n,r.or(n),function(e,n){var r=t.createRng();return r.setStart(Xs(t,e.container()),e.offset()),r.setEnd(Xs(t,n.container()),n.offset()),r})}(n,e);if(e.hasOwnProperty("name"))return function(t,e){return m.from(t.select(e.name)[e.index]).map(function(e){var n=t.createRng();return n.selectNode(e),n})}(n,e);if(e.hasOwnProperty("rng"))return m.some(e.rng)}return m.none()})(t,e).each(function(e){t.setRng(e)})},isBookmarkNode:function(t){return De.isElement(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")}},rc=(" ",function(t){return" "===t}),oc=function(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)},ic=function(t){return!oc(t)&&!rc(t)},ac=function(t){return!!t.nodeType},uc=function(t,e,n){var r,o,i,a=n.startOffset,u=n.startContainer;if((n.startContainer!==n.endContainer||!function(t){return t&&/^(IMG)$/.test(t.nodeName)}(n.startContainer.childNodes[n.startOffset]))&&1===u.nodeType)for(a<(i=u.childNodes).length?(u=i[a],r=new di(u,t.getParent(u,t.isBlock))):(u=i[i.length-1],(r=new di(u,t.getParent(u,t.isBlock))).next(!0)),o=r.current();o;o=r.next())if(3===o.nodeType&&!fc(o))return n.setStart(o,0),void e.setRng(n)},sc=function(t,e,n){if(t){var r=e?"nextSibling":"previousSibling";for(t=n?t:t[r];t;t=t[r])if(1===t.nodeType||!fc(t))return t}},cc=function(t,e){return ac(e)&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]},lc=function(t,e,n){return t.schema.isValidChild(e,n)},fc=function(t){return t&&De.isText(t)&&/^([\t \r\n]+|)$/.test(t.nodeValue)},dc=function(t,e){return"string"!=typeof t?t=t(e):e&&(t=t.replace(/%(\w+)/g,function(t,n){return e[n]||t})),t},hc=function(t,e){return e=e||"",t=""+((t=t||"").nodeName||t),e=""+(e.nodeName||e),t.toLowerCase()===e.toLowerCase()},mc=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},pc=function(t,e,n){return mc(t,t.getStyle(e,n),n)},gc=function(t,e){var n;return t.getParent(e,function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n}),n},vc=function(t,e,n){return t.getParents(e,n,t.getRoot())},bc=nc.isBookmarkNode,yc=vc,xc=fc,wc=cc,Cc=function(t,e){for(var n=e;n;){if(De.isElement(n)&&t.getContentEditable(n))return"false"===t.getContentEditable(n)?n:e;n=n.parentNode}return e},_c=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},kc=function(t,e,n){return _c(t,e,n,function(t){return rc(t)||oc(t)})},Sc=function(t,e,n){return _c(t,e,n,ic)},Tc=function(t,e,n,r,o,i){var a,u=t.getParent(n,t.isBlock)||e,s=function(e,n,r){var i=Du(t),s=o?i.backwards:i.forwards;return m.from(s(e,n,function(t,e){return bc(t.parentNode)?-1:(a=t,r(o,t,e))},u))};return s(n,r,kc).bind(function(t){return i?s(t.container,t.offset+(o?-1:0),Sc):m.some(t)}).orThunk(function(){return a?m.some({container:a,offset:o?0:a.length}):m.none()})},Ec=function(t,e,n,r,o){De.isText(r)&&0===r.nodeValue.length&&r[o]&&(r=r[o]);for(var i=yc(t,r),a=0;a<i.length;a++)for(var u=0;u<e.length;u++){var s=e[u];if(!("collapsed"in s&&s.collapsed!==n.collapsed)&&t.is(i[a],s.selector))return i[a]}return r},Oc=function(t,e,n,r){var o,i=t.dom,a=i.getRoot();if(e[0].wrapper||(o=i.getParent(n,e[0].block,a)),!o){var u=i.getParent(n,"LI,TD,TH");o=i.getParent(De.isText(n)?n.parentNode:n,function(e){return e!==a&&wc(t,e)},u)}if(o&&e[0].wrapper&&(o=yc(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!hc(o,"br")););return o||n},Dc=function(t,e,n,r,o,i,a){var u,s,c,l,f,d;if(u=s=a?n:o,l=a?"previousSibling":"nextSibling",f=t.getRoot(),De.isText(u)&&!xc(u)&&(a?r>0:i<u.nodeValue.length))return u;for(;;){if(!e[0].block_expand&&t.isBlock(s))return s;for(c=s[l];c;c=c[l])if(!bc(c)&&!xc(c)&&("BR"!==(d=c).nodeName||!d.getAttribute("data-mce-bogus")||d.nextSibling))return s;if(s===f||s.parentNode===f){u=s;break}s=s.parentNode}return u},Nc=function(t,e,n,r){void 0===r&&(r=!1);var o=e.startContainer,i=e.startOffset,a=e.endContainer,u=e.endOffset,s=t.dom;return De.isElement(o)&&o.hasChildNodes()&&(o=Ra(o,i),De.isText(o)&&(i=0)),De.isElement(a)&&a.hasChildNodes()&&(a=Ra(a,e.collapsed?u:u-1),De.isText(a)&&(u=a.nodeValue.length)),o=Cc(s,o),a=Cc(s,a),(bc(o.parentNode)||bc(o))&&(o=bc(o)?o:o.parentNode,o=e.collapsed?o.previousSibling||o:o.nextSibling||o,De.isText(o)&&(i=e.collapsed?o.length:0)),(bc(a.parentNode)||bc(a))&&(a=bc(a)?a:a.parentNode,a=e.collapsed?a.nextSibling||a:a.previousSibling||a,De.isText(a)&&(u=e.collapsed?0:a.length)),e.collapsed&&(Tc(s,t.getBody(),o,i,!0,r).each(function(t){var e=t.container,n=t.offset;o=e,i=n}),Tc(s,t.getBody(),a,u,!1,r).each(function(t){var e=t.container,n=t.offset;a=e,u=n})),(n[0].inline||n[0].block_expand)&&(n[0].inline&&De.isText(o)&&0!==i||(o=Dc(s,n,o,i,a,u,!0)),n[0].inline&&De.isText(a)&&u!==a.nodeValue.length||(a=Dc(s,n,o,i,a,u,!1))),n[0].selector&&!1!==n[0].expand&&!n[0].inline&&(o=Ec(s,n,e,o,"previousSibling"),a=Ec(s,n,e,a,"nextSibling")),(n[0].block||n[0].selector)&&(o=Oc(t,n,o,"previousSibling"),a=Oc(t,n,a,"nextSibling"),n[0].block&&(s.isBlock(o)||(o=Dc(s,n,o,i,a,u,!0)),s.isBlock(a)||(a=Dc(s,n,o,i,a,u,!1)))),De.isElement(o)&&(i=s.nodeIndex(o),o=o.parentNode),De.isElement(a)&&(u=s.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},Ac=En.each,Mc={walk:function(t,e,n){var r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset,u=t.select("td[data-mce-selected],th[data-mce-selected]");if(u.length>0)Ac(u,function(t){n([t])});else{var s,c,l,f=function(t){var e;return 3===(e=t[0]).nodeType&&e===r&&o>=e.nodeValue.length&&t.splice(0,1),e=t[t.length-1],0===a&&t.length>0&&e===i&&3===e.nodeType&&t.splice(t.length-1,1),t},d=function(t,e,n){for(var r=[];t&&t!==n;t=t[e])r.push(t);return r},h=function(t,e){do{if(t.parentNode===e)return t;t=t.parentNode}while(t)},m=function(t,e,r){for(var o=r?"nextSibling":"previousSibling",i=t,a=i.parentNode;i&&i!==e;i=a){a=i.parentNode;var u=d(i===t?i:i[o],o);u.length&&(r||u.reverse(),n(f(u)))}};if(1===r.nodeType&&r.hasChildNodes()&&(r=r.childNodes[o]),1===i.nodeType&&i.hasChildNodes()&&(c=a,--c>(l=(s=i).childNodes).length-1?c=l.length-1:c<0&&(c=0),i=l[c]||s),r===i)return n(f([r]));for(var p=t.findCommonAncestor(r,i),g=r;g;g=g.parentNode){if(g===i)return m(r,p,!0);if(g===p)break}for(g=i;g;g=g.parentNode){if(g===r)return m(i,p);if(g===p)break}var v=h(r,p)||r,b=h(i,p)||i;m(r,v,!0);var y=d(v===r?v:v.nextSibling,"nextSibling",b===i?b.nextSibling:b);y.length&&n(f(y)),m(i,b)}}},Ic=function(t,e){var n=function(e){return t(e)?m.from(e.dom().nodeValue):m.none()};return{get:function(e){if(!t(e))throw new Error("Can only get text value of a text node");return n(e).getOr("")},getOption:n,set:function(e,n){if(!t(e))throw new Error("Can only set raw text value of a text node");e.dom().nodeValue=n}}}(ae),zc=function(t){return Ic.get(t)},Bc=function(t,e,n,r){var o,i=e.uid,a=void 0===i?("mce-annotation",o=(new Date).getTime(),"mce-annotation_"+Math.floor(1e9*Math.random())+ ++Ji+String(o)):i,u=function(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}(e,["uid"]),s=et.fromTag("span",t);Pi(s,Yi()),Me(s,""+Gi(),a),Me(s,""+$i(),n);var c=r(a,u),l=c.attributes,f=void 0===l?{}:l,d=c.classes,h=void 0===d?[]:d;return Ie(s,f),function(t,e){N(h,function(e){Pi(t,e)})}(s),s},Rc=function(t,e,n,r,o){var i=[],a=Bc(t.getDoc(),o,n,r),u=nt(m.none()),s=function(){u.set(m.none())},c=function(t){N(t,l)},l=function(e){switch(function(t,e,n,r){return Ft(e).fold(function(){return"skipping"},function(o){return"br"===r||function(t){return ae(t)&&"\ufeff"===zc(t)}(e)?"valid":function(t){return ie(t)&&Li(t,Yi())}(e)?"existing":Nu(e)?"caret":lc(t,n,r)&&lc(t,re(o),n)?"valid":"invalid-child"})}(t,e,"span",re(e))){case"invalid-child":s();var n=qt(e);c(n),s();break;case"valid":!function(t,e){Kt(t,e),Qt(e,t)}(e,u.get().getOrThunk(function(){var t=ta(a);return i.push(t),u.set(m.some(t)),t}))}};return Mc.walk(t.dom,e,function(t){s(),function(t){var e=D(t,et.fromDom);c(e)}(t)}),i},Pc=function(t){var e,n=(e={},{register:function(t,n){e[t]={name:t,settings:n}},lookup:function(t){return e.hasOwnProperty(t)?m.from(e[t]).map(function(t){return t.settings}):m.none()}});!function(t,e){t.on("init",function(){t.serializer.addNodeFilter("span",function(t){N(t,function(t){(function(t){return m.from(t.attr($i())).bind(e.lookup)})(t).each(function(e){!1===e.persistent&&t.unwrap()})})})})}(t,n);var r=function(t,e){var n=nt({}),r=function(t,e){o(t,function(t){return e(t),t})},o=function(t,e){var r=n.get(),o=e(r.hasOwnProperty(t)?r[t]:{listeners:[],previous:nt(m.none())});r[t]=o,n.set(r)},i=zi(function(){var e,i,a=n.get(),u=(e=W(a),(i=_.call(e,0)).sort(void 0),i);N(u,function(e){o(e,function(n){var o=n.previous.get();return Ki(t,m.some(e)).fold(function(){var t;o.isSome()&&(r(t=e,function(e){N(e.listeners,function(e){return e(!1,t)})}),n.previous.set(m.none()))},function(t){var e=t.uid,i=t.name,a=t.elements;o.is(e)||(function(t,e,n){r(t,function(r){N(r.listeners,function(r){return r(!0,t,{uid:e,nodes:D(n,function(t){return t.dom()})})})})}(i,e,a),n.previous.set(m.some(e)))}),{previous:n.previous,listeners:n.listeners}})})},30);return t.on("remove",function(){i.cancel()}),t.on("NodeChange",function(){i.throttle()}),{addListener:function(t,e){o(t,function(t){return{previous:t.previous,listeners:t.listeners.concat([e])}})}}}(t);return{register:function(t,e){n.register(t,e)},annotate:function(e,r){n.lookup(e).each(function(n){!function(t,e,n,r){t.undoManager.transact(function(){var o=t.selection.getRng();if(o.collapsed&&function(t,e){var n=Nc(t,e,[{inline:!0}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)}(t,o),t.selection.getRng().collapsed){var i=Bc(t.getDoc(),r,e,n.decorate);Qi(i," "),t.selection.getRng().insertNode(i.dom()),t.selection.select(i.dom())}else{var a=Eu.getPersistentBookmark(t.selection,!1),u=t.selection.getRng();Rc(t,u,e,n.decorate,r),t.selection.moveToBookmark(a)}})}(t,e,n,r)})},annotationChanged:function(t,e){r.addListener(t,e)},remove:function(e){Ki(t,m.some(e)).each(function(t){var e=t.elements;N(e,ne)})},getAll:function(e){var n=function(t,e){var n=et.fromDom(t.getBody()),r=Hi(n,"["+$i()+'="'+e+'"]'),o={};return N(r,function(t){var e=ze(t,Gi()),n=o.hasOwnProperty(e)?o[e]:[];o[e]=n.concat([t])}),o}(t,e);return $(n,function(t){return D(t,function(t){return t.dom()})})}}},Lc=/^[ \t\r\n]*$/,Hc={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Fc=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 a=t.parent;a&&a!==e;a=a.parent)if(i=a[o])return i}},Vc=function(t){if(!Lc.test(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},jc=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,Hc[e]||1);if(n)for(var o in n)r.attr(o,n[o]);return r},t.prototype.replace=function(t){return t.parent&&t.remove(),this.insert(t,this),this.remove(),this},t.prototype.attr=function(t,e){var n;if("string"!=typeof t){for(var r in t)this.attr(r,t[r]);return this}if(n=this.attributes){if(void 0!==e){if(null===e){if(t in n.map){delete n.map[t];for(var o=n.length;o--;)if(n[o].name===t)return n.splice(o,1),this}return this}if(t in n.map){for(o=n.length;o--;)if(n[o].name===t){n[o].value=e;break}}else n.push({name:t,value:e});return n.map[t]=e,this}return n.map[t]}},t.prototype.clone=function(){var e,n=new t(this.name,this.type);if(e=this.attributes){var r=[];r.map={};for(var o=0,i=e.length;o<i;o++){var a=e[o];"id"!==a.name&&(r[r.length]={name:a.name,value:a.value},r.map[a.name]=a.value)}n.attributes=r}return n.value=this.value,n.shortEnded=this.shortEnded,n},t.prototype.wrap=function(t){return this.parent.insert(t,this),t.append(this),this},t.prototype.unwrap=function(){for(var t=this.firstChild;t;){var e=t.next;this.insert(t,this,!0),t=e}this.remove()},t.prototype.remove=function(){var t=this.parent,e=this.next,n=this.prev;return t&&(t.firstChild===this?(t.firstChild=e,e&&(e.prev=null)):n.next=e,t.lastChild===this?(t.lastChild=n,n&&(n.next=null)):e.prev=n,this.parent=this.next=this.prev=null),this},t.prototype.append=function(t){t.parent&&t.remove();var e=this.lastChild;return e?(e.next=t,t.prev=e,this.lastChild=t):this.lastChild=this.firstChild=t,t.parent=this,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=[],n=this.firstChild;n;n=Fc(n,this))n.name===t&&e.push(n);return e},t.prototype.empty=function(){if(this.firstChild){for(var t=[],e=this.firstChild;e;e=Fc(e,this))t.push(e);for(var n=t.length;n--;)(e=t[n]).parent=e.firstChild=e.lastChild=e.next=e.prev=null}return this.firstChild=this.lastChild=null,this},t.prototype.isEmpty=function(t,e,n){void 0===e&&(e={});var r=this.firstChild;if(r)do{if(1===r.type){if(r.attr("data-mce-bogus"))continue;if(t[r.name])return!1;for(var o=r.attributes.length;o--;){var i=r.attributes[o].name;if("name"===i||0===i.indexOf("data-mce-bookmark"))return!1}}if(8===r.type)return!1;if(3===r.type&&!Vc(r))return!1;if(3===r.type&&r.parent&&e[r.parent.name]&&Lc.test(r.value))return!1;if(n&&n(r))return!1}while(r=Fc(r,this));return!0},t.prototype.walk=function(t){return Fc(this,null,t)},t}(),Uc=function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")},Wc=function(t,e){return!t.allow_html_data_urls&&(/^data:image\//i.test(e)?!1===t.allow_svg_data_urls&&/^data:image\/svg\+xml/i.test(e):/^data:/i.test(e))},qc=function(t,e,n){var r,o,i,a,u=1;for(a=t.getShortEndedElements(),(i=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;o=i.exec(e);){if(r=i.lastIndex,"/"===o[1])u--;else if(!o[1]){if(o[2]in a)continue;u++}if(0===u)break}return r},Yc=function(t,e,n){void 0===n&&(n=0);var r=t.toLowerCase();if(-1!==r.indexOf("[if ",n)&&function(t,e){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(r.substr(e))}(0,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 a=/--!?>/;a.lastIndex=n;var u=a.exec(t);return u?u.index+u[0].length:r.length},$c=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};function Gc(t,e){void 0===e&&(e=cr());var n=function(){};!1!==(t=t||{}).fix_self_closing&&(t.fix_self_closing=!0);var r=t.comment?t.comment:n,o=t.cdata?t.cdata:n,i=t.text?t.text:n,a=t.start?t.start:n,u=t.end?t.end:n,s=t.pi?t.pi:n,c=t.doctype?t.doctype:n;return{parse:function(n,l){void 0===l&&(l="html");var f,d,h,m,p,g,v,b,y,x,w,C,_,k,S,T,E,O,D,N,A,M,I,z,B,R,P,L,H,F=0,V=[],j=0,U=Qn.decode,W=En.makeMap("src,href,data,background,formaction,poster,xlink:href"),q=/((java|vb)script|mhtml):/i,Y="html"===l?0:1,$=function(t){var e,n;for(e=V.length;e--&&V[e].name!==t;);if(e>=0){for(n=V.length-1;n>=e;n--)(t=V[n]).valid&&u(t.name);V.length=e}},G=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),r(e))},K=function(t,e){var r=t||"",o=!vt(r,"--"),i=Yc(n,o,e);return t=n.substr(e,i-e),G(o?r+t:t),i+1},X=function(e,n,r,o,i){var a,u;if(r=(n=n.toLowerCase())in w?n:U(r||o||i||""),_&&!b&&!1===Uc(n)){if(!(a=O[n])&&D){for(u=D.length;u--&&!(a=D[u]).pattern.test(n););-1===u&&(a=null)}if(!a)return;if(a.validValues&&!(r in a.validValues))return}if(W[n]&&!t.allow_script_urls){var s=r.replace(/[\s\u0000-\u001F]+/g,"");try{s=decodeURIComponent(s)}catch(t){s=unescape(s)}if(q.test(s))return;if(Wc(t,s))return}b&&(n in W||0===n.indexOf("on"))||(m.map[n]=r,m.push({name:n,value:r}))};for(B=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"),R=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,x=e.getShortEndedElements(),z=t.self_closing_elements||e.getSelfClosingElements(),w=e.getBoolAttrs(),_=t.validate,y=t.remove_internals,H=t.fix_self_closing,P=e.getSpecialElements(),I=n+">";f=B.exec(I);){var J=f[0];if(F<f.index&&i(U(n.substr(F,f.index-F))),d=f[7])":"===(d=d.toLowerCase()).charAt(0)&&(d=d.substr(1)),$(d);else if(d=f[8]){if(f.index+J.length>n.length){i(U(n.substr(f.index))),F=f.index+J.length;continue}":"===(d=d.toLowerCase()).charAt(0)&&(d=d.substr(1)),C=d in x,H&&z[d]&&V.length>0&&V[V.length-1].name===d&&$(d);var Q=$c(R,f[9]);if(null!==Q){if("all"===Q){F=qc(e,n,B.lastIndex),B.lastIndex=F;continue}S=!1}if(!_||(k=e.getElementRule(d))){if(S=!0,_&&(O=k.attributes,D=k.attributePatterns),(E=f[9])?((b=-1!==E.indexOf("data-mce-type"))&&y&&(S=!1),(m=[]).map={},E.replace(R,X)):(m=[]).map={},_&&!b){if(N=k.attributesRequired,A=k.attributesDefault,M=k.attributesForced,k.removeEmptyAttrs&&!m.length&&(S=!1),M)for(p=M.length;p--;)v=(T=M[p]).name,"{$uid}"===(L=T.value)&&(L="mce_"+j++),m.map[v]=L,m.push({name:v,value:L});if(A)for(p=A.length;p--;)(v=(T=A[p]).name)in m.map||("{$uid}"===(L=T.value)&&(L="mce_"+j++),m.map[v]=L,m.push({name:v,value:L}));if(N){for(p=N.length;p--&&!(N[p]in m.map););-1===p&&(S=!1)}if(T=m.map["data-mce-bogus"]){if("all"===T){F=qc(e,n,B.lastIndex),B.lastIndex=F;continue}S=!1}}S&&a(d,m,C)}else S=!1;if(h=P[d]){h.lastIndex=F=f.index+J.length,(f=h.exec(n))?(S&&(g=n.substr(F,f.index-F)),F=f.index+f[0].length):(g=n.substr(F),F=n.length),S&&(g.length>0&&i(g,!0),u(d)),B.lastIndex=F;continue}C||(E&&E.indexOf("/")===E.length-1?S&&u(d):V.push({name:d,valid:S}))}else if(d=f[1])G(d);else if(d=f[2]){if(!(1===Y||t.preserve_cdata||V.length>0&&e.isValidChild(V[V.length-1].name,"#cdata"))){F=K("",f.index+2),B.lastIndex=F;continue}o(d)}else if(d=f[3])c(d);else{if((d=f[4])||"<!"===J){F=K(d,f.index+J.length),B.lastIndex=F;continue}if(d=f[5]){if(1!==Y){F=K("?",f.index+2),B.lastIndex=F;continue}s(d,f[6])}}F=f.index+J.length}for(F<n.length&&i(U(n.substr(F))),p=V.length-1;p>=0;p--)(d=V[p]).valid&&u(d.name)}}}(Gc||(Gc={})).findEndTag=qc;var Kc,Xc,Jc,Qc=Gc,Zc=function(t,e){var n,r,o,i,a,u=e,s=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,c=t.schema;for(u=function(t,e){var n=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return e.replace(n,"")}(t.getTempAttrs(),u),a=c.getShortEndedElements();i=s.exec(u);)r=s.lastIndex,o=i[0].length,n=a[i[1]]?r:Qc.findEndTag(c,u,r),u=u.substring(0,r-o)+u.substring(n),s.lastIndex=r-o;return oa(u)},tl=Zc,el=Zc,nl=En.makeMap,rl=function(t){var e,n,r,o,i,a=[];return e=(t=t||{}).indent,n=nl(t.indent_before||""),r=nl(t.indent_after||""),o=Qn.getEncodeFunc(t.entity_encoding||"raw",t.entities),i="html"===t.element_format,{start:function(t,u,s){var c,l,f,d;if(e&&n[t]&&a.length>0&&(d=a[a.length-1]).length>0&&"\n"!==d&&a.push("\n"),a.push("<",t),u)for(c=0,l=u.length;c<l;c++)f=u[c],a.push(" ",f.name,'="',o(f.value,!0),'"');a[a.length]=!s||i?">":" />",s&&e&&r[t]&&a.length>0&&(d=a[a.length-1]).length>0&&"\n"!==d&&a.push("\n")},end:function(t){var n;a.push("</",t,">"),e&&r[t]&&a.length>0&&(n=a[a.length-1]).length>0&&"\n"!==n&&a.push("\n")},text:function(t,e){t.length>0&&(a[a.length]=e?t:o(t))},cdata:function(t){a.push("<![CDATA[",t,"]]>")},comment:function(t){a.push("\x3c!--",t,"--\x3e")},pi:function(t,n){n?a.push("<?",t," ",o(n),"?>"):a.push("<?",t,"?>"),e&&a.push("\n")},doctype:function(t){a.push("<!DOCTYPE",t,">",e?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}},ol=function(t,e){void 0===e&&(e=cr());var n=rl(t);return(t=t||{}).validate=!("validate"in t)||t.validate,{serialize:function(r){var o,i;i=t.validate,o={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{a(t)}while(t=t.next)}},n.reset();var a=function t(r){var a,u,s,c,l,f,d,h,m,p=o[r.type];if(p)p(r);else{if(a=r.name,u=r.shortEnded,s=r.attributes,i&&s&&s.length>1&&((f=[]).map={},m=e.getElementRule(r.name))){for(d=0,h=m.attributesOrder.length;d<h;d++)(c=m.attributesOrder[d])in s.map&&(l=s.map[c],f.map[c]=l,f.push({name:c,value:l}));for(d=0,h=s.length;d<h;d++)(c=s[d].name)in f.map||(l=s.map[c],f.map[c]=l,f.push({name:c,value:l}));s=f}if(n.start(r.name,s,u),!u){if(r=r.firstChild)do{t(r)}while(r=r.next);n.end(a)}}};return 1!==r.type||t.inner?o[11](r):a(r),n.getContent()}}},il=function(t){var e=Lt(t).dom();return t.dom()===e.activeElement},al=function(t){var e=void 0!==t?t.dom():n.document;return m.from(e.activeElement).map(et.fromDom)},ul=function(t){if(!b(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=[],r={};return N(t,function(o,i){var a=W(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],s=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!b(s))throw new Error("case arguments must be an array");e.push(u),r[u]=function(){var r=arguments.length;if(r!==s.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+s.length+" ("+s+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(t){var n=W(t);if(e.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+n.join(","));if(!L(e,function(t){return E(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,o)},log:function(t){n.console.log(t,{constructors:e,constructor:u,params:o})}}}}),r},sl={create:Et("start","soffset","finish","foffset")},cl=ul([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ll=(cl.before,cl.on,cl.after,function(t){return t.fold(a,a,a)}),fl=ul([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),dl={domRange:fl.domRange,relative:fl.relative,exact:fl.exact,exactFromRange:function(t){return fl.exact(t.start(),t.soffset(),t.finish(),t.foffset())},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return et.fromDom(t.startContainer)},relative:function(t,e){return ll(t)},exact:function(t,e,n,r){return t}})}(t);return Ht(e)},range:sl.create},hl=Tt().browser,ml=function(t,e){var n=ae(e)?zc(e).length:qt(e).length+1;return t>n?n:t<0?0:t},pl=function(t){return dl.range(t.start(),ml(t.soffset(),t.start()),t.finish(),ml(t.foffset(),t.finish()))},gl=function(t,e){return!De.isRestrictedNode(e.dom())&&(Pt(t,e)||Rt(t,e))},vl=function(t){return function(e){return gl(t,e.start())&&gl(t,e.finish())}},bl=function(t){return dl.range(et.fromDom(t.startContainer),t.startOffset,et.fromDom(t.endContainer),t.endOffset)},yl=function(t){return function(t){var e=t.getSelection();return(e&&0!==e.rangeCount?m.from(e.getRangeAt(0)):m.none()).map(bl)}(Ht(t).dom()).filter(vl(t))},xl=function(t){var e=n.document.createRange();try{return e.setStart(t.start().dom(),t.soffset()),e.setEnd(t.finish().dom(),t.foffset()),m.some(e)}catch(t){return m.none()}},wl=function(t){return(t.bookmark?t.bookmark:m.none()).bind(function(e){return function(t,e){return m.from(e).filter(vl(t)).map(pl)}(et.fromDom(t.getBody()),e)}).bind(xl)},Cl=function(t){var e=function(t){return!0===t.inline||hl.isIE()}(t)?yl(et.fromDom(t.getBody())):m.none();t.bookmark=e.isSome()?e:t.bookmark},_l=wl,kl={isEditorUIElement:function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")}},Sl=function(t){var e=Ii(function(){Cl(t)},0);t.on("init",function(){t.inline&&function(t,e){var r=function(){e.throttle()};Ci.DOM.bind(n.document,"mouseup",r),t.on("remove",function(){Ci.DOM.unbind(n.document,"mouseup",r)})}(t,e),function(t,e){Tt().browser.isIE()?function(t){t.on("focusout",function(){Cl(t)})}(t):function(t,e){t.on("mouseup touchend",function(t){e.throttle()})}(t,e),t.on("keyup NodeChange",function(e){(function(t){return"nodechange"===t.type&&t.selectionChange})(e)||Cl(t)})}(t,e)}),t.on("remove",function(){e.cancel()})},Tl=Ci.DOM,El=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==Tl.getParent(e,function(e){return function(t){return kl.isEditorUIElement(t)}(e)||!!n&&t.dom.is(e,n)})},Ol=function(t,e){var r=e.editor;Sl(r),r.on("focusin",function(){var e=t.focusedEditor;e!==this&&(e&&e.fire("blur",{focusedEditor:this}),t.setActive(this),t.focusedEditor=this,this.fire("focus",{blurredEditor:e}),this.focus(!0))}),r.on("focusout",function(){var e=this;ln.setEditorTimeout(e,function(){var r=t.focusedEditor;El(e,function(){try{return n.document.activeElement}catch(t){return n.document.body}}())||r!==e||(e.fire("blur",{focusedEditor:null}),t.focusedEditor=null)})}),Kc||(Kc=function(e){var r,o=t.activeEditor;r=e.target,o&&r.ownerDocument===n.document&&(r===n.document.body||El(o,r)||t.focusedEditor!==o||(o.fire("blur",{focusedEditor:null}),t.focusedEditor=null))},Tl.bind(n.document,"focusin",Kc))},Dl=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(Tl.unbind(n.document,"focusin",Kc),Kc=null)},Nl=function(t){t.on("AddEditor",u(Ol,t)),t.on("RemoveEditor",u(Dl,t))},Al=El,Ml=function(t,e){(function(t,e){return function(t){return t.collapsed?m.from(Ra(t.startContainer,t.startOffset)).map(et.fromDom):m.none()}(e).bind(function(e){return Pn(e)?m.some(e):!1===Pt(t,e)?m.some(t):m.none()})})(et.fromDom(t.getBody()),e).bind(function(t){return Ks.firstPositionIn(t.dom())}).fold(function(){t.selection.normalize()},function(e){return t.selection.setRng(e.toRange())})},Il=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},zl=function(t){return t.inline?function(t){var e=t.getBody();return e&&function(t){return il(t)||(e=t,al(Lt(e)).filter(function(t){return e.dom().contains(t.dom())})).isSome();var e}(et.fromDom(e))}(t):function(t){return t.iframeElement&&il(et.fromDom(t.iframeElement))}(t)},Bl=function(t){return t.editorManager.setActive(t)},Rl=zl,Pl=function(t){return t instanceof jc},Ll=function(t,e){t.dom.setHTML(t.getBody(),e),function(t){Rl(t)&&Ks.firstPositionIn(t.getBody()).each(function(e){var n=e.getNode(),r=De.isTable(n)?Ks.firstPositionIn(n).getOr(e):e;t.selection.setRng(r.toRange())})}(t)},Hl=function(t,e,n){return void 0===n&&(n={}),n.format=n.format?n.format:"html",n.set=!0,n.content=Pl(e)?"":e,Pl(e)||n.no_events||(t.fire("BeforeSetContent",n),e=n.content),m.from(t.getBody()).fold(i(e),function(r){return Pl(e)?function(t,e,n,r){!function(t,e,n){var r=function(t,e,n){var r={},o={},i=[];for(var a in n.firstChild&&function t(e,n){n(e),e.firstChild&&t(e.firstChild,n),e.next&&t(e.next,n)}(n.firstChild,function(n){N(t,function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})}),N(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)r.hasOwnProperty(a)&&i.push(r[a]);for(var u in o)o.hasOwnProperty(u)&&i.push(o[u]);return i}(t,e,n);N(r,function(t){N(t.filter.callbacks,function(e){e(t.nodes,t.filter.name,{})})})}(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=ol({validate:t.validate},t.schema).serialize(n);return r.content=Hn(et.fromDom(e))?o:En.trim(o),Ll(t,r.content),r.no_events||t.fire("SetContent",r),n}(t,r,e,n):function(t,e,n,r){var o,i;return 0===n.length||/^\s+$/.test(n)?(i='<br data-mce-bogus="1">',"TABLE"===e.nodeName?n="<tr><td>"+i+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+i+"</li>"),(o=Uu(t))&&t.schema.isValidChild(e.nodeName.toLowerCase(),o.toLowerCase())?(n=i,n=t.dom.createHTML(o,t.settings.forced_root_block_attrs,n)):n||(n='<br data-mce-bogus="1">'),Ll(t,n),t.fire("SetContent",r)):("raw"!==r.format&&(n=ol({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=Hn(et.fromDom(e))?n:En.trim(n),Ll(t,r.content),r.no_events||t.fire("SetContent",r)),r.content}(t,r,e,n)})},Fl=Ci.DOM,Vl=function(t){return m.from(t).each(function(t){return t.destroy()})},jl=Object.prototype.hasOwnProperty,Ul=(Xc=function(t,e){return v(t)&&v(e)?Ul(t,e):e},function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var o=t[r];for(var i in o)jl.call(o,i)&&(n[i]=Xc(n[i],o[i]))}return n}),Wl=Et("sections","settings"),ql=Tt().deviceType,Yl=ql.isTouch(),$l=ql.isPhone(),Gl=ql.isTablet(),Kl=["lists","autolink","autosave"],Xl={table_grid:!1,object_resizing:!1,resize:!1},Jl=function(t){var e=b(t)?t.join(" "):t,n=D(g(e)?e.split(" "):[],bt);return M(n,function(t){return t.length>0})},Ql=function(t,e){return t.sections().hasOwnProperty(e)},Zl=function(t,e){return J(t,"toolbar_mode").orThunk(function(){return J(t,"toolbar_drawer").map(function(t){return!1===t?"wrap":t})}).getOr(e)},tf=function(t,e){var n={resize:!1,toolbar_mode:Zl(t,"scrolling"),toolbar_sticky:!1};return Z(Z(Z({},Xl),n),e?{menubar:!1}:{})},ef=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?En.extend({},t.external_plugins,n):n},nf=function(t,e,n,r){var o=Jl(n.forced_plugins),i=Jl(r.plugins),a=function(t,e){return Ql(t,e)?t.sections()[e]:{}}(e,"mobile"),s=a.plugins?Jl(a.plugins):i,c=function(t,e){return[].concat(Jl(t)).concat(Jl(e))}(o,t&&function(t,e,n){var r=t.sections();return Ql(t,e)&&"mobile"===r[e].theme}(e,"mobile")?M(s,u(E,Kl)):t&&Ql(e,"mobile")?s:i);return En.extend(r,{plugins:c.join(" ")})},rf=function(t,e,n,r,o){var i=t?{mobile:tf(o,e)}:{},a=function(t,e){var n=X(e,function(e,n){return E(t,n)});return Wl(n.t,n.f)}(["mobile"],Ul(i,o)),u=En.extend(n,r,a.settings(),function(t,e){return t&&Ql(a,"mobile")}(t)?function(t,e,n){void 0===n&&(n={});var r=a.sections(),o=r.hasOwnProperty(e)?r[e]:{};return En.extend({},n,o)}(0,"mobile"):{},{validate:!0,external_plugins:ef(r,a.settings())});return nf(t,a,r,u)},of=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:Zl(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 Z(Z({},i),r?Xl:{})}(o,e,n,Yl,t);return rf($l||Gl,$l,i,r,o)},af=function(t,e,n){return m.from(e.settings[n]).filter(t)},uf=(Jc={},{add:function(t,e){Jc[t]=e},get:function(t){return Jc[t]?Jc[t]:{icons:{}}},has:function(t){return Q(Jc,t)}}),sf=function(t,e){return e.dom()[t]},cf=function(t,e){return parseInt(Re(e,t),10)},lf=u(sf,"clientWidth"),ff=u(sf,"clientHeight"),df=u(cf,"margin-top"),hf=u(cf,"margin-left"),mf={isXYInContentArea:function(t,e,n){var r,o=et.fromDom(t.getBody()),i=t.inline?o:(r=o,et.fromDom(r.dom().ownerDocument.documentElement)),a=function(t,e,n,r){var o=e.dom().getBoundingClientRect();return{x:n-(t?o.left+e.dom().clientLeft+hf(e):0),y:r-(t?o.top+e.dom().clientTop+df(e):0)}}(t.inline,i,e,n);return function(t,e,n){var r=lf(t),o=ff(t);return e>=0&&n>=0&&e<=r&&n<=o}(i,a.x,a.y)},isEditorAttachedToDom:function(t){var e;return(e=t.inline?t.getBody():t.getContentAreaContainer(),m.from(e).map(et.fromDom)).map(function(t){return Pt(Lt(t),t)}).getOr(!1)}};function pf(t){var e=[],n=function(){var e,n=t.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},r=function(){e.length>0&&n().reposition(e)},o=function(t){R(e,function(e){return e===t}).each(function(t){e.splice(t,1)})},i=function(i){if(!t.removed&&mf.isEditorAttachedToDom(t))return B(e,function(t){return e=n().getArgs(t),r=i,!(e.type!==r.type||e.text!==r.text||e.progressBar||e.timeout||r.progressBar||r.timeout);var e,r}).getOrThunk(function(){t.editorManager.setActive(t);var a=n().open(i,function(){o(a),r()});return function(t){e.push(t)}(a),r(),a})};return function(t){t.on("SkinLoaded",function(){var e=t.settings.service_message;e&&i({text:e,type:"warning",timeout:0})}),t.on("ResizeEditor ResizeWindow NodeChange",function(){ln.requestAnimationFrame(r)}),t.on("remove",function(){N(e.slice(),function(t){n().close(t)})})}(t),{open:i,close:function(){m.from(e[0]).each(function(t){n().close(t),o(t),r()})},getNotifications:function(){return e}}}var gf=Mi.PluginManager,vf=Mi.ThemeManager,bf=function(t){var e=[],n=function(){var e,n=t.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:e=function(){throw new Error("Theme did not provide a WindowManager implementation.")},openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}},r=function(t,e){return function(){return e?e.apply(t,arguments):void 0}},o=function(n){e.push(n),function(e){t.fire("OpenWindow",{dialog:e})}(n)},i=function(n){!function(e){t.fire("CloseWindow",{dialog:e})}(n),0===(e=M(e,function(t){return t!==n})).length&&t.focus()},a=function(e){t.editorManager.setActive(t),Cl(t);var n=e();return o(n),n};return t.on("remove",function(){N(e,function(t){n().close(t)})}),{open:function(t,e){return a(function(){return n().open(t,e,i)})},openUrl:function(t){return a(function(){return n().openUrl(t,i)})},alert:function(t,e,o){n().alert(t,r(o||this,e))},confirm:function(t,e,o){n().confirm(t,r(o||this,e))},close:function(){m.from(e[e.length-1]).each(function(t){n().close(t),i(t)})}}},yf=function(t,e){t.notificationManager.open({type:"error",text:e})},xf=function(t,e){t._skinLoaded?yf(t,e):t.on("SkinLoaded",function(){yf(t,e)})},wf=function(t,e,r){!function(t,e,n){t.fire(e,n)}(t,e,{message:r}),n.console.error(r)},Cf=function(t,e,n){return n?"Failed to load "+t+": "+n+" from url "+e:"Failed to load "+t+" url: "+e},_f=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=n.window.console;o&&(o.error?o.error.apply(o,arguments):o.log.apply(o,arguments))},kf=function(t,e,n){wf(t,"PluginLoadError",Cf("plugin",e,n))},Sf=function(t,e,n){wf(t,"IconsLoadError",Cf("icons",e,n))},Tf=function(t,e,n){wf(t,"LanguageLoadError",Cf("language",e,n))},Ef=function(t,e,n){var r=Ni.translate(["Failed to initialize plugin: {0}",e]);_f(r,n),xf(t,r)},Of=function(t,e){xf(t,Ni.translate(["Failed to upload image: {0}",e]))},Df=xf,Nf=_f,Af=function(t){t.contentCSS=t.contentCSS.concat(function(t){var e=function(t){var e=t.settings.content_css;return g(e)?D(e.split(","),bt):b(e)?e:!1===e||t.inline?[]:["default"]}(t),n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return D(e,function(e){return/^[a-z0-9\-]+$/i.test(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)})}(t))};function Mf(t){return{getBookmark:u(nc.getBookmark,t),moveToBookmark:u(nc.moveToBookmark,t)}}(Mf||(Mf={})).isBookmarkNode=nc.isBookmarkNode;var If=Mf,zf=function(t,e,n){if(n.collapsed)return!1;if(yn.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(De.isElement(r))return O(r.getClientRects(),function(n){return za(n,t,e)})}return O(n.getClientRects(),function(n){return za(n,t,e)})},Bf={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,END:35,HOME:36,modifierPressed:function(t){return t.shiftKey||t.ctrlKey||t.altKey||this.metaKeyPressed(t)},metaKeyPressed:function(t){return yn.mac?t.metaKey:t.ctrlKey&&!t.altKey}},Rf=De.isContentEditableFalse,Pf=De.isContentEditableTrue,Lf=function(t,e){var r,o,i,a,u,s,c,l,f,d,h,m,p,g,v,b,y,x=e.dom,w=En.each,C=e.getDoc(),_=n.document,k=Math.abs,S=Math.round,T=e.getBody();a={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var E=function(t){return t&&("IMG"===t.nodeName||e.dom.is(t,"figure.image"))},O=function(t){var n=t.target;(function(t,e){if("longpress"===t.type||0===t.type.indexOf("touch")){var n=t.touches[0];return E(t.target)&&!zf(n.clientX,n.clientY,e)}return E(t.target)&&!zf(t.clientX,t.clientY,e)})(t,e.selection.getRng())&&!t.isDefaultPrevented()&&e.selection.select(n)},D=function(t){return e.dom.is(t,"figure.image")?t.querySelector("img"):t},N=function(t){var n=function(t){return t.getParam("object_resizing")}(e);return!1!==n&&!yn.iOS&&("string"!=typeof n&&(n="table,img,figure.image,div"),"false"!==t.getAttribute("data-mce-resize")&&t!==e.getBody()&&zt(et.fromDom(t),n))},A=function(t){var n,a,w,C;n=t.screenX-s,a=t.screenY-c,g=n*u[2]+d,v=a*u[3]+h,g=g<5?5:g,v=v<5?5:v,(E(r)&&!1!==function(t){return t.getParam("resize_img_proportional",!0,"boolean")}(e)?!Bf.modifierPressed(t):Bf.modifierPressed(t))&&(k(n)>k(a)?(v=S(g*m),g=S(v/m)):(g=S(v/m),v=S(g*m))),x.setStyles(D(o),{width:g,height:v}),w=(w=u.startPos.x+n)>0?w:0,C=(C=u.startPos.y+a)>0?C:0,x.setStyles(i,{left:w,top:C,display:"block"}),i.innerHTML=g+" &times; "+v,u[2]<0&&o.clientWidth<=g&&x.setStyle(o,"left",l+(d-g)),u[3]<0&&o.clientHeight<=v&&x.setStyle(o,"top",f+(h-v)),(n=T.scrollWidth-b)+(a=T.scrollHeight-y)!=0&&x.setStyles(i,{left:w-n,top:C-a}),p||(function(t,e,n,r){t.fire("ObjectResizeStart",{target:e,width:n,height:r})}(e,r,d,h),p=!0)},M=function t(){p=!1;var n=function(t,n){n&&(r.style[t]||!e.schema.isValid(r.nodeName.toLowerCase(),t)?x.setStyle(D(r),t,n):x.setAttrib(D(r),t,n))};n("width",g),n("height",v),x.unbind(C,"mousemove",A),x.unbind(C,"mouseup",t),_!==C&&(x.unbind(_,"mousemove",A),x.unbind(_,"mouseup",t)),x.remove(o),x.remove(i),I(r),function(t,e,n,r){t.fire("ObjectResized",{target:e,width:n,height:r})}(e,r,g,v),x.setAttrib(r,"style",x.getAttrib(r,"style")),e.nodeChanged()},I=function(t){var n,p,k,S,E;z(),P(),n=x.getPos(t,T),l=n.x,f=n.y,E=t.getBoundingClientRect(),p=E.width||E.right-E.left,k=E.height||E.bottom-E.top,r!==t&&(r=t,g=v=0),S=e.fire("ObjectSelected",{target:t}),N(t)&&!S.isDefaultPrevented()?w(a,function(t,e){var n;(n=x.get("mceResizeHandle"+e))&&x.remove(n),n=x.add(T,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===yn.ie&&(n.contentEditable=!1),x.bind(n,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),function(e){s=e.screenX,c=e.screenY,d=D(r).clientWidth,h=D(r).clientHeight,m=h/d,u=t,t.startPos={x:p*t[0]+l,y:k*t[1]+f},b=T.scrollWidth,y=T.scrollHeight,o=r.cloneNode(!0),x.addClass(o,"mce-clonedresizable"),x.setAttrib(o,"data-mce-bogus","all"),o.contentEditable=!1,o.unSelectabe=!0,x.setStyles(o,{left:l,top:f,margin:0}),o.removeAttribute("data-mce-selected"),T.appendChild(o),x.bind(C,"mousemove",A),x.bind(C,"mouseup",M),_!==C&&(x.bind(_,"mousemove",A),x.bind(_,"mouseup",M)),i=x.add(T,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},d+" &times; "+h)}(e)}),t.elm=n,x.setStyles(n,{left:p*t[0]+l-n.offsetWidth/2,top:k*t[1]+f-n.offsetHeight/2})}):z(),r.setAttribute("data-mce-selected","1")},z=function(){var t,e;for(t in P(),r&&r.removeAttribute("data-mce-selected"),a)(e=x.get("mceResizeHandle"+t))&&(x.unbind(e),x.remove(e))},B=function(n){var r,o=function(t,e){if(t)do{if(t===e)return!0}while(t=t.parentNode)};p||e.removed||(w(x.select("img[data-mce-selected],hr[data-mce-selected]"),function(t){t.removeAttribute("data-mce-selected")}),r="mousedown"===n.type?n.target:t.getNode(),o(r=x.$(r).closest("table,img,figure.image,hr")[0],T)&&(L(),o(t.getStart(!0),r)&&o(t.getEnd(!0),r))?I(r):z())},R=function(t){return Rf(function(t,e){for(;e&&e!==t;){if(Pf(e)||Rf(e))return e;e=e.parentNode}return null}(e.getBody(),t))},P=function(){for(var t in a){var e=a[t];e.elm&&(x.unbind(e.elm),delete e.elm)}},L=function(){try{e.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(t){}};return e.on("init",function(){if(L(),yn.browser.isIE()||yn.browser.isEdge()){e.on("mousedown click",function(t){var n=t.target,r=n.nodeName;p||!/^(TABLE|IMG|HR)$/.test(r)||R(n)||(2!==t.button&&e.selection.select(n,"TABLE"===r),"mousedown"===t.type&&e.nodeChanged())});var t=function(t){var n=function(t){ln.setEditorTimeout(e,function(){return e.selection.select(t)})};if(R(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))};x.bind(T,"mscontrolselect",t),e.on("remove",function(){return x.unbind(T,"mscontrolselect",t)})}var n=ln.throttle(function(t){e.composing||B(t)});e.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged",n),e.on("keyup compositionend",function(t){r&&"TABLE"===r.nodeName&&n(t)}),e.on("hide blur",z),e.on("contextmenu longpress",O,!0)}),e.on("remove",P),{isResizable:N,showResizeRect:I,hideResizeRect:z,updateResizeRect:B,destroy:function(){r=o=null}}},Hf=function(t,e){var n=function(e){var n=function(t){var e=t.dom();return ue(t)?e.getBoundingClientRect().height:e.offsetHeight}(e);if(n<=0||null===n){var r=Re(e,t);return parseFloat(r)||0}return n},r=function(t,e){return z(e,function(e,n){var r=Re(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o},0)};return{set:function(e,n){if(!C(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom();Ne(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}}("height"),Ff=function t(e,n){return e.view(n).fold(i([]),function(n){var r=e.owner(n),o=t(e,r);return[n].concat(o)})},Vf=Object.freeze({__proto__:null,view:function(t){return(t.dom()===n.document?m.none():m.from(t.dom().defaultView.frameElement)).map(et.fromDom)},owner:function(t){return Lt(t)}}),jf=function(t){return"textarea"===re(t)},Uf=function(t,e){var n=function(t){var e=t.dom().ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom())return se(n.offsetLeft,n.offsetTop);var i=ce(r.pageYOffset,o.scrollTop),a=ce(r.pageXOffset,o.scrollLeft),u=ce(o.clientTop,n.clientTop),s=ce(o.clientLeft,n.clientLeft);return le(t).translate(a-s,i-u)}(t),r=function(t){return Hf.get(t)}(t);return{element:t,bottom:n.top()+r,height:r,pos:n,cleanup:e}},Wf=function(t,e,n,r){Gf(t,function(o,i){return Yf(t,e,n,r)},n)},qf=function(t,e,n,r,o){var i={elm:r.element.dom(),alignToTop:o};(function(t,e){return t.fire("ScrollIntoView",e).isDefaultPrevented()})(t,i)||(n(e,de(e).top(),r,o),function(t,e){t.fire("AfterScrollIntoView",e)}(t,i))},Yf=function(t,e,n,r){var o=et.fromDom(t.getBody()),i=et.fromDom(t.getDoc());o.dom().offsetWidth;var a=function(t,e){var n=function(t,e){var n=qt(t);if(0===n.length||jf(t))return{element:t,offset:e};if(e<n.length&&!jf(n[e]))return{element:n[e],offset:0};var r=n[n.length-1];return jf(r)?{element:t,offset:e}:"img"===re(r)?{element:r,offset:1}:ae(r)?{element:r,offset:zc(r).length}:{element:r,offset:qt(r).length}}(t,e),r=et.fromHtml('<span data-mce-bogus="all">'+ra+"</span>");return Kt(n.element,r),Uf(r,function(){return ee(r)})}(et.fromDom(n.startContainer),n.startOffset);qf(t,i,e,a,r),a.cleanup()},$f=function(t,e,n,o){var i=et.fromDom(t.getDoc());qf(t,i,n,function(t){return Uf(et.fromDom(t),r)}(e),o)},Gf=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(et.fromDom(r),et.fromDom(i));var u=t.dom.createRng();u.setStart(r,o),u.setEnd(i,a),t.selection.setRng(n)},Kf=function(t,e,n,r){var o=t.pos;if(n)he(o.left(),o.top(),r);else{var i=o.top()-e+t.height;he(o.left(),i,r)}},Xf=function(t,e,n,r,o){var i=n+e,a=r.pos.top(),u=r.bottom,s=u-a>=n;a<e?Kf(r,n,!1!==o,t):a>i?Kf(r,n,s?!1!==o:!0===o,t):u>i&&!s&&Kf(r,n,!0===o,t)},Jf=function(t,e,n,r){var o=t.dom().defaultView.innerHeight;Xf(t,e,o,n,r)},Qf=function(t,e,r,o){var i=t.dom().defaultView.innerHeight;Xf(t,e,i,r,o);var a=function(t){var e=et.fromDom(n.document),r=de(e),o=function(t,e){var n=e.owner(t);return Ff(e,n)}(t,Vf),i=le(t),a=I(o,function(t,e){var n=le(e);return{left:t.left+n.left(),top:t.top+n.top()}},{left:0,top:0});return se(a.left+i.left()+r.left(),a.top+i.top()+r.top())}(r.element),u=ge(n.window);a.top()<u.y()?me(r.element,!1!==o):a.top()>u.bottom()&&me(r.element,!0===o)},Zf=function(t,e,n){(t.inline?function(t,e,n){return $f(t,e,Jf,n)}:function(t,e,n){return $f(t,e,Qf,n)})(t,e,n)},td=function(t,e,n){(t.inline?function(t,e,n){return Wf(t,Jf,e,n)}:function(t,e,n){return Wf(t,Qf,e,n)})(t,e,n)},ed=function(t){return De.isContentEditableTrue(t)||De.isContentEditableFalse(t)},nd=function(t,e,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(t,e))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(t,e);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,e),r.collapse(!0)}catch(o){r=function(t,e,n){var r,o,i;if(r=n.elementFromPoint(t,e),o=n.body.createTextRange(),r&&"HTML"!==r.tagName||(r=n.body),o.moveToElementText(r),(i=(i=En.toArray(o.getClientRects())).sort(function(t,n){return(t=Math.abs(Math.max(t.top-e,t.bottom-e)))-Math.abs(Math.max(n.top-e,n.bottom-e))})).length>0){e=(i[0].bottom+i[0].top)/2;try{return o.moveToPoint(t,e),o.collapse(!0),o}catch(t){}}return null}(t,e,n)}return function(t,e){var n=t&&t.parentElement?t.parentElement():null;return De.isContentEditableFalse(function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(n,e,ed))?null:t}(r,n.body)}return r},rd=function(t,e){return D(e,function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e})},od=function(t,e){var r=(e||n.document).createDocumentFragment();return N(t,function(t){r.appendChild(t.dom())}),et.fromDom(r)},id=function(t,e){return function(t,e,n){return Pt(e,t)?function(t,e){for(var n=w(e)?e:c,r=t.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=et.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,function(t){return n(t)||Rt(t,e)}).slice(0,-1):[]}(t,e,i(!1))},ad=id,ud=function(t,e){return[t].concat(id(t,e))},sd=function(t,e){return Ha(function(t){var e=t.startContainer,n=t.startOffset;return De.isText(e)?0===n?m.some(et.fromDom(e)):m.none():m.from(e.childNodes[n]).map(et.fromDom)}(e),function(t){var e=t.endContainer,n=t.endOffset;return De.isText(e)?n===e.data.length?m.some(et.fromDom(e)):m.none():m.from(e.childNodes[n-1]).map(et.fromDom)}(e),function(e,n){var r=B(function t(e){return $t(e).fold(i([e]),function(n){return[e].concat(t(n))})}(t),u(Rt,e)),o=B(function t(e){return Gt(e).fold(i([e]),function(n){return"br"===re(n)?Vt(n).map(function(n){return[e].concat(t(n))}).getOr([]):[e].concat(t(n))})}(t),u(Rt,n));return r.isSome()&&o.isSome()}).getOr(!1)},cd=function(t,e,n,r){var o=n,i=new di(n,o),a=t.schema.getNonEmptyElements();do{if(3===n.nodeType&&0!==En.trim(n.nodeValue).length)return void(r?e.setStart(n,0):e.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(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))},ld=function(t){var e=t.selection.getSel();return e&&e.rangeCount>0},fd=Et("element","width","rows"),dd=Et("element","cells"),hd=Et("x","y"),md=function(t,e){var n=parseInt(ze(t,e),10);return isNaN(n)?1:n},pd=function(t,e,n){var r=t.rows();return!!(r[n]?r[n].cells():[])[e]},gd=function(t){return z(t,function(t,e){return e.cells().length>t?e.cells().length:t},0)},vd=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(Rt(o[i],e))return m.some(hd(i,r));return m.none()},bd=function(t,e,n,r,o){for(var i=[],a=t.rows(),u=n;u<=o;u++){var s=a[u].cells(),c=e<r?s.slice(e,r+1):s.slice(r,e+1);i.push(dd(a[u].element(),c))}return i},yd=function(t){return function(t,e){var n=ta(t.element()),r=et.fromTag("tbody");return Zt(r,e),Qt(n,r),n}(t,function(t){return D(t.rows(),function(t){var e=D(t.cells(),function(t){var e=ea(t);return Be(e,"colspan"),Be(e,"rowspan"),e}),n=ta(t.element());return Zt(n,e),n})}(t))},xd=function(t){var e=[];if(t)for(var n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e},wd=xd,Cd=function(t){return M(function(t){return P(t,function(t){var e=Ba(t);return e?[et.fromDom(e)]:[]})}(t),Ln)},_d=function(t,e){var n=function(t){return Hi(t,"td[data-mce-selected],th[data-mce-selected]")}(e),r=Cd(t);return n.length>0?n:r},kd=_d,Sd=function(t){return _d(wd(t.selection.getSel()),et.fromDom(t.getBody()))},Td=function(t,e){var n=et.fromDom(e.commonAncestorContainer),r=ud(n,t),o=M(r,function(t){return An(t)||Dn(t)}),a=function(t,e){return B(t,function(t){return"li"===re(t)&&sd(t,e)}).fold(i([]),function(e){return function(t){return B(t,function(t){return"ul"===re(t)||"ol"===re(t)})}(t).map(function(t){return[et.fromTag("li"),et.fromTag(re(t))]}).getOr([])})}(r,e),u=o.concat(a.length?a:function(t){return Bn(t)?Ft(t).filter(zn).fold(i([]),function(e){return[t,e]}):zn(t)?[t]:[]}(n));return D(u,ta)},Ed=function(){return od([])},Od=function(t,e){return(n=t,r=e[0],Ui(r,"table",u(Rt,n))).bind(function(t){var n=e[0],r=e[e.length-1];return function(t,e,n){return vd(t,e).bind(function(e){return vd(t,n).map(function(n){return function(t,e,n){var r=e.x(),o=e.y(),i=n.x(),a=n.y(),u=o<a?bd(t,r,o,i,a):bd(t,r,a,i,o);return fd(t.element(),gd(u),u)}(t,e,n)})})}(function(t){var e=fd(ta(t),0,[]);return N(Hi(t,"tr"),function(t,n){N(Hi(t,"td,th"),function(r,o){!function(t,e,n,r,o){for(var i=md(o,"rowspan"),a=md(o,"colspan"),u=t.rows(),s=n;s<n+i;s++){u[s]||(u[s]=dd(ea(r),[]));for(var c=e;c<e+a;c++)u[s].cells()[c]=s===n&&c===e?o:ta(o)}}(e,function(t,e,n){for(;pd(t,e,n);)e++;return e}(e,o,n),n,t,r)})}),fd(e.element(),gd(e.rows()),e.rows())}(t),n,r).map(function(t){return od([yd(t)])})}).getOrThunk(Ed);var n,r},Dd=function(t,e){var n=kd(e,t);return n.length>0?Od(t,n):function(t,e){return e.length>0&&e[0].collapsed?Ed():function(t,e){return n=et.fromDom(e.cloneContents()),r=Td(t,e),o=z(r,function(t,e){return Qt(e,t),e},n),r.length>0?od([o]):o;var n,r,o}(t,e[0])}(t,e)},Nd={isEq:function(t,e){return t&&e&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset}},Ad=function(t,e,n){return null!==function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(t,e,n)},Md=function(t,e,n){return Ad(t,e,function(t){return t.nodeName===n})},Id=function(t){return t&&"TABLE"===t.nodeName},zd=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},Bd=function(t,e){return ca(t)&&!1===Ad(t,e,Nu)},Rd=function(t,e,n){for(var r=new di(e,t.getParent(e.parentNode,t.isBlock)||t.getRoot());e=r[n?"prev":"next"]();)if(De.isBr(e))return!0},Pd=function(t,e,n,r,o){var i,a,u=t.getRoot(),s=t.schema.getNonEmptyElements(),c=t.getParent(o.parentNode,t.isBlock)||u;if(r&&De.isBr(o)&&e&&t.isEmpty(c))return m.some(iu(o.parentNode,t.nodeIndex(o)));for(var l=new di(o,c);a=l[r?"prev":"next"]();){if("false"===t.getContentEditableParent(a)||Bd(a,u))return m.none();if(De.isText(a)&&a.nodeValue.length>0)return!1===Md(a,u,"A")?m.some(iu(a,r?a.nodeValue.length:0)):m.none();if(t.isBlock(a)||s[a.nodeName.toLowerCase()])return m.none();i=a}return n&&i?m.some(iu(i,0)):m.none()},Ld=function(t,e,n,r){var o,i,a,u,s,c,l=t.getRoot(),f=!1;if(o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"],c=De.isElement(o)&&i===o.childNodes.length,u=t.schema.getNonEmptyElements(),s=n,ca(o))return m.none();if(De.isElement(o)&&i>o.childNodes.length-1&&(s=!1),De.isDocument(o)&&(o=l,i=0),o===l){if(s&&(a=o.childNodes[i>0?i-1:0])){if(ca(a))return m.none();if(u[a.nodeName]||Id(a))return m.none()}if(o.hasChildNodes()){if(i=Math.min(!s&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=De.isText(o)&&c?o.data.length:0,!e&&o===l.lastChild&&Id(o))return m.none();if(function(t,e){for(;e&&e!==t;){if(De.isContentEditableFalse(e))return!0;e=e.parentNode}return!1}(l,o)||ca(o))return m.none();if(o.hasChildNodes()&&!1===Id(o)){a=o;var d=new di(o,l);do{if(De.isContentEditableFalse(a)||ca(a)){f=!1;break}if(De.isText(a)&&a.nodeValue.length>0){i=s?0:a.nodeValue.length,o=a,f=!0;break}if(u[a.nodeName.toLowerCase()]&&!zd(a)){i=t.nodeIndex(a),o=a.parentNode,s||i++,f=!0;break}}while(a=s?d.next():d.prev())}}}return e&&(De.isText(o)&&0===i&&Pd(t,c,e,!0,o).each(function(t){o=t.container(),i=t.offset(),f=!0}),De.isElement(o)&&((a=o.childNodes[i])||(a=o.childNodes[i-1]),!a||!De.isBr(a)||function(t,e){return t.previousSibling&&"A"===t.previousSibling.nodeName}(a)||Rd(t,a,!1)||Rd(t,a,!0)||Pd(t,c,e,!0,a).each(function(t){o=t.container(),i=t.offset(),f=!0}))),s&&!e&&De.isText(o)&&i===o.nodeValue.length&&Pd(t,c,e,!1,o).each(function(t){o=t.container(),i=t.offset(),f=!0}),f?m.some(iu(o,i)):m.none()},Hd={normalize:function(t,e){var n=e.collapsed,r=e.cloneRange(),o=iu.fromRangeStart(e);return Ld(t,n,!0,r).each(function(t){n&&iu.isAbove(o,t)||r.setStart(t.container(),t.offset())}),n||Ld(t,n,!1,r).each(function(t){r.setEnd(t.container(),t.offset())}),n&&r.collapse(!0),Nd.isEq(e,r)?m.none():m.some(r)}},Fd=function(t){return 0===t.dom().length?(ee(t),m.none()):m.some(t)},Vd=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,a=n?e.startOffset:e.endOffset;return m.from(i).map(et.fromDom).map(function(t){return r&&e.collapsed?t:Yt(t,o(t,a)).getOr(t)}).bind(function(t){return ie(t)?m.some(t):Ft(t)}).map(function(t){return t.dom()}).getOr(t)},jd=function(t,e,n){return Vd(t,e,!0,n,function(t,e){return Math.min(t.dom().childNodes.length,e)})},Ud=function(t,e,n){return Vd(t,e,!1,n,function(t,e){return e>0?e-1:e})},Wd=function(t,e){for(var n=t;t&&De.isText(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},qd=function(t,e,n){if(t&&t.hasOwnProperty(e)){var r=M(t[e],function(t){return t!==n});0===r.length?delete t[e]:t[e]=r}},Yd=function(t){return!!t.select},$d=function(t){return!(!t||!t.ownerDocument)&&Pt(et.fromDom(t.ownerDocument),et.fromDom(t))},Gd=function(t,e,n,r){var o,i,a,u,s=function(t,e){var n,r;return{selectorChangedWithUnbind:function(o,i){return n||(n={},r={},e.on("NodeChange",function(e){var o=e.element,i=t.getParents(o,null,t.getRoot()),a={};En.each(n,function(e,n){En.each(i,function(o){if(t.is(o,n))return r[n]||(En.each(e,function(t){t(!0,{node:o,selector:n,parents:i})}),r[n]=e),a[n]=e,!1})}),En.each(r,function(t,e){a[e]||(delete r[e],En.each(t,function(t){t(!1,{node:o,selector:e,parents:i})}))})})),n[o]||(n[o]=[]),n[o].push(i),{unbind:function(){qd(n,o,i),qd(r,o,i)}}}}}(t,r).selectorChangedWithUnbind,c=function(t,e){return function(t,e,n){if((n=function(t,e){return(t=t||{format:"html"}).set=!0,t.selection=!0,t.content=e,t}(n,e)).no_events||!(n=t.fire("BeforeSetContent",n)).isDefaultPrevented()){var r=t.selection.getRng();!function(t,e){var n=m.from(e.firstChild).map(et.fromDom),r=m.from(e.lastChild).map(et.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Vt).filter(ae).bind(Fd),i=r.bind(jt).filter(ae).bind(Fd);Ha(o,n.filter(ae),function(t,e){!function(t,e){t.insertData(0,e)}(e.dom(),t.dom().data),ee(t)}),Ha(i,r.filter(ae),function(e,n){var r=n.dom().length;n.dom().appendData(e.dom().data),t.setEnd(n.dom(),r),ee(e)}),t.collapse(!1)}(r,r.createContextualFragment(n.content)),t.selection.setRng(r),td(t,r),n.no_events||t.fire("SetContent",n)}else t.fire("SetContent",n)}(r,t,e)},l=function(t){var e=d();e.collapse(!!t),h(e)},f=function(){return e.getSelection?e.getSelection():e.document.selection},d=function(){var n,o,i,s,c=function(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(t){return-1}};if(!e)return null;if(null==(s=e.document))return null;if(void 0!==r.bookmark&&!1===Rl(r)){var l=_l(r);if(l.isSome())return l.map(function(t){return rd(r,[t])[0]}).getOr(s.createRange())}try{(n=f())&&!De.isRestrictedNode(n.anchorNode)&&(o=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():s.createRange())}catch(t){}return(o=rd(r,[o])[0])||(o=s.createRange?s.createRange():s.body.createTextRange()),o.setStart&&9===o.startContainer.nodeType&&o.collapsed&&(i=t.getRoot(),o.setStart(i,0),o.setEnd(i,0)),a&&u&&(0===c(o.START_TO_START,o,a)&&0===c(o.END_TO_END,o,a)?o=u:(a=null,u=null)),o},h=function(t,e){var n,o;if(function(t){return!!t&&(!!Yd(t)||$d(t.startContainer)&&$d(t.endContainer))}(t)){var i=Yd(t)?t:null;if(i){u=null;try{i.select()}catch(t){}}else{if(n=f(),t=r.fire("SetSelectionRange",{range:t,forward:e}).range,n){u=t;try{n.removeAllRanges(),n.addRange(t)}catch(t){}!1===e&&n.extend&&(n.collapse(t.endContainer,t.endOffset),n.extend(t.startContainer,t.startOffset)),a=n.rangeCount>0?n.getRangeAt(0):null}t.collapsed||t.startContainer!==t.endContainer||!n.setBaseAndExtent||yn.ie||t.endOffset-t.startOffset<2&&t.startContainer.hasChildNodes()&&(o=t.startContainer.childNodes[t.startOffset])&&"IMG"===o.tagName&&(n.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset),n.anchorNode===t.startContainer&&n.focusNode===t.endContainer||n.setBaseAndExtent(o,0,o,1)),r.fire("AfterSetSelectionRange",{range:t,forward:e})}}},p=function(){var e,n,r=f();return!(r&&r.anchorNode&&r.focusNode)||((e=t.createRng()).setStart(r.anchorNode,r.anchorOffset),e.collapse(!0),(n=t.createRng()).setStart(r.focusNode,r.focusOffset),n.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,n)<=0)},g={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:l,setCursorLocation:function(e,n){var o=t.createRng();e?(o.setStart(e,n),o.setEnd(e,n),h(o),l(!1)):(cd(t,o,r.getBody(),!0),h(o))},getContent:function(t){return function(t,e){if(void 0===e&&(e={}),e.get=!0,e.format=e.format||"html",e.selection=!0,(e=t.fire("BeforeGetContent",e)).isDefaultPrevented())return t.fire("GetContent",e),e.content;if("text"===e.format)return function(t){return m.from(t.selection.getRng()).map(function(e){var n=t.dom.add(t.getBody(),"div",{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),r=oa(n.innerText);return t.dom.remove(n),r}).getOr("")}(t);e.getInner=!0;var n=function(t,e){var n,r=t.selection.getRng(),o=t.dom.create("body"),i=t.selection.getSel(),a=rd(t,wd(i));return(n=e.contextual?Dd(et.fromDom(t.getBody()),a).dom():r.cloneContents())&&o.appendChild(n),t.selection.serializer.serialize(o,e)}(t,e);return"tree"===e.format?n:(e.content=t.selection.isCollapsed()?"":n,t.fire("GetContent",e),e.content)}(r,t)},setContent:c,getBookmark:function(t,e){return o.getBookmark(t,e)},moveToBookmark:function(t){return o.moveToBookmark(t)},select:function(e,n){return function(t,e,n){return m.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&&(cd(t,o,e,!0),cd(t,o,e,!1)),o})}(t,e,n).each(h),e},isCollapsed:function(){var t=d(),e=f();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},isForward:p,setNode:function(e){return c(t.getOuterHTML(e)),e},getNode:function(){return t=r.getBody(),(e=d())?(o=e.startContainer,i=e.endContainer,a=e.startOffset,u=e.endOffset,n=e.commonAncestorContainer,!e.collapsed&&(o===i&&u-a<2&&o.hasChildNodes()&&(n=o.childNodes[a]),3===o.nodeType&&3===i.nodeType&&(o=o.length===a?Wd(o.nextSibling,!0):o.parentNode,i=0===u?Wd(i.previousSibling,!1):i.parentNode,o&&o===i))?o:n&&3===n.nodeType?n.parentNode:n):t;var t,e,n,o,i,a,u},getSel:f,setRng:h,getRng:d,getStart:function(t){return jd(r.getBody(),d(),t)},getEnd:function(t){return Ud(r.getBody(),d(),t)},getSelectedBlocks:function(e,n){return function(t,e,n,r){var o,i,a=[];if(i=t.getRoot(),n=t.getParent(n||jd(i,e,e.collapsed),t.isBlock),r=t.getParent(r||Ud(i,e,e.collapsed),t.isBlock),n&&n!==i&&a.push(n),n&&r&&n!==r){o=n;for(var u=new di(n,i);(o=u.next())&&o!==r;)t.isBlock(o)&&a.push(o)}return r&&n!==r&&r!==i&&a.push(r),a}(t,d(),e,n)},normalize:function(){var e=d();if(!function(t){return xd(t).length>1}(f())&&ld(r)){var n=Hd.normalize(t,e);return n.each(function(t){h(t,p())}),n.getOr(e)}return e},selectorChanged:function(t,e){return s(t,e),g},selectorChangedWithUnbind:s,getScrollContainer:function(){for(var e,n=t.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){e=n;break}n=n.parentNode}return e},scrollIntoView:function(t,e){return Zf(r,t,e)},placeCaretAt:function(t,e){return h(nd(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=d();return t.collapsed?uu.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=a=u=null,i.destroy()}};return o=If(g),i=Lf(g,r),g.bookmarkManager=o,g.controlSelection=i,g},Kd=function(t,e){var n=Dr();e.convert_fonts_to_spans&&function(t,e,n){t.addNodeFilter("font",function(t){N(t,function(t){var r=e.parse(t.attr("style")),o=t.attr("color"),i=t.attr("face"),a=t.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(t.attr("size"),10)-1]),t.name="span",t.attr("style",e.serialize(r)),function(t,e){N(["color","face","size"],function(e){t.attr(e,null)})}(t)})})}(t,n,En.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",function(t){N(t,function(t){var n=e.parse(t.attr("style"));n["text-decoration"]="line-through",t.name="span",t.attr("style",e.serialize(n))})})}(t,n)},Xd=function(t,e,n,r){(t.padd_empty_with_br||e.insert)&&n[r.name]?r.empty().append(new jc("br",1)).shortEnded=!0:r.empty().append(new jc("#text",3)).value=" "},Jd=function(t,e){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===e},Qd=function(t,e,n,r){return r.isEmpty(e,n,function(e){return function(t,e){var n=t.getElementRule(e.name);return n&&n.paddEmpty}(t,e)})},Zd=En.makeMap,th=En.each,eh=En.explode,nh=En.extend,rh=function(t,e){void 0===e&&(e=cr());var n={},r=[],o={},i={};(t=t||{}).validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var a=function(t){var e,a,u;(a=t.name)in n&&((u=o[a])?u.push(t):o[a]=[t]),e=r.length;for(;e--;)(a=r[e].name)in t.attributes.map&&((u=i[a])?u.push(t):i[a]=[t]);return t},u={schema:e,addAttributeFilter:function(t,e){th(eh(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]})})},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(t,e){th(eh(t),function(t){var r=n[t];r||(n[t]=r=[]),r.push(e)})},getNodeFilters:function(){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push({name:e,callbacks:n[e]});return t},filterNode:a,parse:function(u,s){var c,l,f,d,h,m,p,g,v,b,y,x=[];s=s||{},o={},i={},v=nh(Zd("script,style,head,html,body,title,meta,param"),e.getBlockElements());var w=e.getNonEmptyElements(),C=e.children,_=t.validate,k=function(t){return!1===t?"":!0===t?"p":t}("forced_root_block"in s?s.forced_root_block:t.forced_root_block),S=e.getWhiteSpaceElements(),T=/^[ \t\r\n]+/,E=/[ \t\r\n]+$/,O=/[ \t\r\n]+/g,D=/^[ \t\r\n]+$/;b=S.hasOwnProperty(s.context)||S.hasOwnProperty(t.root_name);var N=function(t,e){var r,i=new jc(t,e);return t in n&&((r=o[t])?r.push(i):o[t]=[i]),i},A=function(t){var n,r,o,i,a=e.getBlockElements();for(n=t.prev;n&&3===n.type;){if((o=n.value.replace(E,"")).length>0)return void(n.value=o);if(r=n.next){if(3===r.type&&r.value.length){n=n.prev;continue}if(!a[r.name]&&"script"!==r.name&&"style"!==r.name){n=n.prev;continue}}i=n.prev,n.remove(),n=i}};c=Qc({validate:_,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:function(t){var e,n={};for(e in t)"li"!==e&&"p"!==e&&(n[e]=t[e]);return n}(e.getSelfClosingElements()),cdata:function(t){y.append(N("#cdata",4)).value=t},text:function(t,e){var n;b||(t=t.replace(O," "),function(t,e){return t&&(v[t.name]||"br"===t.name)}(y.lastChild)&&(t=t.replace(T,""))),0!==t.length&&((n=N("#text",3)).raw=!!e,y.append(n).value=t)},comment:function(t){y.append(N("#comment",8)).value=t},pi:function(t,e){y.append(N(t,7)).value=e,A(y)},doctype:function(t){y.append(N("#doctype",10)).value=t,A(y)},start:function(t,n,o){var a,u,s,c,l;if(s=_?e.getElementRule(t):{}){for((a=N(s.outputName||t,1)).attributes=n,a.shortEnded=o,y.append(a),(l=C[y.name])&&C[a.name]&&!l[a.name]&&x.push(a),u=r.length;u--;)(c=r[u].name)in n.map&&((p=i[c])?p.push(a):i[c]=[a]);v[t]&&A(a),o||(y=a),!b&&S[t]&&(b=!0)}},end:function(n){var r,o,i,a,u;if(o=_?e.getElementRule(n):{}){if(v[n]&&!b){if((r=y.firstChild)&&3===r.type)if((i=r.value.replace(T,"")).length>0)r.value=i,r=r.next;else for(a=r.next,r.remove(),r=a;r&&3===r.type;)i=r.value,a=r.next,(0===i.length||D.test(i))&&(r.remove(),r=a),r=a;if((r=y.lastChild)&&3===r.type)if((i=r.value.replace(E,"")).length>0)r.value=i,r=r.prev;else for(a=r.prev,r.remove(),r=a;r&&3===r.type;)i=r.value,a=r.prev,(0===i.length||D.test(i))&&(r.remove(),r=a),r=a}if(b&&S[n]&&(b=!1),o.removeEmpty&&Qd(e,w,S,y)&&!y.attr("name")&&!y.attr("id"))return u=y.parent,v[y.name]?y.empty().remove():y.unwrap(),void(y=u);o.paddEmpty&&(function(t){return Jd(t,"#text")&&" "===t.firstChild.value}(y)||Qd(e,w,S,y))&&Xd(t,s,v,y),y=y.parent}}},e);var M=y=new jc(s.context||t.root_name,11);if(c.parse(u,s.format),_&&x.length&&(s.context?s.invalid=!0:function(t){var n,r,o,i,u,s,c,l,f,d,h,m,p,g,v,b;for(m=Zd("tr,td,th,tbody,thead,tfoot,table"),d=e.getNonEmptyElements(),h=e.getWhiteSpaceElements(),p=e.getTextBlockElements(),g=e.getSpecialElements(),n=0;n<t.length;n++)if((r=t[n]).parent&&!r.fixed)if(p[r.name]&&"li"===r.parent.name){for(v=r.next;v&&p[v.name];)v.name="li",v.fixed=!0,r.parent.insert(v,r.parent),v=v.next;r.unwrap(r)}else{for(i=[r],o=r.parent;o&&!e.isValidChild(o.name,r.name)&&!m[o.name];o=o.parent)i.push(o);if(o&&i.length>1){for(i.reverse(),u=s=a(i[0].clone()),f=0;f<i.length-1;f++){for(e.isValidChild(s.name,i[f].name)?(c=a(i[f].clone()),s.append(c)):c=s,l=i[f].firstChild;l&&l!==i[f+1];)b=l.next,c.append(l),l=b;s=c}Qd(e,d,h,u)?o.insert(r,i[0],!0):(o.insert(u,i[0],!0),o.insert(r,u)),o=i[0],(Qd(e,d,h,o)||Jd(o,"br"))&&o.empty().remove()}else if(r.parent){if("li"===r.name){if((v=r.prev)&&("ul"===v.name||"ul"===v.name)){v.append(r);continue}if((v=r.next)&&("ul"===v.name||"ul"===v.name)){v.insert(r,v.firstChild,!0);continue}r.wrap(a(new jc("ul",1)));continue}e.isValidChild(r.parent.name,"div")&&e.isValidChild("div",r.name)?r.wrap(a(new jc("div",1))):g[r.name]?r.empty().remove():r.unwrap()}}}(x)),k&&("body"===M.name||s.isRootContent)&&function(){var n,r,o=M.firstChild,i=function(t){t&&((o=t.firstChild)&&3===o.type&&(o.value=o.value.replace(T,"")),(o=t.lastChild)&&3===o.type&&(o.value=o.value.replace(E,"")))};if(e.isValidChild(M.name,k.toLowerCase())){for(;o;)n=o.next,3===o.type||1===o.type&&"p"!==o.name&&!v[o.name]&&!o.attr("data-mce-type")?r?r.append(o):((r=N(k,1)).attr(t.forced_root_block_attrs),M.insert(r,o),r.append(o)):(i(r),r=null),o=n;i(r)}}(),!s.invalid){for(g in o)if(o.hasOwnProperty(g)){for(p=n[g],h=(l=o[g]).length;h--;)l[h].parent||l.splice(h,1);for(f=0,d=p.length;f<d;f++)p[f](l,g,s)}for(f=0,d=r.length;f<d;f++)if((p=r[f]).name in i){for(h=(l=i[p.name]).length;h--;)l[h].parent||l.splice(h,1);for(h=0,m=p.callbacks.length;h<m;h++)p.callbacks[h](l,p.name,s)}}return M}};return function(t,e){var n=t.schema;e.remove_trailing_brs&&t.addNodeFilter("br",function(t,r,o){var i,a,u,s,c,l,f,d,h=t.length,m=En.extend({},n.getBlockElements()),p=n.getNonEmptyElements(),g=n.getNonEmptyElements();for(m.body=1,i=0;i<h;i++)if(u=(a=t[i]).parent,m[a.parent.name]&&a===u.lastChild){for(c=a.prev;c;){if("span"!==(l=c.name)||"bookmark"!==c.attr("data-mce-type")){if("br"!==l)break;if("br"===l){a=null;break}}c=c.prev}a&&(a.remove(),Qd(n,p,g,u)&&(f=n.getElementRule(u.name))&&(f.removeEmpty?u.remove():f.paddEmpty&&Xd(e,o,m,u)))}else{for(s=a;u&&u.firstChild===s&&u.lastChild===s&&(s=u,!m[u.name]);)u=u.parent;s===u&&!0!==e.padd_empty_with_br&&((d=new jc("#text",3)).value=" ",a.replace(d))}}),t.addAttributeFilter("href",function(t){var n,r,o,i=t.length;if(!e.allow_unsafe_link_target)for(;i--;)"a"===(n=t[i]).name&&"_blank"===n.attr("target")&&n.attr("rel",(void 0,o=(r=n.attr("rel"))?En.trim(r):"",/\b(noopener)\b/g.test(o)?o:o.split(" ").filter(function(t){return t.length>0}).concat(["noopener"]).sort().join(" ")))}),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",function(t){for(var e,n,r,o,i=t.length;i--;)if("a"===(o=t[i]).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){for(var e,n,r=t.length;r--;)if("ul"===(n=(e=t[r]).parent).name||"ol"===n.name)if(e.prev&&"li"===e.prev.name)e.prev.append(e);else{var o=new jc("li",1);o.attr("style","list-style-type: none"),e.wrap(o)}}),e.validate&&n.getValidClasses()&&t.addAttributeFilter("class",function(t){for(var e,r,o,i,a,u,s,c=t.length,l=n.getValidClasses();c--;){for(r=(e=t[c]).attr("class").split(" "),a="",o=0;o<r.length;o++)i=r[o],s=!1,(u=l["*"])&&u[i]&&(s=!0),u=l[e.name],!s&&u&&u[i]&&(s=!0),s&&(a&&(a+=" "),a+=i);a.length||(a=null),e.attr("class",a)}})}(u,t),function(t,e){e.inline_styles&&Kd(t,e)}(u,t),u},oh=function(t,e,r){return function(t,e){return t&&t.hasEventListeners("PreProcess")&&!e.no_events}(t,r)?function(t,e,r){var o,i,a,u=t.dom;return e=e.cloneNode(!0),(o=n.document.implementation).createHTMLDocument&&(i=o.createHTMLDocument(""),En.each("BODY"===e.nodeName?e.childNodes:[e],function(t){i.body.appendChild(i.importNode(t,!0))}),e="BODY"!==e.nodeName?i.body.firstChild:i.body,a=u.doc,u.doc=i),function(t,e){t.fire("PreProcess",e)}(t,Z(Z({},r),{node:e})),a&&(u.doc=a),e}(t,e,r):e},ih=function(t,e,n){-1===En.inArray(e,n)&&(t.addAttributeFilter(n,function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)}),e.push(n))},ah=function(t,e){var n=["data-mce-selected"],r=e&&e.dom?e.dom:Ci.DOM,o=e&&e.schema?e.schema:cr(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var i=rh(t,o);return function(t,e,n){t.addAttributeFilter("data-mce-tabindex",function(t,e){for(var n,r=t.length;r--;)(n=t[r]).attr("tabindex",n.attr("data-mce-tabindex")),n.attr(e,null)}),t.addAttributeFilter("src,href,style",function(t,r){for(var o,i,a=t.length,u="data-mce-"+r,s=e.url_converter,c=e.url_converter_scope;a--;)void 0!==(i=(o=t[a]).attr(u))?(o.attr(r,i.length>0?i:null),o.attr(u,null)):(i=o.attr(r),"style"===r?i=n.serializeStyle(n.parseStyle(i),o.name):s&&(i=s.call(c,i,r,o.name)),o.attr(r,i.length>0?i:null))}),t.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)(n=(e=t[r]).attr("class"))&&(n=e.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),e.attr("class",n.length>0?n:null))}),t.addAttributeFilter("data-mce-type",function(t,e,n){for(var r,o=t.length;o--;)"bookmark"!==(r=t[o]).attr("data-mce-type")||n.cleanup||(m.from(r.firstChild).exists(function(t){return!na(t.value)})?r.unwrap():r.remove())}),t.addNodeFilter("noscript",function(t){for(var e,n=t.length;n--;)(e=t[n].firstChild)&&(e.value=Qn.decode(e.value))}),t.addNodeFilter("script,style",function(t,n){for(var r,o,i,a=t.length,u=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,"")};a--;)o=(r=t[a]).firstChild?r.firstChild.value:"","script"===n?((i=r.attr("type"))&&r.attr("type","mce-no/type"===i?null:i.replace(/^mce\-/,"")),"xhtml"===e.element_format&&o.length>0&&(r.firstChild.value="// <![CDATA[\n"+u(o)+"\n// ]]>")):"xhtml"===e.element_format&&o.length>0&&(r.firstChild.value="\x3c!--\n"+u(o)+"\n--\x3e")}),t.addNodeFilter("#comment",function(t){for(var r,o=t.length;o--;)r=t[o],e.preserve_cdata&&0===r.value.indexOf("[CDATA[")?(r.name="#cdata",r.type=4,r.value=n.decode(r.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===r.value.indexOf("mce:protected ")&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(r.value).substr(14))}),t.addNodeFilter("xml:namespace,input",function(t,e){for(var n,r=t.length;r--;)7===(n=t[r]).type?n.remove():1===n.type&&("input"!==e||n.attr("type")||n.attr("type","text"))}),t.addAttributeFilter("data-mce-type",function(e){N(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){for(var n=t.length;n--;)t[n].attr(e,null)})}(i,t,r),{schema:o,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:function(n,a){void 0===a&&(a={});var u=Z({format:"html"},a),s=oh(e,n,u),c=function(t,e,n){var r=oa(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||Hn(et.fromDom(e))?r:En.trim(r)}(r,s,u),l=function(t,e,n){var r=n.selection?Z({forced_root_block:!1},n):n,o=t.parse(e,r);return function(t){var e,n,r=function(t){return t&&"br"===t.name};r(e=t.lastChild)&&r(n=e.prev)&&(e.remove(),n.remove())}(o),o}(i,c,u);return"tree"===u.format?l:function(t,e,n,r,o){return function(t,e,n){return!e.no_events&&t?function(t,e){return t.fire("PostProcess",e)}(t,Z(Z({},e),{content:n})).content:n}(t,o,function(t,e,n){return ol(t,e).serialize(n)}(e,n,r))}(e,t,o,l,u)},addRules:function(t){o.addValidElements(t)},setRules:function(t){o.setValidElements(t)},addTempAttr:u(ih,i,n),getTempAttrs:function(){return n},getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},uh=function(t,e){var n=ah(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}},sh=function(t){var e,n,r=decodeURIComponent(t).split(",");return(n=/data:([^;]+)/.exec(r[0]))&&(e=n[1]),{type:e,data:r[1]}},ch=function(t){return 0===t.indexOf("blob:")?function(t){return new an(function(e,r){var o=function(){r("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var i=new n.XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(){200===this.status?e(this.response):o()},i.onerror=o,i.send()}catch(t){o()}})}(t):0===t.indexOf("data:")?(e=t,new an(function(t){var r,o,i,a=sh(e);try{r=n.atob(a.data)}catch(e){return void t(new n.Blob([]))}for(o=new Uint8Array(r.length),i=0;i<o.length;i++)o[i]=r.charCodeAt(i);t(new n.Blob([o],{type:a.type}))})):null;var e},lh=function(t){return new an(function(e){var r=new n.FileReader;r.onloadend=function(){e(r.result)},r.readAsDataURL(t)})},fh=sh,dh=0,hh=function(t){return(t||"blobid")+dh++};function mh(t,e){var r={},o=function(t,r,o,i){var a,u;(a=new n.XMLHttpRequest).open("POST",e.url),a.withCredentials=e.credentials,a.upload.onprogress=function(t){i(t.loaded/t.total*100)},a.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+a.status)},a.onload=function(){var t,n,i;a.status<200||a.status>=300?o("HTTP Error: "+a.status):(t=JSON.parse(a.responseText))&&"string"==typeof t.location?r((n=e.basePath,i=t.location,n?n.replace(/\/$/,"")+"/"+i.replace(/^\//,""):i)):o("Invalid JSON: "+a.responseText)},(u=new n.FormData).append("file",t.blob(),t.filename()),a.send(u)},i=function(t,e){return{url:e,blobInfo:t,status:!0}},a=function(t,e){return{url:"",blobInfo:t,status:!1,error:e}},u=function(t,e){En.each(r[t],function(t){t(e)}),delete r[t]},s=function(n,o){return n=En.grep(n,function(e){return!t.isUploaded(e.blobUri())}),an.all(En.map(n,function(n){return t.isPending(n.blobUri())?function(t){var e=n.blobUri();return new an(function(t){r[e]=r[e]||[],r[e].push(t)})}():function(e,n,r){return t.markPending(e.blobUri()),new an(function(o){var s;try{var c=function(){s&&s.close()};n(e,function(n){c(),t.markUploaded(e.blobUri(),n),u(e.blobUri(),i(e,n)),o(i(e,n))},function(n){c(),t.removeFailed(e.blobUri()),u(e.blobUri(),a(e,n)),o(a(e,n))},function(t){t<0||t>100||(s||(s=r()),s.progressBar.value(t))})}catch(t){o(a(e,t.message))}})}(n,e.handler,o)}))};return!1===w(e.handler)&&(e.handler=o),{upload:function(t,n){return e.url||e.handler!==o?s(t,n):new an(function(t){t([])})}}}var ph=0,gh=function(t){return t+ph+++(e=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+e()+e()+e());var e},vh=function(t){var e,r,o,a,u,s=function(){var t=[],e=function(t){var e,r,o;if(!t.blob||!t.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");return e=t.id||gh("blobid"),r=t.name||e,{id:i(e),name:i(r),filename:i(r+"."+(o=t.blob.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[o.toLowerCase()]||"dat")),blob:i(t.blob),base64:i(t.base64),blobUri:i(t.blobUri||n.URL.createObjectURL(t.blob)),uri:i(t.uri)}},r=function(t){return o(function(e){return e.id()===t})},o=function(e){return M(t,e)[0]};return{create:function(t,n,r,o){if(g(t))return e({id:t,name:o,blob:n,base64:r});if(v(t))return e(t);throw new Error("Unknown input type")},add:function(e){r(e.id())||t.push(e)},get:r,getByUri:function(t){return o(function(e){return e.blobUri()===t})},findFirst:o,removeByUri:function(e){t=M(t,function(t){return t.blobUri()!==e||(n.URL.revokeObjectURL(t.blobUri()),!1)})},destroy:function(){N(t,function(t){n.URL.revokeObjectURL(t.blobUri())}),t=[]}}}(),c=(o={},a=function(t,e){return{status:t,resultUri:e}},{hasBlobUri:u=function(t){return t in o},getResultUri:function(t){var e=o[t];return e?e.resultUri:null},isPending:function(t){return!!u(t)&&1===o[t].status},isUploaded:function(t){return!!u(t)&&2===o[t].status},markPending:function(t){o[t]=a(1,null)},markUploaded:function(t,e){o[t]=a(2,e)},removeFailed:function(t){delete o[t]},destroy:function(){o={}}}),l=[],f=function(e){return function(n){return t.selection?e(n):[]}},d=function(t,e,n){var r=0;do{-1!==(r=t.indexOf(e,r))&&(t=t.substring(0,r)+n+t.substr(r+e.length),r+=n.length-e.length+1)}while(-1!==r);return t},h=function(t,e,n){return t=d(t,'src="'+e+'"','src="'+n+'"'),d(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"')},m=function(e,n){N(t.undoManager.data,function(t){"fragmented"===t.type?t.fragments=D(t.fragments,function(t){return h(t,e,n)}):t.content=h(t.content,e,n)})},p=function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})},b=function(n){return e||(e=mh(c,{url:$u(t),basePath:Gu(t),credentials:Ku(t),handler:Xu(t)})),w().then(f(function(r){var o=D(r,function(t){return t.blobInfo});return e.upload(o,p).then(f(function(e){var o=D(e,function(e,n){var o=r[n].image;return e.status&&function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")}(t)?function(e,n){var r;s.removeByUri(e.src),m(e.src,n),t.$(e).attr({src:Yu(t)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":t.convertURL(n,"src")})}(o,e.url):e.error&&Of(t,e.error),{element:o,status:e.status}});return n&&n(o),o}))}))},y=function(e){if(qu(t))return b(e)},x=function(e){return!1!==L(l,function(t){return t(e)})&&(0!==e.getAttribute("src").indexOf("data:")||function(t){return t.getParam("images_dataimg_filter",i(!0),"function")}(t)(e))},w=function(){return r||(r=function(t,e){var n={};return{findAll:function(r,o){var a;o||(o=i(!0)),a=M(function(t){return t?U(t.getElementsByTagName("img")):[]}(r),function(e){var n=e.src;return!!yn.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!n||n===yn.transparentSrc)&&(0===n.indexOf("blob:")?!t.isUploaded(n)&&o(e):0===n.indexOf("data:")&&o(e))});var u=D(a,function(t){if(n[t.src])return new an(function(e){n[t.src].then(function(n){if("string"==typeof n)return n;e({image:t,blobInfo:n.blobInfo})})});var r=new an(function(n,r){!function(t,e,n,r){var o,i;0!==e.src.indexOf("blob:")?(o=fh(e.src).data,(i=t.findFirst(function(t){return t.base64()===o}))?n({image:e,blobInfo:i}):ch(e.src).then(function(r){i=t.create(hh(),r,o),t.add(i),n({image:e,blobInfo:i})},function(t){r(t)})):(i=t.getByUri(e.src))?n({image:e,blobInfo:i}):ch(e.src).then(function(r){lh(r).then(function(a){o=fh(a).data,i=t.create(hh(),r,o),t.add(i),n({image:e,blobInfo:i})})},function(t){r(t)})}(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 an.all(u)}}}(c,s)),r.findAll(t.getBody(),x).then(f(function(e){return e=M(e,function(e){return"string"!=typeof e||(Df(t,e),!1)}),N(e,function(t){m(t.image.src,t.blobInfo.blobUri()),t.image.src=t.blobInfo.blobUri(),t.image.removeAttribute("data-mce-src")}),e}))},C=function(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var r=c.getResultUri(n);if(r)return'src="'+r+'"';var o=s.getByUri(n);return o||(o=z(t.editorManager.get(),function(t,e){return t||e.editorUpload&&e.editorUpload.blobCache.getByUri(n)},null)),o?'src="data:'+o.blob().type+";base64,"+o.base64()+'"':e})};return t.on("SetContent",function(){qu(t)?y():w()}),t.on("RawSaveContent",function(t){t.content=C(t.content)}),t.on("GetContent",function(t){t.source_view||"raw"===t.format||(t.content=C(t.content))}),t.on("PostRender",function(){t.parser.addNodeFilter("img",function(t){N(t,function(t){var e=t.attr("src");if(!s.getByUri(e)){var n=c.getResultUri(e);n&&t.attr("src",n)}})})}),{blobCache:s,addFilter:function(t){l.push(t)},uploadImages:b,uploadImagesAuto:y,scanForImages:w,destroy:function(){s.destroy(),c.destroy(),r=e=null}}},bh=function(t){te(t),Qt(t,et.fromHtml('<br data-mce-bogus="1">'))},yh=function(t){Gt(t).each(function(e){Vt(e).each(function(n){Nn(t)&&Mn(e)&&Nn(n)&&ee(e)})})},xh=hc,wh=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o<r.length;o++)if(!1===r[o].inherit&&t.dom.is(e,r[o].selector))return!0;return!1},Ch=function(t,e,n,r){var o=t.dom.getRoot();return e!==o&&(e=t.dom.getParent(e,function(e){return!!wh(t,e,n)||e.parentNode===o||!!Sh(t,e,n,r,!0)}),Sh(t,e,n,r))},_h=function(t,e,n){return!!xh(e,n.inline)||!!xh(e,n.block)||(n.selector?1===e.nodeType&&t.is(e,n.selector):void 0)},kh=function(t,e,n,r,o,i){var a,u,s,c=n[r];if(n.onmatch)return n.onmatch(e,n,r);if(c)if(void 0===c.length){for(a in c)if(c.hasOwnProperty(a)){if(u="attributes"===r?t.getAttrib(e,a):pc(t,e,a),o&&!u&&!n.exact)return;if((!o||n.exact)&&!xh(u,mc(t,dc(c[a],i),a)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?t.getAttrib(e,c[s]):pc(t,e,c[s]))return n;return n},Sh=function(t,e,n,r,o){var i,a,u,s,c=t.formatter.get(n),l=t.dom;if(c&&e)for(a=0;a<c.length;a++)if(i=c[a],_h(t.dom,e,i)&&kh(l,e,i,"attributes",o,r)&&kh(l,e,i,"styles",o,r)){if(s=i.classes)for(u=0;u<s.length;u++)if(!t.dom.hasClass(e,s[u]))return;return i}},Th=function(t,e,n,r){var o;return r?Ch(t,r,e,n):(r=t.selection.getNode(),!!Ch(t,r,e,n)||!((o=t.selection.getStart())===r||!Ch(t,o,e,n)))},Eh=function(t,e,n){var r,o=[],i={};return r=t.selection.getStart(),t.dom.getParent(r,function(r){var a,u;for(a=0;a<e.length;a++)u=e[a],!i[u]&&Sh(t,r,u,n)&&(i[u]=!0,o.push(u))},t.dom.getRoot()),o},Oh=function(t,e){var n,r,o,i,a,u=t.formatter.get(e),s=t.dom;if(u)for(n=t.selection.getStart(),r=vc(s,n),i=u.length-1;i>=0;i--){if(!(a=u[i].selector)||u[i].defaultBlock)return!0;for(o=r.length-1;o>=0;o--)if(s.is(r[o],a))return!0}return!1},Dh=function(t,e){return t.splitText(e)},Nh=function(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,o=t.endOffset;return e===r&&De.isText(e)?n>0&&n<e.nodeValue.length&&(e=(r=Dh(e,n)).previousSibling,o>n?(e=r=Dh(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(De.isText(e)&&n>0&&n<e.nodeValue.length&&(e=Dh(e,n),n=0),De.isText(r)&&o>0&&o<r.nodeValue.length&&(o=(r=Dh(r,o).previousSibling).nodeValue.length)),{startContainer:e,startOffset:n,endContainer:r,endOffset:o}},Ah=function(t,e,n){if(0!==n){var r=t.data.slice(e,e+n),o=e+n>=t.data.length,i=0===e;t.replaceData(e,n,function(t,e,n){return z(t,function(r,o){return oc(o)||rc(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+" "}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}},{previousCharIsSpace:!1,str:""}).str}(r,i,o))}},Mh=function(t,e){var n,r=t.data.slice(e),o=r.length-(n=r,n.replace(/^\s+/g,"")).length;return Ah(t,e,o)},Ih=function(t,e){return Sa(e)&&!1===function(t,e){return De.isText(e)&&/^[ \t\r\n]*$/.test(e.data)&&!1===function(t,e){var n,r,o=et.fromDom(t);return n=et.fromDom(e),r=u(Rt,o),Ui(n,"pre,code",r).isSome()}(t,e)}(t,e)||function(t){return De.isElement(t)&&"A"===t.nodeName&&t.hasAttribute("name")}(e)||zh(e)},zh=De.hasAttribute("data-mce-bookmark"),Bh=De.hasAttribute("data-mce-bogus"),Rh=De.hasAttributeValue("data-mce-bogus","all"),Ph=function(t,e){return void 0===e&&(e=!0),function(t,e){var n,r=0;if(Ih(t,t))return!1;if(!(n=t.firstChild))return!0;var o=new di(n,t);do{if(e){if(Rh(n)){n=o.next(!0);continue}if(Bh(n)){n=o.next();continue}}if(De.isBr(n))r++,n=o.next();else{if(Ih(t,n))return!1;n=o.next()}}while(n);return r<=1}(t.dom(),e)},Lh=function(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===uu.isTextPosition(t)&&n===e.parentNode&&r>uu.before(e).offset()}(e,t)?uu(e.container(),e.offset()-1):e},Hh=function(t){return Sa(t.previousSibling)?m.some((e=t.previousSibling,De.isText(e)?uu(e,e.data.length):uu.after(e))):t.previousSibling?Ks.lastPositionIn(t.previousSibling):m.none();var e},Fh=function(t){return Sa(t.nextSibling)?m.some((e=t.nextSibling,De.isText(e)?uu(e,0):uu.before(e))):t.nextSibling?Ks.firstPositionIn(t.nextSibling):m.none();var e},Vh=function(t,e,n){return function(t,e,n){return t?function(t,e){return Fh(e).orThunk(function(){return Hh(e)}).orThunk(function(){return function(t,e){return Ks.nextPosition(t,uu.after(e)).fold(function(){return Ks.prevPosition(t,uu.before(e))},m.some)}(t,e)})}(e,n):function(t,e){return Hh(e).orThunk(function(){return Fh(e)}).orThunk(function(){return function(t,e){var n=uu.before(e.previousSibling?e.previousSibling:e.parentNode);return Ks.prevPosition(t,n).fold(function(){return Ks.nextPosition(t,uu.after(e))},m.some)}(t,e)})}(e,n)}(t,e,n).map(u(Lh,n))},jh=function(t,e,n){n.fold(function(){t.focus()},function(n){t.selection.setRng(n.toRange(),e)})},Uh=function(t,e){return e&&t.schema.getBlockElements().hasOwnProperty(re(e))},Wh=function(t){if(Ph(t)){var e=et.fromHtml('<br data-mce-bogus="1">');return te(t),Qt(t,e),m.some(uu.before(e.dom()))}return m.none()},qh=function(t,e,n,r){void 0===r&&(r=!0);var o,i=Vh(e,t.getBody(),n.dom()),a=Vi(n,u(Uh,t),(o=t.getBody(),function(t){return t.dom()===o})),s=function(t,e,n){var r,o,i,a,u=Vt(t).filter(ae),s=jt(t).filter(ae);return ee(t),(r=u,o=s,i=e,a=function(t,e,r){var o=t.dom(),i=e.dom(),a=o.data.length;return function(t,e,n){var r=yt(t.data).length;t.appendData(e.data),ee(et.fromDom(e)),n&&Mh(t,r)}(o,i,n),r.container()===i?uu(o,a):r},r.isSome()&&o.isSome()&&i.isSome()?m.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):m.none()).orThunk(function(){return n&&(u.each(function(t){return e=t.dom(),n=t.dom().length,o=(r=e.data.slice(0,n)).length-yt(r).length,Ah(e,n-o,o);var e,n,r,o}),s.each(function(t){return Mh(t.dom(),0)})),e})}(n,i,function(t,e){return Q(t.schema.getTextInlineElements(),re(e))}(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):a.bind(Wh).fold(function(){r&&jh(t,e,s)},function(n){r&&jh(t,e,m.some(n))})},Yh=ra,$h=function(t){return function(t){for(var e=[];t;){if(3===t.nodeType&&t.nodeValue!==Yh||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e}(t).length>0},Gh=function(t){if(t){var e=new di(t,t);for(t=e.current();t;t=e.next())if(De.isText(t))return t}return null},Kh=function(t){var e=et.fromTag("span");return Ie(e,{id:"_mce_caret","data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&Qt(e,et.fromText(Yh)),e},Xh=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if($h(e))qh(t,!1,et.fromDom(e),n);else{var i=o.getRng(),a=r.getParent(e,r.isBlock),u=function(t){var e=Gh(t);return e&&e.nodeValue.charAt(0)===Yh&&e.deleteData(0,1),e}(e);i.startContainer===u&&i.startOffset>0&&i.setStart(u,i.startOffset-1),i.endContainer===u&&i.endOffset>0&&i.setEnd(u,i.endOffset-1),r.remove(e,!0),a&&r.isEmpty(a)&&bh(et.fromDom(a)),o.setRng(i)}},Jh=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Xh(t,e,n);else if(!(e=Au(t.getBody(),o.getStart())))for(;e=r.get("_mce_caret");)Xh(t,e,!1)},Qh=function(t,e,n){var r=t.dom,o=r.getParent(n,u(cc,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(function(t){var e=Hi(t,"br"),n=M(function(t){for(var e=[],n=t.dom();n;)e.push(et.fromDom(n)),n=n.lastChild;return e}(t).slice(-1),Mn);e.length===n.length&&N(n,ee)}(et.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))},Zh=function(t,e){return t.appendChild(e),e},tm=function(t,e){var n=I(t,function(t,e){return Zh(t,e.cloneNode(!1))},e);return Zh(n,n.ownerDocument.createTextNode(Yh))},em=function(t,e){return t.schema.getTextInlineElements().hasOwnProperty(re(e))&&!Nu(e.dom())&&!De.isBogus(e.dom())},nm={},rm=_n.filter,om=_n.each;!function(t,e){var n=nm[t];n||(nm[t]=n=[]),nm[t].push(function(t){var e,n,r=t.selection.getRng();e=De.matchNodeNames(["pre"]),r.collapsed||(n=t.selection.getSelectedBlocks(),om(rm(rm(n,e),function(t){return e(t.previousSibling)&&-1!==_n.indexOf(n,t.previousSibling)}),function(t){var e,n;e=t.previousSibling,fi(n=t).remove(),fi(e).append("<br><br>").append(n.childNodes)}))})}("pre");var im,am=En.each,um=function(t){this.compare=function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return am(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(t.hasOwnProperty(r)){if(void 0===(n=e[r]))return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(e.hasOwnProperty(r))return!1;return!0};return!(!o(r(e),r(n))||!o(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style")))||nc.isBookmarkNode(e)||nc.isBookmarkNode(n))}},sm=/^(src|href|style)$/,cm=En.each,lm=hc,fm=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},dm=function(t,e,n){var r,o;if(r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"],De.isElement(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return De.isText(r)&&n&&o>=r.nodeValue.length&&(r=new di(r,t.getBody()).next()||r),De.isText(r)&&!n&&0===o&&(r=new di(r,t.getBody()).prev()||r),r},hm=function(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o},mm=function(t,e,n,r,o){var i=et.fromDom(e),a=et.fromDom(t.create(r,o)),u=n?Wt(i):Ut(i);return Zt(a,u),n?(Kt(i,a),Jt(a,i)):(Xt(i,a),Qt(a,i)),a.dom()},pm=function(t,e,n,r){return!(e=sc(e,n,r))||"BR"===e.nodeName||t.isBlock(e)},gm=function(t,e,n,r,o){var i,a=t.dom;if(!function(t,e,n){return!!lm(e,n.inline)||!!lm(e,n.block)||(n.selector?De.isElement(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return!1;var u=r;if("all"!==e.remove){cm(e.styles,function(t,r){t=mc(a,dc(t,n),r),"number"==typeof r&&(r=t,o=null),(e.remove_similar||!o||lm(pc(a,o,r),t))&&a.setStyle(u,r,""),i=!0}),i&&""===a.getAttrib(u,"style")&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),cm(e.attributes,function(t,r){var i;if(t=dc(t,n),"number"==typeof r&&(r=t,o=null),e.remove_similar||!o||lm(a.getAttrib(o,r),t)){if("class"===r&&(t=a.getAttrib(u,r))&&(i="",cm(t.split(/\s+/),function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)}),i))return void a.setAttrib(u,r,i);"class"===r&&u.removeAttribute("className"),sm.test(r)&&u.removeAttribute("data-mce-"+r),u.removeAttribute(r)}}),cm(e.classes,function(t){t=dc(t,n),o&&!a.hasClass(o,t)||a.removeClass(u,t)});for(var s=a.getAttribs(u),c=0;c<s.length;c++){var l=s[c].nodeName;if(0!==l.indexOf("_")&&0!==l.indexOf("data-"))return!1}}return"none"!==e.remove?(function(t,e,n){var r,o=e.parentNode,i=t.dom,a=Uu(t);n.block&&(a?o===i.getRoot()&&(n.list_block&&lm(e,n.list_block)||cm(En.grep(e.childNodes),function(e){lc(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=hm(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=0})):i.isBlock(e)&&!i.isBlock(o)&&(pm(i,e,!1)||pm(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),pm(i,e,!0)||pm(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),n.selector&&n.inline&&!lm(n.inline,e)||i.remove(e,!0)}(t,u,e),!0):void 0},vm=function(t,e,n,r,o){var i,a,u=t.formatter.get(e),s=u[0],c=!0,l=t.dom,f=t.selection,d=function(r){var i=function(t,e,n,r,o){var i;return cm(vc(t.dom,e.parentNode).reverse(),function(e){var a;i||"_start"===e.id||"_end"===e.id||(a=Sh(t,e,n,r,o))&&!1!==a.split&&(i=e)}),i}(t,r,e,n,o);return function(t,e,n,r,o,i,a,u){var s,c,l,f,d,h,m=t.dom;if(n){for(h=n.parentNode,s=r.parentNode;s&&s!==h;s=s.parentNode){for(c=m.clone(s,!1),d=0;d<e.length;d++)if(gm(t,e[d],u,c,c)){c=0;break}c&&(l&&c.appendChild(l),f||(f=c),l=c)}a.mixed&&m.isBlock(n)||(r=m.split(n,r)),l&&(o.parentNode.insertBefore(l,o),f.appendChild(o))}return r}(t,u,i,r,r,0,s,n)},h=function e(r){var o,i,a,f,d;if(De.isElement(r)&&l.getContentEditable(r)&&(f=c,c="true"===l.getContentEditable(r),d=!0),o=En.grep(r.childNodes),c&&!d)for(i=0,a=u.length;i<a&&!gm(t,u[i],n,r,r);i++);if(s.deep&&o.length){for(i=0,a=o.length;i<a;i++)e(o[i]);d&&(c=f)}},p=function(t){var e=l.get(t?"_start":"_end"),n=e[t?"firstChild":"lastChild"];return function(t){return nc.isBookmarkNode(t)&&De.isElement(t)&&("_start"===t.id||"_end"===t.id)}(n)&&(n=n[t?"firstChild":"lastChild"]),De.isText(n)&&0===n.data.length&&(n=t?e.previousSibling||e.nextSibling:e.nextSibling||e.previousSibling),l.remove(e,!0),n},g=function(e){var n,r,o=e.commonAncestorContainer,i=Nc(t,e,u,!0);if(s.split){if(i=Nh(i),(n=dm(t,i,!0))!==(r=dm(t,i))){if(/^(TR|TH|TD)$/.test(n.nodeName)&&n.firstChild&&(n="TR"===n.nodeName?n.firstChild.firstChild||n:n.firstChild||n),o&&/^T(HEAD|BODY|FOOT|R)$/.test(o.nodeName)&&/^(TH|TD)$/.test(r.nodeName)&&r.firstChild&&(r=r.firstChild||r),fm(l,n,r)){var a=m.from(n.firstChild).getOr(n);return d(mm(l,a,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void p(!0)}if(fm(l,r,n))return a=m.from(r.lastChild).getOr(r),d(mm(l,a,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void p(!1);n=hm(l,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=hm(l,r,"span",{id:"_end","data-mce-type":"bookmark"});var c=l.createRng();c.setStartAfter(n),c.setEndBefore(r),Mc.walk(l,c,function(t){N(t,function(t){nc.isBookmarkNode(t)||nc.isBookmarkNode(t.parentNode)||d(t)})}),d(n),d(r),n=p(!0),r=p()}else n=r=d(n);i.startContainer=n.parentNode?n.parentNode:n,i.startOffset=l.nodeIndex(n),i.endContainer=r.parentNode?r.parentNode:r,i.endOffset=l.nodeIndex(r)+1}Mc.walk(l,i,function(e){cm(e,function(e){h(e),De.isElement(e)&&"underline"===t.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===gc(l,e.parentNode)&&gm(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})};if(r)ac(r)?((a=l.createRng()).setStartBefore(r),a.setEndAfter(r),g(a)):g(r);else if("false"!==l.getContentEditable(f.getNode()))f.isCollapsed()&&s.inline&&!l.select("td[data-mce-selected],th[data-mce-selected]").length?function(t,e,n,r){var o,i,a,u,s,c,l,f=t.dom,d=t.selection,h=[],m=d.getRng();for(o=m.startContainer,i=m.startOffset,s=o,3===o.nodeType&&(i!==o.nodeValue.length&&(u=!0),s=s.parentNode);s;){if(Sh(t,s,e,n,r)){c=s;break}s.nextSibling&&(u=!0),h.push(s),s=s.parentNode}if(c)if(u){a=d.getBookmark(),m.collapse(!0);var p=Nc(t,m,t.formatter.get(e),!0);p=Nh(p),t.formatter.remove(e,n,p),d.moveToBookmark(a)}else{l=Au(t.getBody(),c);var g=Kh(!1).dom(),v=tm(h,g);Qh(t,g,l||c),Xh(t,l,!1),d.setCursorLocation(v,1),f.isEmpty(c)&&f.remove(c)}}(t,e,n,o):(i=Eu.getPersistentBookmark(t.selection,!0),g(f.getRng()),f.moveToBookmark(i),s.inline&&Th(t,e,n,f.getStart())&&uc(l,f,f.getRng()),t.nodeChanged());else{r=f.getNode();for(var v=0,b=u.length;v<b&&(!u[v].ceFalseOverride||!gm(t,u[v],n,r,r));v++);}},bm=En.each,ym=function(t){return De.isElement(t)&&!nc.isBookmarkNode(t)&&!Nu(t)&&!De.isBogus(t)},xm=function(t,e){var n;for(n=t;n;n=n[e]){if(De.isText(n)&&0!==n.nodeValue.length)return t;if(De.isElement(n)&&!nc.isBookmarkNode(n))return n}return t},wm=function(t,e,n){var r,o,i=new um(t);if(e&&n&&(e=xm(e,"previousSibling"),n=xm(n,"nextSibling"),i.compare(e,n))){for(r=e.nextSibling;r&&r!==n;)o=r,r=r.nextSibling,e.appendChild(o);return t.remove(n),En.each(En.grep(n.childNodes),function(t){e.appendChild(t)}),e}return n},Cm=function t(e,n,r){bm(e.childNodes,function(e){ym(e)&&(n(e)&&r(e),e.hasChildNodes()&&t(e,n,r))})},_m=function(t,e){return u(function(e,n){return!(!n||!pc(t,n,e))},e)},km=function(t,e,n){return u(function(e,n,r){t.setStyle(r,e,n),""===r.getAttribute("style")&&r.removeAttribute("style"),Sm(t,r)},e,n)},Sm=function(t,e){"SPAN"===e.nodeName&&0===t.getAttribs(e).length&&t.remove(e,!0)},Tm=function(t,e){var n;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(n=gc(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))},Em=function(t){return t.collapsed?t:function(t){var e=uu.fromRangeStart(t),r=uu.fromRangeEnd(t),o=t.commonAncestorContainer;return Ks.fromPosition(!1,o,r).map(function(i){return!vs(e,r,o)&&vs(e,i,o)?function(t,e,r,o){var i=n.document.createRange();return i.setStart(t,e),i.setEnd(r,o),i}(e.container(),e.offset(),i.container(),i.offset()):t}).getOr(t)}(t)},Om=En.each,Dm=function t(e,n,r,o){var i,a,s=e.formatter.get(n),c=s[0],l=!o&&e.selection.isCollapsed(),f=e.dom,d=e.selection,h=function(t,e){if(e=e||c,t){if(e.onformat&&e.onformat(t,e,r,o),Om(e.styles,function(e,n){f.setStyle(t,n,dc(e,r))}),e.styles){var n=f.getAttrib(t,"style");n&&f.setAttrib(t,"data-mce-style",n)}Om(e.attributes,function(e,n){f.setAttrib(t,n,dc(e,r))}),Om(e.classes,function(e){e=dc(e,r),f.hasClass(t,e)||f.addClass(t,e)})}},m=function(t,e){var n=!1;return!!c.selector&&(Om(t,function(t){if(!("collapsed"in t&&t.collapsed!==l))return f.is(e,t.selector)&&!Nu(e)?(h(e,t),n=!0,!1):void 0}),n)},p=function(t,o,i,a){var u,l,f=[],d=!0;u=c.inline||c.block,l=t.create(u),h(l),Mc.walk(t,o,function(o){var i;Om(o,function o(p){var g=!1,v=d,b=p.nodeName.toLowerCase(),y=p.parentNode.nodeName.toLowerCase();if(De.isElement(p)&&t.getContentEditable(p)&&(v=d,d="true"===t.getContentEditable(p),g=!0),hc(b,"br"))return i=0,void(c.block&&t.remove(p));if(c.wrapper&&Sh(e,p,n,r))i=0;else{if(d&&!g&&c.block&&!c.wrapper&&cc(e,b)&&lc(e,y,u))return p=t.rename(p,u),h(p),f.push(p),void(i=0);if(c.selector){var x=m(s,p);if(!c.inline||x)return void(i=0)}!d||g||!lc(e,u,b)||!lc(e,y,u)||!a&&3===p.nodeType&&1===p.nodeValue.length&&65279===p.nodeValue.charCodeAt(0)||Nu(p)||c.inline&&t.isBlock(p)?(i=0,Om(En.grep(p.childNodes),o),g&&(d=v),i=0):(i||(i=t.clone(l,!1),p.parentNode.insertBefore(i,p),f.push(i)),i.appendChild(p))}})}),!0===c.links&&Om(f,function(t){!function t(e){"A"===e.nodeName&&h(e,c),Om(En.grep(e.childNodes),t)}(t)}),Om(f,function(o){var i;i=function(t){var e=0;return Om(o.childNodes,function(t){(function(t){return t&&De.isText(t)&&0===t.length})(t)||nc.isBookmarkNode(t)||e++}),e}(),!(f.length>1)&&t.isBlock(o)||0!==i?(c.inline||c.wrapper)&&(c.exact||1!==i||(o=function(e){var n,r;return(n=function(t){var e=!1;return Om(t.childNodes,function(t){if(function(t){return t&&1===t.nodeType&&!nc.isBookmarkNode(t)&&!Nu(t)&&!De.isBogus(t)}(t))return e=t,!1}),e}(e))&&!nc.isBookmarkNode(n)&&_h(t,n,c)&&(r=t.clone(n,!1),h(r),t.replace(r,e,!0),t.remove(n,!0)),r||e}(o)),function(t,e,n,r){bm(e,function(e){bm(t.dom.select(e.inline,r),function(r){ym(r)&&gm(t,e,n,r,e.exact?r:null)}),function(t,e,n){if(e.clear_child_styles){var r=e.links?"*:not(a)":"*";bm(t.select(r,n),function(n){ym(n)&&bm(e.styles,function(e,r){t.setStyle(n,r,"")})})}}(t.dom,e,r)})}(e,s,r,o),function(t,e,n,r,o){Sh(t,o.parentNode,n,r)&&gm(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,function(i){if(Sh(t,i,n,r))return gm(t,e,r,o),!0})}(e,c,n,r,o),function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Cm(r,_m(t,"fontSize"),km(t,"backgroundColor",dc(e.styles.backgroundColor,n)))}(t,c,r,o),function(t,e,n,r){"sub"!==e.inline&&"sup"!==e.inline||(Cm(r,_m(t,"fontSize"),km(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(t,c,0,o),function(t,e,n,r){r&&!1!==c.merge_siblings&&(r=wm(t,sc(r),r),r=wm(t,r,sc(r,!0)))}(t,0,0,o)):t.remove(o,!0)})};if("false"!==f.getContentEditable(d.getNode())){if(c){if(o)ac(o)?m(s,o)||((a=f.createRng()).setStartBefore(o),a.setEndAfter(o),p(f,Nc(e,a,s),0,!0)):p(f,o,0,!0);else if(l&&c.inline&&!f.select("td[data-mce-selected],th[data-mce-selected]").length)!function(t,e,n){var r,o,i,a,u,s,c=t.selection;a=(r=c.getRng()).startOffset,s=r.startContainer.nodeValue,(o=Au(t.getBody(),c.getStart()))&&(i=Gh(o));var l,f,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;s&&a>0&&a<s.length&&d.test(s.charAt(a))&&d.test(s.charAt(a-1))?(u=c.getBookmark(),r.collapse(!0),r=Nc(t,r,t.formatter.get(e)),r=Nh(r),t.formatter.apply(e,n,r),c.moveToBookmark(u)):(o&&i.nodeValue===Yh?t.formatter.apply(e,n,o):(l=t.getDoc(),f=Kh(!0).dom(),i=(o=l.importNode(f,!0)).firstChild,r.insertNode(o),a=1,t.formatter.apply(e,n,o)),c.setCursorLocation(i,a))}(e,n,r);else{var g=e.selection.getNode();e.settings.forced_root_block||!s[0].defaultBlock||f.getParent(g,f.isBlock)||t(e,s[0].defaultBlock),e.selection.setRng(Em(e.selection.getRng())),i=Eu.getPersistentBookmark(e.selection,!0),p(f,Nc(e,d.getRng(),s)),c.styles&&function(t,e,n,r){(e.styles.color||e.styles.textDecoration)&&(En.walk(r,u(Tm,t),"childNodes"),Tm(t,r))}(f,c,0,g),d.moveToBookmark(i),uc(f,d,d.getRng()),e.nodeChanged()}!function(t,e){om(nm[t],function(t){t(e)})}(n,e)}}else{o=d.getNode();for(var v=0,b=s.length;v<b;v++)if(s[v].ceFalseOverride&&f.is(o,s[v].selector))return void h(o,s[v])}},Nm=function(t,e,n,r){return X(t,function(t,o){return!!Q(e,o)||(N(t,function(t){t(!1,{node:n,format:o,parents:r})}),!1)}).t},Am=function(t,e,n,r,o){return null===e.get()&&function(t,e){var n=nt({});t.set({}),e.on("NodeChange",function(r){!function(t,e,n,r){var o=W(n.get()),i={},a={},u=M(vc(t.dom,e),function(t){return 1===t.nodeType&&!t.getAttribute("data-mce-bogus")});Y(r,function(e,n){En.each(u,function(r){return t.formatter.matchNode(r,n,{},e.similar)?(-1===o.indexOf(n)&&(N(e.callbacks,function(t){t(!0,{node:r,format:n,parents:u})}),i[n]=e.callbacks),a[n]=e.callbacks,!1):!wh(t,r,n)&&void 0})});var s=Nm(n.get(),a,e,u);n.set(Z(Z({},i),s))}(e,r.element,n,t.get())})}(e,t),function(t,e,n,r){var o=t.get();N(e.split(","),function(t){o[t]||(o[t]={similar:r,callbacks:[]}),o[t].callbacks.push(n)}),t.set(o)}(e,n,r,o),{unbind:function(){return function(t,e,n){var r=t.get();N(e.split(","),function(t){r[t].callbacks=M(r[t].callbacks,function(t){return t!==n}),0===r[t].callbacks.length&&delete r[t]}),t.set(r)}(e,n,r)}}},Mm=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",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",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",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"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],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},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(){return!0},onformat:function(e,n,r){En.each(r,function(n,r){t.setAttrib(e,r,n)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",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 En.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(t){e[t]={block:t,remove:"all"}}),e},Im=En.each,zm=Ci.DOM,Bm=function(t,e){var n,r,o,i=e&&e.schema||cr({}),a=function(t){var e;return r="string"==typeof t?{name:t,classes:[],attrs:{}}:t,function(t,e){e.classes.length&&zm.addClass(t,e.classes.join(" ")),zm.setAttribs(t,e.attrs)}(e=zm.create(r.name),r),e};return t&&t.length?(r=t[0],n=a(r),(o=zm.create("div")).appendChild(function t(e,n,r){var o,u,s,c=n.length>0&&n[0],l=c&&c.name;if(s=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!==En.inArray(o,e)?e:o[0])}(e,l))l===s?(u=n[0],n=n.slice(1)):u=s;else if(c)u=n[0],n=n.slice(1);else if(!r)return e;return u&&(o=a(u)).appendChild(e),r&&(o||(o=zm.create("div")).appendChild(e),En.each(r,function(t){var n=a(t);o.insertBefore(n,e)})),t(o,n,u&&u.siblings)}(n,t.slice(1),r.siblings)),o):""},Rm=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=En.trim(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!==En.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""})),n.name=e||"div",n},Pm=function(t,e){var n,r,o,i,a,u,s="";if(!1===(u=t.settings.preview_styles))return"";"string"!=typeof u&&(u="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");var c,l=function(t){return t.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=t.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(u=e.preview)?"":(n=e.block||e.inline||"span",(i=(c=e.selector)&&"string"==typeof c?(c=(c=c.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),En.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),function(t){var e=En.map(t.split(/(?:~\+|~|\+)/),Rm),n=e.pop();return e.length&&(n.siblings=e),n}).reverse()):[]).length?(i[0].name||(i[0].name=n),n=e.selector,r=Bm(i,t)):r=Bm([n],t),o=zm.select(n,r)[0]||r.firstChild,Im(e.styles,function(t,e){(t=l(t))&&zm.setStyle(o,e,t)}),Im(e.attributes,function(t,e){(t=l(t))&&zm.setAttrib(o,e,t)}),Im(e.classes,function(t){t=l(t),zm.hasClass(o,t)||zm.addClass(o,t)}),t.fire("PreviewFormats"),zm.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),a=zm.getStyle(t.getBody(),"fontSize",!0),a=/px$/.test(a)?parseInt(a,10):0,Im(u.split(" "),function(e){var n=zm.getStyle(o,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=zm.getStyle(t.getBody(),e,!0),"#ffffff"===zm.toHex(n).toLowerCase())||"color"===e&&"#000000"===zm.toHex(n).toLowerCase())){if("font-size"===e&&/em|%$/.test(n)){if(0===a)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*a+"px"}"border"===e&&n&&(s+="padding:0 2px;"),s+=e+":"+n+";"}}),t.fire("AfterPreviewFormats"),zm.remove(r),s)},Lm=function(t,e,n,r,o){var i=e.get(n);!Th(t,n,r,o)||"toggle"in i[0]&&!i[0].toggle?Dm(t,n,r,o):vm(t,n,r,o)},Hm=function(t){var e=function(t){var e={},n=function t(n,r){n&&("string"!=typeof n?En.each(n,function(e,n){t(n,e)}):(b(r)||(r=[r]),En.each(r,function(t){void 0===t.deep&&(t.deep=!t.selector),void 0===t.split&&(t.split=!t.selector||t.inline),void 0===t.remove&&t.selector&&!t.inline&&(t.remove="none"),t.selector&&t.inline&&(t.mixed=!0,t.block_expand=!0),"string"==typeof t.classes&&(t.classes=t.classes.split(/\s+/))}),e[n]=r))};return n(Mm(t.dom)),n(t.settings.formats),{get:function(t){return t?e[t]:e},has:function(t){return Q(e,t)},register:n,unregister:function(t){return t&&e[t]&&delete e[t],e}}}(t),n=nt(null);return 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"])}(t),function(t){t.on("mouseup keydown",function(e){!function(t,e){var n=t.selection,r=t.getBody();Jh(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==Yh||Jh(t,Au(r,n.getStart())),37!==e&&39!==e||Jh(t,Au(r,n.getStart()))}(t,e.keyCode)})}(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:u(Dm,t),remove:u(vm,t),toggle:u(Lm,t,e),match:u(Th,t),matchAll:u(Eh,t),matchNode:u(Sh,t),canApply:u(Oh,t),formatChanged:u(Am,t,n),getCssText:u(Pm,t)}},Fm=function(t){return De.isElement(t)?t.outerHTML:De.isText(t)?Qn.encodeRaw(t.data,!1):De.isComment(t)?"\x3c!--"+t.data+"--\x3e":""},Vm=function(t,e,r){var o=function(t){var e,r,o;for(o=n.document.createElement("div"),e=n.document.createDocumentFragment(),t&&(o.innerHTML=t);r=o.firstChild;)e.appendChild(r);return e}(e);if(t.hasChildNodes()&&r<t.childNodes.length){var i=t.childNodes[r];i.parentNode.insertBefore(o,i)}else t.appendChild(o)},jm=function(t,e){return function(t,e){var n=0;N(t,function(t){0===t[0]?n++:1===t[0]?(Vm(e,t[1],n),n++):2===t[0]&&function(t,e){if(t.hasChildNodes()&&e<t.childNodes.length){var n=t.childNodes[e];n.parentNode.removeChild(n)}}(e,n)})}(function(t,e){var n=t.length+e.length+2,r=new Array(n),o=new Array(n),i=function(n,r,o,i){for(var a=n;a-r<i&&a<o&&t[a]===e[a-r];)++a;return function(t,e,n){return{start:t,end:a,diag:r}}(n)},a=function(n,a,u,s){var c=a-n,l=s-u;if(0===c||0===l)return null;var f,d,h,m,p,g=c-l,v=l+c,b=(v%2==0?v:v+1)/2;for(r[1+b]=n,o[1+b]=a+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){for(h=d+b,d===-f||d!==f&&r[h-1]<r[h+1]?r[h]=r[h+1]:r[h]=r[h-1]+1,p=(m=r[h])-n+u-d;m<a&&p<s&&t[m]===e[p];)r[h]=++m,++p;if(g%2!=0&&g-f<=d&&d<=g+f&&o[h-g]<=r[h])return i(o[h-g],d+n-u,a,s)}for(d=g-f;d<=g+f;d+=2){for(h=d+b-g,d===g-f||d!==g+f&&o[h+1]<=o[h-1]?o[h]=o[h+1]-1:o[h]=o[h-1],p=(m=o[h]-1)-n+u-d;m>=n&&p>=u&&t[m]===e[p];)o[h]=m--,p--;if(g%2==0&&-f<=d&&d<=f&&o[h]<=r[h+g])return i(o[h],d+n-u,a,s)}}},u=[];return function n(r,o,i,u,s){var c=a(r,o,i,u);if(null===c||c.start===o&&c.diag===o-u||c.end===r&&c.diag===r-i)for(var l=r,f=i;l<o||f<u;)l<o&&f<u&&t[l]===e[f]?(s.push([0,t[l]]),++l,++f):o-r>u-i?(s.push([2,t[l]]),++l):(s.push([1,e[f]]),++f);else{n(r,c.start,i,c.start-c.diag,s);for(var d=c.start;d<c.end;++d)s.push([0,t[d]]);n(c.end,o,c.end-c.diag,u,s)}}(0,t.length,0,e.length,u),u}(D(U(e.childNodes),Fm),t),e),e},Um=nt(m.none()),Wm=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},qm=function(t){var e=et.fromTag("body",Um.get().getOrThunk(function(){var t=n.document.implementation.createHTMLDocument("undo");return Um.set(m.some(t)),t}));return Qi(e,Wm(t)),N(Hi(e,"*[data-mce-bogus]"),ne),e.dom().innerHTML},Ym=function(t){var e,n,r;return e=function(t){return M(D(U(t.childNodes),Fm),function(t){return t.length>0})}(t.getBody()),-1!==(n=(r=P(e,function(e){var n=el(t.serializer,e);return n.length>0?[n]:[]})).join("")).indexOf("</iframe>")?function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}}(r):function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}}(n)},$m=function(t,e,n){"fragmented"===e.type?jm(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(n?e.beforeBookmark:e.bookmark)},Gm=function(t,e){return!(!t||!e)&&(!!function(t,e){return Wm(t)===Wm(e)}(t,e)||function(t,e){return qm(t)===qm(e)}(t,e))},Km=function(t){return 0===t.get()},Xm=function(t,e,n){Km(n)&&(t.typing=e)},Jm=function(t,e){t.typing&&(Xm(t,!1,e),t.add())},Qm=function(t){var e=nt(m.none()),n=nt(0),r=nt(0),o={data:[],typing:!1,beforeChange:function(){!function(t,e,n){Km(e)&&n.set(m.some(Eu.getUndoBookmark(t.selection)))}(t,n,e)},add:function(i,a){return function(t,e,n,r,o,i,a){var u=t.settings,s=Ym(t);if(i=i||{},i=En.extend(i,s),!1===Km(r)||t.removed)return null;var c=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&Gm(c,i))return null;if(e.data[n.get()]&&o.get().each(function(t){e.data[n.get()].beforeBookmark=t}),u.custom_undo_redo_levels&&e.data.length>u.custom_undo_redo_levels){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=Eu.getUndoBookmark(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:a};return t.fire("AddUndo",f),n.get()>0&&(t.setDirty(!0),t.fire("change",f)),i}(t,o,r,n,e,i,a)},undo:function(){return function(t,e,n,r){var o;return e.typing&&(e.add(),e.typing=!1,Xm(e,!1,n)),r.get()>0&&(r.set(r.get()-1),o=e.data[r.get()],$m(t,o,!0),t.setDirty(!0),t.fire("Undo",{level:o})),o}(t,o,n,r)},redo:function(){return function(t,e,n){var r;return e.get()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],$m(t,r,!1),t.setDirty(!0),t.fire("Redo",{level:r})),r}(t,r,o.data)},clear:function(){!function(t,e,n){e.data=[],n.set(0),e.typing=!1,t.fire("ClearUndos")}(t,o,r)},reset:function(){var t;(t=o).clear(),t.add()},hasUndo:function(){return function(t,e,n){return r.get()>0||e.typing&&e.data[0]&&!Gm(Ym(t),e.data[0])}(t,o)},hasRedo:function(){return t=o,r.get()<t.data.length-1&&!t.typing;var t},transact:function(t){return function(t,e,n){return Jm(t,e),t.beforeChange(),t.ignore(n),t.add()}(o,n,t)},ignore:function(t){!function(t,e){try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}}(n,t)},extra:function(e,n){!function(t,e,n,r,o){if(e.transact(r)){var i=e.data[n.get()].bookmark,a=e.data[n.get()-1];$m(t,a,!0),e.transact(o)&&(e.data[n.get()-1].beforeBookmark=i)}}(t,o,r,e,n)}};return function(t,e,n){var r=nt(!1),o=function(t){Xm(e,!1,n),e.add({},t)};t.on("init",function(){e.add()}),t.on("BeforeExecCommand",function(t){var r=t.command;"Undo"!==r&&"Redo"!==r&&"mceRepaint"!==r&&(Jm(e,n),e.beforeChange())}),t.on("ExecCommand",function(t){var e=t.command;"Undo"!==e&&"Redo"!==e&&"mceRepaint"!==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===Gm(Ym(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 a=t.ctrlKey&&!t.altKey||t.metaKey;!(i<16||i>20)||224===i||91===i||e.typing||a||(e.beforeChange(),Xm(e,!0,n),e.add({},t),r.set(!0))}}),t.on("mousedown",function(t){e.typing&&o(t)}),t.on("input",function(t){t.inputType&&("insertReplacementText"===t.inputType||function(t){return"insertText"===t.inputType&&null===t.data}(t))&&o(t)}),t.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||t.nodeChanged()})}(t,o,n),function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")}(t),o},Zm=[9,27,Bf.HOME,Bf.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Bf.DOWN,Bf.UP,Bf.LEFT,Bf.RIGHT].concat(yn.browser.isFirefox()?[224]:[]),tp=function(t){return"keydown"===t.type||"keyup"===t.type},ep=function(t){var e=t.keyCode;return e===Bf.BACKSPACE||e===Bf.DELETE},np=function(t){var e=t.dom,n=Uu(t),r=function(t){return t.getParam("placeholder",Fu.getAttrib(t.getElement(),"placeholder"),"string")}(t),o=function o(i,a){if(!function(t){if(tp(t)){var e=t.keyCode;return!ep(t)&&(Bf.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||E(Zm,e))}return!1}(i)){var u=t.getBody(),s=!function(t){return tp(t)&&!(ep(t)||"keyup"===t.type&&229===t.keyCode)}(i)&&function(t,e,n){if(Ph(et.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}(e,u,n);(""!==e.getAttrib(u,"data-mce-placeholder")!==s||a)&&(e.setAttrib(u,"data-mce-placeholder",s?r:null),e.setAttrib(u,"aria-placeholder",s?r:null),function(t,e){t.fire("PlaceholderToggle",{state:e})}(t,s),t.on(s?"keydown":"keyup",o),t.off(s?"keyup":"keydown",o))}};r&&t.on("init",function(n){o(n,!0),t.on("change SetContent ExecCommand",o),t.on("remove",function(){var n=t.getBody();e.setAttrib(n,"data-mce-placeholder",null),e.setAttrib(n,"aria-placeholder",null)})})},rp=function(t){return void 0===t.touches||1!==t.touches.length?m.none():m.some(t.touches[0])},op=function(t){var e=nt(m.none()),n=nt(!1),r=zi(function(e){t.fire("longpress",Z(Z({},e),{type:"longpress"})),n.set(!0)},400);t.on("touchstart",function(t){rp(t).each(function(o){r.cancel();var a={x:i(o.clientX),y:i(o.clientY),target:i(t.target)};r.throttle(t),n.set(!1),e.set(m.some(a))})},!0),t.on("touchmove",function(o){r.cancel(),rp(o).each(function(r){e.get().each(function(o){(function(t,e){var n=Math.abs(t.clientX-e.x()),r=Math.abs(t.clientY-e.y());return n>5||r>5})(r,o)&&(e.set(m.none()),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",Z(Z({},o),{type:"tap"}))})},!0)},ip=function(t,e){return t.hasOwnProperty(e.nodeName)},ap=function(t,e){return!!De.isText(e)||!!De.isElement(e)&&!ip(t,e)&&!nc.isBookmarkNode(e)},up=function(t,e){if(De.isText(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||ip(t,e.nextSibling)))return!0}return!1},sp=function(t){var e,n,r,o,i,a,u,s,c,l,f=t.dom,d=t.selection,h=t.schema,m=h.getBlockElements(),p=d.getStart(),g=t.getBody(),v=Uu(t);if(p&&De.isElement(p)&&v&&(l=g.nodeName.toLowerCase(),h.isValidChild(l,v.toLowerCase())&&!function(t,e,n){return O(ad(et.fromDom(n),et.fromDom(e)),function(e){return ip(t,e.dom())})}(m,g,p))){for(n=(e=d.getRng()).startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,c=Rl(t),p=g.firstChild;p;)if(ap(m,p)){if(up(m,p)){u=p,p=p.nextSibling,f.remove(u);continue}a||(a=f.create(v,Wu(t)),p.parentNode.insertBefore(a,p),s=!0),u=p,p=p.nextSibling,a.appendChild(u)}else a=null,p=p.nextSibling;s&&c&&(e.setStart(n,r),e.setEnd(o,i),d.setRng(e),t.nodeChanged())}},cp=function(t){Uu(t)&&t.on("NodeChange",u(sp,t))},lp=De.isText,fp=function(t){return lp(t)&&t.data[0]===ra},dp=function(t){return lp(t)&&t.data[t.data.length-1]===ra},hp=function(t){return t.ownerDocument.createTextNode(ra)},mp=function(t,e){return t?function(t){if(lp(t.previousSibling))return dp(t.previousSibling)?t.previousSibling:(t.previousSibling.appendData(ra),t.previousSibling);if(lp(t))return fp(t)?t:(t.insertData(0,ra),t);var e=hp(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(lp(t.nextSibling))return fp(t.nextSibling)?t.nextSibling:(t.nextSibling.insertData(0,ra),t.nextSibling);if(lp(t))return dp(t)?t:(t.appendData(ra),t);var e=hp(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e}(e)},pp=u(mp,!0),gp=u(mp,!1),vp=function(t,e){return De.isText(t.container())?mp(e,t.container()):mp(e,t.getNode())},bp=function(t,e){var n=e.get();return n&&t.container()===n&&sa(n)},yp=function(t,e){return e.fold(function(e){Hu.remove(t.get());var n=pp(e);return t.set(n),m.some(uu(n,n.length-1))},function(e){return Ks.firstPositionIn(e).map(function(e){if(bp(e,t))return uu(t.get(),1);Hu.remove(t.get());var n=vp(e,!0);return t.set(n),uu(n,1)})},function(e){return Ks.lastPositionIn(e).map(function(e){if(bp(e,t))return uu(t.get(),t.get().length-1);Hu.remove(t.get());var n=vp(e,!1);return t.set(n),uu(n,n.length-1)})},function(e){Hu.remove(t.get());var n=gp(e);return t.set(n),m.some(uu(n,1))})},xp=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,wp=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?sa(n)?De.isText(n.nextSibling)?uu(n.nextSibling,0):uu.after(n):fa(e)?uu(n,r+1):e:sa(n)?De.isText(n.previousSibling)?uu(n.previousSibling,n.previousSibling.data.length):uu.before(n):da(e)?uu(n,r-1):e},Cp={isInlineTarget:function(t,e){return zt(et.fromDom(e),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},findRootInline:function(t,e,n){var r=function(t,e,n){return M(Ci.DOM.getParents(n.container(),"*",e),t)}(t,e,n);return m.from(r[r.length-1])},isRtl:function(t){return"rtl"===Ci.DOM.getStyle(t,"direction",!0)||(e=t.textContent,xp.test(e));var e},isAtZwsp:function(t){return fa(t)||da(t)},normalizePosition:wp,normalizeForwards:u(wp,!0),normalizeBackwards:u(wp,!1),hasSameParentBlock:function(t,e,n){var r=gs(e,t),o=gs(n,t);return r&&r===o}},_p=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].apply(null,e);if(r.isSome())return r}return m.none()},kp=ul([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Sp=function(t,e){return gs(e,t)||t},Tp=function(t,e,n){var r=Cp.normalizeForwards(n),o=Sp(e,r.container());return Cp.findRootInline(t,o,r).fold(function(){return Ks.nextPosition(o,r).bind(u(Cp.findRootInline,t,o)).map(function(t){return kp.before(t)})},m.none)},Ep=function(t,e){return null===Au(t,e)},Op=function(t,e,n){return Cp.findRootInline(t,e,n).filter(u(Ep,e))},Dp=function(t,e,n){var r=Cp.normalizeBackwards(n);return Op(t,e,r).bind(function(t){return Ks.prevPosition(t,r).isNone()?m.some(kp.start(t)):m.none()})},Np=function(t,e,n){var r=Cp.normalizeForwards(n);return Op(t,e,r).bind(function(t){return Ks.nextPosition(t,r).isNone()?m.some(kp.end(t)):m.none()})},Ap=function(t,e,n){var r=Cp.normalizeBackwards(n),o=Sp(e,r.container());return Cp.findRootInline(t,o,r).fold(function(){return Ks.prevPosition(o,r).bind(u(Cp.findRootInline,t,o)).map(function(t){return kp.after(t)})},m.none)},Mp=function(t){return!1===Cp.isRtl(zp(t))},Ip=function(t,e,n){return _p([Tp,Dp,Np,Ap],[t,e,n]).filter(Mp)},zp=function(t){return t.fold(a,a,a,a)},Bp=function(t){return t.fold(i("before"),i("start"),i("end"),i("after"))},Rp=function(t){return t.fold(kp.before,kp.before,kp.after,kp.after)},Pp=function(t,e,n,r,o,i){return Ha(Cp.findRootInline(e,n,r),Cp.findRootInline(e,n,o),function(e,r){return e!==r&&Cp.hasSameParentBlock(n,e,r)?kp.after(t?e:r):i}).getOr(i)},Lp=function(t,e){return t.fold(i(!0),function(t){return r=e,!(Bp(n=t)===Bp(r)&&zp(n)===zp(r));var n,r})},Hp=function(t,e){return t?e.fold(o(m.some,kp.start),m.none,o(m.some,kp.after),m.none):e.fold(m.none,o(m.some,kp.before),m.none,o(m.some,kp.end))},Fp=function(t,e,n,r){var o=Cp.normalizePosition(t,r),i=Ip(e,n,o);return Ip(e,n,o).bind(u(Hp,t)).orThunk(function(){return function(t,e,n,r,o){var i=Cp.normalizePosition(t,o);return Ks.fromPosition(t,n,i).map(u(Cp.normalizePosition,t)).fold(function(){return r.map(Rp)},function(o){return Ip(e,n,o).map(u(Pp,t,e,n,i,o)).filter(u(Lp,r))}).filter(Mp)}(t,e,n,i,r)})},Vp=Ip,jp=Fp,Up=(u(Fp,!1),u(Fp,!0),Rp),Wp=function(t){return t.fold(kp.start,kp.start,kp.end,kp.end)},qp=function(t,e,n){var r=t?1:-1;return e.setRng(uu(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0},Yp=function(t,e){var n=e.selection.getRng(),r=t?uu.fromRangeEnd(n):uu.fromRangeStart(n);return!!function(t){return w(t.selection.getSel().modify)}(e)&&(t&&fa(r)?qp(!0,e.selection,r):!(t||!da(r))&&qp(!1,e.selection,r))},$p=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},Gp=function(t){return!1!==t.settings.inline_boundaries},Kp=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},Xp=function(t,e,n){return yp(e,n).map(function(e){return $p(t,e),n})},Jp=function(t,e,n){return function(){return!!Gp(e)&&Yp(t,e)}},Qp={move:function(t,e,n){return function(){return!!Gp(t)&&function(t,e,n){var r=t.getBody(),o=uu.fromRangeStart(t.selection.getRng()),i=u(Cp.isInlineTarget,t);return jp(n,i,r,o).bind(function(n){return Xp(t,e,n)})}(t,e,n).isSome()}},moveNextWord:u(Jp,!0),movePrevWord:u(Jp,!1),setupSelectedState:function(t){var e=nt(null),n=u(Cp.isInlineTarget,t);return t.on("NodeChange",function(r){Gp(t)&&(function(t,e,n){var r=M(e.select('*[data-mce-selected="inline-boundary"]'),t),o=M(n,t);N(F(r,o),u(Kp,!1)),N(F(o,r),u(Kp,!0))}(n,t.dom,r.parents),function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=uu.fromRangeStart(t.selection.getRng());uu.isTextPosition(n)&&!1===Cp.isAtZwsp(n)&&($p(t,Hu.removeAndReposition(e.get(),n)),e.set(null))}}(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=M(r,t);N(o,function(r){var o=uu.fromRangeStart(e.selection.getRng());Vp(t,e.getBody(),o).bind(function(t){return Xp(e,n,t)})})}}(n,t,e,r.parents))}),e},setCaretPosition:$p},Zp=function(t){return z(t,function(t,e){return t.concat(function(t){var e=function(e){return D(e,function(e){return(e=Da(e)).node=t,e})};if(De.isElement(t))return e(t.getClientRects());if(De.isText(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}}(e))},[])};!function(t){t[t.Up=-1]="Up",t[t.Down=1]="Down"}(im||(im={}));var tg,eg=function(t,e,n,r,o,i){var a,u,s=0,c=[],l=function(r){var i,a,l;for(l=Zp([r]),-1===t&&(l=l.reverse()),i=0;i<l.length;i++)if(a=l[i],!n(a,u)){if(c.length>0&&e(a,_n.last(c))&&s++,a.line=s,o(a))return!0;c.push(a)}};return(u=_n.last(i.getClientRects()))?(l(a=i.getNode()),function(t,e,n,r){for(;r=ps(r,t,Ea,e);)if(n(r))return}(t,r,l,a),c):c},ng=u(eg,im.Up,Ma,Ia),rg=u(eg,im.Down,Ia,Ma),og=function(t){return function(e){return function(t,e){return e.line>t}(t,e)}},ig=function(t){return function(e){return function(t,e){return e.line===t}(t,e)}},ag=De.isContentEditableFalse,ug=ps,sg=function(t,e){return Math.abs(t.left-e)},cg=function(t,e){return Math.abs(t.right-e)},lg=function(t,e){return t>=e.left&&t<=e.right},fg=function(t,e){return _n.reduce(t,function(t,n){var r,o;return r=Math.min(sg(t,e),cg(t,e)),o=Math.min(sg(n,e),cg(n,e)),lg(e,n)?n:lg(e,t)?t:o===r&&ag(n.node)?n:o<r?n:t})},dg=function(t,e,n,r){for(;r=ug(r,t,Ea,e);)if(n(r))return},hg=function(t,e,n){var r,o=Zp(function(t){return M(U(t.getElementsByTagName("*")),is)}(t)),i=M(o,function(t){return n>=t.top&&n<=t.bottom});return(r=fg(i,e))&&(r=fg(function(t,e){var n=[],r=function(t,r){var o;return o=M(Zp([r]),function(n){return!t(n,e)}),n=n.concat(o),0===o.length};return n.push(e),dg(im.Up,t,u(r,Ma),e.node),dg(im.Down,t,u(r,Ia),e.node),n}(t,r),e))&&is(r.node)?function(t,e){return{node:t.node,before:sg(t,e)<cg(t,e)}}(r,e):null},mg=De.isContentEditableTrue,pg=De.isContentEditableFalse,gg=function(t,e,n,r,o){return e._selectionOverrides.showCaret(t,n,r,o)},vg=function(t,e){return t.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?null:function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e}(e)},bg=function(t,e,n){var r=ks(1,t.getBody(),e),o=uu.fromRangeStart(r),i=o.getNode();if(pg(i))return gg(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(pg(a))return gg(1,t,a,!1,!1);var u=t.dom.getParent(o.getNode(),function(t){return pg(t)||mg(t)});return pg(u)?gg(1,t,u,!1,n):null},yg=function(t,e,n){return e&&e.collapsed&&bg(t,e,n)||e},xg=function(t,e,n){return m.from(n.container()).filter(De.isText).exists(function(r){var o=t?0:-1;return e(r.data.charAt(n.offset()+o))})},wg=u(xg,!0,oc),Cg=u(xg,!1,oc),_g=function(t){var e=t.container();return De.isText(e)&&0===e.data.length},kg=function(t,e){return function(n){return m.from(bs(t?0:-1,n)).filter(e).isSome()}},Sg=function(t){return"IMG"===t.nodeName&&"block"===Re(et.fromDom(t),"display")},Tg=function(t){return De.isContentEditableFalse(t)&&!De.isBogusAll(t)},Eg=kg(!0,Sg),Og=kg(!1,Sg),Dg=kg(!0,De.isTable),Ng=kg(!1,De.isTable),Ag=kg(!0,Tg),Mg=kg(!1,Tg);!function(t){t[t.Br=0]="Br",t[t.Block=1]="Block",t[t.Wrap=2]="Wrap",t[t.Eol=3]="Eol"}(tg||(tg={}));var Ig,zg,Bg=function(t,e){return t===au.Backwards?H(e):e},Rg=function(t,e,n){return t===au.Forwards?e.next(n):e.prev(n)},Pg=function(t,e,n,r){return De.isBr(r.getNode(e===au.Forwards))?tg.Br:!1===vs(n,r)?tg.Block:tg.Wrap},Lg=function(t,e,n,r){for(var o,i=Fs(n),a=r,u=[];a&&(o=Rg(e,i,a));){if(De.isBr(o.getNode(!1)))return e===au.Forwards?{positions:Bg(e,u).concat([o]),breakType:tg.Br,breakAt:m.some(o)}:{positions:Bg(e,u),breakType:tg.Br,breakAt:m.some(o)};if(o.isVisible()){if(t(a,o)){var s=Pg(0,e,a,o);return{positions:Bg(e,u),breakType:s,breakAt:m.some(o)}}u.push(o),a=o}else a=o}return{positions:Bg(e,u),breakType:tg.Eol,breakAt:m.none()}},Hg=function(t,e,n,r){return e(n,r).breakAt.map(function(r){var o=e(n,r).positions;return t===au.Backwards?o.concat(r):[r].concat(o)}).getOr([])},Fg=function(t,e){return z(t,function(t,n){return t.fold(function(){return m.some(n)},function(r){return Ha(V(r.getClientRects()),V(n.getClientRects()),function(t,o){var i=Math.abs(e-t.left);return Math.abs(e-o.left)<=i?n:r}).or(t)})},m.none())},Vg=function(t,e){return V(e.getClientRects()).bind(function(e){return Fg(t,e.left)})},jg=u(Lg,iu.isAbove,-1),Ug=u(Lg,iu.isBelow,1),Wg=u(Hg,-1,jg),qg=u(Hg,1,Ug),Yg=De.isContentEditableFalse,$g=Ba,Gg=function(t,e,n){var r,o,i=Fs(t.getBody()),a=u(Os,i.next),s=u(Os,i.prev);if(n.collapsed&&t.settings.forced_root_block){if(!(r=t.dom.getParent(n.startContainer,"PRE")))return;(1===e?a(uu.fromRangeStart(n)):s(uu.fromRangeStart(n)))||(o=function(t){var e=t.dom.create(Uu(t));return(!yn.ie||yn.ie>=11)&&(e.innerHTML='<br data-mce-bogus="1">'),e}(t),1===e?t.$(r).after(o):t.$(r).before(o),t.selection.select(o,!0),t.selection.collapse())}},Kg=function(t,e){return function(){var n=function(t,e){var n,r=Fs(t.getBody()),o=u(Os,r.next),i=u(Os,r.prev),a=e?au.Forwards:au.Backwards,s=e?o:i,c=t.selection.getRng();return(n=function(t,e,n,r){var o=t===au.Forwards,i=o?Ag:Mg;if(!r.collapsed){var a=$g(r);if(Yg(a))return gg(t,e,a,t===au.Backwards,!0)}var u=ua(r.startContainer),s=Ts(t,e.getBody(),r);if(i(s))return vg(e,s.getNode(!o));var c=Cp.normalizePosition(o,n(s));if(!c)return u?r:null;if(i(c))return gg(t,e,c.getNode(!o),o,!0);var l=n(c);return l&&i(l)&&Ds(c,l)?gg(t,e,l.getNode(!o),o,!0):u?yg(e,c.toRange(),!0):null}(a,t,s,c))?n:(n=Gg(t,a,c))||null}(t,e);return!!n&&(t.selection.setRng(n),!0)}},Xg=function(t,e){return function(){var n=function(t,e){var n,r=e?1:-1,o=e?rg:ng,i=t.selection.getRng();return(n=function(t,e,n,r){var o,i,a,u,s,c,l,f,d;if(d=$g(r),o=Ts(t,e.getBody(),r),i=n(e.getBody(),og(1),o),a=M(i,ig(1)),s=_n.last(o.getClientRects()),(Ag(o)||Dg(o))&&(d=o.getNode()),(Mg(o)||Ng(o))&&(d=o.getNode(!0)),!s)return null;if(c=s.left,(u=fg(a,c))&&Yg(u.node))return l=Math.abs(c-u.left),f=Math.abs(c-u.right),gg(t,e,u.node,l<f,!0);if(d){var h=function(t,e,n,r){var o,i,a,u,s,c,l=Fs(e),f=[],d=0,h=function(t){return _n.last(t.getClientRects())};1===t?(o=l.next,i=Ia,a=Ma,u=uu.after(r)):(o=l.prev,i=Ma,a=Ia,u=uu.before(r)),c=h(u);do{if(u.isVisible()&&!a(s=h(u),c)){if(f.length>0&&i(s,_n.last(f))&&d++,(s=Da(s)).position=u,s.line=d,n(s))return f;f.push(s)}}while(u=o(u));return f}(t,e.getBody(),og(1),d);if(u=fg(M(h,ig(1)),c))return yg(e,u.position.toRange(),!0);if(u=_n.last(M(h,ig(0))))return yg(e,u.position.toRange(),!0)}}(r,t,o,i))?n:(n=Gg(t,r,i))||null}(t,e);return!!n&&(t.selection.setRng(n),!0)}},Jg=function(t,e){return function(){var n=e?uu.fromRangeEnd(t.selection.getRng()):uu.fromRangeStart(t.selection.getRng()),r=e?Ug(t.getBody(),n):jg(t.getBody(),n);return(e?j(r.positions):V(r.positions)).filter(function(t){return function(e){return t?Mg(e):Ag(e)}}(e)).fold(i(!1),function(e){return t.selection.setRng(e.toRange()),!0})}},Qg=function(t,e,n,r,o){var i=Hi(et.fromDom(n),"td,th,caption").map(function(t){return t.dom()});return function(t,e,n){return z(t,function(t,r){return t.fold(function(){return m.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 m.some(i<o?r:t)})},m.none())}(M(function(t,e){return P(i,function(e){var n=function(t,e){return{left:t.left-e,top:t.top-e,right:t.right+-2,bottom:t.bottom+-2,width:t.width+e,height:t.height+e}}(Da(e.getBoundingClientRect()),-1);return[{x:n.left,y:t(n),cell:e},{x:n.right,y:t(n),cell:e}]})}(t),function(t){return e(t,o)}),r,o).map(function(t){return t.cell})},Zg=u(Qg,function(t){return t.bottom},function(t,e){return t.y<e}),tv=u(Qg,function(t){return t.top},function(t,e){return t.y>e}),ev=function(t,e){t.selection.setRng(e),td(t,e)},nv=function(t,e,n){var r=t(e,n);return function(t){return t.breakType===tg.Wrap&&0===t.positions.length}(r)||!De.isBr(n.getNode())&&function(t){return t.breakType===tg.Br&&1===t.positions.length}(r)?!function(t,e,n){return r.breakAt.map(function(n){return t(e,n).breakAt.isSome()}).getOr(!1)}(t,e):r.breakAt.isNone()},rv=u(nv,jg),ov=u(nv,Ug),iv=function(t,e,n){var r=function(t,e){var n=e.getNode(t);return De.isElement(n)&&"TABLE"===n.nodeName?m.some(n):m.none()}(!!e,n),o=!1===e;r.fold(function(){return ev(t,n.toRange())},function(r){return Ks.positionIn(o,t.getBody()).filter(function(t){return t.isEqual(n)}).fold(function(){return ev(t,n.toRange())},function(o){return function(t,e,n,r){var o=Uu(e);o?e.undoManager.transact(function(){var r=et.fromTag(o);Ie(r,Wu(e)),Qt(r,et.fromTag("br")),t?Xt(et.fromDom(n),r):Kt(et.fromDom(n),r);var i=e.dom.createRng();i.setStart(r.dom(),0),i.setEnd(r.dom(),0),ev(e,i)}):ev(e,r.toRange())}(e,t,r,n)})})},av=function(t,e,n,r){var o=t.selection.getRng(),i=uu.fromRangeStart(o),a=t.getBody();if(!e&&rv(r,i)){var u=function(t,e,n){return function(t,e){return V(e.getClientRects()).bind(function(e){return Zg(t,e.left,e.top)}).bind(function(t){return Vg((n=t,Ks.lastPositionIn(n).map(function(t){return jg(n,t).positions.concat(t)}).getOr([])),e);var n})}(e,n).orThunk(function(){return V(n.getClientRects()).bind(function(n){return Fg(Wg(t,uu.before(e)),n.left)})}).getOr(uu.before(e))}(a,n,i);return iv(t,e,u),!0}return!(!e||!ov(r,i))&&(u=function(t,e,n){return function(t,e){return j(e.getClientRects()).bind(function(e){return tv(t,e.left,e.top)}).bind(function(t){return Vg((n=t,Ks.firstPositionIn(n).map(function(t){return[t].concat(Ug(n,t).positions)}).getOr([])),e);var n})}(e,n).orThunk(function(){return V(n.getClientRects()).bind(function(n){return Fg(qg(t,uu.after(e)),n.left)})}).getOr(uu.after(e))}(a,n,i),iv(t,e,u),!0)},uv=function(t,e){return function(){return m.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(n){return m.from(t.dom.getParent(n,"table")).map(function(n){return function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;if(os()&&function(t,e,n){var r=uu.fromRangeStart(e);return Ks.positionIn(!t,n).map(function(t){return t.isEqual(r)}).getOr(!1)}(e,o,n)){var a=gg(i,t,n,!e,!0);return ev(t,a),!0}return!1}(t,e,n)})}).getOr(!1)}},sv=function(t,e){return function(){return m.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind(function(n){return m.from(t.dom.getParent(n,"table")).map(function(r){return av(t,e,r,n)})}).getOr(!1)}},cv=function(t){return E(["figcaption"],re(t))},lv=function(t){var e=n.document.createRange();return e.setStartBefore(t.dom()),e.setEndBefore(t.dom()),e},fv=function(t,e,n){n?Qt(t,e):Jt(t,e)},dv=function(t,e){var n=et.fromDom(t.getBody()),r=uu.fromRangeStart(t.selection.getRng()),o=Uu(t),i=Wu(t);return function(t,e){var n=u(Rt,e);return ji(et.fromDom(t.container()),Nn,n).filter(cv)}(r,n).exists(function(){if(function(t,e,n){return e?function(t,e){return Ug(t,n).breakAt.isNone()}(t.dom()):function(t,e){return jg(t,n).breakAt.isNone()}(t.dom())}(n,e,r)){var a=function(t,e,n,r){return""===e?function(t,e){var n=et.fromTag("br");return fv(t,n,e),lv(n)}(t,r):function(t,e,n,r){var o=et.fromTag(n),i=et.fromTag("br");return Ie(o,r),Qt(o,i),fv(t,o,e),lv(i)}(t,r,e,n)}(n,o,i,e);return t.selection.setRng(a),!0}return!1})},hv=function(t,e){return function(){return!!t.selection.isCollapsed()&&dv(t,e)}},mv=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,r)}},pv=function(t,e){return B(function(t,e){return P(function(t){return D(t,function(t){return Z({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:r},t)})}(t),function(t){return function(t,e){return e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey}(t,e)?[t]:[]})}(t,e),function(t){return t.action()})},gv=function(t,e){return Pt(t,e)?ji(e,function(t){return In(t)||Bn(t)},function(t){return function(e){return Rt(t,et.fromDom(e.dom().parentNode))}}(t)):m.none()},vv=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),function(t){var e=t.getBody(),n=e.firstChild&&t.dom.isBlock(e.firstChild)?e.firstChild:e;t.selection.setCursorLocation(n,0)}(t))},bv=function(t,e){return{from:i(t),to:i(e)}},yv=function(t,e){var n=et.fromDom(t),r=et.fromDom(e.container());return gv(n,r).map(function(t){return function(t,e){return{block:i(t),position:i(e)}}(t,e)})},xv=function(t,e,n){return n.collapsed?function(t,e,n){var r=yv(t,uu.fromRangeStart(n)),o=r.bind(function(n){return Ks.fromPosition(e,t,n.position()).bind(function(n){return yv(t,n).map(function(n){return function(t,e,n){return De.isBr(n.position().getNode())&&!1===Ph(n.block())?Ks.positionIn(!1,n.block().dom()).bind(function(r){return r.isEqual(n.position())?Ks.fromPosition(e,t,r).bind(function(e){return yv(t,e)}):m.some(n)}).getOr(n):n}(t,e,n)})})});return Ha(r,o,bv).filter(function(t){return function(t){return!1===Rt(t.from().block(),t.to().block())}(t)&&function(t){return Ft(t.from().block()).bind(function(e){return Ft(t.to().block()).filter(function(t){return Rt(e,t)})}).isSome()}(t)&&function(t){return!1===De.isContentEditableFalse(t.from().block().dom())&&!1===De.isContentEditableFalse(t.to().block().dom())}(t)})}(t,e,n):m.none()},wv=function(t){var e=function(t){var e=qt(t);return R(e,Nn).fold(function(){return e},function(t){return e.slice(0,t)})}(t);return N(e,ee),e},Cv=function(t,e){var n=ud(e,t);return B(n.reverse(),function(t){return Ph(t)}).each(ee)},_v=function(t,e,n,r){if(Ph(n))return bh(n),Ks.firstPositionIn(n.dom());0===M(Ut(r),function(t){return!Ph(t)}).length&&Ph(e)&&Kt(r,et.fromTag("br"));var o=Ks.prevPosition(n.dom(),uu.before(r.dom()));return N(wv(e),function(t){Kt(r,t)}),Cv(t,e),o},kv=function(t,e,n){if(Ph(n))return ee(n),Ph(e)&&bh(e),Ks.firstPositionIn(e.dom());var r=Ks.lastPositionIn(n.dom());return N(wv(e),function(t){Qt(n,t)}),Cv(t,e),r},Sv=function(t,e){Ks.positionIn(t,e.dom()).map(function(t){return t.getNode()}).map(et.fromDom).filter(Mn).each(ee)},Tv=function(t,e,n){return Sv(!0,e),Sv(!1,n),function(t,e){return Pt(e,t)?function(t,e){var n=ud(e,t);return m.from(n[n.length-1])}(e,t):m.none()}(e,n).fold(u(kv,t,e,n),u(_v,t,e,n))},Ev=function(t,e,n,r){return e?Tv(t,r,n):Tv(t,n,r)},Ov=function(t,e){var n=et.fromDom(t.getBody()),r=xv(n.dom(),e,t.selection.getRng()).bind(function(t){return Ev(n,e,t.from().block(),t.to().block())});return r.each(function(e){t.selection.setRng(e.toRange())}),r.isSome()},Dv=function(t,e){var n=et.fromDom(e),r=u(Rt,t);return Vi(n,Ln,r).isSome()},Nv=function(t){var e=et.fromDom(t.getBody());return function(t,e){var n=Ks.prevPosition(t.dom(),uu.fromRangeStart(e)).isNone(),r=Ks.nextPosition(t.dom(),uu.fromRangeEnd(e)).isNone();return!function(t,e){return Dv(t,e.startContainer)||Dv(t,e.endContainer)}(t,e)&&n&&r}(e,t.selection.getRng())?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,e){var n=e.getRng();return Ha(gv(t,et.fromDom(n.startContainer)),gv(t,et.fromDom(n.endContainer)),function(r,o){return!1===Rt(r,o)&&(n.deleteContents(),Ev(t,!0,r,o).each(function(t){e.setRng(t.toRange())}),!0)}).getOr(!1)}(e,t.selection)},Av=function(t,e){return!t.selection.isCollapsed()&&Nv(t)},Mv=function(t){return Es(t).exists(Mn)},Iv=function(t,e,n){var r=M(ud(et.fromDom(n.container()),e),Nn),o=V(r).getOr(e);return Ks.fromPosition(t,o.dom(),n).filter(Mv)},zv=function(t,e){return Es(e).exists(Mn)||Iv(!0,t,e).isSome()},Bv=function(t,e){return function(t){return m.from(t.getNode(!0)).map(et.fromDom)}(e).exists(Mn)||Iv(!1,t,e).isSome()},Rv=u(Iv,!1),Pv=u(Iv,!0),Lv=ul([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Hv=function(t,e,n,r){var o=r.getNode(!1===e);return gv(et.fromDom(t),et.fromDom(n.getNode())).map(function(t){return Ph(t)?Lv.remove(t.dom()):Lv.moveToElement(o)}).orThunk(function(){return m.some(Lv.moveToElement(o))})},Fv=function(t,e,n){return Ks.fromPosition(e,t,n).bind(function(r){return o=r.getNode(),Ln(et.fromDom(o))||Bn(et.fromDom(o))?m.none():function(t,e,n,r){var o=function(e){return An(et.fromDom(e))&&!vs(n,r,t)};return Ss(!e,n).fold(function(){return Ss(e,r).fold(i(!1),o)},o)}(t,e,n,r)?m.none():e&&De.isContentEditableFalse(r.getNode())?Hv(t,e,n,r):!1===e&&De.isContentEditableFalse(r.getNode(!0))?Hv(t,e,n,r):e&&Mg(n)?m.some(Lv.moveToPosition(r)):!1===e&&Ag(n)?m.some(Lv.moveToPosition(r)):m.none();var o})},Vv=function(t,e){return m.from(Uv(t.getBody(),e))},jv=function(t,e){var n=t.selection.getNode();return Vv(t,n).filter(De.isContentEditableFalse).fold(function(){return function(t,e,n){var r=ks(e?1:-1,t,n),o=uu.fromRangeStart(r),i=et.fromDom(t);return!1===e&&Mg(o)?m.some(Lv.remove(o.getNode(!0))):e&&Ag(o)?m.some(Lv.remove(o.getNode())):!1===e&&Ag(o)&&Bv(i,o)?Rv(i,o).map(function(t){return Lv.remove(t.getNode())}):e&&Mg(o)&&zv(i,o)?Pv(i,o).map(function(t){return Lv.remove(t.getNode())}):function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return De.isElement(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&De.isContentEditableFalse(e.nextSibling)?m.some(Lv.moveToElement(e.nextSibling)):!1===t&&De.isContentEditableFalse(e.previousSibling)?m.some(Lv.moveToElement(e.previousSibling)):m.none()}(e,n.getNode(!1===e)).fold(function(){return Fv(t,e,n)},m.some):Fv(t,e,n).bind(function(e){return function(t,e,n){return n.fold(function(t){return m.some(Lv.remove(t))},function(t){return m.some(Lv.moveToElement(t))},function(n){return vs(e,n,t)?m.none():m.some(Lv.moveToPosition(n))})}(t,n,e)})}(t,e,o)}(t.getBody(),e,t.selection.getRng()).map(function(n){return n.fold(function(t,e){return function(n){return t._selectionOverrides.hideFakeCaret(),qh(t,e,et.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?uu.before(n):uu.after(n);return t.selection.setRng(r.toRange()),!0}}(t,e),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))}).getOr(!1)},function(){return!0})},Uv=function(t,e){for(;e&&e!==t;){if(De.isContentEditableTrue(e)||De.isContentEditableFalse(e))return e;e=e.parentNode}return null},Wv=function(t,e){return t.selection.isCollapsed()?jv(t,e):function(t,e){var n=t.selection.getNode();return!!De.isContentEditableFalse(n)&&Vv(t,n.parentNode).filter(De.isContentEditableFalse).fold(function(){var n;return n=et.fromDom(t.getBody()),N(Hi(n,".mce-offscreen-selection"),ee),qh(t,e,et.fromDom(t.selection.getNode())),vv(t),!0},function(){return!0})}(t,e)},qv=function(t){var e,n=Uv(t.getBody(),t.selection.getNode());return De.isContentEditableTrue(n)&&t.dom.isBlock(n)&&t.dom.isEmpty(n)&&(e=t.dom.create("br",{"data-mce-bogus":"1"}),t.dom.setHTML(n,""),n.appendChild(e),t.selection.setRng(uu.before(e).toRange())),!0},Yv=function(t,e,n,r,o,i){var a=gg(r,t,i.getNode(!o),o,!0);if(e.collapsed){var u=e.cloneRange();o?u.setEnd(a.startContainer,a.startOffset):u.setStart(a.endContainer,a.endOffset),u.deleteContents()}else e.deleteContents();return t.selection.setRng(a),function(t,e){De.isText(e)&&0===e.data.length&&t.remove(e)}(t.dom,n),!0},$v=function(t,e){return function(t,e){var n=t.selection.getRng();if(!De.isText(n.commonAncestorContainer))return!1;var r=e?au.Forwards:au.Backwards,o=Fs(t.getBody()),i=u(Os,o.next),a=u(Os,o.prev),s=e?i:a,c=e?Ag:Mg,l=Ts(r,t.getBody(),n),f=Cp.normalizePosition(e,s(l));if(!f||!Ds(l,f))return!1;if(c(f))return Yv(t,n,l.getNode(),r,e,f);var d=s(f);return!!(d&&c(d)&&Ds(f,d))&&Yv(t,n,l.getNode(),r,e,d)}(t,e)},Gv=function(t,e){return function(n){return yp(e,n).map(function(e){return Qp.setCaretPosition(t,e),!0}).getOr(!1)}},Kv=function(t,e,r,o){var i=t.getBody(),a=u(Cp.isInlineTarget,t);t.undoManager.ignore(function(){t.selection.setRng(function(t,e){var r=n.document.createRange();return r.setStart(t.container(),t.offset()),r.setEnd(e.container(),e.offset()),r}(r,o)),t.execCommand("Delete"),Vp(a,i,uu.fromRangeStart(t.selection.getRng())).map(Wp).map(Gv(t,e))}),t.nodeChanged()},Xv=function(t,e,n){if(t.selection.isCollapsed()&&function(t){return!1!==t.settings.inline_boundaries}(t)){var r=uu.fromRangeStart(t.selection.getRng());return function(t,e,n,r){var o=function(t,e){return gs(e,t)||t}(t.getBody(),r.container()),a=u(Cp.isInlineTarget,t),s=Vp(a,o,r);return s.bind(function(t){return n?t.fold(i(m.some(Wp(t))),m.none,i(m.some(Up(t))),m.none):t.fold(m.none,i(m.some(Up(t))),m.none,i(m.some(Wp(t))))}).map(Gv(t,e)).getOrThunk(function(){var i=Ks.navigate(n,o,r),u=i.bind(function(t){return Vp(a,o,t)});return s.isSome()&&u.isSome()?Cp.findRootInline(a,o,r).map(function(e){return!!function(t){return Ha(Ks.firstPositionIn(t),Ks.lastPositionIn(t),function(e,n){var r=Cp.normalizePosition(!0,e),o=Cp.normalizePosition(!1,n);return Ks.nextPosition(t,r).map(function(t){return t.isEqual(o)}).getOr(!0)}).getOr(!0)}(e)&&(qh(t,n,et.fromDom(e)),!0)}).getOr(!1):u.bind(function(o){return i.map(function(o){return n?Kv(t,e,r,o):Kv(t,e,o,r),!0})}).getOr(!1)})}(t,e,n,r)}return!1},Jv=function(t){return 1===qt(t).length},Qv=function(t,e){var n=et.fromDom(t.getBody()),r=et.fromDom(t.selection.getStart()),o=M(function(t,e){var n=ud(r,t);return R(n,Nn).fold(i(n),function(t){return n.slice(0,t)})}(n),Jv);return j(o).map(function(n){var r,i=uu.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Ha(Ks.firstPositionIn(n),Ks.lastPositionIn(n),function(r,o){var i=Cp.normalizePosition(!0,r),a=Cp.normalizePosition(!1,o),u=Cp.normalizePosition(!1,e);return t?Ks.nextPosition(n,u).map(function(t){return t.isEqual(a)&&e.isEqual(i)}).getOr(!1):Ks.prevPosition(n,u).map(function(t){return t.isEqual(i)&&e.isEqual(a)}).getOr(!1)}).getOr(!0)}(e,i,n.dom())||(r=n,Nu(r.dom())&&$h(r.dom()))||(function(t,e,n,r){var o=u(em,e),i=D(M(r,o),function(t){return t.dom()});if(0===i.length)qh(e,t,n);else{var a=function(t,e){var n=Kh(!1),r=tm(e,n.dom());return Kt(et.fromDom(t),n),ee(et.fromDom(t)),uu(r,0)}(n.dom(),i);e.selection.setRng(a.toRange())}}(e,t,n,o),0))}).getOr(!1)},Zv=function(t,e){return!!t.selection.isCollapsed()&&Qv(t,e)},tb=function(t,e){return{start:i(t),end:i(e)}},eb=ul([{removeTable:["element"]},{emptyCells:["cells"]}]),nb=function(t,e){return qi(et.fromDom(t),"td,th",e)},rb=function(t,e){return Ui(t,"table",e)},ob=function(t){return!1===Rt(t.start(),t.end())},ib=function(t,e){return rb(t.start(),e).bind(function(n){return rb(t.end(),e).bind(function(t){return e=Rt(n,t),r=n,e?m.some(r):m.none();var e,r})})},ab=function(t){return Hi(t,"td,th")},ub=function(t,e){return ib(e,t).isSome()},sb=function(t,e){var n=function(t){return function(e){return Rt(t,e)}}(t);return function(t,e){var n=nb(t.startContainer,e),r=nb(t.endContainer,e);return Ha(n,r,tb).filter(ob).filter(function(t){return ub(e,t)}).orThunk(function(){return function(t,e){var n=nb(e.startContainer,t),r=nb(e.endContainer,t);return e.collapsed?m.none():Ha(n,r,tb).fold(function(){return n.fold(function(){return r.bind(function(e){return rb(e,t).bind(function(t){return V(ab(t)).map(function(t){return tb(t,e)})})})},function(e){return rb(e,t).bind(function(t){return j(ab(t)).map(function(t){return tb(e,t)})})})},function(e){return ub(t,e)?m.none():function(t,e){return rb(t.start(),e).bind(function(e){return j(ab(e)).map(function(e){return tb(t.start(),e)})})}(e,t)})}(e,t)})}(e,n).bind(function(t){return function(t,e){return ib(t,e).map(function(e){return function(t,e,n){return{rng:i(t),table:i(e),cells:i(n)}}(t,e,ab(e))})}(t,n)})},cb=function(t,e){return R(t,function(t){return Rt(t,e)})},lb=function(t){return function(t){return Ha(cb(t.cells(),t.rng().start()),cb(t.cells(),t.rng().end()),function(e,n){return t.cells().slice(e,n+1)})}(t).map(function(e){var n=t.cells();return e.length===n.length?eb.removeTable(t.table()):eb.emptyCells(e)})},fb=function(t,e){return N(e,bh),t.selection.setCursorLocation(e[0].dom(),0),!0},db=function(t,e){return qh(t,!1,e),!0},hb=function(t,e,n,r){return pb(e,r).fold(function(){return function(t,e,n){return function(t,e){return sb(t,n).bind(lb)}(e).map(function(e){return e.fold(u(db,t),u(fb,t))})}(t,e,n)},function(e){return function(t,e){return gb(t,e)}(t,e)}).getOr(!1)},mb=function(t,e){return B(ud(e,t),Ln)},pb=function(t,e){return B(ud(e,t),function(t){return"caption"===re(t)})},gb=function(t,e){return bh(e),t.selection.setCursorLocation(e.dom(),0),m.some(!0)},vb=function(t,e){return t?Dg(e):Ng(e)},bb=function(t,e,n){var r=et.fromDom(t.getBody());return pb(r,n).fold(function(){return function(t,e,n,r){var o=uu.fromRangeStart(t.selection.getRng());return mb(n,r).bind(function(r){return Ph(r)?gb(t,r):function(t,e,n,r,o){return Ks.navigate(n,t.getBody(),o).bind(function(t){return mb(e,et.fromDom(t.getNode())).map(function(t){return!1===Rt(t,r)})})}(t,n,e,r,o)}).getOr(!1)}(t,e,r,n)||function(t,e){var n=uu.fromRangeStart(t.selection.getRng());return vb(e,n)||Ks.fromPosition(e,t.getBody(),n).map(function(t){return vb(e,t)}).getOr(!1)}(t,e)},function(n){return function(t,e,n,r){var o=uu.fromRangeStart(t.selection.getRng());return Ph(r)?gb(t,r):function(t,e,n,r,o){return Ks.navigate(n,t.getBody(),o).bind(function(i){return function(t,e,n,r){return Ks.firstPositionIn(t.dom()).bind(function(o){return Ks.lastPositionIn(t.dom()).map(function(t){return e?n.isEqual(o)&&r.isEqual(t):n.isEqual(t)&&r.isEqual(o)})}).getOr(!0)}(r,n,o,i)?function(t,e){return gb(t,r)}(t):function(t,e,n){return pb(t,et.fromDom(n.getNode())).map(function(t){return!1===Rt(t,e)})}(e,r,i)}).or(m.some(!0))}(t,n,e,r,o)}(t,e,r,n).getOr(!1)})},yb=function(t,e){var n=et.fromDom(t.selection.getStart(!0)),r=Sd(t);return t.selection.isCollapsed()&&0===r.length?bb(t,e,n):function(t,e){var n=et.fromDom(t.getBody()),r=t.selection.getRng(),o=Sd(t);return 0!==o.length?fb(t,o):hb(t,n,r,e)}(t,n)},xb=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=uu.fromRangeStart(t.selection.getRng());return Ks.fromPosition(e,t.getBody(),n).filter(function(t){return e?Eg(t):Og(t)}).bind(function(t){return m.from(bs(e?0:-1,t))}).map(function(e){return t.selection.select(e),!0}).getOr(!1)}(t,e)},wb=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},Cb=function(t,e){return(t||"table"===re(e)?"margin":"padding")+("rtl"===Re(e,"direction")?"-right":"-left")},_b=function(t){var e=Sb(t);return!0!==t.readonly&&(e.length>1||function(t,e){return L(e,function(e){var n=Cb(ts(t),e),r=Le(e,n).map(wb).getOr(0);return"false"!==t.dom.getContentEditable(e.dom())&&r>0})}(t,e))},kb=function(t){return zn(t)||Bn(t)},Sb=function(t){return M(D(t.selection.getSelectedBlocks(),et.fromDom),function(t){return!kb(t)&&!function(t){return Ft(t).map(kb).getOr(!1)}(t)&&ji(t,function(t){return De.isContentEditableTrue(t.dom())||De.isContentEditableFalse(t.dom())}).exists(function(t){return De.isContentEditableTrue(t.dom())})})},Tb=function(t,e){var n=t.dom,r=t.selection,o=t.formatter,i=function(t){return t.getParam("indentation","40px","string")}(t),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=ts(t),c=Uu(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==c||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),N(Sb(t),function(t){!function(t,e,n,r,o,i){var a=Cb(n,et.fromDom(i));if("outdent"===e){var u=Math.max(0,wb(i.style[a])-r);t.setStyle(i,a,u?u+o:"")}else u=wb(i.style[a])+r+o,t.setStyle(i,a,u)}(n,e,s,u,a,t.dom())})},Eb=function(t,e,n){return Ks.navigateIgnore(t,e,n,_g)},Ob=function(t,e){return B(ud(et.fromDom(e.container()),t),Nn)},Db=function(t,e,n){return Eb(t,e.dom(),n).forall(function(t){return Ob(e,n).fold(function(){return!1===vs(t,n,e.dom())},function(r){return!1===vs(t,n,e.dom())&&Pt(r,et.fromDom(t.container()))})})},Nb=function(t,e,n){return Ob(e,n).fold(function(){return Eb(t,e.dom(),n).forall(function(t){return!1===vs(t,n,e.dom())})},function(e){return Eb(t,e.dom(),n).isNone()})},Ab=u(Nb,!1),Mb=u(Nb,!0),Ib=u(Db,!1),zb=u(Db,!0),Bb=function(t,e,n){if(t.selection.isCollapsed()&&_b(t)){var r=t.dom,o=t.selection.getRng(),i=uu.fromRangeStart(o),a=r.getParent(o.startContainer,r.isBlock);if(null!==a&&Ab(et.fromDom(a),i))return Tb(t,"outdent"),!0}return!1},Rb=function(t){return m.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},Pb=function(t,e){var n,r,o=e,i=t.dom,a=t.schema.getMoveCaretBeforeOnEnterElements();if(e){if(/^(LI|DT|DD)$/.test(e.nodeName)){var u=function(t){for(;t;){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}}(e.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&e.insertBefore(i.doc.createTextNode(" "),e.firstChild)}if(r=i.createRng(),e.normalize(),e.hasChildNodes()){for(var s=new di(e,e);n=s.current();){if(De.isText(n)){r.setStart(n,0),r.setEnd(n,0);break}if(a[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=s.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else De.isBr(e)?e.nextSibling&&i.isBlock(e.nextSibling)?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)):(r.setStart(e,0),r.setEnd(e,0));t.selection.setRng(r),td(t,r)}},Lb=Rb,Hb=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},Fb=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},Vb=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},jb=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!De.isElement(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},Ub=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},Wb=function(t){t.innerHTML='<br data-mce-bogus="1">'},qb=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},Yb=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)},$b=function(t,e,n){return!1===De.isText(e)?n:t?1===n&&e.data.charAt(n-1)===ra?0:n:n===e.data.length-1&&e.data.charAt(n)===ra?e.data.length:n},Gb=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},Kb=function(t,e){var n=Uu(t);n&&n.toLowerCase()===e.tagName.toLowerCase()&&t.dom.setAttribs(e,Wu(t))},Xb=function(t,e){var n,r,o,i,a,u,s,c,l,f,d,h,m,p=t.dom,g=t.schema,v=g.getNonEmptyElements(),b=t.selection.getRng(),y=function(e){var n,i,u,s=o,c=g.getTextInlineElements();if(e||"TABLE"===f||"HR"===f?(n=p.create(e||h),Kb(t,n)):n=a.cloneNode(!1),u=n,!1===function(t){return t.getParam("keep_styles",!0)}(t))p.setAttrib(n,"style",null),p.setAttrib(n,"class",null);else do{if(c[s.nodeName]){if(Nu(s)||nc.isBookmarkNode(s))continue;i=s.cloneNode(!1),p.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(u=i,n.appendChild(i))}}while((s=s.parentNode)&&s!==r);return Wb(u),n},x=function(t){var e,n,r=$b(t,o,i);if(De.isText(o)&&(t?r>0:r<o.nodeValue.length))return!1;if(o.parentNode===a&&m&&!t)return!0;if(t&&De.isElement(o)&&o===a.firstChild)return!0;if(qb(o,"TABLE")||qb(o,"HR"))return m&&!t||!m&&t;var u=new di(o,a);for(De.isText(o)&&(t&&0===r?u.prev():t||r!==o.nodeValue.length||u.next());e=u.current();){if(De.isElement(e)){if(!e.getAttribute("data-mce-bogus")&&(n=e.nodeName.toLowerCase(),v[n]&&"br"!==n))return!1}else if(De.isText(e)&&!/^[ \t\r\n]*$/.test(e.nodeValue))return!1;t?u.prev():u.next()}return!0},w=function(){s=/^(H[1-6]|PRE|FIGURE)$/.test(f)&&"HGROUP"!==d?y(h):y(),function(t){return t.getParam("end_container_on_empty_block",!1)}(t)&&Yb(p,l)&&p.isEmpty(a)?s=p.split(l,a):p.insertAfter(s,a),Pb(t,s)};Hd.normalize(p,b).each(function(t){b.setStart(t.startContainer,t.startOffset),b.setEnd(t.endContainer,t.endOffset)}),o=b.startContainer,i=b.startOffset,h=Uu(t),u=!(!e||!e.shiftKey);var C=!(!e||!e.ctrlKey);De.isElement(o)&&o.hasChildNodes()&&(m=i>o.childNodes.length-1,o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o,i=m&&De.isText(o)?o.nodeValue.length:0),(r=Gb(p,o))&&((h&&!u||!h&&u)&&(o=function(t,e,n,r,o){var i,a,u,s,c,l,f=e||"P",d=t.dom,h=Gb(d,r);if(!(a=d.getParent(r,d.isBlock))||!Yb(d,a)){if(l=(a=a||h)===t.getBody()||a&&/^(TD|TH|CAPTION)$/.test(a.nodeName)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),Kb(t,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==a;)s=s.parentNode;for(;s&&!d.isBlock(s);)u=s,s=s.previousSibling;if(u&&t.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),Kb(t,i),u.parentNode.insertBefore(i,u),s=u;s&&!d.isBlock(s);)c=s.nextSibling,i.appendChild(s),s=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(t,h,b,o,i)),a=p.getParent(o,p.isBlock),l=a?p.getParent(a.parentNode,p.isBlock):null,f=a?a.nodeName.toUpperCase():"","LI"!==(d=l?l.nodeName.toUpperCase():"")||C||(a=l,l=l.parentNode,f=d),/^(LI|DT|DD)$/.test(f)&&p.isEmpty(a)?function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){var u;Fb(u=n)&&Fb(u.parentNode)&&(o="LI");var s=o?e(o):i.create("BR");if(jb(n,r,!0)&&jb(n,r,!1))Hb(n,"LI")?i.insertAfter(s,Vb(n)):i.replace(s,n);else if(jb(n,r,!0))Hb(n,"LI")?(i.insertAfter(s,Vb(n)),s.appendChild(i.doc.createTextNode(" ")),s.appendChild(n)):n.parentNode.insertBefore(s,n);else if(jb(n,r,!1))i.insertAfter(s,Vb(n));else{n=Vb(n);var c=a.cloneRange();c.setStartAfter(r),c.setEndAfter(n);var l=c.extractContents();"LI"===o&&function(t,e){return t.firstChild&&"LI"===t.firstChild.nodeName}(l)?(s=l.firstChild,i.insertAfter(l,n)):(i.insertAfter(l,n),i.insertAfter(s,n))}i.remove(r),Pb(t,s)}}(t,y,l,a,h):h&&a===t.getBody()||(h=h||"P",ua(a)?(s=ga(a),p.isEmpty(a)&&Wb(a),Pb(t,s)):x()?w():x(!0)?(s=a.parentNode.insertBefore(y(),a),Pb(t,qb(a,"HR")?s:a)):((n=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,$b(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,$b(!1,t.endContainer,t.endOffset)),e}(b).cloneRange()).setEndAfter(a),function(t){N(function t(e,n){var r=[];return N(qt(e),function(e){n(e)&&(r=r.concat([e])),r=r.concat(t(e,n))}),r}(et.fromDom(t),ae),function(t){var e=t.dom();e.nodeValue=oa(e.nodeValue)})}(c=n.extractContents()),function(t){do{De.isText(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)}(c),s=c.firstChild,p.insertAfter(c,a),function(t,e,n){var r,o=s,i=[];if(o){for(;o=o.firstChild;){if(t.isBlock(o))return;De.isElement(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue?t.remove(o):Ub(t,o)&&t.remove(o)}}(p,v),function(t,e){var n;e.normalize(),(n=e.lastChild)&&!/^(left|right)$/gi.test(t.getStyle(n,"float",!0))||t.add(e,"br")}(p,a),p.isEmpty(a)&&Wb(a),s.normalize(),p.isEmpty(s)?(p.remove(s),w()):Pb(t,s)),p.setAttrib(s,"id",""),t.fire("NewBlock",{newBlock:s})))},Jb=function(t,e,n){var r=t.create("span",{},"&nbsp;");n.parentNode.insertBefore(r,n),e.scrollIntoView(r),t.remove(r)},Qb=function(t,e,n,r){var o=t.createRng();r?(o.setStartBefore(n),o.setEndBefore(n)):(o.setStartAfter(n),o.setEndAfter(n)),e.setRng(o)},Zb=function(t,e){var n=et.fromTag("br");Kt(et.fromDom(e),n),t.undoManager.add()},ty=function(t,e){ey(t.getBody(),e)||Xt(et.fromDom(e),et.fromTag("br"));var n=et.fromTag("br");Xt(et.fromDom(e),n),Jb(t.dom,t.selection,n.dom()),Qb(t.dom,t.selection,n.dom(),!1),t.undoManager.add()},ey=function(t,e){return n=uu.after(e),!!De.isBr(n.getNode())||Ks.nextPosition(t,uu.after(e)).map(function(t){return De.isBr(t.getNode())}).getOr(!1);var n},ny=function(t){return t&&"A"===t.nodeName&&"href"in t},ry=function(t){return t.fold(i(!1),ny,ny,i(!1))},oy=function(t,e){e.fold(r,u(Zb,t),u(ty,t),r)},iy=function(t,e){var n=function(t){var e=u(Cp.isInlineTarget,t),n=uu.fromRangeStart(t.selection.getRng());return Vp(e,t.getBody(),n).filter(ry)}(t);n.isSome()?n.each(u(oy,t)):function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();Hd.normalize(i,a).each(function(t){a.setStart(t.startContainer,t.startOffset),a.setEnd(t.endContainer,t.endOffset)});var u=a.startOffset,s=a.startContainer;if(1===s.nodeType&&s.hasChildNodes()){var c=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,u=c&&3===s.nodeType?s.nodeValue.length:0}var l=i.getParent(s,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",h=!(!e||!e.ctrlKey);"LI"!==d||h||(l=f),s&&3===s.nodeType&&u>=s.nodeValue.length&&(function(t,e,n){for(var r,o=new di(s,l),i=t.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0}(t.schema)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),vu(i,a,n),Jb(i,o,n),Qb(i,o,n,r),t.undoManager.add()}(t,e)},ay=function(t,e){return Lb(t).filter(function(t){return e.length>0&&zt(et.fromDom(t),e)}).isSome()},uy=ul([{br:[]},{block:[]},{none:[]}]),sy=function(t,e){return function(t){return ay(t,function(t){return t.getParam("no_newline_selector","")}(t))}(t)},cy=function(t){return function(e,n){return""===Uu(e)===t}},ly=function(t){return function(e,n){return function(t){return Rb(t).filter(function(t){return Bn(et.fromDom(t))}).isSome()}(e)===t}},fy=function(t,e){return function(n,r){return function(t){return Rb(t).fold(i(""),function(t){return t.nodeName.toUpperCase()})}(n)===t.toUpperCase()===e}},dy=function(t){return fy("pre",t)},hy=function(t){return function(e,n){return function(t){return t.getParam("br_in_pre",!0)}(e)===t}},my=function(t,e){return function(t){return ay(t,function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(t))}(t)},py=function(t,e){return e},gy=function(t){var e=Uu(t),n=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}(t.dom,t.selection.getStart());return n&&t.schema.isValidChild(n.nodeName,e||"P")},vy=function(t,e){return function(n,r){return z(t,function(t,e){return t&&e(n,r)},!0)?m.some(e):m.none()}},by=function(t,e){(function(t,e){return _p([vy([sy],uy.none()),vy([fy("summary",!0)],uy.br()),vy([dy(!0),hy(!1),py],uy.br()),vy([dy(!0),hy(!1)],uy.block()),vy([dy(!0),hy(!0),py],uy.block()),vy([dy(!0),hy(!0)],uy.br()),vy([ly(!0),py],uy.br()),vy([ly(!0)],uy.block()),vy([cy(!0),py,gy],uy.block()),vy([cy(!0)],uy.br()),vy([my],uy.br()),vy([cy(!1),py],uy.br()),vy([gy],uy.block())],[t,!(!e||!e.shiftKey)]).getOr(uy.none())})(t,e).fold(function(){iy(t,e)},function(){Xb(t,e)},r)},yy=function(t,e){var n=e.container(),r=e.offset();return De.isText(n)?(n.insertData(r,t),m.some(iu(n,r+t.length))):Es(e).map(function(n){var r=et.fromText(t);return e.isAtEnd()?Xt(n,r):Kt(n,r),iu(r.dom(),t.length)})},xy=u(yy," "),wy=u(yy," "),Cy=function(t){return iu.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},_y=function(t,e){var n=M(ud(et.fromDom(e.container()),t),Nn);return V(n).getOr(t)},ky=function(t,e){return Cy(e)?Cg(e):Cg(e)||Ks.prevPosition(_y(t,e).dom(),e).exists(Cg)},Sy=function(t,e){return Cy(e)?wg(e):wg(e)||Ks.nextPosition(_y(t,e).dom(),e).exists(wg)},Ty=function(t){return Es(t).bind(function(t){return ji(t,ie)}).exists(function(t){return function(t){return E(["pre","pre-wrap"],t)}(Re(t,"white-space"))})},Ey=function(t,e){return function(t,e){return!Ty(e)&&(Ab(t,e)||Ib(t,e)||Bv(t,e)||ky(t,e))}(t,e)||function(t,e){var n=function(t){var e=t.container(),n=t.offset();return De.isText(e)&&n<e.data.length?iu(e,n+1):t}(e);return!Ty(n)&&(Mb(t,n)||zb(t,n)||zv(t,n)||Sy(t,n))}(t,e)},Oy=function(t,e){return rc(t.charAt(e))},Dy=function(t){var e=t.container();return De.isText(e)&&gt(e.data," ")},Ny=function(t,e){return m.some(e).filter(Dy).bind(function(e){var n=e.container();return function(t,e){var n=e.data,r=iu(e,0);return!(!Oy(n,0)||Ey(t,r)||(e.data=" "+n.slice(1),0))}(t,n)||function(t){var e=t.data,n=function(t){var e=t.split("");return D(e,function(t,n){return rc(t)&&n>0&&n<e.length-1&&ic(e[n-1])&&ic(e[n+1])?" ":t}).join("")}(e);return n!==e&&(t.data=n,!0)}(n)||function(t,e){var n=e.data,r=iu(e,n.length-1);return!(!Oy(n,n.length-1)||Ey(t,r)||(e.data=n.slice(0,-1)+" ",0))}(t,n)?m.some(e):m.none()})},Ay=function(t){var e=et.fromDom(t.getBody());t.selection.isCollapsed()&&Ny(e,iu.fromRangeStart(t.selection.getRng())).each(function(e){t.selection.setRng(e.toRange())})},My=function(t,e){return function(n){return function(t,e){return!Ty(e)&&(function(t,e){return function(t,e){return Ks.prevPosition(t.dom(),e).isNone()}(t,e)||function(t,e){return Ks.nextPosition(t.dom(),e).isNone()}(t,e)||Ab(t,e)||Mb(t,e)||Bv(t,e)||zv(t,e)}(t,e)||ky(t,e)||Sy(t,e))}(t,n)?xy(e):wy(e)}},Iy=function(t){var e=uu.fromRangeStart(t.selection.getRng()),n=et.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=u(Cp.isInlineTarget,t),o=uu.fromRangeStart(t.selection.getRng());return Vp(r,t.getBody(),o).bind(function(t){return function(e){return e.fold(function(e){return Ks.prevPosition(t.dom(),uu.before(e))},function(t){return Ks.firstPositionIn(t)},function(t){return Ks.lastPositionIn(t)},function(e){return Ks.nextPosition(t.dom(),uu.after(e))})}}(n)).bind(My(n,e)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(t))}return!1},zy=function(t,e){e.hasAttribute("data-mce-caret")&&(ga(e),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(e))},By=function(t,e){var n=function(t){return Wi(et.fromDom(t.getBody()),"*[data-mce-caret]").fold(i(null),function(t){return t.dom()})}(t);if(n)return"compositionstart"===e.type?(e.preventDefault(),e.stopPropagation(),void zy(t,n)):void(la(n)&&(zy(t,n),t.undoManager.add()))},Ry=Tt().browser,Py=function(t){var e=Qp.setupSelectedState(t);(function(t){t.on("keyup compositionstart",u(By,t))})(t),function(t,e){t.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(t,e,n){var r=Tt().os;pv([{keyCode:Bf.RIGHT,action:Kg(t,!0)},{keyCode:Bf.LEFT,action:Kg(t,!1)},{keyCode:Bf.UP,action:Xg(t,!1)},{keyCode:Bf.DOWN,action:Xg(t,!0)},{keyCode:Bf.RIGHT,action:uv(t,!0)},{keyCode:Bf.LEFT,action:uv(t,!1)},{keyCode:Bf.UP,action:sv(t,!1)},{keyCode:Bf.DOWN,action:sv(t,!0)},{keyCode:Bf.RIGHT,action:Qp.move(t,e,!0)},{keyCode:Bf.LEFT,action:Qp.move(t,e,!1)},{keyCode:Bf.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:Qp.moveNextWord(t,e)},{keyCode:Bf.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:Qp.movePrevWord(t,e)},{keyCode:Bf.UP,action:hv(t,!1)},{keyCode:Bf.DOWN,action:hv(t,!0)}],n).each(function(t){n.preventDefault()})}(t,e,n)})}(t,e),function(t,e){t.on("keydown",function(n){!1===n.isDefaultPrevented()&&function(t,e,n){pv([{keyCode:Bf.BACKSPACE,action:mv(Bb,t,!1)},{keyCode:Bf.BACKSPACE,action:mv(Wv,t,!1)},{keyCode:Bf.DELETE,action:mv(Wv,t,!0)},{keyCode:Bf.BACKSPACE,action:mv($v,t,!1)},{keyCode:Bf.DELETE,action:mv($v,t,!0)},{keyCode:Bf.BACKSPACE,action:mv(Xv,t,e,!1)},{keyCode:Bf.DELETE,action:mv(Xv,t,e,!0)},{keyCode:Bf.BACKSPACE,action:mv(yb,t,!1)},{keyCode:Bf.DELETE,action:mv(yb,t,!0)},{keyCode:Bf.BACKSPACE,action:mv(xb,t,!1)},{keyCode:Bf.DELETE,action:mv(xb,t,!0)},{keyCode:Bf.BACKSPACE,action:mv(Av,t,!1)},{keyCode:Bf.DELETE,action:mv(Av,t,!0)},{keyCode:Bf.BACKSPACE,action:mv(Ov,t,!1)},{keyCode:Bf.DELETE,action:mv(Ov,t,!0)},{keyCode:Bf.BACKSPACE,action:mv(Zv,t,!1)},{keyCode:Bf.DELETE,action:mv(Zv,t,!0)}],n).each(function(t){n.preventDefault()})}(t,e,n)}),t.on("keyup",function(e){!1===e.isDefaultPrevented()&&function(t,e){pv([{keyCode:Bf.BACKSPACE,action:mv(qv,t)},{keyCode:Bf.DELETE,action:mv(qv,t)}],e)}(t,e)})}(t,e),function(t){t.on("keydown",function(e){e.keyCode===Bf.ENTER&&function(t,e){var n;e.isDefaultPrevented()||(e.preventDefault(),(n=t.undoManager).typing&&(n.typing=!1,n.add()),t.undoManager.transact(function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),by(t,e)}))}(t,e)})}(t),function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(t,e){pv([{keyCode:Bf.SPACEBAR,action:mv(Iy,t)}],e).each(function(t){e.preventDefault()})}(t,e)})}(t),function(t){!function(t){var e=Ii(function(){t.composing||Ay(t)},0);Ry.isIE()&&(t.on("keypress",function(t){e.throttle()}),t.on("remove",function(t){e.cancel()}))}(t),t.on("input",function(e){!1===e.isComposing&&Ay(t)})}(t),function(t){t.on("keydown",function(e){!1===e.isDefaultPrevented()&&function(t,e){pv([{keyCode:Bf.END,action:Jg(t,!0)},{keyCode:Bf.HOME,action:Jg(t,!1)}],e).each(function(t){e.preventDefault()})}(t,e)})}(t)},Ly=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,o;o={startContainer:(r=t.selection.getRng()).startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset},"nodechange"!==n.type&&Nd.isEq(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||!yn.range&&t.selection.isCollapsed()||ld(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})}),t.on("mouseup",function(e){!e.isDefaultPrevented()&&ld(t)&&("IMG"===t.selection.getNode().nodeName?ln.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&&!this.editor.settings.disable_nodechange&&!this.editor.readonly&&(r=this.editor.getBody(),(e=o.getStart(!0)||r).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||{}).element=e,t.parents=n,this.editor.fire("NodeChange",t))},t.prototype.isSameElementPath=function(t){var e,n;if((n=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t)).length===this.lastPath.length){for(e=n.length;e>=0&&n[e]===this.lastPath[e];e--);if(-1===e)return this.lastPath=n,!0}return this.lastPath=n,!1},t}(),Hy=function(t){return De.isElement(t)&&In(et.fromDom(t))},Fy=function(t){var e,n,r,o;return o=t.getBoundingClientRect(),n=(e=t.ownerDocument).documentElement,r=e.defaultView,{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}},Vy=De.isContentEditableFalse,jy=De.isContentEditableTrue,Uy=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},Wy=function(t,e){return function(n){if(0===n.button){var r=B(e.dom.getParents(n.target),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Fa.call(arguments);return function(t){for(var e=0;e<n.length;e++)if(n[e](t))return!0;return!1}}(Vy,jy)).getOr(null);if(u=e.getBody(),Vy(s=r)&&s!==u){var o=e.dom.getPos(r),i=e.getBody(),a=e.getDoc().documentElement;t.element=r,t.screenX=n.screenX,t.screenY=n.screenY,t.maxX=(e.inline?i.scrollWidth:a.offsetWidth)-2,t.maxY=(e.inline?i.scrollHeight:a.offsetHeight)-2,t.relX=n.pageX-o.x,t.relY=n.pageY-o.y,t.width=r.offsetWidth,t.height=r.offsetHeight,t.ghost=function(t,e,n,r){var o=e.cloneNode(!0);t.dom.setStyles(o,{width:n,height:r}),t.dom.setAttrib(o,"data-mce-selected",null);var i=t.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return t.dom.setStyles(i,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),t.dom.setStyles(o,{margin:0,boxSizing:"border-box"}),i.appendChild(o),i}(e,r,t.width,t.height)}}var u,s}},qy=function(t){t.dragging=!1,t.element=null,Uy(t.ghost)},Yy=function(t){var e,r,o,i,a,u,s={};e=Ci.DOM,u=n.document,r=Wy(s,t),o=function(t,e){var n=ln.throttle(function(t,n){e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t,n)},0);return function(r){var o,i,a=Math.max(Math.abs(r.screenX-t.screenX),Math.abs(r.screenY-t.screenY));if(function(t){return t.element}(t)&&!t.dragging&&a>10){if(e.fire("dragstart",{target:t.element}).isDefaultPrevented())return;t.dragging=!0,e.focus()}if(t.dragging){var u=function(t,e){return{pageX:e.pageX-t.relX,pageY:e.pageY+5}}(t,function(t,e){return function(t,e,n){return{pageX:n.left-t.left+e.left,pageY:n.top-t.top+e.top}}(function(t){return t.inline?Fy(t.getBody()):{left:0,top:0}}(t),function(t){var e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}}(t),function(t,e){if(e.target.ownerDocument!==t.getDoc()){var n=Fy(t.getContentAreaContainer()),r=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}(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}return{left:e.pageX,top:e.pageY}}(t,e))}(e,r));o=t.ghost,i=e.getBody(),o.parentNode!==i&&i.appendChild(o),function(t,e,n,r,o,i){var a=0,u=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>o&&(a=e.pageX+n-o),e.pageY+r>i&&(u=e.pageY+r-i),t.style.width=n-a+"px",t.style.height=r-u+"px"}(t.ghost,u,t.width,t.height,t.maxX,t.maxY),n(r.clientX,r.clientY)}}}(s,t),i=function(t,e){return function(n){if(t.dragging&&function(t,e,n){return e!==n&&!t.dom.isChildOf(e,n)&&!Vy(e)}(e,3===(a=e.selection.getSel().getRangeAt(0).startContainer).nodeType?a.parentNode:a,t.element)){var r=((i=t.element.cloneNode(!0)).removeAttribute("data-mce-selected"),i),o=e.fire("drop",{targetClone:r,clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||(r=o.targetClone,e.undoManager.transact(function(){Uy(t.element),e.insertContent(e.dom.getOuterHTML(r)),e._selectionOverrides.hideFakeCaret()}))}var i,a;qy(t)}}(s,t),a=function(t,e){return function(){t.dragging&&e.fire("dragend"),qy(t)}}(s,t),t.on("mousedown",r),t.on("mousemove",o),t.on("mouseup",i),e.bind(u,"mousemove",o),e.bind(u,"mouseup",a),t.on("remove",function(){e.unbind(u,"mousemove",o),e.unbind(u,"mouseup",a)})},$y=function(t){var e=Ii(function(){if(!t.removed&&t.getBody().contains(n.document.activeElement)&&t.selection.getRng().collapsed){var e=yg(t,t.selection.getRng(),!1);t.selection.setRng(e)}},0);t.on("focus",function(){e.throttle()}),t.on("blur",function(){e.cancel()})},Gy=De.isContentEditableTrue,Ky=De.isContentEditableFalse,Xy=function(t,e){for(var n=t.getBody();e&&e!==n;){if(Gy(e)||Ky(e))return e;e=e.parentNode}return null},Jy=function(t){var e,n=t.getBody(),r=function(t,e,n,r){var o,i,a=nt(m.none()),u=Uu(t),s=u.length>0?u:"p",c=function(){!function(t){var e,n,r,o,i;for(e=fi("*[contentEditable=false]",t),o=0;o<e.length;o++)r=(n=e[o]).previousSibling,pa(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(i.length-1,1)),r=n.nextSibling,ma(r)&&(1===(i=r.data).length?r.parentNode.removeChild(r):r.deleteData(0,1))}(e),i&&(Hu.remove(i),i=null),a.get().each(function(t){fi(t.caret).remove(),a.set(m.none())}),ln.clearInterval(o)},l=function(){o=ln.setInterval(function(){r()?fi("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):fi("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")},500)};return{show:function(t,r){var o,u,f;if(c(),f=r,De.isElement(f)&&/^(TD|TH)$/i.test(f.tagName))return null;if(!n(r))return i=function(t,e){var n,r,o;if(r=t.ownerDocument.createTextNode(ra),o=t.parentNode,e){if(n=t.previousSibling,aa(n)){if(ca(n))return n;if(pa(n))return n.splitText(n.data.length-1)}o.insertBefore(r,t)}else{if(n=t.nextSibling,aa(n)){if(ca(n))return n;if(ma(n))return n.splitText(1),n}t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r)}return r}(r,t),u=r.ownerDocument.createRange(),ns(i.nextSibling)?(u.setStart(i,0),u.setEnd(i,0)):(u.setStart(i,1),u.setEnd(i,1)),u;i=ha(s,r,t),o=rs(e,r,t),fi(i).css("top",o.top);var d=fi('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(o).appendTo(e)[0];return a.set(m.some({caret:d,element:r,before:t})),a.get().each(function(e){t&&fi(e.caret).addClass("mce-visual-caret-before")}),l(),(u=r.ownerDocument.createRange()).setStart(i,0),u.setEnd(i,0),u},hide:c,getCss: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;}"},reposition:function(){a.get().each(function(t){var n=rs(e,t.element,t.before);fi(t.caret).css(Z({},n))})},destroy:function(){return ln.clearInterval(o)}}}(t,n,function(e){return t.dom.isBlock(e)},function(){return Rl(t)}),o="sel-"+t.dom.uniqueId(),i=function(e){e&&t.selection.setRng(e)},a=function(){return t.selection.getRng()},u=function(e,n,o,i){return void 0===i&&(i=!0),t.fire("ShowCaret",{target:n,direction:e,before:o}).isDefaultPrevented()?null:(i&&t.selection.scrollIntoView(n,-1===e),r.show(o,n))},s=function(t){return ca(t)||ma(t)||pa(t)},c=function(t){return s(t.startContainer)||s(t.endContainer)},l=function(e){var n=t.schema.getShortEndedElements(),r=t.dom.createRng(),o=e.startContainer,i=e.startOffset,a=e.endContainer,u=e.endOffset;return Q(n,o.nodeName.toLowerCase())?0===i?r.setStartBefore(o):r.setStartAfter(o):r.setStart(o,i),Q(n,a.nodeName.toLowerCase())?0===u?r.setEndBefore(a):r.setEndAfter(a):r.setEnd(a,u),r},f=function(r,i){var a,s,l,f,d,m,p,g,v,b,y=t.$,x=t.dom;if(!r)return null;if(r.collapsed){if(!c(r))if(!1===i){if(g=Ts(-1,n,r),is(g.getNode(!0)))return u(-1,g.getNode(!0),!1,!1);if(is(g.getNode()))return u(-1,g.getNode(),!g.isAtEnd(),!1)}else{if(g=Ts(1,n,r),is(g.getNode()))return u(1,g.getNode(),!g.isAtEnd(),!1);if(is(g.getNode(!0)))return u(1,g.getNode(!0),!1,!1)}return null}if(f=r.startContainer,d=r.startOffset,m=r.endOffset,3===f.nodeType&&0===d&&Ky(f.parentNode)&&(f=f.parentNode,d=x.nodeIndex(f),f=f.parentNode),1!==f.nodeType)return null;if(m===d+1&&f===r.endContainer&&(a=f.childNodes[d]),!Ky(a))return null;if(v=b=a.cloneNode(!0),(p=t.fire("ObjectSelected",{target:a,targetClone:v})).isDefaultPrevented())return null;s=Wi(et.fromDom(t.getBody()),"#"+o).fold(function(){return y([])},function(t){return y([t.dom()])}),v=p.targetClone,0===s.length&&(s=y('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",o)).appendTo(t.getBody()),r=t.dom.createRng(),v===b&&yn.ie?(s.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(v),r.setStartAfter(s[0].firstChild.firstChild),r.setEndAfter(v)):(s.empty().append(" ").append(v).append(" "),r.setStart(s[0].firstChild,1),r.setEnd(s[0].lastChild,0)),s.css({top:x.getPos(a,t.getBody()).y}),s[0].focus(),(l=t.selection.getSel()).removeAllRanges(),l.addRange(r);var w=et.fromDom(a);return N(Hi(et.fromDom(t.getBody()),"*[data-mce-selected]"),function(t){Rt(w,t)||Be(t,"data-mce-selected")}),t.dom.getAttrib(a,"data-mce-selected")||a.setAttribute("data-mce-selected","1"),e=a,h(),r},d=function(){e&&(e.removeAttribute("data-mce-selected"),Wi(et.fromDom(t.getBody()),"#"+o).each(ee),e=null),Wi(et.fromDom(t.getBody()),"#"+o).each(ee),e=null},h=function(){r.hide()};return yn.ceFalse&&function(){t.on("mouseup",function(e){var n=a();n.collapsed&&mf.isXYInContentArea(t,e.clientX,e.clientY)&&i(bg(t,n,!1))}),t.on("click",function(e){var n;(n=Xy(t,e.target))&&(Ky(n)&&(e.preventDefault(),t.focus()),Gy(n)&&t.dom.isChildOf(n,t.selection.getNode())&&d())}),t.on("blur NewBlock",function(){d()}),t.on("ResizeWindow FullscreenStateChanged",function(){return r.reposition()});!function(t){t.on("tap",function(e){var n=Xy(t,e.target);Ky(n)&&(e.preventDefault(),f(vg(t,n)))},!0)}(t),t.on("mousedown",function(e){var r,o=e.target;if((o===n||"HTML"===o.nodeName||t.dom.isChildOf(o,n))&&!1!==mf.isXYInContentArea(t,e.clientX,e.clientY))if(r=Xy(t,o))Ky(r)?(e.preventDefault(),f(vg(t,r))):(d(),Gy(r)&&e.shiftKey||zf(e.clientX,e.clientY,t.selection.getRng())||(h(),t.selection.placeCaretAt(e.clientX,e.clientY)));else if(!1===is(o)){d(),h();var a=hg(n,e.clientX,e.clientY);if(a&&!function(e,n){var r,o,i=t.dom.getParent(e,t.dom.isBlock),a=t.dom.getParent(n,t.dom.isBlock);return!(!i||!t.dom.isChildOf(i,a)||!1!==Ky(Xy(t,i)))||i&&(r=i,o=a,!(t.dom.getParent(r,t.dom.isBlock)===t.dom.getParent(o,t.dom.isBlock)))&&function(t){var e=Fs(t);if(!t.firstChild)return!1;var n=uu.before(t.firstChild),r=e.next(n);return r&&!Ag(r)&&!Mg(r)}(i)}(e.target,a.node)){e.preventDefault();var s=u(1,a.node,a.before,!1);t.getBody().focus(),i(s)}}}),t.on("keypress",function(e){Bf.modifierPressed(e)||(e.keyCode,Ky(t.selection.getNode())&&e.preventDefault())}),t.on("GetSelectionRange",function(t){var n=t.range;if(e){if(!e.parentNode)return void(e=null);(n=n.cloneRange()).selectNode(e),t.range=n}}),t.on("SetSelectionRange",function(t){t.range=l(t.range);var e=f(t.range,t.forward);e&&(t.range=e)}),t.on("AfterSetSelectionRange",function(e){var n,r=e.range;c(r)||"mcepastebin"===r.startContainer.parentNode.id||h(),n=r.startContainer.parentNode,t.dom.hasClass(n,"mce-offscreen-selection")||d()}),t.on("copy",function(e){var n,r=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!yn.ie){var i=(n=t.dom.get(o))?n.getElementsByTagName("*")[0]:n;i&&(e.preventDefault(),r.clearData(),r.setData("text/html",i.outerHTML),r.setData("text/plain",i.outerText))}}),function(t){Yy(t),function(t){t.on("drop",function(e){var n=void 0!==e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Vy(n)||Vy(t.dom.getContentEditableParent(n)))&&e.preventDefault()})}(t)}(t),$y(t)}(),{showCaret:u,showBlockCaretContainer:function(e){e.hasAttribute("data-mce-caret")&&(ga(e),i(a()),t.selection.scrollIntoView(e))},hideFakeCaret:h,destroy:function(){r.destroy(),e=null}}},Qy=Ci.DOM,Zy=function(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),function(t){var e=t.dom.getRoot();t.inline||ld(t)&&t.selection.getStart(!0)!==e||Ks.firstPositionIn(e).each(function(e){var n=e.getNode(),r=De.isTable(n)?Ks.firstPositionIn(n).getOr(e):e;t.selection.setRng(r.toRange())})}(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),function(t){t.settings.auto_focus&&ln.setEditorTimeout(t,function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()},100)}(t)},tx=function(t,e){var r,o,i=t.settings,a=t.getElement(),u=t.getDoc();i.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(u.open(),u.write(t.iframeHTML),u.close()),t.inline&&(t.on("remove",function(){var t=this.getBody();Qy.removeClass(t,"mce-content-body"),Qy.removeClass(t,"mce-edit-focus"),Qy.setAttrib(t,"contentEditable",null)}),Qy.addClass(a,"mce-content-body"),t.contentDocument=u=n.document,t.contentWindow=n.window,t.bodyElement=a,t.contentAreaContainer=a,i.root_name=a.nodeName.toLowerCase()),(r=t.getBody()).disabled=!0,t.readonly=i.readonly,t.readonly||(t.inline&&"static"===Qy.getStyle(r,"position",!0)&&(r.style.position="relative"),r.contentEditable=t.getParam("content_editable_state",!0)),r.disabled=!1,t.editorUpload=vh(t),t.schema=cr(i),t.dom=Ci(u,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:i.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:Ju(t),referrerPolicy:Qu(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(t){var e=rh(t.settings,t.schema);return e.addAttributeFilter("src,href,style,tabindex",function(e,n){for(var r,o,i,a=e.length,u=t.dom;a--;)if(o=(r=e[a]).attr(n),i="data-mce-"+n,!r.attr(i)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?((o=u.serializeStyle(u.parseStyle(o),r.name)).length||(o=null),r.attr(i,o),r.attr(n,o)):"tabindex"===n?(r.attr(i,o),r.attr(n,null)):r.attr(i,t.convertURL(o,n,r.name))}}),e.addNodeFilter("script",function(t){for(var e,n,r=t.length;r--;)0!==(n=(e=t[r]).attr("type")||"no/type").indexOf("mce-")&&e.attr("type","mce-"+n)}),t.settings.preserve_cdata&&e.addNodeFilter("#cdata",function(e){for(var n,r=e.length;r--;)(n=e[r]).type=8,n.name="#comment",n.value="[CDATA["+t.dom.encode(n.value)+"]]"}),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var n,r=e.length,o=t.schema.getNonEmptyElements();r--;)(n=e[r]).isEmpty(o)&&0===n.getAll("br").length&&(n.append(new jc("br",1)).shortEnded=!0)}),e}(t),t.serializer=uh(i,t),t.selection=Gd(t.dom,t.getWin(),t.serializer,t),t.annotator=Pc(t),t.formatter=Hm(t),t.undoManager=Qm(t),t._nodeChangeDispatcher=new Ly(t),t._selectionOverrides=Jy(t),op(t),function(t){!function(t){t.on("click",function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()})}(t),function(t){t.parser.addNodeFilter("details",function(t){N(t,function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")})}),t.serializer.addNodeFilter("details",function(t){N(t,function(t){var e=t.attr("data-mce-open");t.attr("open",g(e)?e:null),t.attr("data-mce-open",null)})})}(t)}(t),function(t){t.on("click",function(e){e.detail>=3&&function(t){var e=t.selection.getRng(),n=iu.fromRangeStart(e),r=iu.fromRangeEnd(e);if(iu.isElementPosition(n)){var o=n.container();Hy(o)&&Ks.firstPositionIn(o).each(function(t){return e.setStart(t.container(),t.offset())})}iu.isElementPosition(r)&&(o=n.container(),Hy(o)&&Ks.lastPositionIn(o).each(function(t){return e.setEnd(t.container(),t.offset())})),t.selection.setRng(Em(e))}(t)})}(t),Py(t),cp(t),np(t),function(t){t.fire("PreInit")}(t),i.browser_spellcheck||i.gecko_spellcheck||(u.body.spellcheck=!1,Qy.setAttrib(r,"spellcheck","false")),t.quirks=function(t){var e,r,o,i=En.each,a=Bf.BACKSPACE,u=Bf.DELETE,s=t.dom,c=t.selection,l=t.settings,f=t.parser,d=yn.gecko,h=yn.ie,m=yn.webkit,p=h?"Text":"URL",g=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(t){}},v=function(t){return t.isDefaultPrevented()},b=function(){t.shortcuts.add("meta+a",null,"SelectAll")},y=function(){t.on("keydown",function(t){if(!v(t)&&t.keyCode===a&&c.isCollapsed()&&0===c.getRng().startOffset){var e=c.getNode().previousSibling;if(e&&e.nodeName&&"table"===e.nodeName.toLowerCase())return t.preventDefault(),!1}})},x=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",function(e){var n;if("HTML"===e.target.nodeName){if(yn.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}}))};return t.on("keydown",function(e){var n,r,o,i,a;if(!v(e)&&e.keyCode===Bf.BACKSPACE&&(r=(n=c.getRng()).startContainer,o=n.startOffset,i=s.getRoot(),a=r,n.collapsed&&0===o)){for(;a&&a.parentNode&&a.parentNode.firstChild===a&&a.parentNode!==i;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(t.formatter.toggle("blockquote",null,a),(n=s.createRng()).setStart(r,0),n.setEnd(r,0),c.setRng(n))}}),e=function(t){var e=s.create("body"),n=t.cloneContents();return e.appendChild(n),c.serializer.serialize(e,{format:"html"})},t.on("keydown",function(n){var r,o,i=n.keyCode;if(!v(n)&&(i===u||i===a)){if(r=t.selection.isCollapsed(),o=t.getBody(),r&&!s.isEmpty(o))return;if(!r&&!function(n){var r=e(n),o=s.createRng();return o.selectNode(t.getBody()),r===e(o)}(t.selection.getRng()))return;n.preventDefault(),t.setContent(""),o.firstChild&&s.isBlock(o.firstChild)?t.selection.setCursorLocation(o.firstChild,0):t.selection.setCursorLocation(o,0),t.nodeChanged()}}),yn.windowsPhone||t.on("keyup focusin mouseup",function(t){Bf.modifierPressed(t)||c.normalize()},!0),m&&(t.inline||s.bind(t.getDoc(),"mousedown mouseup",function(e){var n;if(e.target===t.getDoc().documentElement)if(n=c.getRng(),t.getBody().focus(),"mousedown"===e.type){if(ca(n.startContainer))return;c.placeCaretAt(e.clientX,e.clientY)}else c.setRng(n)}),t.on("click",function(e){var n=e.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==s.getContentEditableParent(n)&&(e.preventDefault(),t.selection.select(n),t.nodeChanged()),"A"===n.nodeName&&s.hasClass(n,"mce-item-anchor")&&(e.preventDefault(),c.select(n))}),l.forced_root_block&&t.on("init",function(){g("DefaultParagraphSeparator",Uu(t))}),t.on("init",function(){t.dom.bind(t.getBody(),"submit",function(t){t.preventDefault()})}),y(),f.addNodeFilter("br",function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()}),yn.iOS?(t.inline||t.on("keydown",function(){n.document.activeElement===n.document.body&&t.getWin().focus()}),x(),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}")):b()),yn.ie>=11&&(x(),y()),yn.ie&&(b(),g("AutoUrlDetect",!1),t.on("dragstart",function(e){!function(e){var n,r;e.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===e.target.tagName&&c.select(e.target),(n=t.selection.getContent()).length>0&&(r="data:text/mce-internal,"+escape(t.id)+","+escape(n),e.dataTransfer.setData(p,r)))}(e)}),t.on("drop",function(e){if(!v(e)){var n=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(p))&&e.indexOf("data:text/mce-internal,")>=0?(e=e.substr("data:text/mce-internal,".length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null}(e);if(n&&n.id!==t.id){e.preventDefault();var r=nd(e.x,e.y,t.getDoc());c.setRng(r),o=n.html,t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:o,internal:!0}):t.execCommand("mceInsertContent",!1,o)}}var o})),d&&(t.on("keydown",function(e){if(!v(e)&&e.keyCode===a){if(!t.getBody().getElementsByTagName("hr").length)return;if(c.isCollapsed()&&0===c.getRng().startOffset){var n=c.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return s.remove(n),void e.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(s.remove(r),e.preventDefault())}}}),n.Range.prototype.getClientRects||t.on("mousedown",function(e){if(!v(e)&&"HTML"===e.target.nodeName){var n=t.getBody();n.blur(),ln.setEditorTimeout(t,function(){n.focus()})}}),r=function(){var e=s.getAttribs(c.getStart().cloneNode(!1));return function(){var n=c.getStart();n!==t.getBody()&&(s.setAttrib(n,"style",null),i(e,function(t){n.setAttributeNode(t.cloneNode(!0))}))}},o=function(){return!c.isCollapsed()&&s.getParent(c.getStart(),s.isBlock)!==s.getParent(c.getEnd(),s.isBlock)},t.on("keypress",function(e){var n;if(!v(e)&&(8===e.keyCode||46===e.keyCode)&&o())return n=r(),t.getDoc().execCommand("delete",!1,null),n(),e.preventDefault(),!1}),s.bind(t.getDoc(),"cut",function(e){var n;!v(e)&&o()&&(n=r(),ln.setEditorTimeout(t,function(){n()}))}),l.readonly||t.on("BeforeExecCommand mousedown",function(){g("StyleWithCSS",!1),g("enableInlineTableEditing",!1),l.object_resizing||g("enableObjectResizing",!1)}),t.on("SetContent ExecCommand",function(t){"setcontent"!==t.type&&"mceInsertLink"!==t.command||i(s.select("a"),function(t){var e=t.parentNode,n=s.getRoot();if(e.lastChild===t){for(;e&&!s.isBlock(e);){if(e.parentNode.lastChild!==e||e===n)return;e=e.parentNode}s.add(e,"br",{"data-mce-bogus":1})}})}),t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),yn.mac&&t.on("keydown",function(e){!Bf.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),t.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}),y()),{refreshContentEditable:function(){},isHidden:function(){var e;return!(!d||t.removed||(e=t.selection.getSel())&&e.rangeCount&&0!==e.rangeCount)}}}(t),function(t){t.fire("PostRender")}(t);var s=function(t){return t.getParam("directionality",Ni.isRtl()?"rtl":void 0)}(t);void 0!==s&&(r.dir=s),i.protect&&t.on("BeforeSetContent",function(t){En.each(i.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.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.on("compositionstart compositionend",function(e){t.composing="compositionstart"===e.type}),t.contentStyles.length>0&&(o="",En.each(t.contentStyles,function(t){o+=t+"\r\n"}),t.dom.addStyle(o)),function(t){return t.inline?Qy.styleSheetLoader:t.dom.styleSheetLoader}(t).loadAll(t.contentCSS,function(e){Zy(t)},function(e){Zy(t)}),i.content_style&&function(t,e){var n=et.fromDom(t.getDoc().head),r=et.fromTag("style");Me(r,"type","text/css"),Qt(r,et.fromText(e)),Qt(n,r)}(t,i.content_style)},ex=Ci.DOM,nx=function(t,e){var r=t.editorManager.translate("Rich Text Area. Press ALT-0 for help."),o=function(t,e,n,r){var o=et.fromTag("iframe");return Ie(o,r),Ie(o,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",title:e}),Pi(o,"tox-edit-area__iframe"),o}(t.id,r,e.height,function(t){return t.getParam("iframe_attrs",{})}(t)).dom();o.onload=function(){o.onload=null,t.fire("load")};var i=function(t,e){if(n.document.domain!==n.window.location.hostname&&yn.browser.isIE()){var r=gh("mce");t[r]=function(){tx(t)};var o='javascript:(function(){document.open();document.domain="'+n.document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+r+"(true);})()";return ex.setAttrib(e,"src",o),!0}return!1}(t,o);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=o,t.iframeHTML=function(t){var e,n,r;return r=function(t){return t.getParam("doctype","<!DOCTYPE html>")}(t)+"<html><head>",function(t){return t.getParam("document_base_url","")}(t)!==t.documentBaseUrl&&(r+='<base href="'+t.documentBaseURI.getURI()+'" />'),r+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',e=function(t){return Vu(t,"body_id","tinymce")}(t),n=function(t){return Vu(t,"body_class","")}(t),ju(t)&&(r+='<meta http-equiv="Content-Security-Policy" content="'+ju(t)+'" />'),r+'</head><body id="'+e+'" class="mce-content-body '+n+'" data-id="'+t.id+'"><br></body></html>'}(t),ex.add(e.iframeContainer,o),i},rx=Ci.DOM,ox=function(t){return t.replace(/^\-/,"")},ix=function(t){return{editorContainer:t,iframeContainer:t}},ax=function(t){t.fire("ScriptsLoaded"),function(t){var e=En.trim(t.settings.icons),n=t.ui.registry.getAll().icons,r=Z(Z({},{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-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 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-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 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.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 1 1 0-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-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 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-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 1 1 0-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 1 1 0-2h9.2zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h6.8zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h4.4zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 0 1 0-2h2zm4 0h8a1 1 0 0 1 0 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 1 1 0-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 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 0 1-.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 0 0-1 1z" fill-rule="nonzero"/></svg>',"border-width":'<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 1 1 0-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></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 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 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 0 1-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 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 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0zm-10-7l-.7-.8a1 1 0 0 1-.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 0 1-.7.3 1 1 0 0 1-.8-.3zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.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 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 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 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8zM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-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>',"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 0 1-.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 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-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 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.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 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.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 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.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 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-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 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-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 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.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 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-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 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .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 0 1-.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 0 1-.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 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.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 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.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 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 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 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 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 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-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 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-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:'<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 0 1-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 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 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 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-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 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .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 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-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:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 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 0 0-.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 0 0-2-2H7v2h11v9zM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 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 0 1 19 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 0 0 8 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-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 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .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 0 0-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-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 1 0 0 16 8 8 0 0 0 0-16zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13z" fill-rule="nonzero"/></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 0 0 2.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 0 0 2-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 0 0-2 2zm14-2v2h2a2 2 0 0 0-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 0 0 2-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2zm2 14h-2v2a2 2 0 0 0 2-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 0 0-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 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-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 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 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 0 1-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-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 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-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 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1zM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4z"/><path d="M9.6 9.7a.7.7 0 0 1-.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 0 0-.8.8.8.8 0 0 1-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 0 1 2.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 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-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 0 1-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 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 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 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 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-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 1 0 0-14 7 7 0 0 0 0 14zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-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 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.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 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 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>',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 0 1 1.4 1.4l-2.1 2a2 2 0 1 0 2.7 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.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 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 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 0 0-.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 0 0-.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 0 1-.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 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-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 1 1 0-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 0 1-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 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19zm-1 8.8l.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.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 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-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 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.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 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-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 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 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 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.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 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-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 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-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 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-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 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-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 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.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 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 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 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.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 0 1 2.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 0 1-2.8-3.7 1 1 0 0 1 0-1zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-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 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .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 1 1-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 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-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 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8zM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-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 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7zM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 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 0 1-.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 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 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 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.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 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 0 0-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 0 0 2-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 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-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 0 1-.2-.6V8H5a1 1 0 1 1 0-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 0 1-.2-.6V13H5a1 1 0 0 1 0-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 0 1-.2-.6V18H5a1 1 0 0 1 0-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>',"sort-asc":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 8h5a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zm0 8h8a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0-4h7a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/><path fill-rule="nonzero" d="M16 8.4l-2.3 2.3a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L18 8.4V18a1 1 0 0 1-2 0V8.4z"/></g></svg>',"sort-dsc":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 16h5a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2zm0-8h8a1 1 0 0 0 0-2H4a1 1 0 1 0 0 2zm0 4h7a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2z"/><path fill-rule="nonzero" d="M16 15.6l-2.3-2.3a1 1 0 0 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 0 0-1.4-1.4L18 15.6V6a1 1 0 0 0-2 0v9.6z"/></g></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 0 1 0-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 0 0-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 0 1-.7-.3 1 1 0 0 1-.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 0 1-.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 0 1 7 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 0 1 0 2H5a1 1 0 0 1 0-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 0 0-.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 0 1-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-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.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 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.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 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-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 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 1 0-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 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-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 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.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 0 0 .5.6h1.6a.5.5 0 0 0 .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 1 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-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 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-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 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 1 1 2 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 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.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 0 1 0-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 0 1-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 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2zM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1zM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 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 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.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 0 1-.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 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-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 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 0 0-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 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12zM11 6.4L8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24zm-8.7-5.3a11 11 0 0 0 17.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>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 0 1-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 0 1-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.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 0 1 2 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.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 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>'}),uf.get(e).icons);Y(r,function(e,r){Q(n,r)||t.ui.registry.addIcon(r,e)})}(t),function(t){var e=t.settings.theme;if(g(e)){t.settings.theme=ox(e);var n=vf.get(e);t.theme=new n(t,vf.urls[e]),t.theme.init&&t.theme.init(t,vf.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];En.each(t.settings.plugins.split(/[ ,]/),function(n){!function t(e,n,r){var o=gf.get(r),i=gf.urls[r]||e.documentBaseUrl.replace(/\/$/,"");if(r=En.trim(r),o&&-1===En.inArray(n,r)){if(En.each(gf.dependencies(r),function(r){t(e,n,r)}),e.plugins[r])return;try{var a=new o(e,i,e.$);e.plugins[r]=a,a.init&&(a.init(e,i),n.push(r))}catch(n){Ef(e,r,n)}}}(t,e,ox(n))})}(t);var e=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,g(t.settings.theme)?function(t){return t.theme.renderUI()}(t):w(t.settings.theme)?function(t){var e=t.getElement(),n=(0,t.settings.theme)(t,e);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:e.offsetHeight,n}(t):function(t){var e=t.getElement();return t.inline?ix(null):function(t){var e=rx.create("div");return rx.insertAfter(e,t),ix(e)}(e)}(t)}(t);return t.editorContainer=e.editorContainer?e.editorContainer:null,Af(t),t.inline?tx(t):function(t,e){var n=nx(t,e);e.editorContainer&&(ex.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=ex.isHidden(e.editorContainer)),t.getElement().style.display="none",ex.setAttrib(t.id,"aria-hidden","true"),n||tx(t)}(t,e)},ux=Ci.DOM,sx=function(t){return"-"===t.charAt(0)},cx=function(t,e){var n=Ti.ScriptLoader;!function(t,e,n,r){var o=e.settings,i=o.theme;if(g(i)){if(!sx(i)&&!vf.urls.hasOwnProperty(i)){var a=o.theme_url;a?vf.load(i,e.documentBaseURI.toAbsolute(a)):vf.load(i,"themes/"+i+"/theme"+n+".js")}t.loadQueue(function(){vf.waitFor(i,r)})}else r()}(n,t,e,function(){!function(t,e){var n=Zu(e),o=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ni.hasCode(n)&&"en"!==n){var i=""!==o?o:e.editorManager.baseURL+"/langs/"+n+".js";t.add(i,r,void 0,function(){Tf(e,i,n)})}}(n,t),function(t,e){(function(t){return m.from(function(t){return t.getParam("icons_url","","string")}(t)).filter(function(t){return t.length>0}).map(function(t){return{url:t,name:m.none()}})})(e).orThunk(function(){return t=e,m.from(function(t){return t.getParam("icons","","string")}(t)).filter(function(t){return t.length>0&&!uf.has(t)}).map(function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons.js",name:m.some(e)}});var t}).each(function(n){t.add(n.url,r,void 0,function(){Sf(e,n.url,n.name.getOrUndefined())})})}(n,t),function(t,e,n){b(e.plugins)&&(e.plugins=e.plugins.join(" ")),En.each(e.external_plugins,function(n,o){gf.load(o,n,r,void 0,function(){kf(t,n,o)}),e.plugins+=" "+o}),En.each(e.plugins.split(/[ ,]/),function(e){if((e=En.trim(e))&&!gf.urls[e])if(sx(e)){e=e.substr(1,e.length);var o=gf.dependencies(e);En.each(o,function(e){var o={prefix:"plugins/",resource:e,suffix:"/plugin"+n+".js"},i=gf.createUrl(o,e);gf.load(i.resource,i,r,void 0,function(){kf(t,i.prefix+i.resource+i.suffix,i.resource)})})}else{var i={prefix:"plugins/",resource:e,suffix:"/plugin"+n+".js"};gf.load(e,i,r,void 0,function(){kf(t,i.prefix+i.resource+i.suffix,e)})}})}(t,t.settings,e),n.loadQueue(function(){t.removed||ax(t)},t,function(){t.removed||ax(t)})})},lx=function(t){return t.length>0&&(!(e=t[t.length-1]).firstChild||function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return" "===t.data||De.isBr(t)}(t.firstChild)}(e))?t.slice(0,-1):t;var e},fx=function(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null},dx=function(t,e){var n=uu.after(t),r=Fs(e).prev(n);return r?r.toRange():null},hx=function(t,e,n,r){var o=function(t,e,n){var r=e.serialize(n);return 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}(t.createFragment(r))}(e,t,r),i=fx(e,n.startContainer),a=lx(function(t){return En.grep(t.childNodes,function(t){return"LI"===t.nodeName})}(o.firstChild)),u=e.getRoot(),s=function(t){var r=uu.fromRangeStart(n),o=Fs(e.getRoot()),a=1===t?o.prev(r):o.next(r);return!a||fx(e,a.getNode())!==i};return s(1)?function(t,e,n){var r=t.parentNode;return En.each(e,function(e){r.insertBefore(e,t)}),function(t,e){var n=uu.before(t),r=Fs(e).next(n);return r?r.toRange():null}(t,n)}(i,a,u):s(2)?function(t,e,n,r){return r.insertAfter(e.reverse(),t),dx(e[0],n)}(i,a,u,e):function(t,e,n,r){var o=function(t,e){var n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),En.each(e,function(e){i.insertBefore(e,t)}),i.insertBefore(o[1],t),i.removeChild(t),dx(e[e.length-1],n)}(i,a,u,n)},mx=De.matchNodeNames(["td","th"]),px=function(t,e){var n=t.selection.getRng(),r=n.startContainer,o=n.startOffset;n.collapsed&&function(t,e){return De.isText(t)&&" "===t.nodeValue[e-1]}(r,o)&&De.isText(r)&&(r.insertData(o-1," "),r.deleteData(o,1),n.setStart(r,o),n.setEnd(r,o),t.selection.setRng(n)),t.selection.setContent(e)},gx=function(t,e,n){var r,o,i,a,u,s,c,l,f,d,h,p=t.selection,g=t.dom;if(/^ | $/.test(e)&&(e=function(t,e){var n,r;n=t.startContainer,r=t.startOffset;var o=function(t){return n[t]&&3===n[t].nodeType};return 3===n.nodeType&&(r>0?e=e.replace(/^&nbsp;/," "):o("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),r<n.length?e=e.replace(/&nbsp;(<br>|)$/," "):o("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}(p.getRng(),e)),r=t.parser,h=n.merge,o=ol({validate:t.settings.validate},t.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',s={content:e,format:"html",selection:!0,paste:n.paste},(s=t.fire("BeforeSetContent",s)).isDefaultPrevented())t.fire("SetContent",{content:s.content,format:"html",selection:!0,paste:n.paste});else{-1===(e=s.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,d);var v=(l=p.getRng()).startContainer||(l.parentElement?l.parentElement():null),b=t.getBody();v===b&&p.isCollapsed()&&g.isBlock(b.firstChild)&&function(t,e){return e&&!t.schema.getShortEndedElements()[e.nodeName]}(t,b.firstChild)&&g.isEmpty(b.firstChild)&&((l=g.createRng()).setStart(b.firstChild,0),l.setEnd(b.firstChild,0),p.setRng(l)),p.isCollapsed()||(t.selection.setRng(Em(t.selection.getRng())),t.getDoc().execCommand("Delete",!1,null),e=function(t,e){var n,r;return n=t.startContainer,r=t.startOffset,3===n.nodeType&&t.collapsed&&(" "===n.data[r]?(n.deleteData(r,1),/[\u00a0| ]$/.test(e)||(e+=" ")):" "===n.data[r-1]&&(n.deleteData(r-1,1),/[\u00a0| ]$/.test(e)||(e=" "+e))),e}(t.selection.getRng(),e));var y,x={context:(i=p.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0};if(u=r.parse(e,x),!0===n.paste&&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),function(t,e){var n=t.getNonEmptyElements();return e&&(e.isEmpty(n)||function(t,e){return t.getBlockElements()[e.name]&&function(t){return t.firstChild&&t.firstChild===t.lastChild}(e)&&function(t){return"br"===t.name||" "===t.value}(e.firstChild)}(t,e))}(t,r)&&(r=r.prev),!(!n||n!==r||"ul"!==n.name&&"ol"!==n.name)}(t.schema,u)&&function(t,e){return!!fx(t,e)}(g,i))return l=hx(o,g,t.selection.getRng(),u),t.selection.setRng(l),void t.fire("SetContent",s);if(function(t){for(var e=u;e=e.walk();)1===e.type&&e.attr("data-mce-fragment","1")}(),"mce_marker"===(f=u.lastChild).attr("id"))for(c=f,f=f.prev;f;f=f.walk(!0))if(3===f.type||!g.isBlock(f.name)){t.schema.isValidChild(f.parent.name,"span")&&f.parent.insert(c,f,"br"===f.name);break}if(t._selectionOverrides.showBlockCaretContainer(i),x.invalid){for(px(t,d),i=p.getNode(),a=t.getBody(),9===i.nodeType?i=f=a:f=i;f!==a;)i=f,f=f.parentNode;e=i===a?a.innerHTML:g.getOuterHTML(i),e=o.serialize(r.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return o.serialize(u)}))),i===a?g.setHTML(a,e):g.setOuterHTML(i,e)}else!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):px(t,e)}}(t,e=o.serialize(u),i);!function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=new um(r);En.each(r.select("*[data-mce-fragment]"),function(t){for(var e=t.parentNode;e&&e!==o;e=e.parentNode)n[t.nodeName.toLowerCase()]&&i.compare(e,t)&&r.remove(t,!0)})}}(t,h),function(t,e){var n,r,o,i,a,u=t.dom,s=t.selection;if(e){if(t.selection.scrollIntoView(e),n=function(e){for(var n=t.getBody();e&&e!==n;e=e.parentNode)if("false"===t.dom.getContentEditable(e))return e;return null}(e))return u.remove(e),void s.select(n);var c=u.createRng();(i=e.previousSibling)&&3===i.nodeType?(c.setStart(i,i.nodeValue.length),yn.ie||(a=e.nextSibling)&&3===a.nodeType&&(i.appendData(a.data),a.parentNode.removeChild(a))):(c.setStartBefore(e),c.setEndBefore(e)),r=u.getParent(e,u.isBlock),u.remove(e),r&&u.isEmpty(r)&&(t.$(r).empty(),c.setStart(r,0),c.setEnd(r,0),mx(r)||r.getAttribute("data-mce-fragment")||!(o=function(e){var n=uu.fromRangeStart(e);if(n=Fs(t.getBody()).next(n))return n.toRange()}(c))?u.add(r,u.create("br",{"data-mce-bogus":"1"})):(c=o,u.remove(r))),s.setRng(c)}}(t,g.get("mce_marker")),y=t.getBody(),En.each(y.getElementsByTagName("*"),function(t){t.removeAttribute("data-mce-fragment")}),function(t,e){m.from(t.getParent(e,"td,th")).map(et.fromDom).each(yh)}(t.dom,t.selection.getStart()),t.fire("SetContent",s),t.addVisual()}},vx=function(t,e){t.getDoc().execCommand(e,!1,null)},bx={"font-size":"size","font-family":"face"},yx=function(t,e,n){var r=function(e){return Le(e,t).orThunk(function(){return"font"===re(e)?J(bx,t).bind(function(t){return n=e,r=t,m.from(ze(n,r));var n,r}):m.none()})};return function(t,e,n){return e(t).orThunk(function(){return n(t)?m.none():function(t,e,n){for(var r=t.dom(),o=w(n)?n:i(!1);r.parentNode;){r=r.parentNode;var a=et.fromDom(r),u=e(a);if(u.isSome())return u;if(o(a))break}return m.none()}(t,e,n)})}(et.fromDom(n),function(t){return r(t)},function(t){return Rt(et.fromDom(e),t)})},xx=function(t){return function(e,n){return m.from(n).map(et.fromDom).filter(ie).bind(function(n){return yx(t,e,n.dom()).or(function(t,e){return m.from(Ci.DOM.getStyle(e,t,!0))}(t,n.dom()))}).getOr("")}},wx={getFontSize:xx("font-size"),getFontFamily:o(function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},xx("font-family")),toPt:function(t,e){return/[0-9.]+px$/.test(t)?function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}(72*parseInt(t,10)/96,e||0)+"pt":t}},Cx=function(t){return Ks.firstPositionIn(t.getBody()).map(function(t){var e=t.container();return De.isText(e)?e.parentNode:e})},_x=function(t){return m.from(t.selection.getRng()).bind(function(e){return function(t,e){return t.startContainer===e&&0===t.startOffset}(e,t.getBody())?m.none():m.from(t.selection.getStart(!0))})},kx=function(t,e){if(/^[0-9\.]+$/.test(e)){var n=parseInt(e,10);if(n>=1&&n<=7){var r=function(t){return En.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return En.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},Sx=function(t){var e=t.split(/\s*,\s*/);return D(e,function(t){return-1===t.indexOf(" ")||vt(t,'"')||vt(t,"'")?t:"'"+t+"'"}).join(",")},Tx=En.each,Ex=En.map,Ox=En.inArray,Dx=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,a=!1,u=this;if(!u.editor.removed){if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?function(t){wl(t).each(function(e){t.selection.setRng(e)})}(u.editor):u.editor.focus(),(r=u.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n})).isDefaultPrevented())return!1;if(i=t.toLowerCase(),o=u.commands.exec[i])return o(i,e,n),u.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(Tx(this.editor.plugins,function(r){if(r.execCommand&&r.execCommand(t,e,n))return u.editor.fire("ExecCommand",{command:t,ui:e,value:n}),a=!0,!1}),a)return a;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{a=u.editor.getDoc().execCommand(t,e,n)}catch(t){}return!!a&&(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(t){}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(t){}}},t.prototype.addCommands=function(t,e){var n=this;e=e||"exec",Tx(t,function(t,r){Tx(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,a){return e.call(n||r.editor,o,i,a)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(t){}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?{value:e}:void 0),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":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(t){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.");yn.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"),Tx("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,o;e.execNativeCommand(n),(r=t.dom.getParent(t.selection.getNode(),"ol,ul"))&&(o=r.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(o.nodeName)&&(e.storeSelection(),t.dom.split(o,r),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,r)},FontName:function(e,n,r){!function(t,e){var n=kx(t,r);t.formatter.toggle("fontname",{value:Sx(n)}),t.nodeChanged()}(t)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:kx(t,e)}),t.nodeChanged()}(t,r)},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){!function(t,e){var n=function(t){var e;return"string"!=typeof t?(e=En.extend({paste:t.paste,data:{paste:t.paste}},t),{content:t.content,details:e}):{content:t,details:{}}}(e);gx(t,n.content,n.details)}(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){by(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){Tb(t,e)},mceRepaint:function(){},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){var o;"string"==typeof r&&(r={href:r}),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(),De.isContentEditableTrue);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},delete:function(){!function(t){Bb(t)||Wv(t,!1)||$v(t,!1)||Xv(t,!1)||Ov(t,!1)||yb(t)||Av(t)||Zv(t,!1)||(vx(t,"Delete"),vv(t))}(t)},forwardDelete:function(){!function(t){Wv(t,!0)||$v(t,!0)||Xv(t,!0)||Ov(t,!0)||yb(t)||Av(t)||Zv(t,!0)||vx(t,"ForwardDelete")}(t)},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return iy(t,r),!0}});var n=function(e){return function(){var n=t.selection.isCollapsed()?[t.dom.getParent(t.selection.getNode(),t.dom.isBlock)]:t.selection.getSelectedBlocks(),r=Ex(n,function(n){return!!t.formatter.matchNode(n,e)});return-1!==Ox(r,!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 _b(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 function(t){return _x(t).fold(function(){return Cx(t).map(function(e){return wx.getFontFamily(t.getBody(),e)}).getOr("")},function(e){return wx.getFontFamily(t.getBody(),e)})}(t)},this),e.addQueryValueHandler("FontSize",function(){return function(t){return _x(t).fold(function(){return Cx(t).map(function(e){return wx.getFontSize(t.getBody(),e)}).getOr("")},function(e){return wx.getFontSize(t.getBody(),e)})}(t)},this)},t}(),Nx=En.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"," "),Ax=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||c}return t.isNative=function(t){return!!Nx[t.toLowerCase()]},t.prototype.fire=function(t,e){var n,r,o,i;if(t=t.toLowerCase(),(e=e||{}).type=t,e.target||(e.target=this.scope),e.preventDefault||(e.preventDefault=function(){e.isDefaultPrevented=l},e.stopPropagation=function(){e.isPropagationStopped=l},e.stopImmediatePropagation=function(){e.isImmediatePropagationStopped=l},e.isDefaultPrevented=c,e.isPropagationStopped=c,e.isImmediatePropagationStopped=c),this.settings.beforeFire&&this.settings.beforeFire(e),n=this.bindings[t])for(r=0,o=n.length;r<o;r++){if((i=n[r]).once&&this.off(t,i.func),e.isImmediatePropagationStopped())return e.stopPropagation(),e;if(!1===i.func.call(this.scope,e))return e.preventDefault(),e}return e},t.prototype.on=function(t,e,n,r){var o,i,a;if(!1===e&&(e=c),e){var u={func:e};for(r&&En.extend(u,r),a=(i=t.toLowerCase().split(" ")).length;a--;)t=i[a],(o=this.bindings[t])||(o=this.bindings[t]=[],this.toggleEvent(t,!0)),n?o.unshift(u):o.push(u)}return this},t.prototype.off=function(t,e){var n,r,o,i,a;if(t)for(n=(i=t.toLowerCase().split(" ")).length;n--;){if(t=i[n],r=this.bindings[t],!t){for(o in this.bindings)this.toggleEvent(o,!1),delete this.bindings[o];return this}if(r){if(e)for(a=r.length;a--;)r[a].func===e&&(r=r.slice(0,a).concat(r.slice(a+1)),this.bindings[t]=r);else r.length=0;r.length||(this.toggleEvent(t,!1),delete this.bindings[t])}}else{for(t in this.bindings)this.toggleEvent(t,!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}(),Mx=function(t){return t._eventDispatcher||(t._eventDispatcher=new Ax({scope:t,toggleEvent:function(e,n){Ax.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher},Ix={fire:function(t,e,n){if(this.removed&&"remove"!==t&&"detach"!==t)return e;var r=Mx(this).fire(t,e);if(!1!==n&&this.parent)for(var o=this.parent();o&&!r.isPropagationStopped();)o.fire(t,r,!1),o=o.parent();return r},on:function(t,e,n){return Mx(this).on(t,e,n)},off:function(t,e){return Mx(this).off(t,e)},once:function(t,e){return Mx(this).once(t,e)},hasEventListeners:function(t){return Mx(this).has(t)}},zx=function(t,e,n){Li(t,e)&&!1===n?function(t,e){Ri(t)?t.dom().classList.remove(e):function(t,e){(function(t,e,n){var r=M(Bi(t,e),function(t){return t!==n});r.length>0?Me(t,e,r.join(" ")):Be(t,e)})(t,"class",e)}(t,e),function(t){0===(Ri(t)?t.dom().classList:function(t){return Bi(t,"class")}(t)).length&&Be(t,"class")}(t)}(t,e):n&&Pi(t,e)},Bx=function(t,e,n){try{t.getDoc().execCommand(e,!1,n)}catch(t){}},Rx=function(t,e){t.dom().contentEditable=e?"true":"false"},Px=function(t,e){var n=et.fromDom(t.getBody());zx(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){m.from(t.selection.getNode()).each(function(t){t.removeAttribute("data-mce-selected")})}(t),t.readonly=!0,Rx(n,!1),N(Hi(n,'*[contenteditable="true"]'),function(t){Me(t,"data-mce-contenteditable","true"),Rx(t,!1)})):(t.readonly=!1,Rx(n,!0),N(Hi(n,'*[data-mce-contenteditable="true"]'),function(t){Be(t,"data-mce-contenteditable"),Rx(t,!0)}),Bx(t,"StyleWithCSS",!1),Bx(t,"enableInlineTableEditing",!1),Bx(t,"enableObjectResizing",!1),function(t){return zl(t)||function(t){return al().filter(function(e){return!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"))}(e.dom())&&Al(t,e.dom())}).isSome()}(t)}(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},Lx=function(t){return!0===t.readonly},Hx=function(t){t.parser.addAttributeFilter("contenteditable",function(e){Lx(t)&&N(e,function(t){t.attr("data-mce-contenteditable",t.attr("contenteditable")),t.attr("contenteditable","false")})}),t.serializer.addAttributeFilter("data-mce-contenteditable",function(e){Lx(t)&&N(e,function(t){t.attr("contenteditable",t.attr("data-mce-contenteditable"))})}),t.serializer.addTempAttr("data-mce-contenteditable")},Fx=Ci.DOM,Vx=function(t,e){return"selectionchange"===e?t.getDoc():!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(e)?t.getDoc().documentElement:t.settings.event_root?(t.eventRoot||(t.eventRoot=Fx.select(t.settings.event_root)[0]),t.eventRoot):t.getBody()},jx=function(t,e,n){!function(t){return!t.hidden&&!Lx(t)}(t)?Lx(t)&&function(t,e){var n=e.target;"click"===e.type&&!Bf.metaKeyPressed(e)&&function(t,e){return null!==t.dom.getParent(e,"a")}(t,n)&&e.preventDefault()}(t,n):t.fire(e,n)},Ux=function(t,e){var n,r;if(t.delegates||(t.delegates={}),!t.delegates[e]&&!t.removed)if(n=Vx(t,e),t.settings.event_root){if(Ig||(Ig={},t.editorManager.on("removeEditor",function(){var e;if(!t.editorManager.activeEditor&&Ig){for(e in Ig)t.dom.unbind(Vx(t,e));Ig=null}})),Ig[e])return;r=function(n){for(var r=n.target,o=t.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();(a===r||Fx.isChildOf(r,a))&&jx(o[i],e,n)}},Ig[e]=r,Fx.bind(n,e,r)}else r=function(n){jx(t,e,n)},Fx.bind(n,e,r),t.delegates[e]=r},Wx=Z(Z({},Ix),{bindPendingEventDelegates:function(){var t=this;En.each(t._pendingNativeEvents,function(e){Ux(t,e)})},toggleNativeEvent:function(t,e){"focus"!==t&&"blur"!==t&&(e?this.initialized?Ux(this,t):this._pendingNativeEvents?this._pendingNativeEvents.push(t):this._pendingNativeEvents=[t]:this.initialized&&(this.dom.unbind(Vx(this,t),t,this.delegates[t]),delete this.delegates[t]))},unbindAllNativeEvents:function(){var t,e=this.getBody(),n=this.dom;if(this.delegates){for(t in this.delegates)this.dom.unbind(Vx(this,t),t,this.delegates[t]);delete this.delegates}!this.inline&&e&&n&&(e.onload=null,n.unbind(this.getWin()),n.unbind(this.getDoc())),n&&(n.unbind(e),n.unbind(this.getContainer()))}}),qx=["design","readonly"],Yx=function(t,e,r,o){var i=r[e.get()],a=r[o];try{a.activate()}catch(t){return void n.console.error("problem while activating editor mode "+o+":",t)}i.deactivate(),i.editorReadOnly!==a.editorReadOnly&&Px(t,a.editorReadOnly),e.set(o),function(t,e){t.fire("SwitchMode",{mode:e})}(t,o)},$x=function(t){var e=nt("design"),o=nt({design:{activate:r,deactivate:r,editorReadOnly:!1},readonly:{activate:r,deactivate:r,editorReadOnly:!0}});return function(t){t.serializer?Hx(t):t.on("PreInit",function(){Hx(t)})}(t),function(t){t.on("ShowCaret",function(e){Lx(t)&&e.preventDefault()}),t.on("ObjectSelected",function(e){Lx(t)&&e.preventDefault()})}(t),{isReadOnly:function(){return Lx(t)},set:function(n){return function(t,e,n,r){if(r!==n.get()){if(!Q(e,r))throw new Error("Editor mode '"+r+"' is invalid");t.initialized?Yx(t,n,e,r):t.on("init",function(){return Yx(t,n,e,r)})}}(t,o.get(),e,n)},get:function(){return e.get()},register:function(t,e){o.set(function(t,e,r){var o;if(E(qx,e))throw new Error("Cannot override default mode "+e);return Z(Z({},t),((o={})[e]=Z(Z({},r),{deactivate:function(){try{r.deactivate()}catch(t){n.console.error("problem while deactivating editor mode "+e+":",t)}}}),o))}(o.get(),t,e))}}},Gx=En.each,Kx=En.explode,Xx={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},Jx=En.makeMap("alt,ctrl,shift,meta,access"),Qx=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()||(Gx(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,i=this;return o=n,"string"==typeof n?n=function(){i.editor.execCommand(o,!1,null)}:En.isArray(o)&&(n=function(){i.editor.execCommand(o[0],o[1],o[2])}),Gx(Kx(En.trim(t)),function(t){var o=i.createShortcut(t,e,n,r);i.shortcuts[o.id]=o}),!0},t.prototype.remove=function(t){var e=this.createShortcut(t);return!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},t.prototype.parseShortcut=function(t){var e,n,r={};for(n in Gx(Kx(t.toLowerCase(),"+"),function(t){t in Jx?r[t]=!0:/^[0-9]{2,}$/.test(t)?r.keyCode=parseInt(t,10):(r.charCode=t.charCodeAt(0),r.keyCode=Xx[t]||t.toUpperCase().charCodeAt(0))}),e=[r.keyCode],Jx)r[n]?e.push(n):r[n]=!1;return r.id=e.join(","),r.access&&(r.alt=!0,yn.mac?r.ctrl=!0:r.shift=!0),r.meta&&(yn.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r},t.prototype.createShortcut=function(t,e,n,r){var o;return(o=En.map(Kx(t,">"),this.parseShortcut))[o.length-1]=En.extend(o[o.length-1],{func:n,scope:r||this.editor}),En.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}(),Zx=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},u=function(t,e){return function(n,r){return t[n.toLowerCase()]=Z(Z({},r),{type:e})}};return{addButton:u(t,"button"),addGroupToolbarButton:u(t,"grouptoolbarbutton"),addToggleButton:u(t,"togglebutton"),addMenuButton:u(t,"menubutton"),addSplitButton:u(t,"splitbutton"),addMenuItem:u(e,"menuitem"),addNestedMenuItem:u(e,"nestedmenuitem"),addToggleMenuItem:u(e,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(t,e){return r[t.toLowerCase()]=e},getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}}();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}},tw=En.each,ew=En.trim,nw="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),rw={ftp:21,http:80,https:443,mailto:25},ow=function(){function t(e,r){e=ew(e),this.settings=r||{};var o=this.settings.base_uri,i=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))i.source=e;else{var a=0===e.indexOf("//");if(0!==e.indexOf("/")||a||(e=(o&&o.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var u=this.settings.base_uri?this.settings.base_uri.path:new t(n.document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+i.toAbsPath(u,e);else{var s=/([^#?]*)([#?]?.*)/.exec(e);e=(o&&o.protocol||"http")+"://mce_host"+i.toAbsPath(u,s[1])+s[2]}}e=e.replace(/@@/g,"(mce_at)");var c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);tw(nw,function(t,e){var n=c[e];n&&(n=n.replace(/\(mce_at\)/g,"@@")),i[t]=n}),o&&(i.protocol||(i.protocol=o.protocol),i.userInfo||(i.userInfo=o.userInfo),i.port||"mce_host"!==i.host||(i.port=o.port),i.host&&"mce_host"!==i.host||(i.host=o.host),i.source=""),a&&(i.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.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=rw[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},t.prototype.toRelPath=function(t,e){var n,r,o,i=0,a="",u=t.substring(0,t.lastIndexOf("/")).split("/");if(n=e.split("/"),u.length>=n.length)for(r=0,o=u.length;r<o;r++)if(r>=n.length||u[r]!==n[r]){i=r+1;break}if(u.length<n.length)for(r=0,o=n.length;r<o;r++)if(r>=u.length||u[r]!==n[r]){i=r+1;break}if(1===i)return e;for(r=0,o=u.length-(i-1);r<o;r++)a+="../";for(r=i-1,o=n.length;r<o;r++)a+=r!==i-1?"/"+n[r]:n[r];return a},t.prototype.toAbsPath=function(t,e){var n,r,o,i=0,a=[];r=/\/$/.test(e)?"/":"";var u=t.split("/"),s=e.split("/");for(tw(u,function(t){t&&a.push(t)}),u=a,n=s.length-1,a=[];n>=0;n--)0!==s[n].length&&"."!==s[n]&&(".."!==s[n]?i>0?i--:a.push(s[n]):i++);return 0!==(o=(n=u.length-i)<=0?H(a).join("/"):u.slice(0,n).join("/")+"/"+H(a).join("/")).indexOf("/")&&(o="/"+o),r&&o.lastIndexOf("/")!==o.length-1&&(o+=r),o},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}(),iw=Ci.DOM,aw=En.extend,uw=En.each,sw=En.resolve,cw=yn.ie,lw=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,aw(this,Wx),this.settings=of(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&&(Ti.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Ci.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Mi.languageLoad=this.settings.language_load,Mi.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new ow(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new Qx(this),this.editorCommands=new Dx(this),this.settings.cache_suffix&&(yn.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:Zx()};var o=$x(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=fi.overrideDefaults(function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}})}return t.prototype.render=function(){!function(t){var e=t.settings,r=t.id;Ni.setCode(Zu(t));if(Hr.Event.domLoaded){if(t.getElement()&&yn.contentEditable){e.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||ux.getParent(r,"form");o&&(t.formElement=o,e.hidden_input&&!De.isTextareaOrInput(t.getElement())&&(ux.insertAfter(ux.create("input",{type:"hidden",name:r}),r),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},ux.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.resetContent()}),!e.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),o._mceOldSubmit(o)})),t.windowManager=bf(t),t.notificationManager=pf(t),"xml"===e.encoding&&t.on("GetContent",function(t){t.save&&(t.content=ux.encode(t.content))}),e.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),e.add_unload_trigger&&(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),cx(t,t.suffix)}}else ux.bind(n.window,"ready",function e(){ux.unbind(n.window,"ready",e),t.render()})}(this)},t.prototype.focus=function(t){!function(t,e){t.removed||(e?Bl(t):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===zl(t)&&_l(t).each(function(e){t.selection.setRng(e),r=e});var o=function(t,e){return t.dom.getParent(e,function(e){return"true"===t.dom.getContentEditable(e)})}(t,e.getNode());if(t.$.contains(n,o))return Il(o),Ml(t,r),void Bl(t);t.inline||(yn.opera||Il(n),t.getWin().focus()),(yn.gecko||t.inline)&&(Il(n),Ml(t,r)),Bl(t)}(t))}(this,t)},t.prototype.hasFocus=function(){return Rl(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=(r=i.replace(/\.\w+$/,""))?sw(r):0,i=sw(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:i,scope:r}),i.apply(r||o,Array.prototype.slice.call(arguments,1))},t.prototype.translate=function(t){return Ni.translate(t)},t.prototype.getParam=function(t,e,n){return function(t,e,n,r){var o,i=e in t.settings?t.settings[e]:n;return"hash"===r?function(t){var e={};return"string"==typeof t?N(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),function(t){var n=t.split("=");n.length>1?e[En.trim(n[0])]=En.trim(n[1]):e[En.trim(n[0])]=En.trim(n[0])}):e=t,e}(i):"string"===r?af(g,t,e).getOr(n):"number"===r?af(C,t,e).getOr(n):"boolean"===r?af(x,t,e).getOr(n):"object"===r?af(v,t,e).getOr(n):"array"===r?af(b,t,e).getOr(n):"string[]"===r?af((o=g,function(t){return b(t)&&L(t,o)}),t,e).getOr(n):"function"===r?af(w,t,e).getOr(n):i}(this,t,e,n)},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(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable="true":(iw.show(this.getContainer()),iw.hide(this.id)),this.load(),this.fire("show"))},t.prototype.hide=function(){var t=this.getDoc();this.hidden||(cw&&t&&!this.inline&&t.execCommand("SelectAll"),this.save(),this.inline?(this.getBody().contentEditable="false",this===this.editorManager.focusedEditor&&(this.editorManager.focusedEditor=null)):(iw.hide(this.getContainer()),iw.setStyle(this.id,"display",this.orgDisplay)),this.hidden=!0,this.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.getElement();if(this.removed)return"";if(n){(t=t||{}).load=!0;var r=De.isTextareaOrInput(n)?n.value:n.innerHTML;return e=this.setContent(r,t),t.element=n,t.no_events||this.fire("LoadContent",t),t.element=n=null,e}},t.prototype.save=function(t){var e,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(t=t||{}).save=!0,t.element=o,t.content=r.getContent(t),t.no_events||r.fire("SaveContent",t),"raw"===t.format&&r.fire("RawSaveContent",t),e=t.content,De.isTextareaOrInput(o)?o.value=e:(!t.is_removing&&r.inline||(o.innerHTML=e),(n=iw.getParent(r.id,"form"))&&uw(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 Hl(this,t,e)},t.prototype.getContent=function(t){return function(t,e){return void 0===e&&(e={}),m.from(t.getBody()).fold(i("tree"===e.format?new jc("body",11):""),function(n){return function(t,e,n){var r;if(e.format=e.format?e.format:"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),"raw"===e.format)r=En.trim(tl(t.serializer,n.innerHTML));else if("text"===e.format)r=oa(n.innerText||n.textContent);else{if("tree"===e.format)return t.serializer.serialize(n,e);r=function(t,e){var n=Uu(t),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return e.replace(r,"")}(t,t.serializer.serialize(n,e))}return"text"===e.format||Hn(et.fromDom(n))?e.content=r:e.content=En.trim(r),e.no_events||t.fire("GetContent",e),e.content}(t,e,n)})}(this,t)},t.prototype.insertContent=function(t,e){e&&(t=aw({content:t},e)),this.execCommand("mceInsertContent",!1,t)},t.prototype.resetContent=function(t){void 0===t?Hl(this,this.startContent,{format:"raw"}):Hl(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(){return this.container||(this.container=iw.get(this.editorContainer||this.id+"_parent")),this.container},t.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},t.prototype.getElement=function(){return this.targetElm||(this.targetElm=iw.get(this.id)),this.targetElm},t.prototype.getWin=function(){var t;return this.contentWindow||(t=this.iframeElement)&&(this.contentWindow=t.contentWindow),this.contentWindow},t.prototype.getDoc=function(){var t;return this.contentDocument||(t=this.getWin())&&(this.contentDocument=t.document),this.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.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",t,n,!0,e):!r.convert_urls||n&&"LINK"===n.nodeName||0===t.indexOf("file:")||0===t.length?t:r.relative_urls?this.documentBaseURI.toRelative(t):t=this.documentBaseURI.toAbsolute(t,r.remove_script_host)},t.prototype.addVisual=function(t){var e,n=this,r=n.settings,o=n.dom;t=t||n.getBody(),void 0===n.hasVisual&&(n.hasVisual=r.visual),uw(o.select("table,a",t),function(t){var i;switch(t.nodeName){case"TABLE":return e=r.visual_table_class||"mce-item-table",void((i=o.getAttrib(t,"border"))&&"0"!==i||!n.hasVisual?o.removeClass(t,e):o.addClass(t,e));case"A":return void(o.getAttrib(t,"href")||(i=o.getAttrib(t,"name")||t.id,e=r.visual_anchor_class||"mce-item-anchor",i&&n.hasVisual?o.addClass(t,e):o.removeClass(t,e)))}}),n.fire("VisualAid",{element:t,hasVisual:n.hasVisual})},t.prototype.remove=function(){!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&&Fl.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){Fl.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),Fl.remove(t.getContainer()),Vl(e),Vl(n),t.destroy()}}(this)},t.prototype.destroy=function(t){!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(),Vl(n),Vl(r)),function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),Fl.unbind(e,"submit reset",t.formEventDelegate))}(t),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)}(t),t.destroyed=!0):t.remove())}(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}(),fw=Ci.DOM,dw=En.explode,hw=En.each,mw=En.extend,pw=0,gw=!1,vw=[],bw=[],yw=function(t){var e=t.type;hw(_w.get(),function(n){switch(e){case"scroll":n.fire("ScrollWindow",t);break;case"resize":n.fire("ResizeWindow",t)}})},xw=function(t){t!==gw&&(t?fi(window).on("resize scroll",yw):fi(window).off("resize scroll",yw),gw=t)},ww=function(t){var e=bw;delete vw[t.id];for(var n=0;n<vw.length;n++)if(vw[n]===t){vw.splice(n,1);break}return bw=M(bw,function(e){return t!==e}),_w.activeEditor===t&&(_w.activeEditor=bw.length>0?bw[0]:null),_w.focusedEditor===t&&(_w.focusedEditor=null),e.length!==bw.length},Cw="CSS1Compat"!==n.document.compatMode,_w=Z(Z({},Ix),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:fi,majorVersion:"5",minorVersion:"2.0",releaseDate:"2020-02-13",editors:vw,i18n:Ni,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,r="";e=ow.getDocumentBaseUrl(n.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=n.document.getElementsByTagName("script"),a=0;a<i.length;a++){var u;if(""!==(u=i[a].src||"")){var s=u.substring(u.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(u)){-1!==s.indexOf(".min")&&(r=".min"),t=u.substring(0,u.lastIndexOf("/"));break}}}!t&&n.document.currentScript&&(-1!==(u=n.document.currentScript.src).indexOf(".min")&&(r=".min"),t=u.substring(0,u.lastIndexOf("/")))}this.baseURL=new ow(e).toAbsolute(t),this.documentBaseURL=e,this.baseURI=new ow(this.baseURL),this.suffix=r,Nl(this)},overrideDefaults:function(t){var e,n;(e=t.base_url)&&this._setBaseUrl(e),n=t.suffix,t.suffix&&(this.suffix=n),this.defaultSettings=t;var r=t.plugin_base_urls;for(var o in r)Mi.PluginManager.urls[o]=r[o]},init:function(t){var e,r,o=this;r=En.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"," ");var i=function(t){var e=t.id;return e||(e=(e=t.name)&&!fw.get(e)?t.name:fw.uniqueId(),t.setAttribute("id",e)),e},a=function(t,e){return e.constructor===RegExp?e.test(t.className):fw.hasClass(t,e)},u=function(t){e=t};return o.settings=t,fw.bind(window,"ready",function e(){var s,c=0,l=[],f=function(t,e,n){var r=new lw(t,e,o);l.push(r),r.on("init",function(){++c===s.length&&u(l)}),r.targetElm=r.targetElm||n,r.render()};fw.unbind(window,"ready",e),function(e){var n=t.onpageload;n&&n.apply(o,Array.prototype.slice.call(arguments,2))}("onpageload"),s=fi.unique(function(t){var e,r=[];if(yn.browser.isIE()&&yn.browser.version.major<11)return Nf("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(Cw)return Nf("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return hw(t.types,function(t){r=r.concat(fw.select(t.selector))}),r;if(t.selector)return fw.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":(e=t.elements||"").length>0&&hw(dw(e),function(t){var e;(e=fw.get(t))?r.push(e):hw(n.document.forms,function(e){hw(e.elements,function(e){e.name===t&&(t="mce_editor_"+pw++,fw.setAttrib(e,"id",t),r.push(e))})})});break;case"textareas":case"specific_textareas":hw(fw.select("textarea"),function(e){t.editor_deselector&&a(e,t.editor_deselector)||t.editor_selector&&!a(e,t.editor_selector)||r.push(e)})}return r}(t)),t.types?hw(t.types,function(e){En.each(s,function(n){return!fw.is(n,e.selector)||(f(i(n),mw({},t,e),n),!1)})}):(En.each(s,function(t){var e;(e=o.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(ww(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)}),0===(s=En.grep(s,function(t){return!o.get(t.id)})).length?u([]):hw(s,function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?f(i(e),t,e):Nf("Could not initialize inline editor on invalid inline target element",e)}))}),new an(function(t){e?t(e):u=function(e){t(e)}})},get:function(t){return 0===arguments.length?bw.slice(0):g(t)?B(bw,function(e){return e.id===t}).getOr(null):C(t)&&bw[t]?bw[t]:null},add:function(t){var e=this;return vw[t.id]===t?t:(null===e.get(t.id)&&("length"!==t.id&&(vw[t.id]=t),vw.push(t),bw.push(t)),xw(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),zg||(zg=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",zg)),t)},createEditor:function(t,e){return this.add(new lw(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!g(t))return n=t,y(r.get(n.id))?null:(ww(n)&&r.fire("RemoveEditor",{editor:n}),0===bw.length&&window.removeEventListener("beforeunload",zg),n.remove(),xw(bw.length>0),n);hw(fw.select(t),function(t){(n=r.get(t.id))&&r.remove(n)})}else for(e=bw.length-1;e>=0;e--)r.remove(bw[e])},execCommand:function(t,e,n){var r=this.get(n);switch(t){case"mceAddEditor":return this.get(n)||new lw(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?(r.isHidden()?r.show():r.hide(),!0):(this.execCommand("mceAddEditor",0,n),!0)}return!!this.activeEditor&&this.activeEditor.execCommand(t,e,n)},triggerSave:function(){hw(bw,function(t){t.save()})},addI18n:function(t,e){Ni.add(t,e)},translate:function(t){return Ni.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 ow(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new ow(this.baseURL)}});function kw(t){return{walk:function(e,n){return Mc.walk(t,e,n)},split:Nh,normalize:function(e){return Hd.normalize(t,e).fold(i(!1),function(t){return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),!0})}}}_w.setup(),function(t){t.compareRanges=Nd.isEq,t.getCaretRangeFromPoint=nd,t.getSelectedNode=Ba,t.getNode=Ra}(kw||(kw={}));var Sw,Tw,Ew,Ow,Dw=kw,Nw=(Sw={},Tw={},{load:function(t,e){var r='Script at URL "'+e+'" failed to load',o='Script at URL "'+e+"\" did not call `tinymce.Resource.add('"+t+"', data)` within 1 second";if(void 0!==Sw[t])return Sw[t];var i=new an(function(i,a){var u=function(t,e,r){void 0===r&&(r=1e3);var o=!1,i=null,a=function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];o||(o=!0,null!==i&&(n.clearTimeout(i),i=null),t.apply(null,e))}},u=a(t),s=a(e);return{start:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o||null!==i||(i=n.setTimeout(function(){return s.apply(null,t)},r))},resolve:u,reject:s}}(i,a);Tw[t]=u.resolve,Ti.ScriptLoader.loadScript(e,function(){return u.start(o)},function(){return u.reject(r)})});return Sw[t]=i,i},add:function(t,e){void 0!==Tw[t]&&(Tw[t](e),delete Tw[t]),Sw[t]=an.resolve(e)}}),Aw=Math.min,Mw=Math.max,Iw=Math.round,zw=function(t,e,n){var r,o,i,a,u,s;return r=e.x,o=e.y,i=t.w,a=t.h,u=e.w,s=e.h,"b"===(n=(n||"").split(""))[0]&&(o+=s),"r"===n[1]&&(r+=u),"c"===n[0]&&(o+=Iw(s/2)),"c"===n[1]&&(r+=Iw(u/2)),"b"===n[3]&&(o-=a),"r"===n[4]&&(r-=i),"c"===n[3]&&(o-=Iw(a/2)),"c"===n[4]&&(r-=Iw(i/2)),Bw(r,o,i,a)},Bw=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},Rw={inflate:function(t,e,n){return Bw(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:zw,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i<r.length;i++)if((o=zw(t,e,r[i])).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},intersect:function(t,e){var n,r,o,i;return n=Mw(t.x,e.x),r=Mw(t.y,e.y),o=Aw(t.x+t.w,e.x+e.w),i=Aw(t.y+t.h,e.y+e.h),o-n<0||i-r<0?null:Bw(n,r,o-n,i-r)},clamp:function(t,e,n){var r,o,i,a,u,s,c,l,f,d;return u=t.x,s=t.y,c=t.x+t.w,l=t.y+t.h,f=e.x+e.w,d=e.y+e.h,r=Mw(0,e.x-u),o=Mw(0,e.y-s),i=Mw(0,c-f),a=Mw(0,l-d),u+=r,s+=o,n&&(c+=r,l+=o,u-=i,s-=a),Bw(u,s,(c-=i)-u,(l-=a)-s)},create:Bw,fromClientRect:function(t){return Bw(t.left,t.top,t.width,t.height)}},Pw=En.each,Lw=En.extend,Hw=function(){};Hw.extend=Ew=function(t){var e,n,r,o=this.prototype,i=function(){var t,e,n,r=this;if(!Ow&&(r.init&&r.init.apply(r,arguments),e=r.Mixins))for(t=e.length;t--;)(n=e[t]).init&&n.init.apply(r,arguments)},a=function(){return this},u=function(t,e){return function(){var n,r=this,i=r._super;return r._super=o[t],n=e.apply(r,arguments),r._super=i,n}};for(n in Ow=!0,e=new this,Ow=!1,t.Mixins&&(Pw(t.Mixins,function(e){for(var n in e)"init"!==n&&(t[n]=e[n])}),o.Mixins&&(t.Mixins=o.Mixins.concat(t.Mixins))),t.Methods&&Pw(t.Methods.split(","),function(e){t[e]=a}),t.Properties&&Pw(t.Properties.split(","),function(e){var n="_"+e;t[e]=function(t){return void 0!==t?(this[n]=t,this):this[n]}}),t.Statics&&Pw(t.Statics,function(t,e){i[e]=t}),t.Defaults&&o.Defaults&&(t.Defaults=Lw({},o.Defaults,t.Defaults)),t)"function"==typeof(r=t[n])&&o[n]?e[n]=u(n,r):e[n]=r;return i.prototype=e,i.constructor=i,i.extend=Ew,i};var Fw,Vw=Math.min,jw=Math.max,Uw=Math.round,Ww={serialize:function(t){var e=JSON.stringify(t);return g(e)?e.replace(/[\u0080-\uFFFF]/g,function(t){var e=t.charCodeAt(0).toString(16);return"\\u"+"0000".substring(e.length)+e}):e},parse:function(t){try{return JSON.parse(t)}catch(t){}}},qw={callbacks:{},count:0,send:function(t){var e=this,n=Ci.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++}},Yw=Z(Z({},Ix),{send:function(t){var e,r=0,o=function n(){!t.async||4===e.readyState||r++>1e4?(t.success&&r<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,r>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):ln.setTimeout(n,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||"",Yw.fire("beforeInitialize",{settings:t}),e=new n.XMLHttpRequest){if(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&&En.each(t.requestheaders,function(t){e.setRequestHeader(t.key,t.value)}),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=Yw.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return o();ln.setTimeout(o,10)}}}),$w=En.extend,Gw=function(){function t(t){this.settings=$w({},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=$w(this.settings,t);r.success=function(t,o){void 0===(t=Ww.parse(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=Ww.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",Yw.send(r)},t}();try{Fw=n.window.localStorage}catch(t){Fw=function(){var t={},e=[],n={getItem:function(e){return t[e]||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}()}var Kw={geom:{Rect:Rw},util:{Promise:an,Delay:ln,Tools:En,VK:Bf,URI:ow,Class:Hw,EventDispatcher:Ax,Observable:Ix,I18n:Ni,XHR:Yw,JSON:Ww,JSONRequest:Gw,JSONP:qw,LocalStorage:Fw,Color:function(t){var e={},n=0,r=0,o=0,i=function(t){var i;return"object"==_typeof(t)?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&function(t,e,i){var a,u,s,c;if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=jw(0,Vw(e,1)),i=jw(0,Vw(i,1)),0!==e){switch(a=t/60,s=(u=i*e)*(1-Math.abs(a%2-1)),c=i-u,Math.floor(a)){case 0:n=u,r=s,o=0;break;case 1:n=s,r=u,o=0;break;case 2:n=0,r=u,o=s;break;case 3:n=0,r=s,o=u;break;case 4:n=s,r=0,o=u;break;case 5:n=u,r=0,o=s;break;default:n=r=o=0}n=Uw(255*(n+c)),r=Uw(255*(r+c)),o=Uw(255*(o+c))}else n=r=o=Uw(255*i)}(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&&i(t),e.toRgb=function(){return{r:n,g:r,b:o}},e.toHsv=function(){return function(t,e,n){var r,o,i,a;return o=0,(i=Vw(t/=255,Vw(e/=255,n/=255)))===(a=jw(t,jw(e,n)))?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:Uw(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:Uw(100*r),v:Uw(100*o)})}(n,r,o)},e.toHex=function(){var t=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},e.parse=i,e}},dom:{EventUtils:Hr,Sizzle:_o,DomQuery:fi,TreeWalker:di,TextSeeker:Du,DOMUtils:Ci,ScriptLoader:Ti,RangeUtils:Dw,Serializer:uh,ControlSelection:Lf,BookmarkManager:If,Selection:Gd,Event:Hr.Event},html:{Styles:Dr,Entities:Qn,Node:jc,Schema:cr,SaxParser:Qc,DomParser:rh,Writer:rl,Serializer:ol},Env:yn,AddOnManager:Mi,Annotator:Pc,Formatter:Hm,UndoManager:Qm,EditorCommands:Dx,WindowManager:bf,NotificationManager:pf,EditorObservable:Wx,Shortcuts:Qx,Editor:lw,FocusManager:kl,EditorManager:_w,DOM:Ci.DOM,ScriptLoader:Ti.ScriptLoader,PluginManager:Mi.PluginManager,ThemeManager:Mi.ThemeManager,IconManager:uf,Resource:Nw,trim:En.trim,isArray:En.isArray,is:En.is,toArray:En.toArray,makeMap:En.makeMap,each:En.each,map:En.map,grep:En.grep,inArray:En.inArray,extend:En.extend,create:En.create,walk:En.walk,createNS:En.createNS,resolve:En.resolve,explode:En.explode,_addCacheSuffix:En._addCacheSuffix,isOpera:yn.opera,isWebKit:yn.webkit,isIE:yn.ie,isGecko:yn.gecko,isMac:yn.mac},Xw=En.extend(_w,Kw);!function(t){window.tinymce=t,window.tinyMCE=t}(Xw),function(e){try{t.exports=e}catch(t){}}(Xw)}(window)}).call(this,n("yLpj"))},"5oMp":function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},"7bfH":function(t,e,n){var r,o,i;o=[n("EVdn"),n("wCe6"),n("GC/X"),n("N6cA"),n("vBzC"),n("r15H"),n("Jchv"),n("y6ec"),n("Qwlt"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){return t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,n=this,r=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(r).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){n._rendered||n._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,n){t.preventDefault(),e._setSelection(),e._select(n.item.data("ui-selectmenu-item"),t)},focus:function(t,n){var r=n.item.data("ui-selectmenu-item");null!=e.focusIndex&&r.index!==e.focusIndex&&(e._trigger("focus",t,{item:r}),e.isOpen||e._select(r,t)),e.focusIndex=r.index,e.button.attr("aria-activedescendant",e.menuItems.eq(r.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var n=t("<span>");return this._setText(n,e.label),this._addClass(n,"ui-selectmenu-text"),n},_renderMenu:function(e,n){var r=this,o="";t.each(n,function(n,i){var a;i.optgroup!==o&&(a=t("<li>",{text:i.optgroup}),r._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(i.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),o=i.optgroup),r._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,n){var r=t("<li>"),o=t("<div>",{title:n.element.attr("title")});return n.disabled&&this._addClass(r,null,"ui-state-disabled"),this._setText(o,n.label),r.append(o).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var n,r,o=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),o+=":not(.ui-state-disabled)"),(r="first"===t||"last"===t?n["first"===t?"prevAll":"nextAll"](o).eq(-1):n[t+"All"](o).eq(0)).length&&this.menuInstance.focus(e,r)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var n=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),n=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),n=!1}n&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==n&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var n=this,r=[];e.each(function(e,o){r.push(n._parseOption(t(o),e))}),this.items=r},_parseOption:function(t,e){var n=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}])})?r.apply(e,o):r)||(t.exports=i)},"7x9u":function(t,e){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){var e=function(t){return t.getContent({source_view:!0})}(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:e},onSubmit:function(e){(function(t,e){t.focus(),t.undoManager.transact(function(){t.setContent(e)}),t.selection.setCursorLocation(),t.nodeChanged()})(t,e.getData().code),e.close()}})},n=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},r=function(t){t.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return e(t)}}),t.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return e(t)}})};t.add("code",function(t){return n(t),r(t),{}})}()},"8Iik":function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.fn.scrollParent=function(e){var n=this.css("position"),r="absolute"===n,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,i=this.parents().filter(function(){var e=t(this);return(!r||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&i.length?i:t(this[0].ownerDocument||document)}})?r.apply(e,o):r)||(t.exports=i)},"8oxB":function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!l){var t=u(d);l=!0;for(var e=c.length;e;){for(s=c,c=[];++f<e;)s&&s[f].run();f=-1,e=c.length}s=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new m(t,e)),1!==c.length||l||u(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},"9/yf":function(t,e,n){var r,o,i;o=[n("EVdn"),n("wCe6"),n("vBzC"),n("Jchv"),n("yw1R"),n("Qwlt"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){return t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,r,o=this.element[0].nodeName.toLowerCase(),i="textarea"===o,a="input"===o;this.isMultiLine=i||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[i||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,r=!0,void(n=!0);e=!1,r=!1,n=!1;var i=t.ui.keyCode;switch(o.keyCode){case i.PAGE_UP:e=!0,this._move("previousPage",o);break;case i.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case i.UP:e=!0,this._keyEvent("previous",o);break;case i.DOWN:e=!0,this._keyEvent("next",o);break;case i.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case i.TAB:this.menu.active&&this.menu.select(o);break;case i.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:n=!0,this._searchTimeout(o)}},keypress:function(r){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||r.preventDefault());if(!n){var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:this._move("previousPage",r);break;case o.PAGE_DOWN:this._move("nextPage",r);break;case o.UP:this._keyEvent("previous",r);break;case o.DOWN:this._keyEvent("next",r)}}},input:function(t){if(r)return r=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,n){var r,o;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});o=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:o})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(o.value),(r=n.item.attr("aria-label")||o.value)&&t.trim(r).length&&(this.liveRegion.children().hide(),t("<div>").text(r).appendTo(this.liveRegion))},menuselect:function(e,n){var r=n.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay(function(){this.previous=o,this.selectedItem=r})),!1!==this._trigger("select",e,{item:r})&&this._value(r.value),this.term=this._value(),this.close(e),this.selectedItem=r}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var n=this.menu.element[0];return e.target===this.element[0]||e.target===n||t.contains(n,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,n,r=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(n,r){r(t.ui.autocomplete.filter(e,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,o){r.xhr&&r.xhr.abort(),r.xhr=t.ajax({url:n,data:e,dataType:"json",success:function(t){o(t)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),n=this.menu.element.is(":visible"),r=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||n||r)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var n=this.menu.element.empty();this._renderMenu(n,e),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,n){var r=this;t.each(n,function(t,n){r._renderItemData(e,n)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").append(t("<div>").text(n.label)).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var r=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return r.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}}),t.ui.autocomplete})?r.apply(e,o):r)||(t.exports=i)},"9rSQ":function(t,e,n){"use strict";var r=n("xTJ+");function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},Aw8l:function(t,e,n){(function(t){!function(e){"use strict";var n=function(){},r=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},o=function(t){return function(){return t}},i=function(t){return t};function a(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 u=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},s=function(t){return function(){throw new Error(t)}},c=o(!1),l=o(!0),f=tinymce.util.Tools.resolve("tinymce.ThemeManager"),d=function(){return(d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function h(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(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var p,g=function(){return v},v=function(){var t=function(t){return t.isNone()},e=function(t){return t()},r=function(t){return t},i={fold:function(t,e){return t()},is:c,isSome:c,isNone:l,getOr:r,getOrThunk:e,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:r,orThunk:e,map:g,each:n,bind:g,exists:c,forall:l,filter:g,equals:t,equals_:t,toArray:function(){return[]},toString:o("none()")};return Object.freeze&&Object.freeze(i),i}(),b=function t(e){var n=o(e),r=function(){return a},i=function(t){return t(e)},a={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:l,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return t(n(e))},each:function(t){t(e)},bind:i,exists:i,forall:i,filter:function(t){return t(e)?a:v},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(c,function(t){return n(e,t)})}};return a},y={some:b,none:g,from:function(t){return null==t?v:b(t)}},x=function t(e){return{is:function(t){return e===t},isValue:l,isError:c,getOr:o(e),getOrThunk:o(e),getOrDie:o(e),or:function(n){return t(e)},orThunk:function(n){return t(e)},fold:function(t,n){return n(e)},map:function(n){return t(n(e))},mapError:function(n){return t(e)},each:function(t){t(e)},bind:function(t){return t(e)},exists:function(t){return t(e)},forall:function(t){return t(e)},toOption:function(){return y.some(e)}}},w=function t(e){return{is:c,isValue:c,isError:l,getOr:i,getOrThunk:function(t){return t()},getOrDie:function(){return s(String(e))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(e)},map:function(n){return t(e)},mapError:function(n){return t(n(e))},each:n,bind:function(n){return t(e)},exists:c,forall:l,toOption:y.none}},C={value:x,error:w,fromOption:function(t,e){return t.fold(function(){return w(e)},x)}},_=function(t){return function(e){return function(t){if(null===t)return"null";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}(e)===t}},k=_("string"),S=_("object"),T=_("array"),E=_("boolean"),O=_("function"),D=_("number"),N=function(t,e){if(T(t)){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n]))return!1;return!0}return!1},A=Array.prototype.slice,M=Array.prototype.indexOf,I=Array.prototype.push,z=function(t,e){return M.call(t,e)},B=function(t,e){return z(t,e)>-1},R=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return!0;return!1},P=function(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=A.call(t,r,r+e);n.push(o)}return n},L=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},H=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},F=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},V=function(t,e,n){return function(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])}(t,function(t){n=e(n,t)}),n},j=function(t,e,n){return H(t,function(t){n=e(n,t)}),n},U=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return y.some(o)}return y.none()},W=function(t,e){for(var n=0,r=t.length;n<r;n++)if(e(t[n],n))return y.some(n);return y.none()},q=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!T(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);I.apply(e,t[n])}return e},Y=function(t,e){return q(L(t,e))},$=function(t,e){for(var n=0,r=t.length;n<r;++n)if(!0!==e(t[n],n))return!1;return!0},G=function(t){var e=A.call(t,0);return e.reverse(),e},K=function(t,e){return F(t,function(t){return!B(e,t)})},X=function(t){return[t]},J=function(t,e){var n=A.call(t,0);return n.sort(e),n},Q=function(t){return 0===t.length?y.none():y.some(t[0])},Z=function(t){return 0===t.length?y.none():y.some(t[t.length-1])},tt=O(Array.from)?Array.from:function(t){return A.call(t)},et=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return y.none()},nt=Object.keys,rt=Object.hasOwnProperty,ot=function(t,e){for(var n=nt(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},it=function(t,e){return at(t,function(t,n){return{k:n,v:e(t,n)}})},at=function(t,e){var n={};return ot(t,function(t,r){var o=e(t,r);n[o.k]=o.v}),n},ut=function(t,e){var n=[];return ot(t,function(t,r){n.push(e(t,r))}),n},st=function(t,e){for(var n=nt(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];if(e(a,i,t))return y.some(a)}return y.none()},ct=function(t){return ut(t,function(t){return t})},lt=function(t,e){return ft(t,e)?y.from(t[e]):y.none()},ft=function(t,e){return rt.call(t,e)},dt=function(t,e){return ft(t,e)&&void 0!==t[e]&&null!==t[e]},ht=function(t){if(!T(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var n=[],r={};return H(t,function(o,i){var a=nt(o);if(1!==a.length)throw new Error("one and only one name per case");var u=a[0],s=o[u];if(void 0!==r[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!T(s))throw new Error("case arguments must be an array");n.push(u),r[u]=function(){var r=arguments.length;if(r!==s.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+s.length+" ("+s+"), got "+r);for(var o=new Array(r),a=0;a<o.length;a++)o[a]=arguments[a];return{fold:function(){if(arguments.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+arguments.length);return arguments[i].apply(null,o)},match:function(t){var e=nt(t);if(n.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+e.join(","));if(!$(n,function(t){return B(e,t)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+n.join(", "));return t[u].apply(null,o)},log:function(t){e.console.log(t,{constructors:n,constructor:u,params:o})}}}}),r},mt=Object.prototype.hasOwnProperty,pt=function(t){return function(){for(var e=new Array(arguments.length),n=0;n<e.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 a in i)mt.call(i,a)&&(r[a]=t(r[a],i[a]))}return r}},gt=pt(function(t,e){return S(t)&&S(e)?gt(t,e):e}),vt=pt(function(t,e){return e}),bt=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}};!function(t){t[t.Error=0]="Error",t[t.Value=1]="Value"}(p||(p={}));var yt=function(t,e,n){return t.stype===p.Error?e(t.serror):n(t.svalue)},xt=function(t){return{stype:p.Value,svalue:t}},wt=function(t){return{stype:p.Error,serror:t}},Ct=xt,_t=function(t){var e=[],n=[];return H(t,function(t){yt(t,function(t){return n.push(t)},function(t){return e.push(t)})}),{values:e,errors:n}},kt=wt,St=function(t,e){return t.stype===p.Value?e(t.svalue):t},Tt=function(t,e){return t.stype===p.Value?{stype:p.Value,svalue:e(t.svalue)}:t},Et=ht([{strict:[]},{defaultedThunk:["fallbackThunk"]},{asOption:[]},{asDefaultedOptionThunk:["fallbackThunk"]},{mergeWithThunk:["baseThunk"]}]),Ot=function(t){return Et.defaultedThunk(o(t))},Dt=function(t){return Et.mergeWithThunk(o(t))},Nt=Et.strict,At=Et.asOption,Mt=Et.defaultedThunk,It=(Et.asDefaultedOptionThunk,Et.mergeWithThunk),zt=function(t,e){var n;return(n={})[t]=e,n},Bt=(ht([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t,e){return function(t,e){var n={};return ot(t,function(t,r){B(e,r)||(n[r]=t)}),n}(t,e)}),Rt=function(t,e){return zt(t,e)},Pt=function(t){return function(t){var e={};return H(t,function(t){e[t.key]=t.value}),e}(t)},Lt=function(t){return r(kt,q)(t)},Ht=function(t){var e=_t(t);return e.errors.length>0?Lt(e.errors):Ct(e.values)},Ft=function(t){return S(t)&&nt(t).length>100?" removed due to size":JSON.stringify(t,null,2)},Vt=function(t,e){return kt([{path:t,getErrorInfo:e}])},jt=ht([{field:["key","okey","presence","prop"]},{state:["okey","instantiator"]}]),Ut=function(t,e,n){var r=lt(t,e).fold(function(){return n(t)},i);return Ct(r)},Wt=function(t,e,n,r){return n.fold(function(n,i,a,u){var s=function(e){var o=u.extract(t.concat([n]),r,e);return Tt(o,function(t){return zt(i,r(t))})},c=function(e){return e.fold(function(){var t=zt(i,r(y.none()));return Ct(t)},function(e){var o=u.extract(t.concat([n]),r,e);return Tt(o,function(t){return zt(i,r(y.some(t)))})})};return a.fold(function(){return St(function(t,e,n){return lt(e,n).fold(function(){return function(t,e,n){return Vt(t,function(){return'Could not find valid *strict* value for "'+e+'" in '+Ft(n)})}(t,n,e)},Ct)}(t,e,n),s)},function(t){return St(Ut(e,n,t),s)},function(){return St(Ct(lt(e,n)),c)},function(t){return St(function(t,e,n){var r=lt(t,e).map(function(e){return!0===e?n(t):e});return Ct(r)}(e,n,t),c)},function(t){var r=t(e),i=Tt(Ut(e,n,o({})),function(t){return gt(r,t)});return St(i,s)})},function(t,n){var o=n(e);return Ct(zt(t,r(o)))})},qt=function(t){return{extract:function(e,n,r){return function(t,e){return t.stype===p.Error?e(t.serror):t}(t(r,n),function(t){return function(t,e){return Vt(t,function(){return e})}(e,t)})},toString:function(){return"val"}}},Yt=function(t){var e=$t(t),n=V(t,function(t,e){return e.fold(function(e){return gt(t,Rt(e,!0))},o(t))},{});return{extract:function(t,r,o){var i=E(o)?[]:function(t){var e=nt(t);return F(e,function(e){return dt(t,e)})}(o),a=F(i,function(t){return!dt(n,t)});return 0===a.length?e.extract(t,r,o):function(t,e){return Vt(t,function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"})}(t,a)},toString:e.toString}},$t=function(t){return{extract:function(e,n,r){return function(t,e,n,r){return function(t,e){var n=_t(t);return n.errors.length>0?Lt(n.errors):function(t,e){return t.length>0?Ct(gt(e,vt.apply(void 0,t))):Ct(e)}(n.values,e)}(L(n,function(n){return Wt(t,e,n,r)}),{})}(e,r,t,n)},toString:function(){return"obj{\n"+L(t,function(t){return t.fold(function(t,e,n,r){return t+" -> "+r.toString()},function(t,e){return"state("+t+")"})}).join("\n")+"}"}}},Gt=function(t){return{extract:function(e,n,r){var o=L(r,function(r,o){return t.extract(e.concat(["["+o+"]"]),n,r)});return Ht(o)},toString:function(){return"array("+t.toString()+")"}}},Kt=o(qt(Ct)),Xt=r(Gt,$t),Jt=jt.state,Qt=jt.field,Zt=function(t,e){return{extract:function(n,r,o){return lt(o,t).fold(function(){return e=t,Vt(n,function(){return'Choice schema did not contain choice key: "'+e+'"'});var e},function(t){return function(t,e,n,r,o){return lt(r,o).fold(function(){return function(t,e,n){return Vt(t,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Ft(e)})}(t,r,o)},function(r){return r.extract(t.concat(["branch: "+o]),e,n)})}(n,r,o,e,t)})},toString:function(){return"chooseOn("+t+"). Possible values: "+nt(e)}}},te=qt(Ct),ee=function(t){return Xt(t)},ne=function(t){return qt(function(e){return t(e).fold(kt,Ct)})},re=function(t,e){return function(t,e){return{extract:function(n,r,o){var a=nt(o),u=function(e,n){return Gt(qt(t)).extract(e,i,n)}(n,a);return St(u,function(t){var i=L(t,function(t){return jt.field(t,t,Nt(),e)});return $t(i).extract(n,r,o)})},toString:function(){return"setOf("+e.toString()+")"}}}(function(e){return function(t){return t.fold(wt,xt)}(t(e))},e)},oe=function(t,e,n){return function(t){return yt(t,C.error,C.value)}(function(t,e,n,r){return function(t,e){return t.stype===p.Error?{stype:p.Error,serror:e(t.serror)}:t}(e.extract([t],n,r),function(t){return{input:r,errors:t}})}(t,e,i,n))},ie=function(t){return t.fold(function(t){throw new Error(ue(t))},i)},ae=function(t,e,n){return ie(oe(t,e,n))},ue=function(t){return"Errors: \n"+(e=t.errors,n=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:function(){return"... (only showing first ten failures)"}}]):e,L(n,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()})).join("\n")+"\n\nInput object: "+Ft(t.input);var e,n},se=function(t,e){return Zt(t,e)},ce=function(t,e){return Zt(t,it(e,$t))},le=o(te),fe=function(t,e){return qt(function(n){var r=_typeof(n);return t(n)?Ct(n):kt("Expected type: "+e+" but got: "+r)})},de=fe(D,"number"),he=fe(k,"string"),me=fe(E,"boolean"),pe=fe(O,"function"),ge=qt(function(t){return function t(e){var n=function(t,e){for(var n=t.next();!n.done;){if(!e(n.value))return!1;n=t.next()}return!0};if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every(function(n){return t(e[n])});case"Map":return n(e.keys(),t)&&n(e.values(),t);case"Set":return n(e.keys(),t);default:return!1}}(t)?Ct(t):kt("Expected value to be acceptable for sending via postMessage")}),ve=function(t){return ne(function(e){return B(t,e)?C.value(e):C.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')})},be=function(t){return Qt(t,t,Nt(),Kt())},ye=function(t,e){return Qt(t,t,Nt(),e)},xe=function(t){return ye(t,de)},we=function(t){return ye(t,he)},Ce=function(t,e){return Qt(t,t,Nt(),ve(e))},_e=function(t){return ye(t,pe)},ke=function(t,e){return Qt(t,t,Nt(),$t(e))},Se=function(t,e){return Qt(t,t,Nt(),Xt(e))},Te=function(t,e){return Qt(t,t,Nt(),Gt(e))},Ee=function(t){return Qt(t,t,At(),Kt())},Oe=function(t,e){return Qt(t,t,At(),e)},De=function(t){return Oe(t,de)},Ne=function(t){return Oe(t,he)},Ae=function(t){return Oe(t,pe)},Me=function(t,e){return Oe(t,$t(e))},Ie=function(t,e){return Qt(t,t,Ot(e),Kt())},ze=function(t,e,n){return Qt(t,t,Ot(e),n)},Be=function(t,e){return ze(t,e,de)},Re=function(t,e){return ze(t,e,he)},Pe=function(t,e,n){return ze(t,e,ve(n))},Le=function(t,e){return ze(t,e,me)},He=function(t,e){return ze(t,e,pe)},Fe=function(t,e,n){return ze(t,e,$t(n))},Ve=function(t,e){return Jt(t,e)},je=function t(e){var n=e,r=function(){return n};return{get:r,set:function(t){n=t},clone:function(){return t(r())}}},Ue=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:o(t)}},We={fromHtml:function(t,n){var r=(n||e.document).createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw e.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Ue(r.childNodes[0])},fromTag:function(t,n){var r=(n||e.document).createElement(t);return Ue(r)},fromText:function(t,n){var r=(n||e.document).createTextNode(t);return Ue(r)},fromDom:Ue,fromPoint:function(t,e,n){var r=t.dom();return y.from(r.elementFromPoint(e,n)).map(Ue)}},qe=function(t,n){return function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(t,n,e.Node.DOCUMENT_POSITION_CONTAINED_BY)},Ye=function(){return $e(0,0)},$e=function(t,e){return{major:t,minor:e}},Ge=function(t,e){var n=String(e).toLowerCase();return 0===t.length?Ye():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return $e(r(1),r(2))}(t,n)},Ke=Ye,Xe=function(t,e){return function(){return e===t}},Je=function(t){var e=t.current;return{current:e,version:t.version,isEdge:Xe("Edge",e),isChrome:Xe("Chrome",e),isIE:Xe("IE",e),isOpera:Xe("Opera",e),isFirefox:Xe("Firefox",e),isSafari:Xe("Safari",e)}},Qe=function(){return Je({current:void 0,version:Ke()})},Ze=Je,tn=(o("Edge"),o("Chrome"),o("IE"),o("Opera"),o("Firefox"),o("Safari"),function(t,e){return function(){return e===t}}),en=function(t){var e=t.current;return{current:e,version:t.version,isWindows:tn("Windows",e),isiOS:tn("iOS",e),isAndroid:tn("Android",e),isOSX:tn("OSX",e),isLinux:tn("Linux",e),isSolaris:tn("Solaris",e),isFreeBSD:tn("FreeBSD",e),isChromeOS:tn("ChromeOS",e)}},nn=function(){return en({current:void 0,version:Ke()})},rn=en,on=(o("Windows"),o("iOS"),o("Android"),o("Linux"),o("OSX"),o("Solaris"),o("FreeBSD"),o("ChromeOS"),function(t,e){var n=String(e).toLowerCase();return U(t,function(t){return t.search(n)})}),an=function(t,e){return-1!==t.indexOf(e)},un=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,sn=function(t){return function(e){return an(e,t)}},cn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return an(t,"edge/")&&an(t,"chrome")&&an(t,"safari")&&an(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,un],search:function(t){return an(t,"chrome")&&!an(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return an(t,"msie")||an(t,"trident")}},{name:"Opera",versionRegexes:[un,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:sn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:sn("firefox")},{name:"Safari",versionRegexes:[un,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(an(t,"safari")||an(t,"mobile/"))&&an(t,"applewebkit")}}],ln=[{name:"Windows",search:sn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return an(t,"iphone")||an(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:sn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:sn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:sn("linux"),versionRegexes:[]},{name:"Solaris",search:sn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:sn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:sn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fn={browsers:o(cn),oses:o(ln)},dn=je(function(t,e){var n=fn.browsers(),r=fn.oses(),i=function(t,e){return on(t,e).map(function(t){var n=Ge(t.versionRegexes,e);return{current:t.name,version:n}})}(n,t).fold(Qe,Ze),a=function(t,e){return on(t,e).map(function(t){var n=Ge(t.versionRegexes,e);return{current:t.name,version:n}})}(r,t).fold(nn,rn);return{browser:i,os:a,deviceType:function(t,e,n,r){var i=t.isiOS()&&!0===/ipad/i.test(n),a=t.isiOS()&&!i,u=t.isiOS()||t.isAndroid(),s=u||r("(pointer:coarse)"),c=i||!a&&u&&r("(min-device-width:768px)"),l=a||u&&!c,f=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!l&&!c&&!f;return{isiPad:o(i),isiPhone:o(a),isTablet:o(c),isPhone:o(l),isTouch:o(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:o(f),isDesktop:o(d)}}(a,i,t,e)}}(e.navigator.userAgent,function(t){return e.window.matchMedia(t).matches})),hn=function(){return dn.get()},mn=(e.Node.ATTRIBUTE_NODE,e.Node.CDATA_SECTION_NODE,e.Node.COMMENT_NODE,e.Node.DOCUMENT_NODE),pn=(e.Node.DOCUMENT_TYPE_NODE,e.Node.DOCUMENT_FRAGMENT_NODE,e.Node.ELEMENT_NODE),gn=e.Node.TEXT_NODE,vn=(e.Node.PROCESSING_INSTRUCTION_NODE,e.Node.ENTITY_REFERENCE_NODE,e.Node.ENTITY_NODE,e.Node.NOTATION_NODE,pn),bn=mn,yn=function(t,e){var n=t.dom();if(n.nodeType!==vn)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")},xn=function(t){return t.nodeType!==vn&&t.nodeType!==bn||0===t.childElementCount},wn=function(t,n){var r=void 0===n?e.document:n.dom();return xn(r)?[]:L(r.querySelectorAll(t),We.fromDom)},Cn=function(t,e){return t.dom()===e.dom()},_n=hn().browser.isIE()?function(t,e){return qe(t.dom(),e.dom())}:function(t,e){var n=t.dom(),r=e.dom();return n!==r&&n.contains(r)},kn=function(t,e,n){for(var r=t.dom(),i=O(n)?n:o(!1);r.parentNode;){r=r.parentNode;var a=We.fromDom(r),u=e(a);if(u.isSome())return u;if(i(a))break}return y.none()},Sn=function(t,e,n){return e(t).orThunk(function(){return n(t)?y.none():kn(t,e,n)})},Tn=function(t,e){return Cn(t.element(),e.event().target())},En=function(t){if(!dt(t,"can")&&!dt(t,"abort")&&!dt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return ae("Extracting event.handler",Yt([Ie("can",o(!0)),Ie("abort",o(!1)),Ie("run",n)]),t)},On=o("touchstart"),Dn=o("touchmove"),Nn=o("touchend"),An=o("touchcancel"),Mn=o("mousedown"),In=o("mousemove"),zn=o("mouseout"),Bn=o("mouseup"),Rn=o("mouseover"),Pn=o("focusin"),Ln=o("focusout"),Hn=o("keydown"),Fn=o("keyup"),Vn=o("input"),jn=o("change"),Un=o("click"),Wn=o("transitionend"),qn=o("selectstart"),Yn={tap:o("alloy.tap")},$n=o("alloy.focus"),Gn=o("alloy.blur.post"),Kn=o("alloy.paste.post"),Xn=o("alloy.receive"),Jn=o("alloy.execute"),Qn=o("alloy.focus.item"),Zn=Yn.tap,tr=o("alloy.longpress"),er=o("alloy.sandbox.close"),nr=o("alloy.typeahead.cancel"),rr=o("alloy.system.init"),or=o("alloy.system.touchmove"),ir=o("alloy.system.touchend"),ar=o("alloy.system.scroll"),ur=o("alloy.system.resize"),sr=o("alloy.system.attached"),cr=o("alloy.system.detached"),lr=o("alloy.system.dismissRequested"),fr=o("alloy.system.repositionRequested"),dr=o("alloy.focusmanager.shifted"),hr=o("alloy.slotcontainer.visibility"),mr=o("alloy.change.tab"),pr=o("alloy.dismiss.tab"),gr=o("alloy.highlight"),vr=o("alloy.dehighlight"),br=function(t,e){Cr(t,t.element(),e,{})},yr=function(t,e,n){Cr(t,t.element(),e,n)},xr=function(t){br(t,Jn())},wr=function(t,e,n){Cr(t,e,n,{})},Cr=function(t,e,n,r){var i=d({target:e},r);t.getSystem().triggerEvent(n,e,it(i,o))},_r=function(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event())},kr=function(t){return Pt(t)},Sr=function(t,e){return{key:t,value:En({abort:e})}},Tr=function(t){return{key:t,value:En({run:function(t,e){e.event().prevent()}})}},Er=function(t,e){return{key:t,value:En({run:e})}},Or=function(t,e,n){return{key:t,value:En({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}},Dr=function(t){return function(e){return{key:t,value:En({run:function(t,n){Tn(t,n)&&e(t,n)}})}}},Nr=function(t,e,n){return function(t,e){return Er(t,function(n,r){n.getSystem().getByUid(e).each(function(e){_r(e,e.element(),t,r)})})}(t,e.partUids[n])},Ar=function(t,e){return Er(t,function(t,n){var r=n.event(),i=t.getSystem().getByDom(r.target()).fold(function(){return Sn(r.target(),function(e){return t.getSystem().getByDom(e).toOption()},o(!1)).getOr(t)},function(t){return t});e(t,i,n)})},Mr=function(t){return Er(t,function(t,e){e.cut()})},Ir=function(t){return Er(t,function(t,e){e.stop()})},zr=function(t,e){return Dr(t)(e)},Br=Dr(sr()),Rr=Dr(cr()),Pr=Dr(rr()),Lr=function(t){return function(e){return Er(t,e)}}(Jn()),Hr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t.length!==e.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+e.length+" arguments");var r={};return H(t,function(t,n){r[t]=o(e[n])}),r}},Fr=function(t){return t.slice(0).sort()},Vr=function(t,e){if(!T(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");H(e,function(e){if(!k(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")})},jr=function(t,e){var n=t.concat(e);if(0===n.length)throw new Error("You must specify at least one required or optional field.");return Vr("required",t),Vr("optional",e),function(t){var e=Fr(n);U(e,function(t,n){return n<e.length-1&&t===e[n+1]}).each(function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+e.join(", ")+"].")})}(),function(r){var i=nt(r);$(t,function(t){return B(i,t)})||function(t,e){throw new Error("All required keys ("+Fr(t).join(", ")+") were not specified. Specified keys were: "+Fr(e).join(", ")+".")}(t,i);var a=F(i,function(t){return!B(n,t)});a.length>0&&function(t){throw new Error("Unsupported keys for object: "+Fr(a).join(", "))}();var u={};return H(t,function(t){u[t]=o(r[t])}),H(e,function(t){u[t]=o(Object.prototype.hasOwnProperty.call(r,t)?y.some(r[t]):y.none())}),u}},Ur=function(t){return We.fromDom(t.dom().ownerDocument)},Wr=function(t){return We.fromDom(t.dom().ownerDocument.documentElement)},qr=function(t){return We.fromDom(t.dom().ownerDocument.defaultView)},Yr=function(t){return y.from(t.dom().parentNode).map(We.fromDom)},$r=function(t){return y.from(t.dom().offsetParent).map(We.fromDom)},Gr=function(t){return L(t.dom().childNodes,We.fromDom)},Kr=function(t,e){var n=t.dom().childNodes;return y.from(n[e]).map(We.fromDom)},Xr=(Hr("element","offset"),function(t,e){Yr(t).each(function(n){n.dom().insertBefore(e.dom(),t.dom())})}),Jr=function(t,e){(function(t){return y.from(t.dom().nextSibling).map(We.fromDom)})(t).fold(function(){Yr(t).each(function(t){Zr(t,e)})},function(t){Xr(t,e)})},Qr=function(t,e){(function(t){return Kr(t,0)})(t).fold(function(){Zr(t,e)},function(n){t.dom().insertBefore(e.dom(),n.dom())})},Zr=function(t,e){t.dom().appendChild(e.dom())},to=function(t,e){H(e,function(e){Zr(t,e)})},eo=function(t){t.dom().textContent="",H(Gr(t),function(t){no(t)})},no=function(t){var e=t.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},ro=function(t){var e,n=Gr(t);n.length>0&&(e=t,H(n,function(t){Xr(e,t)})),no(t)},oo=function(t){return t.dom().innerHTML},io=function(t,n){var r,o,i=Ur(t).dom(),a=We.fromDom(i.createDocumentFragment()),u=(r=n,(o=(i||e.document).createElement("div")).innerHTML=r,Gr(We.fromDom(o)));to(a,u),eo(t),Zr(t,a)},ao=(void 0!==e.window?e.window:Function("return this;")(),function(t){return t.dom().nodeName.toLowerCase()}),uo=function(t){return function(e){return e.dom().nodeType===t}},so=uo(pn),co=uo(gn),lo=function(t,n,r){if(!(k(r)||E(r)||D(r)))throw e.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,r+"")},fo=function(t,e,n){lo(t.dom(),e,n)},ho=function(t,e){var n=t.dom().getAttribute(e);return null===n?void 0:n},mo=function(t,e){var n=t.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},po=function(t,e){t.dom().removeAttribute(e)},go=function(t){return function(t){var e=We.fromTag("div"),n=We.fromDom(t.dom().cloneNode(!0));return Zr(e,n),oo(e)}(function(t){return function(t,e){return We.fromDom(t.dom().cloneNode(!1))}(t)}(t))},vo=function(t){return go(t)},bo=kr([function(t,e){return{key:$n(),value:En({can:e})}}(0,function(t,n){var r=n.event().originator(),o=n.event().target();return!function(t,e,n){return Cn(e,t.element())&&!Cn(e,n)}(t,r,o)||(e.console.warn($n()+" did not get interpreted by the desired target. \nOriginator: "+vo(r)+"\nTarget: "+vo(o)+"\nCheck the "+$n()+" event handlers"),!1)})]),yo=Object.freeze({__proto__:null,events:bo}),xo=0,wo=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++xo+String(e)},Co=o("alloy-id-"),_o=o("data-alloy-id"),ko=Co(),So=_o(),To=function(t,e){var n=wo(ko+t);return Eo(e,n),n},Eo=function(t,e){Object.defineProperty(t.dom(),So,{value:e,writable:!0})},Oo=function(t){var e=so(t)?t.dom()[So]:null;return y.from(e)},Do=function(t){return wo(t)},No=i,Ao=function(t){var e=function(e){return function(){throw new Error("The component must be in a context to send: "+e+(t?"\n"+vo(t().element())+" is not in context.":""))}};return{debugInfo:o("fake"),triggerEvent:e("triggerEvent"),triggerFocus:e("triggerFocus"),triggerEscape:e("triggerEscape"),build:e("build"),addToWorld:e("addToWorld"),removeFromWorld:e("removeFromWorld"),addToGui:e("addToGui"),removeFromGui:e("removeFromGui"),getByUid:e("getByUid"),getByDom:e("getByDom"),broadcast:e("broadcast"),broadcastOn:e("broadcastOn"),broadcastEvent:e("broadcastEvent"),isConnected:o(!1)}},Mo=Ao(),Io=function(t){return L(t,function(t){return function(t,e){return function(t,e,n){return!(t.length<e.length)&&t.substr(n,n+e.length)===e}(t,"/*",t.length-"/*".length)}(t)?t.substring(0,t.length-"/*".length):t})},zo=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:Io(i)}},t},Bo=wo("alloy-premade"),Ro=function(t){return Rt(Bo,t)},Po=function(t){return 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:Io(i.slice(1))}},t}(function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,[e.getApis()].concat([e].concat(n)))},t)},Lo={init:function(){return Ho({readState:function(){return"No State required"}})}},Ho=function(t){return t},Fo=function(t,e){var n={};return ot(t,function(t,r){ot(t,function(t,o){var i=lt(n,o).getOr([]);n[o]=i.concat([e(r,t)])})}),n},Vo=function(t){return{classes:void 0!==t.classes?t.classes:[],attributes:void 0!==t.attributes?t.attributes:{},styles:void 0!==t.styles?t.styles:{}}},jo=function(t,e){return n=a.apply(void 0,[t.handler].concat(e)),r=t.purpose(),{cHandler:n,purpose:o(r)};var n,r},Uo=function(t){return t.cHandler},Wo=function(t,e){return{name:o(t),handler:o(e)}},qo=function(t,e,n){var r=e[n];return r?function(t,e,n,r){try{var o=J(n,function(n,o){var i=n[e](),a=o[e](),u=r.indexOf(i),s=r.indexOf(a);if(-1===u)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===s)throw new Error("The ordering for "+t+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(r,null,2));return u<s?-1:s<u?1:0});return C.value(o)}catch(t){return C.error([t])}}("Event: "+n,"name",t,r).map(function(t){return function(t){var e=function(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return j(t,function(t,n){return t&&function(t){return t.can}(n).apply(void 0,e)},!0)}}(t),n=function(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return j(t,function(t,n){return t||function(t){return t.abort}(n).apply(void 0,e)},!1)}}(t);return En({can:e,abort:n,run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];H(t,function(t){t.run.apply(void 0,e)})}})}(L(t,function(t){return t.handler()}))}):function(t,e){return C.error(["The event ("+n+') 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(L(e,function(t){return t.name()}),null,2)])}(0,t)},Yo=function(t,e){return function(t,e){var n,r=function(t){var e=[],n=[];return H(t,function(t){t.fold(function(t){e.push(t)},function(t){n.push(t)})}),{errors:e,values:n}}(t);return r.errors.length>0?(n=r.errors,C.error(q(n))):function(t,e){return 0===t.length?C.value(e):C.value(gt(e,vt.apply(void 0,t)))}(r.values,e)}(ut(t,function(t,n){return(1===t.length?C.value(t[0].handler()):qo(t,e,n)).map(function(r){var i=function(t){var e=function(t){return O(t)?{can:o(!0),abort:o(!1),run:t}:t}(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)}}(r),a=t.length>1?F(e[n],function(e){return R(t,function(t){return t.name()===e})}).join(" > "):t[0].name();return Rt(n,{handler:i,purpose:o(a)})})}),{})},$o=function(t){return t.events},Go=function(t,e){var n=ho(t,e);return void 0===n||""===n?[]:n.split(" ")},Ko=function(t){return void 0!==t.dom().classList},Xo=function(t,e){Ko(t)?t.dom().classList.add(e):function(t,e){(function(t,e,n){var r=Go(t,e).concat([n]);fo(t,e,r.join(" "))})(t,"class",e)}(t,e)},Jo=function(t,e){Ko(t)?t.dom().classList.remove(e):function(t,e){(function(t,e,n){var r=F(Go(t,e),function(t){return t!==n});r.length>0?fo(t,e,r.join(" ")):po(t,e)})(t,"class",e)}(t,e),function(t){0===(Ko(t)?t.dom().classList:function(t){return Go(t,"class")}(t)).length&&po(t,"class")}(t)},Qo=function(t,e){return Ko(t)&&t.dom().classList.contains(e)},Zo=function(t,e){H(e,function(e){Xo(t,e)})},ti=function(t,e){H(e,function(e){Jo(t,e)})},ei=function(t){return void 0!==t.style&&O(t.style.getPropertyValue)},ni=function(t){var e=co(t)?t.dom().parentNode:t.dom();return null!=e&&e.ownerDocument.body.contains(e)},ri=bt(function(){return oi(We.fromDom(e.document))}),oi=function(t){var e=t.dom().body;if(null==e)throw new Error("Body is not available yet");return We.fromDom(e)},ii=function(t,n,r){if(!k(r))throw e.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",t),new Error("CSS value must be a string: "+r);ei(t)&&t.style.setProperty(n,r)},ai=function(t,e){ei(t)&&t.style.removeProperty(e)},ui=function(t,e,n){var r=t.dom();ii(r,e,n)},si=function(t,e){var n=t.dom();ot(e,function(t,e){ii(n,e,t)})},ci=function(t,e){var n=t.dom();ot(e,function(t,e){t.fold(function(){ai(n,e)},function(t){ii(n,e,t)})})},li=function(t,n){var r=t.dom(),o=e.window.getComputedStyle(r).getPropertyValue(n),i=""!==o||ni(t)?o:fi(r,n);return null===i?void 0:i},fi=function(t,e){return ei(t)?t.style.getPropertyValue(e):""},di=function(t,e){var n=t.dom(),r=fi(n,e);return y.from(r).filter(function(t){return t.length>0})},hi=function(t){var e={},n=t.dom();if(ei(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},mi=function(t,e,n){var r=We.fromTag(t);return ui(r,e,n),di(r,e).isSome()},pi=function(t,e){var n=t.dom();ai(n,e),mo(t,"style")&&""===ho(t,"style").replace(/^\s+|\s+$/g,"")&&po(t,"style")},gi=function(t){return t.dom().offsetWidth},vi=function(t){return t.dom().value},bi=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom().value=e},yi=function(t){return function(t,e){return function(t,e){var n=L(e,function(t){return Me(t.name(),[be("config"),Ie("state",Lo)])}),r=oe("component.behaviours",$t(n),t.behaviours).fold(function(e){throw new Error(ue(e)+"\nComplete spec:\n"+JSON.stringify(t,null,2))},function(t){return t});return{list:e,data:it(r,function(t){var e=t.map(function(t){return{config:t.config,state:t.state.init(t.config)}});return function(){return e}})}}(t,e)}(t,function(t){var e=lt(t,"behaviours").getOr({}),n=F(nt(e),function(t){return void 0!==e[t]});return L(n,function(t){return e[t].me})}(t))},xi=function(t,e,n){var r={"alloy.base.behaviour":$o(t)};return function(t,e,n,r){var o=function(t,e,n){var r=d(d({},n),function(t,e){var n={};return H(t,function(t){n[t.name()]=t.handlers(e)}),n}(e,t));return Fo(r,Wo)}(t,n,r);return Yo(o,e)}(n,t.eventOrder,e,r).getOrDie()},wi=function(t){var e=function(){return f},n=je(Mo),r=ie(function(t){return oe("custom.definition",$t([Qt("dom","dom",Nt(),$t([be("tag"),Ie("styles",{}),Ie("classes",[]),Ie("attributes",{}),Ee("value"),Ee("innerHtml")])),be("components"),be("uid"),Ie("events",{}),Ie("apis",{}),Qt("eventOrder","eventOrder",Dt({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"]}),le()),Ee("domModification")]),t)}(t)),i=yi(t),a=i.list,u=i.data,s=function(t){var e=We.fromTag(t.tag);!function(t,e){var n=t.dom();ot(e,function(t,e){lo(n,e,t)})}(e,t.attributes),Zo(e,t.classes),si(e,t.styles),t.innerHtml.each(function(t){return io(e,t)});var n=t.domChildren;return to(e,n),t.value.each(function(t){bi(e,t)}),t.uid,Eo(e,t.uid),e}(function(t,e,n){var r,o,i,a=d(d({},(r=t).dom),{uid:r.uid,domChildren:L(r.components,function(t){return t.element()})}),u=function(t){return t.domModification.fold(function(){return Vo({})},Vo)}(t),s={"alloy.base.modification":u};return i=e.length>0?function(t,e,n,r){var o=d({},e);H(n,function(e){o[e.name()]=e.exhibit(t,r)});var i=Fo(o,function(t,e){return{name:t,modification:e}}),a=function(t){return V(t,function(t,e){return d(d({},e.modification),t)},{})},u=V(i.classes,function(t,e){return e.modification.concat(t)},[]),s=a(i.attributes),c=a(i.styles);return Vo({classes:u,attributes:s,styles:c})}(n,s,e,a):u,d(d({},o=a),{attributes:d(d({},o.attributes),i.attributes),styles:d(d({},o.styles),i.styles),classes:o.classes.concat(i.classes)})}(r,a,u)),c=xi(r,a,u),l=je(r.components),f={getSystem:n.get,config:function(e){var n=u;return(O(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(t){return O(u[t.name()])},spec:o(t),readState:function(t){return u[t]().map(function(t){return t.state.readState()}).getOr("not enabled")},getApis:function(){return r.apis},connect:function(t){n.set(t)},disconnect:function(){n.set(Ao(e))},element:o(s),syncComponents:function(){var t=Gr(s),e=Y(t,function(t){return n.get().getByDom(t).fold(function(){return[]},function(t){return[t]})});l.set(e)},components:l.get,events:o(c)};return f},Ci=function(t){var e=No(t),n=e.events,r=h(e,["events"]),o=function(t){var e=lt(r,"components").getOr([]);return L(e,Ti)}(),i=d(d({},r),{events:d(d({},yo),n),components:o});return C.value(wi(i))},_i=function(t){var e=We.fromText(t);return ki({element:e})},ki=function(t){var e=ae("external.component",Yt([be("element"),Ee("uid")]),t),r=je(Ao());e.uid.each(function(t){Eo(e.element,t)});var i={getSystem:r.get,config:y.none,hasConfigured:o(!1),connect:function(t){r.set(t)},disconnect:function(){r.set(Ao(function(){return i}))},getApis:function(){return{}},element:o(e.element),spec:o(t),readState:o("No state"),syncComponents:n,components:o([]),events:o({})};return Ro(i)},Si=Do,Ti=function(t){return function(t){return lt(t,Bo)}(t).fold(function(){var e=t.hasOwnProperty("uid")?t:d({uid:Si("")},t);return Ci(e).getOrDie()},function(t){return t})},Ei=Ro;function Oi(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=li(n,t);return parseFloat(o)||0}return r},r=function(t,e){return j(e,function(e,n){var r=li(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o},0)};return{set:function(e,n){if(!D(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom();ei(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}}var Di=Oi("height",function(t){var e=t.dom();return ni(t)?e.getBoundingClientRect().height:e.offsetHeight}),Ni=function(t){return Di.get(t)},Ai=function(t){return Di.getOuter(t)},Mi=function t(e,n){return{left:o(e),top:o(n),translate:function(r,o){return t(e+r,n+o)}}},Ii=function(t,e){return void 0!==t?t:void 0!==e?e:0},zi=function(t){var e=t.dom().ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom())return Mi(n.offsetLeft,n.offsetTop);var i=Ii(r.pageYOffset,o.scrollTop),a=Ii(r.pageXOffset,o.scrollLeft),u=Ii(o.clientTop,n.clientTop),s=Ii(o.clientLeft,n.clientLeft);return Bi(t).translate(a-s,i-u)},Bi=function(t){var e=t.dom(),n=e.ownerDocument.body;return n===e?Mi(n.offsetLeft,n.offsetTop):ni(t)?function(t){var e=t.getBoundingClientRect();return Mi(e.left,e.top)}(e):Mi(0,0)},Ri=Oi("width",function(t){return t.dom().offsetWidth}),Pi=function(t){return Ri.get(t)},Li=function(t){return Ri.getOuter(t)},Hi=function(t){var e=We.fromDom(t.target),n=function(){t.stopPropagation()},i=function(){t.preventDefault()},a=r(i,n);return function(t,e,n,r,i,a,u){return{target:o(t),x:o(e),y:o(n),stop:r,prevent:i,kill:a,raw:o(u)}}(e,t.clientX,t.clientY,n,i,a,t)},Fi=function(t,e,n,r,o){var i=function(t,e){return function(n){t(n)&&e(Hi(n))}}(n,r);return t.dom().addEventListener(e,i,o),{unbind:a(Vi,t,e,i,o)}},Vi=function(t,e,n,r){t.dom().removeEventListener(e,n,r)},ji=(hn().browser.isSafari(),function(t){var n=void 0!==t?t.dom():e.document,r=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return Mi(r,o)}),Ui=function(t,n,r){(void 0!==r?r.dom():e.document).defaultView.scrollTo(t,n)},Wi=function(t,e,n,r){return{x:o(t),y:o(e),width:o(n),height:o(r),right:o(t+n),bottom:o(e+r)}},qi=function(t){var n=void 0===t?e.window:t,r=n.document,o=ji(We.fromDom(r));return function(t){var n=void 0===t?e.window:t;return y.from(n.visualViewport)}(n).fold(function(){var t=n.document.documentElement,e=t.clientWidth,r=t.clientHeight;return Wi(o.left(),o.top(),e,r)},function(t){return Wi(Math.max(t.pageLeft,o.left()),Math.max(t.pageTop,o.top()),t.width,t.height)})},Yi=Object.freeze({__proto__:null,view:function(t){return(t.dom()===e.document?y.none():y.from(t.dom().defaultView.frameElement)).map(We.fromDom)},owner:function(t){return Ur(t)}}),$i=function(t){var n=We.fromDom(e.document),r=ji(n);return function(t,e){var n=e.owner(t),r=function t(e,n){return e.view(n).fold(o([]),function(n){var r=e.owner(n),o=t(e,r);return[n].concat(o)})}(e,n);return y.some(r)}(t,Yi).fold(a(zi,t),function(e){var n=Bi(t),o=V(e,function(t,e){var n=Bi(e);return{left:t.left+n.left(),top:t.top+n.top()}},{left:0,top:0});return Mi(o.left+n.left()+r.left(),o.top+n.top()+r.top())})},Gi=Hr("point","width","height"),Ki=Hr("x","y","width","height"),Xi=function(t,e,n,r){return{x:o(t),y:o(e),width:o(n),height:o(r),right:o(t+n),bottom:o(e+r)}},Ji=function(t){var e=zi(t),n=Li(t),r=Ai(t);return Xi(e.left(),e.top(),n,r)},Qi=function(t){var e=$i(t),n=Li(t),r=Ai(t);return Xi(e.left(),e.top(),n,r)},Zi=function(){return qi(e.window)};function ta(t,e,n,r,o){return t(n,r)?y.some(n):O(o)&&o(n)?y.none():e(n,r,o)}var ea,na=function(t,e,n){for(var r=t.dom(),i=O(n)?n:o(!1);r.parentNode;){r=r.parentNode;var a=We.fromDom(r);if(e(a))return y.some(a);if(i(a))break}return y.none()},ra=function(t,e,n){return ta(function(t,e){return e(t)},na,t,e,n)},oa=function(t,e,n){return ra(t,e,n).isSome()},ia=function(t,e,n){return na(t,function(t){return yn(t,e)},n)},aa=function(t,n){return function(t,n){var r=void 0===n?e.document:n.dom();return xn(r)?y.none():y.from(r.querySelector(t)).map(We.fromDom)}(n,t)},ua=function(t,e,n){return ta(yn,ia,t,e,n)},sa=function(){var t=wo("aria-owns");return{id:o(t),link:function(e){fo(e,"aria-owns",t)},unlink:function(t){po(t,"aria-owns")}}},ca=function(t,e){return ra(e,function(t){if(!so(t))return!1;var e=ho(t,"id");return void 0!==e&&e.indexOf("aria-owns")>-1}).bind(function(t){var e=ho(t,"id"),n=Ur(t);return aa(n,'[aria-owns="'+e+'"]')}).exists(function(e){return la(t,e)})},la=function(t,e){return oa(e,function(e){return Cn(e,t.element())},o(!1))||ca(t,e)};!function(t){t[t.STOP=0]="STOP",t[t.NORMAL=1]="NORMAL",t[t.LOGGING=2]="LOGGING"}(ea||(ea={}));var fa,da=je({}),ha=function(t,n,r){switch(lt(da.get(),t).orThunk(function(){var e=nt(da.get());return et(e,function(e){return t.indexOf(e)>-1?y.some(da.get()[e]):y.none()})}).getOr(ea.NORMAL)){case ea.NORMAL:return r(ga());case ea.LOGGING:var o=function(t,n){var r=[],o=(new Date).getTime();return{logEventCut:function(t,e,n){r.push({outcome:"cut",target:e,purpose:n})},logEventStopped:function(t,e,n){r.push({outcome:"stopped",target:e,purpose:n})},logNoParent:function(t,e,n){r.push({outcome:"no-parent",target:e,purpose:n})},logEventNoHandlers:function(t,e){r.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,n){r.push({outcome:"response",purpose:n,target:e})},write:function(){var i=(new Date).getTime();B(["mousemove","mouseover","mouseout",rr()],t)||e.console.log(t,{event:t,time:i-o,target:n.dom(),sequence:L(r,function(t){return B(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+vo(t.target)+")":t.outcome})})}}}(t,n),i=r(o);return o.write(),i;case ea.STOP:return!0}},ma=["alloy/data/Fields","alloy/debugging/Debugging"],pa=function(t,e,n){return ha(t,e,n)},ga=o({logEventCut:n,logEventStopped:n,logNoParent:n,logEventNoHandlers:n,logEventResponse:n,write:n}),va=o([be("menu"),be("selectedMenu")]),ba=o([be("item"),be("selectedItem")]),ya=(o($t(ba().concat(va()))),o($t(ba()))),xa=ke("initSize",[be("numColumns"),be("numRows")]),wa=function(){return ke("markers",[be("backgroundMenu")].concat(va()).concat(ba()))},Ca=function(t){return ke("markers",L(t,be))},_a=function(t,e,n){return function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");U(e,function(t){return t.indexOf("alloy")>0&&!R(ma,function(e){return t.indexOf(e)>-1})}).getOr("unknown")}}(),Qt(e,e,n,ne(function(t){return C.value(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)})}))},ka=function(t){return _a(0,t,Ot(n))},Sa=function(t){return _a(0,t,Ot(y.none))},Ta=function(t){return _a(0,t,Nt())},Ea=function(t){return _a(0,t,Nt())},Oa=function(t,e){return Ve(t,o(e))},Da=function(t){return Ve(t,i)},Na=o(xa),Aa=Hr("x","y","bubble","direction","label"),Ma=ht([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Ia=Ma.southeast,za=Ma.southwest,Ba=Ma.northeast,Ra=Ma.northwest,Pa=Ma.south,La=Ma.north,Ha=Ma.east,Fa=Ma.west,Va=function(t){return t.x()},ja=function(t,e){return t.x()+t.width()/2-e.width()/2},Ua=function(t,e){return t.x()+t.width()-e.width()},Wa=function(t,e){return t.y()-e.height()},qa=function(t){return t.y()+t.height()},Ya=function(t,e){return t.y()+t.height()/2-e.height()/2},$a=function(t,e,n){return Aa(Va(t),qa(t),n.southeast(),Ia(),"layout-se")},Ga=function(t,e,n){return Aa(Ua(t,e),qa(t),n.southwest(),za(),"layout-sw")},Ka=function(t,e,n){return Aa(Va(t),Wa(t,e),n.northeast(),Ba(),"layout-ne")},Xa=function(t,e,n){return Aa(Ua(t,e),Wa(t,e),n.northwest(),Ra(),"layout-nw")},Ja=function(t,e,n){return Aa(ja(t,e),Wa(t,e),n.north(),La(),"layout-n")},Qa=function(t,e,n){return Aa(ja(t,e),qa(t),n.south(),Pa(),"layout-s")},Za=function(t,e,n){return Aa(function(t){return t.x()+t.width()}(t),Ya(t,e),n.east(),Ha(),"layout-e")},tu=function(t,e,n){return Aa(function(t,e){return t.x()-e.width()}(t,e),Ya(t,e),n.west(),Fa(),"layout-w")},eu=function(){return[$a,Ga,Ka,Xa,Qa,Ja,Za,tu]},nu=function(){return[Ga,$a,Xa,Ka,Qa,Ja,Za,tu]},ru=function(){return[Ka,Xa,$a,Ga,Ja,Qa]},ou=function(){return[$a,Ga,Ka,Xa,Qa,Ja]},iu=function(){return[Ga,$a,Xa,Ka,Qa,Ja]},au=function(t,e,n){return Pr(function(r,o){n(r,t,e)})},uu=function(t,e,n){return function(t,e,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:Io(a.slice(0,1).concat(a.slice(3)))}},t}(function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var u=[r].concat(i);return r.config({name:o(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))})},n,e)},su=function(t){return{key:t,value:void 0}},cu=function(t,e,n,r,o,i,u){var s=function(t){return dt(t,n)?t[n]():y.none()},c=it(o,function(t,e){return uu(n,t,e)}),l=it(i,function(t,e){return zo(t,e)}),f=d(d(d({},l),c),{revoke:a(su,n),config:function(e){var r=ae(n+"-config",t,e);return{key:n,value:{config:r,me:f,configAsRaw:bt(function(){return ae(n+"-config",t,e)}),initialConfig:e,state:u}}},schema:function(){return e},exhibit:function(t,e){return s(t).bind(function(t){return lt(r,"exhibit").map(function(n){return n(e,t.config,t.state)})}).getOr(Vo({}))},name:function(){return n},handlers:function(t){return s(t).map(function(t){return lt(r,"events").getOr(function(){return{}})(t.config,t.state)}).getOr({})}});return f},lu=function(t){return Pt(t)},fu=Yt([be("fields"),be("name"),Ie("active",{}),Ie("apis",{}),Ie("state",Lo),Ie("extra",{})]),du=function(t){var e=ae("Creating behaviour: "+t.name,fu,t);return function(t,e,n,r,o,i){var a,u=Yt(t),s=Me(e,[("config",a=t,Oe("config",Yt(a)))]);return cu(u,s,e,n,r,o,i)}(e.fields,e.name,e.active,e.apis,e.extra,e.state)},hu=Yt([be("branchKey"),be("branches"),be("name"),Ie("active",{}),Ie("apis",{}),Ie("state",Lo),Ie("extra",{})]),mu=function(t){var e=ae("Creating behaviour: "+t.name,hu,t);return function(t,e,n,r,o,i){var a=t,u=Me(e,[Oe("config",t)]);return cu(a,u,e,n,r,o,i)}(ce(e.branchKey,e.branches),e.name,e.active,e.apis,e.extra,e.state)},pu=o(void 0),gu=Object.freeze({__proto__:null,events:function(t){return kr([Er(Xn(),function(e,n){var r=t.channels,o=nt(r),i=n,a=function(t,e){return e.universal()?t:F(t,function(t){return B(e.channels(),t)})}(o,i);H(a,function(t){var n=r[t],o=n.schema,a=ae("channel["+t+"] data\nReceiver: "+vo(e.element()),o,i.data());n.onReceive(e,a)})})])}}),vu=[ye("channels",re(C.value,Yt([Ta("onReceive"),Ie("schema",le())])))],bu=du({fields:vu,name:"receiving",active:gu}),yu=Object.freeze({__proto__:null,exhibit:function(t,e){return Vo({classes:[],styles:e.useFixed()?{}:{position:"relative"}})}}),xu=function(t){t.dom().focus()},wu=function(t){var n=void 0!==t?t.dom():e.document;return y.from(n.activeElement).map(We.fromDom)},Cu=function(t){return wu(Ur(t)).filter(function(e){return t.dom().contains(e.dom())})},_u=function(t,e){var r=Ur(e),o=wu(r).bind(function(t){var n,r,o=function(e){return Cn(t,e)};return o(e)?y.some(e):(n=o,(r=function(t){for(var e=0;e<t.childNodes.length;e++){var o=We.fromDom(t.childNodes[e]);if(n(o))return y.some(o);var i=r(t.childNodes[e]);if(i.isSome())return i}return y.none()})(e.dom()))}),i=t(e);return o.each(function(t){wu(r).filter(function(e){return Cn(e,t)}).fold(function(){xu(t)},n)}),i},ku=Hr("position","left","top","right","bottom"),Su=function(t,e){var n=function(t){return t+"px"};ci(t,{position:y.some(e.position()),left:e.left().map(n),top:e.top().map(n),right:e.right().map(n),bottom:e.bottom().map(n)})},Tu=ht([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Eu=function(t,e,n,r,o,i){var a=e.x()-n,u=e.y()-r,s=o-(a+e.width()),c=i-(u+e.height()),l=y.some(a),f=y.some(u),d=y.some(s),h=y.some(c),m=y.none();return function(t,e,n,r,o,i,a,u,s){return t.fold(e,n,r,o,i,a,u,s)}(e.direction(),function(){return ku(t,l,f,m,m)},function(){return ku(t,m,f,d,m)},function(){return ku(t,l,m,m,h)},function(){return ku(t,m,m,d,h)},function(){return ku(t,l,f,m,m)},function(){return ku(t,l,m,m,h)},function(){return ku(t,l,f,m,m)},function(){return ku(t,m,f,d,m)})},Ou=function(t,e){var n=a($i,e),r=t.fold(n,n,function(){var t=ji();return $i(e).translate(-t.left(),-t.top())}),o=Li(e),i=Ai(e);return Xi(r.left(),r.top(),o,i)},Du=function(t,e){return e.fold(function(){return t.fold(Zi,Zi,Xi)},function(e){return t.fold(e,e,function(){var n=e(),r=Nu(t,n.x(),n.y());return Xi(r.left(),r.top(),n.width(),n.height())})})},Nu=function(t,e,n){var r=Mi(e,n);return t.fold(o(r),o(r),function(){var t=ji();return r.translate(-t.left(),-t.top())})},Au=(Tu.none,Tu.relative),Mu=Tu.fixed,Iu=Hr("anchorBox","origin"),zu=function(t,e,n,r){var o=t+e;return o>r?n:o<n?r:o},Bu=function(t,e,n){return Math.min(Math.max(t,e),n)},Ru=jr(["x","y","width","height","maxHeight","maxWidth","direction","classes","label","candidateYforTest"],[]),Pu=ht([{fit:["reposition"]},{nofit:["reposition","deltaW","deltaH"]}]),Lu=function(t,e,n,r){var i=t.x(),a=t.y(),u=t.bubble().offset().left(),s=t.bubble().offset().top(),c=r.y(),l=r.bottom(),f=r.x(),d=r.right(),h=a+s,m=function(t,e,n,r,o){var i=o.x(),a=o.y(),u=o.width(),s=o.height(),c=t>=i,l=e>=a,f=c&&l,d=t+n<=i+u&&e+r<=a+s,h=Math.abs(Math.min(n,c?i+u-t:i-(t+n))),m=Math.abs(Math.min(r,l?a+s-e:a-(e+r)));return{originInBounds:f,sizeInBounds:d,limitX:Bu(t,o.x(),o.right()),limitY:Bu(e,o.y(),o.bottom()),deltaW:h,deltaH:m}}(i+u,h,e,n,r),p=m.originInBounds,g=m.sizeInBounds,v=m.limitX,b=m.limitY,y=m.deltaW,x=m.deltaH,w=o(b+x-c),C=o(l-b),_=function(t,e,n,r){return t.fold(e,e,r,r,e,r,n,n)}(t.direction(),C,C,w),k=o(v+y-f),S=o(d-v),T=function(t,e,n,r){return t.fold(e,r,e,r,n,n,e,r)}(t.direction(),S,S,k),E=Ru({x:v,y:b,width:y,height:x,maxHeight:_,maxWidth:T,direction:t.direction(),classes:{on:t.bubble().classesOn(),off:t.bubble().classesOff()},label:t.label(),candidateYforTest:h});return p&&g?Pu.fit(E):Pu.nofit(E,y,x)},Hu=function(t,e,n,r){pi(e,"max-height"),pi(e,"max-width");var u,s={width:o(Li(u=e)),height:o(Ai(u))};return function(t,e,n,r,o){var u=n.width(),s=n.height(),c=function(t,i,a,c){var l=t(e,n,r);return Lu(l,u,s,o).fold(Pu.fit,function(t,e,n){return n>c||e>a?Pu.nofit(t,e,n):Pu.nofit(i,a,c)})};return j(t,function(t,e){var n=a(c,e);return t.fold(Pu.fit,n)},Pu.nofit(Ru({x:e.x(),y:e.y(),width:n.width(),height:n.height(),maxHeight:n.height(),maxWidth:n.width(),direction:Ia(),classes:{on:[],off:[]},label:"none",candidateYforTest:e.y()}),-1,-1)).fold(i,i)}(r.preference(),t,s,n,r.bounds())},Fu=function(t,e){!function(t,e){var n=Di.max(t,e,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);ui(t,"max-height",n+"px")}(t,Math.floor(e))},Vu=o(function(t,e){Fu(t,e),si(t,{"overflow-x":"hidden","overflow-y":"auto"})}),ju=o(function(t,e){Fu(t,e)}),Uu=jr(["bounds","origin","preference","maxHeightFunction","maxWidthFunction"],[]),Wu=function(t,e,n){return void 0===t[e]?n:t[e]},qu=function(t,e,n,r){var o=Hu(t,e,n,r);(function(t,e,n){Su(t,function(t,e){return t.fold(function(){return ku("absolute",y.some(e.x()),y.some(e.y()),y.none(),y.none())},function(t,n,r,o){return Eu("absolute",e,t,n,r,o)},function(t,n,r,o){return Eu("fixed",e,t,n,r,o)})}(n.origin(),e))})(e,o,r),function(t,e){var n=o.classes();ti(t,n.off),Zo(t,n.on)}(e),function(t,e,n){r.maxHeightFunction()(t,e.maxHeight())}(e,o),function(t,e,n){r.maxWidthFunction()(t,e.maxWidth())}(e,o)},Yu=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right"],$u=function(t,e,n){var r=function(t){return lt(n,t).getOr([])},o=function(t,e,n){var o=K(Yu,n);return{offset:function(){return Mi(t,e)},classesOn:function(){return Y(n,r)},classesOff:function(){return Y(o,r)}}};return{southeast:function(){return o(-t,e,["top","alignLeft"])},southwest:function(){return o(t,e,["top","alignRight"])},south:function(){return o(-t/2,e,["top","alignCentre"])},northeast:function(){return o(-t,-e,["bottom","alignLeft"])},northwest:function(){return o(t,-e,["bottom","alignRight"])},north:function(){return o(-t/2,-e,["bottom","alignCentre"])},east:function(){return o(t,-e/2,["valignCentre","left"])},west:function(){return o(-t,-e/2,["valignCentre","right"])},innerNorthwest:function(){return o(-t,e,["top","alignRight"])},innerNortheast:function(){return o(t,e,["top","alignLeft"])},innerNorth:function(){return o(-t/2,e,["top","alignCentre"])},innerSouthwest:function(){return o(-t,-e,["bottom","alignRight"])},innerSoutheast:function(){return o(t,-e,["bottom","alignLeft"])},innerSouth:function(){return o(-t/2,-e,["bottom","alignCentre"])},innerWest:function(){return o(t,-e/2,["valignCentre","right"])},innerEast:function(){return o(-t,-e/2,["valignCentre","left"])}}},Gu=function(){return $u(0,0,{})},Ku=function(t){return t},Xu=function(t,e){return function(n){return"rtl"===Ju(n)?e:t}},Ju=function(t){return"rtl"===li(t,"direction")?"rtl":"ltr"};!function(t){t.TopToBottom="toptobottom",t.BottomToTop="bottomtotop"}(fa||(fa={}));var Qu="data-alloy-vertical-dir",Zu=function(t){return oa(t,function(t){return so(t)&&ho(t,Qu)===fa.BottomToTop})},ts=function(){return Me("layouts",[be("onLtr"),be("onRtl"),Ee("onBottomLtr"),Ee("onBottomRtl")])},es=function(t,e,n,r,o,i,a){var u=a.map(Zu).getOr(!1),s=e.layouts.map(function(e){return e.onLtr(t)}),c=e.layouts.map(function(e){return e.onRtl(t)}),l=u?e.layouts.bind(function(e){return e.onBottomLtr.map(function(e){return e(t)})}).or(s).getOr(o):s.getOr(n),f=u?e.layouts.bind(function(e){return e.onBottomRtl.map(function(e){return e(t)})}).or(c).getOr(i):c.getOr(r);return Xu(l,f)(t)},ns=[be("hotspot"),Ee("bubble"),Ie("overrides",{}),ts(),Oa("placement",function(t,e,n){var r=e.hotspot,o=Ou(n,r.element()),i=es(t.element(),e,ou(),iu(),ru(),[Xa,Ka,Ga,$a,Ja,Qa],y.some(e.hotspot.element()));return y.some(Ku({anchorBox:o,bubble:e.bubble.getOr(Gu()),overrides:e.overrides,layouts:i,placer:y.none()}))})],rs=[be("x"),be("y"),Ie("height",0),Ie("width",0),Ie("bubble",Gu()),Ie("overrides",{}),ts(),Oa("placement",function(t,e,n){var r=Nu(n,e.x,e.y),o=Xi(r.left(),r.top(),e.width,e.height),i=es(t.element(),e,eu(),nu(),eu(),nu(),y.none());return y.some(Ku({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:y.none()}))})],os={create:Hr("start","soffset","finish","foffset")},is=ht([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),as=(is.before,is.on,is.after,function(t){return t.fold(i,i,i)}),us=ht([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ss={domRange:us.domRange,relative:us.relative,exact:us.exact,exactFromRange:function(t){return us.exact(t.start(),t.soffset(),t.finish(),t.foffset())},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return We.fromDom(t.startContainer)},relative:function(t,e){return as(t)},exact:function(t,e,n,r){return t}})}(t);return qr(e)},range:os.create},cs=function(t,e,n){var r,o=t.document.createRange();return r=o,e.fold(function(t){r.setStartBefore(t.dom())},function(t,e){r.setStart(t.dom(),e)},function(t){r.setStartAfter(t.dom())}),function(t,e){n.fold(function(e){t.setEndBefore(e.dom())},function(e,n){t.setEnd(e.dom(),n)},function(e){t.setEndAfter(e.dom())})}(o),o},ls=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom(),n),i.setEnd(r.dom(),o),i},fs=function(t){return{left:o(t.left),top:o(t.top),right:o(t.right),bottom:o(t.bottom),width:o(t.width),height:o(t.height)}},ds=ht([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),hs=function(t,e,n){return e(We.fromDom(n.startContainer),n.startOffset,We.fromDom(n.endContainer),n.endOffset)};ds.ltr,ds.rtl;var ms,ps=function(t,e){var n=function(e){return t(e)?y.from(e.dom().nodeValue):y.none()};return{get:function(e){if(!t(e))throw new Error("Can only get text value of a text node");return n(e).getOr("")},getOption:n,set:function(e,n){if(!t(e))throw new Error("Can only set raw text value of a text node");e.dom().nodeValue=n}}}(co),gs=function(t){return ps.getOption(t)},vs=["img","br"],bs=function(t){return gs(t).filter(function(t){return 0!==t.trim().length||t.indexOf(" ")>-1}).isSome()||B(vs,ao(t))},ys=function(t,e){return wn(e,t)},xs=function(t){var e=We.fromDom(t.anchorNode),n=We.fromDom(t.focusNode);return function(t,e,n,r){var o=function(t,e,n,r){var o=Ur(t).dom().createRange();return o.setStart(t.dom(),e),o.setEnd(n.dom(),r),o}(t,e,n,r),i=Cn(t,n)&&e===r;return o.collapsed&&!i}(e,t.anchorOffset,n,t.focusOffset)?y.some(os.create(e,t.anchorOffset,n,t.focusOffset)):function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return y.some(os.create(We.fromDom(e.startContainer),e.startOffset,We.fromDom(n.endContainer),n.endOffset))}return y.none()}(t)},ws=function(t,e){return function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?y.some(n).map(fs):y.none()}(function(t,e){return function(t,e){return function(t,e){var n=e.ltr();return n.collapsed?e.rtl().filter(function(t){return!1===t.collapsed}).map(function(t){return ds.rtl(We.fromDom(t.endContainer),t.endOffset,We.fromDom(t.startContainer),t.startOffset)}).getOrThunk(function(){return hs(0,ds.ltr,n)}):hs(0,ds.ltr,n)}(0,function(t,e){return e.match({domRange:function(t){return{ltr:o(t),rtl:y.none}},relative:function(e,n){return{ltr:bt(function(){return cs(t,e,n)}),rtl:bt(function(){return y.some(cs(t,n,e))})}},exact:function(e,n,r,o){return{ltr:bt(function(){return ls(t,e,n,r,o)}),rtl:bt(function(){return y.some(ls(t,r,o,e,n))})}}})}(t,e))}(t,e).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}})}(t,e))},Cs=Hr("element","offset"),_s=ht([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),ks=function(t){return t.fold(i,function(t,e,n){return t.translate(-e,-n)})},Ss=function(t){return t.fold(i,i)},Ts=function(t){return j(t,function(t,e){return t.translate(e.left(),e.top())},Mi(0,0))},Es=function(t){var e=L(t,Ss);return Ts(e)},Os=_s.screen,Ds=_s.absolute,Ns=function(t,e,n){var r=Ur(t.element()),o=ji(r),i=function(t,e,n){var r=qr(n.root).dom();return y.from(r.frameElement).map(We.fromDom).filter(function(e){var n=Ur(e),r=Ur(t.element());return Cn(n,r)}).map(zi)}(t,0,n).getOr(o);return Ds(i,o.left(),o.top())},As=function(t,e,n,r){var o=t,i=e,a=n,u=r;t<0&&(o=0,a=n+t),e<0&&(i=0,u=r+e);var s=Os(Mi(o,i));return y.some(Gi(s,a,u))},Ms=function(t,e,n,r,o){return t.map(function(t){var i,a,u,s=[e,t.point()],c=(i=function(){return Es(s)},a=function(){return Es(s)},u=function(){return t=L(s,ks),Ts(t);var t},r.fold(i,a,u)),l=Ki(c.left(),c.top(),t.width(),t.height()),f=n.showAbove?ru():ou(),d=(n.showAbove,iu()),h=es(o,n,f,d,f,d,y.none());return Ku({anchorBox:l,bubble:n.bubble.getOr(Gu()),overrides:n.overrides,layouts:h,placer:y.none()})})},Is=Hr("element","offset"),zs=function(t,e){return co(t)?Is(t,e):function(t,e){var n=Gr(t);if(0===n.length)return Cs(t,e);if(e<n.length)return Cs(n[e],0);var r=n[n.length-1],o=co(r)?function(t){return ps.get(t)}(r).length:Gr(r).length;return Cs(r,o)}(t,e)},Bs=function(t,e){return e.getSelection.getOrThunk(function(){return function(){return function(t){return y.from(t.getSelection()).filter(function(t){return t.rangeCount>0}).bind(xs)}(t)}})().map(function(t){var e=zs(t.start(),t.soffset()),n=zs(t.finish(),t.foffset());return ss.range(e.element(),e.offset(),n.element(),n.offset())})},Rs=[Ee("getSelection"),be("root"),Ee("bubble"),ts(),Ie("overrides",{}),Ie("showAbove",!1),Oa("placement",function(t,e,n){var r=qr(e.root).dom(),o=Ns(t,0,e),i=Bs(r,e).bind(function(t){return ws(r,ss.exactFromRange(t)).orThunk(function(){var e=We.fromText("\ufeff");return Xr(t.start(),e),ws(r,ss.exact(e,0,e,1)).map(function(t){return no(e),t})}).bind(function(t){return As(t.left(),t.top(),t.width(),t.height())})}),a=Bs(r,e).bind(function(t){return so(t.start())?y.some(t.start()):Yr(t.start())}).getOr(t.element());return Ms(i,o,e,n,a)})],Ps=[be("node"),be("root"),Ee("bubble"),ts(),Ie("overrides",{}),Ie("showAbove",!1),Oa("placement",function(t,e,n){var r=Ns(t,0,e);return e.node.bind(function(o){var i=o.dom().getBoundingClientRect(),a=As(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element());return Ms(a,r,e,n,u)})})],Ls=function(t){return t.x()+t.width()},Hs=function(t,e){return t.x()-e.width()},Fs=function(t,e){return t.y()-e.height()+t.height()},Vs=function(t){return t.y()},js=function(t,e,n){return Aa(Ls(t),Vs(t),n.southeast(),Ia(),"link-layout-se")},Us=function(t,e,n){return Aa(Hs(t,e),Vs(t),n.southwest(),za(),"link-layout-sw")},Ws=function(t,e,n){return Aa(Ls(t),Fs(t,e),n.northeast(),Ba(),"link-layout-ne")},qs=function(t,e,n){return Aa(Hs(t,e),Fs(t,e),n.northwest(),Ra(),"link-layout-nw")},Ys=function(){return[js,Us,Ws,qs]},$s=function(){return[Us,js,qs,Ws]},Gs=[be("item"),ts(),Ie("overrides",{}),Oa("placement",function(t,e,n){var r=Ou(n,e.item.element()),o=es(t.element(),e,Ys(),$s(),Ys(),$s(),y.none());return y.some(Ku({anchorBox:r,bubble:Gu(),overrides:e.overrides,layouts:o,placer:y.none()}))})],Ks=ce("anchor",{selection:Rs,node:Ps,hotspot:ns,submenu:Gs,makeshift:rs}),Xs=function(t,e,r,o,i){!function(t,e,r,o,i,a){var u=Wu(a,"maxHeightFunction",Vu()),s=Wu(a,"maxWidthFunction",n),c=t.anchorBox(),l=t.origin(),f=Uu({bounds:Du(l,i),origin:l,preference:o,maxHeightFunction:u,maxWidthFunction:s});qu(c,e,r,f)}(function(t,e){return Iu(t,e)}(r.anchorBox,e),i.element(),r.bubble,r.layouts,o,r.overrides)},Js=function(t,e,n,r,o,i){var a=i.map(Ji);return Qs(t,e,n,r,o,a)},Qs=function(t,n,r,i,a,u){var s=ae("positioning anchor.info",Ks,i);_u(function(){ui(a.element(),"position","fixed");var r=di(a.element(),"visibility");ui(a.element(),"visibility","hidden");var i,c=n.useFixed()?(i=e.document.documentElement,Mu(0,0,i.clientWidth,i.clientHeight)):function(t){var e=zi(t.element()),n=t.element().dom().getBoundingClientRect();return Au(e.left(),e.top(),n.width,n.height)}(t),l=s.placement,f=u.map(o).or(n.getBounds);l(t,s,c).each(function(e){e.placer.getOr(Xs)(t,c,e,f,a)}),r.fold(function(){pi(a.element(),"visibility")},function(t){ui(a.element(),"visibility",t)}),di(a.element(),"left").isNone()&&di(a.element(),"top").isNone()&&di(a.element(),"right").isNone()&&di(a.element(),"bottom").isNone()&&di(a.element(),"position").is("fixed")&&pi(a.element(),"position")},a.element())},Zs=Object.freeze({__proto__:null,position:function(t,e,n,r,o){Js(t,e,n,r,o,y.none())},positionWithin:Js,positionWithinBounds:Qs,getMode:function(t,e,n){return e.useFixed()?"fixed":"absolute"}}),tc=[Ie("useFixed",c),Ee("getBounds")],ec=du({fields:tc,name:"positioning",active:yu,apis:Zs}),nc=function t(e){br(e,cr());var n=e.components();H(n,t)},rc=function t(e){var n=e.components();H(n,t),br(e,sr())},oc=function(t,e){Zr(t.element(),e.element())},ic=function(t,e){var n=t.components();!function(t){H(t.components(),function(t){return no(t.element())}),eo(t.element()),t.syncComponents()}(t);var r=K(n,e);H(r,function(e){nc(e),t.getSystem().removeFromWorld(e)}),H(e,function(e){e.getSystem().isConnected()?oc(t,e):(t.getSystem().addToWorld(e),oc(t,e),ni(t.element())&&rc(e)),t.syncComponents()})},ac=function(t,e){uc(t,e,Zr)},uc=function(t,e,n){t.getSystem().addToWorld(e),n(t.element(),e.element()),ni(t.element())&&rc(e),t.syncComponents()},sc=function(t){nc(t),no(t.element()),t.getSystem().removeFromWorld(t)},cc=function(t){var e=Yr(t.element()).bind(function(e){return t.getSystem().getByDom(e).toOption()});sc(t),e.each(function(t){t.syncComponents()})},lc=function(t){var e=t.components();H(e,sc),eo(t.element()),t.syncComponents()},fc=function(t,e){dc(t,e,Zr)},dc=function(t,e,n){n(t,e.element());var r=Gr(e.element());H(r,function(t){e.getByDom(t).each(rc)})},hc=function(t){var e=Gr(t.element());H(e,function(e){t.getByDom(e).each(nc)}),no(t.element())},mc=function(t,e,n,r){n.get().each(function(e){lc(t)});var o=e.getAttachPoint(t);ac(o,t);var i=t.getSystem().build(r);return ac(t,i),n.set(i),i},pc=function(t,e,n,r){var o=mc(t,e,n,r);return e.onOpen(t,o),o},gc=function(t,e,n){n.get().each(function(r){lc(t),cc(t),e.onClose(t,r),n.clear()})},vc=function(t,e,n){return n.isOpen()},bc=function(t,e,n){var r=e.getAttachPoint(t);ui(t.element(),"position",ec.getMode(r)),function(t,e,n,r){di(t.element(),e).fold(function(){po(t.element(),n)},function(e){fo(t.element(),n,e)}),ui(t.element(),e,"hidden")}(t,"visibility",e.cloakVisibilityAttr)},yc=function(t,e,n){(function(t){return R(["top","left","right","bottom"],function(e){return di(t,e).isSome()})})(t.element())||pi(t.element(),"position"),function(t,e,n){if(mo(t.element(),n)){var r=ho(t.element(),n);ui(t.element(),e,r)}else pi(t.element(),e)}(t,"visibility",e.cloakVisibilityAttr)},xc=Object.freeze({__proto__:null,cloak:bc,decloak:yc,open:pc,openWhileCloaked:function(t,e,n,r,o){bc(t,e),pc(t,e,n,r),o(),yc(t,e)},close:gc,isOpen:vc,isPartOf:function(t,e,n,r){return vc(0,0,n)&&n.get().exists(function(n){return e.isPartOf(t,n,r)})},getState:function(t,e,n){return n.get()},setContent:function(t,e,n,r){return n.get().map(function(){return mc(t,e,n,r)})}}),wc=Object.freeze({__proto__:null,events:function(t,e){return kr([Er(er(),function(n,r){gc(n,t,e)})])}}),Cc=[ka("onOpen"),ka("onClose"),be("isPartOf"),be("getAttachPoint"),Ie("cloakVisibilityAttr","data-precloak-visibility")],_c=du({fields:Cc,name:"sandboxing",active:wc,apis:xc,state:Object.freeze({__proto__:null,init:function(){var t=je(y.none()),e=o("not-implemented");return Ho({readState:e,isOpen:function(){return t.get().isSome()},clear:function(){t.set(y.none())},set:function(e){t.set(y.some(e))},get:function(){return t.get()}})}})}),kc=o("dismiss.popups"),Sc=o("reposition.popups"),Tc=o("mouse.released"),Ec=Yt([Ie("isExtraPart",o(!1)),Me("fireEventInstead",[Ie("event",lr())])]),Oc=function(t){var e,n=ae("Dismissal",Ec,t);return(e={})[kc()]={schema:Yt([be("target")]),onReceive:function(t,e){_c.isOpen(t)&&(_c.isPartOf(t,e.target)||n.isExtraPart(t,e.target)||n.fireEventInstead.fold(function(){return _c.close(t)},function(e){return br(t,e.event)}))}},e},Dc=Yt([Ie("isExtraPart",o(!1)),Me("fireEventInstead",[Ie("event",fr())]),_e("doReposition")]),Nc=function(t){var e,n=ae("Reposition",Dc,t);return(e={})[Sc()]={onReceive:function(t){_c.isOpen(t)&&n.fireEventInstead.fold(function(){return n.doReposition(t)},function(e){return br(t,e.event)})}},e},Ac=function(t,e,n){e.store.manager.onLoad(t,e,n)},Mc=function(t,e,n){e.store.manager.onUnload(t,e,n)},Ic=Object.freeze({__proto__:null,onLoad:Ac,onUnload:Mc,setValue:function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},getValue:function(t,e,n){return e.store.manager.getValue(t,e,n)},getState:function(t,e,n){return n}}),zc=Object.freeze({__proto__:null,events:function(t,e){var n=t.resetOnDom?[Br(function(n,r){Ac(n,t,e)}),Rr(function(n,r){Mc(n,t,e)})]:[au(t,e,Ac)];return kr(n)}}),Bc=function(){var t=je(null);return Ho({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},Rc=function(){var t=je({}),e=je({});return Ho({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},lookup:function(n){return lt(t.get(),n).orThunk(function(){return lt(e.get(),n)})},update:function(n){var r=t.get(),o=e.get(),i={},a={};H(n,function(t){i[t.value]=t,lt(t,"meta").each(function(e){lt(e,"text").each(function(e){a[e]=t})})}),t.set(d(d({},r),i)),e.set(d(d({},o),a))},clear:function(){t.set({}),e.set({})}})},Pc=Object.freeze({__proto__:null,memory:Bc,dataset:Rc,manual:function(){return Ho({readState:function(){}})},init:function(t){return t.store.manager.state(t)}}),Lc=function(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)},Hc=[Ee("initialValue"),be("getFallbackEntry"),be("getDataKey"),be("setValue"),Oa("manager",{setValue:Lc,getValue:function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).fold(function(){return r.getFallbackEntry(o)},function(t){return t})},onLoad:function(t,e,n){e.store.initialValue.each(function(r){Lc(t,e,n,r)})},onUnload:function(t,e,n){n.clear()},state:Rc})],Fc=[be("getValue"),Ie("setValue",n),Ee("initialValue"),Oa("manager",{setValue:function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},getValue:function(t,e,n){return e.store.getValue(t)},onLoad:function(t,e,n){e.store.initialValue.each(function(n){e.store.setValue(t,n)})},onUnload:n,state:Lo.init})],Vc=[Ee("initialValue"),Oa("manager",{setValue:function(t,e,n,r){n.set(r),e.onSetValue(t,r)},getValue:function(t,e,n){return n.get()},onLoad:function(t,e,n){e.store.initialValue.each(function(t){n.isNotSet()&&n.set(t)})},onUnload:function(t,e,n){n.clear()},state:Bc})],jc=[ze("store",{mode:"memory"},ce("mode",{memory:Vc,manual:Fc,dataset:Hc})),ka("onSetValue"),Ie("resetOnDom",!1)],Uc=du({fields:jc,name:"representing",active:zc,apis:Ic,extra:{setValueFrom:function(t,e){var n=Uc.getValue(e);Uc.setValue(t,n)}},state:Pc}),Wc=function(t,e){return Fe(t,{},L(e,function(e){return n=e.name(),r="Cannot configure "+e.name()+" for "+t,Qt(n,n,At(),qt(function(t){return kt("The field: "+n+" is forbidden. "+r)}));var n,r}).concat([Ve("dump",i)]))},qc=function(t){return t.dump},Yc=function(t,e){return d(d({},t.dump),lu(e))},$c=Wc,Gc=Yc,Kc=ht([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Xc=function(t){return ft(t,"uiType")},Jc=function t(e,n,r,a){return function(t,e,n,r){return Xc(n)&&"placeholder"===n.uiType?function(t,e,n,r){return t.exists(function(t){return t!==n.owner})?Kc.single(!0,o(n)):lt(r,n.name).fold(function(){throw new Error("Unknown placeholder component: "+n.name+"\nKnown: ["+nt(r)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(n,null,2))},function(t){return t.replace()})}(t,0,n,r):Kc.single(!1,o(n))}(e,0,r,a).fold(function(o,i){var u=Xc(r)?i(n,r.config,r.validated):i(n),s=lt(u,"components").getOr([]),c=Y(s,function(r){return t(e,n,r,a)});return[d(d({},u),{components:c})]},function(t,e){if(Xc(r)){var o=e(n,r.config,r.validated);return r.validated.preprocess.getOr(i)(o)}return e(n)})},Qc=Kc.single,Zc=Kc.multiple,tl=o("placeholder"),el=ht([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),nl=Ie("factory",{sketch:i}),rl=Ie("schema",[]),ol=be("name"),il=Qt("pname","pname",Mt(function(t){return"<alloy."+wo(t.name)+">"}),le()),al=Ve("schema",function(){return[Ee("preprocess")]}),ul=Ie("defaults",o({})),sl=Ie("overrides",o({})),cl=$t([nl,rl,ol,il,ul,sl]),ll=$t([nl,rl,ol,ul,sl]),fl=$t([nl,rl,ol,il,ul,sl]),dl=$t([nl,al,ol,be("unit"),il,ul,sl]),hl=function(t){return t.fold(y.some,y.none,y.some,y.some)},ml=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},pl=function(t,e){return function(n){var r=ae("Converting part type",e,n);return t(r)}},gl=pl(el.required,cl),vl=pl(el.external,ll),bl=pl(el.optional,fl),yl=pl(el.group,dl),xl=o("entirety"),wl=Object.freeze({__proto__:null,required:gl,external:vl,optional:bl,group:yl,asNamedPart:hl,name:ml,asCommon:function(t){return t.fold(i,i,i,i)},original:xl}),Cl=function(t,e,n,r){return gt(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},_l=function(t,e){var n={};return H(e,function(e){hl(e).each(function(e){var r=kl(t,e.pname);n[e.name]=function(n){var o=ae("Part: "+e.name+" in "+t,$t(e.schema),n);return d(d({},r),{config:n,validated:o})}})}),n},kl=function(t,e){return{uiType:tl(),owner:t,name:e}},Sl=function(t,e,n){return{uiType:tl(),owner:t,name:e,config:n,validated:{}}},Tl=function(t){return Y(t,function(t){return t.fold(y.none,y.some,y.none,y.none).map(function(t){return ke(t.name,t.schema.concat([Da(xl())]))}).toArray()})},El=function(t){return L(t,ml)},Ol=function(t,e,n){return function(t,e,n){var r={},i={};return H(n,function(t){t.fold(function(t){r[t.pname]=Qc(!0,function(e,n,r){return t.factory.sketch(Cl(e,t,n,r))})},function(t){var n=e.parts[t.name];i[t.name]=o(t.factory.sketch(Cl(e,t,n[xl()]),n))},function(t){r[t.pname]=Qc(!1,function(e,n,r){return t.factory.sketch(Cl(e,t,n,r))})},function(t){r[t.pname]=Zc(!0,function(e,n,r){var o=e[t.name];return L(o,function(n){return t.factory.sketch(gt(t.defaults(e,n,r),n,t.overrides(e,n)))})})})}),{internals:o(r),externals:o(i)}}(0,e,n)},Dl=function(t,e,n){return function(t,e,n,r){var i=it(r,function(t,e){return r=t,i=!1,{name:o(n=e),required:function(){return r.fold(function(t,e){return t},function(t,e){return t})},used:function(){return i},replace:function(){if(i)throw new Error("Trying to use the same placeholder more than once: "+n);return i=!0,r}};var n,r,i}),a=function(t,e,n,r){return Y(n,function(n){return Jc(t,e,n,r)})}(t,e,n,i);return ot(i,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))}),a}(y.some(t),e,e.components,n)},Nl=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOption()},Al=function(t,e,n){return Nl(t,e,n).getOrDie("Could not find part: "+n)},Ml=function(t,e,n){var r={},i=e.partUids,a=t.getSystem();return H(n,function(t){r[t]=o(a.getByUid(i[t]))}),r},Il=function(t,e){var n=t.getSystem();return it(e.partUids,function(t,e){return o(n.getByUid(t))})},zl=function(t){return nt(t.partUids)},Bl=function(t,e,n){var r={},i=e.partUids,a=t.getSystem();return H(n,function(t){r[t]=o(a.getByUid(i[t]).getOrDie())}),r},Rl=function(t,e){var n=El(e);return Pt(L(n,function(e){return{key:e,value:t+"-"+e}}))},Pl=function(t){return Qt("partUids","partUids",It(function(e){return Rl(e.uid,t)}),le())},Ll=Object.freeze({__proto__:null,generate:_l,generateOne:Sl,schemas:Tl,names:El,substitutes:Ol,components:Dl,defaultUids:Rl,defaultUidsSchema:Pl,getAllParts:Il,getAllPartNames:zl,getPart:Nl,getPartOrDie:Al,getParts:Ml,getPartsOrDie:Bl}),Hl=function(t,e,n,r,o){var i=function(t,e){return(t.length>0?[ke("parts",t)]:[]).concat([be("uid"),Ie("dom",{}),Ie("components",[]),Da("originalSpec"),Ie("debug.sketcher",{})]).concat(e)}(r,o);return ae(t+" [SpecSchema]",Yt(i.concat(e)),n)},Fl=function(t,e,n,r,o){var i=Vl(o),a=Tl(n),u=Pl(n),s=Hl(t,e,i,a,[u]),c=Ol(0,s,n);return r(s,Dl(t,s,c.internals()),i,c.externals())},Vl=function(t){return function(t){return ft(t,"uid")}(t)?t:d(d({},t),{uid:Do("uid")})},jl=Yt([be("name"),be("factory"),be("configFields"),Ie("apis",{}),Ie("extraApis",{})]),Ul=Yt([be("name"),be("factory"),be("configFields"),be("partFields"),Ie("apis",{}),Ie("extraApis",{})]),Wl=function(t){var e=ae("Sketcher for "+t.name,jl,t),n=it(e.apis,Po),r=it(e.extraApis,function(t,e){return zo(t,e)});return d(d({name:o(e.name),configFields:o(e.configFields),sketch:function(t){return function(t,e,n,r){var o=Vl(r);return n(Hl(t,e,o,[],[]),o)}(e.name,e.configFields,e.factory,t)}},n),r)},ql=function(t){var e=ae("Sketcher for "+t.name,Ul,t),n=_l(e.name,e.partFields),r=it(e.apis,Po),i=it(e.extraApis,function(t,e){return zo(t,e)});return d(d({name:o(e.name),partFields:o(e.partFields),configFields:o(e.configFields),sketch:function(t){return Fl(e.name,e.configFields,e.partFields,e.factory,t)},parts:o(n)},r),i)},Yl=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},$l=function(t){return"input"===ao(t)&&"radio"!==ho(t,"type")||"textarea"===ao(t)},Gl=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),Kl=[be("find")],Xl=du({fields:Kl,name:"composing",apis:Gl}),Jl=function(t,e,n,r){var o=ys(t.element(),"."+e.highlightClass);H(o,function(n){R(r,function(t){return t.element()===n})||(Jo(n,e.highlightClass),t.getSystem().getByDom(n).each(function(n){e.onDehighlight(t,n),br(n,vr())}))})},Ql=function(t,e,n,r){Jl(t,e,0,[r]),Zl(t,e,n,r)||(Xo(r.element(),e.highlightClass),e.onHighlight(t,r),br(r,gr()))},Zl=function(t,e,n,r){return Qo(r.element(),e.highlightClass)},tf=function(t,e,n){return aa(t.element(),"."+e.itemClass).bind(function(e){return t.getSystem().getByDom(e).toOption()})},ef=function(t,e,n){var r=ys(t.element(),"."+e.itemClass);return(r.length>0?y.some(r[r.length-1]):y.none()).bind(function(e){return t.getSystem().getByDom(e).toOption()})},nf=function(t,e,n,r){var o=ys(t.element(),"."+e.itemClass);return W(o,function(t){return Qo(t,e.highlightClass)}).bind(function(e){var n=zu(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOption()})},rf=function(t,e,n){var r=ys(t.element(),"."+e.itemClass);return Yl(L(r,function(e){return t.getSystem().getByDom(e).toOption()}))},of=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return Jl(t,e,0,[])},dehighlight:function(t,e,n,r){Zl(t,e,n,r)&&(Jo(r.element(),e.highlightClass),e.onDehighlight(t,r),br(r,vr()))},highlight:Ql,highlightFirst:function(t,e,n){tf(t,e).each(function(r){Ql(t,e,n,r)})},highlightLast:function(t,e,n){ef(t,e).each(function(r){Ql(t,e,n,r)})},highlightAt:function(t,e,n,r){(function(t,e,n,r){var o=ys(t.element(),"."+e.itemClass);return y.from(o[r]).fold(function(){return C.error("No element found with index "+r)},t.getSystem().getByDom)})(t,e,0,r).fold(function(t){throw new Error(t)},function(r){Ql(t,e,n,r)})},highlightBy:function(t,e,n,r){var o=rf(t,e);U(o,r).each(function(r){Ql(t,e,n,r)})},isHighlighted:Zl,getHighlighted:function(t,e,n){return aa(t.element(),"."+e.highlightClass).bind(function(e){return t.getSystem().getByDom(e).toOption()})},getFirst:tf,getLast:ef,getPrevious:function(t,e,n){return nf(t,e,0,-1)},getNext:function(t,e,n){return nf(t,e,0,1)},getCandidates:rf}),af=[be("highlightClass"),be("itemClass"),ka("onHighlight"),ka("onDehighlight")],uf=du({fields:af,name:"highlighting",apis:of}),sf=function(t,e,n){var r=G(t.slice(0,e)),o=G(t.slice(e+1));return U(r.concat(o),n)},cf=function(t,e,n){var r=G(t.slice(0,e));return U(r,n)},lf=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return U(o.concat(r),n)},ff=function(t,e,n){var r=t.slice(e+1);return U(r,n)},df=function(t){return function(e){var n=e.raw();return B(t,n.which)}},hf=function(t){return function(e){return $(t,function(t){return t(e)})}},mf=function(t){return!0===t.raw().shiftKey},pf=function(t){return!0===t.raw().ctrlKey},gf=u(mf),vf=function(t,e){return{matches:t,classification:e}},bf=function(t,e,n){e.exists(function(t){return n.exists(function(e){return Cn(e,t)})})||yr(t,dr(),{prevFocus:e,newFocus:n})},yf=function(){var t=function(t){return Cu(t.element())};return{get:t,set:function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element());var o=t(e);bf(e,r,o)}}},xf=function(){var t=function(t){return uf.getHighlighted(t).map(function(t){return t.element()})};return{get:t,set:function(e,r){var o=t(e);e.getSystem().getByDom(r).fold(n,function(t){uf.highlight(e,t)});var i=t(e);bf(e,o,i)}}};!function(t){t.OnFocusMode="onFocus",t.OnEnterOrSpaceMode="onEnterOrSpace",t.OnApiMode="onApi"}(ms||(ms={}));var wf,Cf=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i,a;return(i=n(t,e,r,o),a=e.event(),U(i,function(t){return t.matches(a)}).map(function(t){return t.classification})).bind(function(n){return n(t,e,r,o)})},a={schema:function(){return t.concat([Ie("focusManager",yf()),ze("focusInside","onFocus",ne(function(t){return B(["onFocus","onEnterOrSpace","onApi"],t)?C.value(t):C.error("Invalid value for focusInside")})),Oa("handler",a),Oa("state",e),Oa("sendFocusIn",o)])},processKey:i,toEvents:function(t,e){var a=t.focusInside!==ms.OnFocusMode?y.none():o(t).map(function(n){return Er($n(),function(r,o){n(r,t,e),o.stop()})});return kr(a.toArray().concat([Er(Hn(),function(r,a){i(r,a,n,t,e).fold(function(){!function(n,r){var i=df([32].concat([13]))(r.event());t.focusInside===ms.OnEnterOrSpaceMode&&i&&Tn(n,r)&&o(t).each(function(o){o(n,t,e),r.stop()})}(r,a)},function(t){a.stop()})}),Er(Fn(),function(n,o){i(n,o,r,t,e).each(function(t){o.stop()})})]))}};return a},_f=function(t){var e=[Ee("onEscape"),Ee("onEnter"),Ie("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ie("firstTabstop",0),Ie("useTabstopAt",o(!0)),Ee("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind(function(t){return ua(e,t)}).getOr(e);return Ni(n)>0},r=function(t,e,r){(function(t,e){var r=ys(t.element(),e.selector),o=F(r,function(t){return n(e,t)});return y.from(o[e.firstTabstop])})(t,e).each(function(n){e.focusManager.set(t,n)})},i=function(t,e,r,o,i){return i(e,r,function(t){return function(t,e){return n(t,e)&&t.useTabstopAt(e)}(o,t)}).fold(function(){return o.cyclic?y.some(!0):y.none()},function(e){return o.focusManager.set(t,e),y.some(!0)})},u=function(t,e,n,r){var o=ys(t.element(),n.selector);return function(t,e){return e.focusManager.get(t).bind(function(t){return ua(t,e.selector)})}(t,n).bind(function(e){return W(o,a(Cn,e)).bind(function(e){return i(t,o,e,n,r)})})},s=o([vf(hf([mf,df([9])]),function(t,e,n){var r=n.cyclic?sf:cf;return u(t,0,n,r)}),vf(df([9]),function(t,e,n){var r=n.cyclic?lf:ff;return u(t,0,n,r)}),vf(df([27]),function(t,e,n){return n.onEscape.bind(function(n){return n(t,e)})}),vf(hf([gf,df([13])]),function(t,e,n){return n.onEnter.bind(function(n){return n(t,e)})})]),c=o([]);return Cf(e,Lo.init,s,c,function(){return y.some(r)})},kf=_f(Ve("cyclic",o(!1))),Sf=_f(Ve("cyclic",o(!0))),Tf=function(t,e,n){return $l(n)&&df([32])(e.event())?y.none():function(t,e,n){return wr(t,n,Jn()),y.some(!0)}(t,0,n)},Ef=function(t,e){return y.some(!0)},Of=[Ie("execute",Tf),Ie("useSpace",!1),Ie("useEnter",!0),Ie("useControlEnter",!1),Ie("useDown",!1)],Df=function(t,e,n){return n.execute(t,e,t.element())},Nf=Cf(Of,Lo.init,function(t,e,n,r){var o=n.useSpace&&!$l(t.element())?[32]:[],i=n.useEnter?[13]:[],a=n.useDown?[40]:[],u=o.concat(i).concat(a);return[vf(df(u),Df)].concat(n.useControlEnter?[vf(hf([pf,df([13])]),Df)]:[])},function(t,e,n,r){return n.useSpace&&!$l(t.element())?[vf(df([32]),Ef)]:[]},function(){return y.none()}),Af=function(){var t=je(y.none());return Ho({readState:function(){return t.get().map(function(t){return{numRows:String(t.numRows()),numColumns:String(t.numColumns())}}).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(e,n){t.set(y.some({numRows:o(e),numColumns:o(n)}))},getNumRows:function(){return t.get().map(function(t){return t.numRows()})},getNumColumns:function(){return t.get().map(function(t){return t.numColumns()})}})},Mf=Object.freeze({__proto__:null,flatgrid:Af,init:function(t){return t.state(t)}}),If=function(t){return function(e,n,r,o){var i=t(e.element());return Pf(i,e,n,r,o)}},zf=function(t,e){var n=Xu(t,e);return If(n)},Bf=function(t,e){var n=Xu(e,t);return If(n)},Rf=function(t){return function(e,n,r,o){return Pf(t,e,n,r,o)}},Pf=function(t,e,n,r,o){return r.focusManager.get(e).bind(function(n){return t(e.element(),n,r,o)}).map(function(t){return r.focusManager.set(e,t),!0})},Lf=Rf,Hf=Rf,Ff=Rf,Vf=function(t){return!function(t){return t.offsetWidth<=0&&t.offsetHeight<=0}(t.dom())},jf=function(t,e,n){var r=ys(t,n);return function(t,e){return W(t,e).map(function(e){return{index:o(e),candidates:o(t)}})}(F(r,Vf),function(t){return Cn(t,e)})},Uf=function(t,e){return W(t,function(t){return Cn(e,t)})},Wf=function(t,e,n,r){return r(Math.floor(e/n),e%n).bind(function(e){var r=e.row()*n+e.column();return r>=0&&r<t.length?y.some(t[r]):y.none()})},qf=function(t,e,n,r,i){return Wf(t,e,r,function(e,a){var u=e===n-1?t.length-e*r:r,s=zu(a,i,0,u-1);return y.some({row:o(e),column:o(s)})})},Yf=function(t,e,n,r,i){return Wf(t,e,r,function(e,a){var u=zu(e,i,0,n-1),s=u===n-1?t.length-u*r:r,c=Bu(a,0,s-1);return y.some({row:o(u),column:o(c)})})},$f=[be("selector"),Ie("execute",Tf),Sa("onEscape"),Ie("captureTab",!1),Na()],Gf=function(t,e,n){aa(t.element(),e.selector).each(function(n){e.focusManager.set(t,n)})},Kf=function(t){return function(e,n,r,o){return jf(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))})}},Xf=function(t,e,n){return n.captureTab?y.some(!0):y.none()},Jf=Kf(function(t,e,n,r){return qf(t,e,n,r,-1)}),Qf=Kf(function(t,e,n,r){return qf(t,e,n,r,1)}),Zf=Kf(function(t,e,n,r){return Yf(t,e,n,r,-1)}),td=Kf(function(t,e,n,r){return Yf(t,e,n,r,1)}),ed=o([vf(df([37]),zf(Jf,Qf)),vf(df([39]),Bf(Jf,Qf)),vf(df([38]),Lf(Zf)),vf(df([40]),Hf(td)),vf(hf([mf,df([9])]),Xf),vf(hf([gf,df([9])]),Xf),vf(df([27]),function(t,e,n){return n.onEscape(t,e)}),vf(df([32].concat([13])),function(t,e,n,r){return function(t,e){return e.focusManager.get(t).bind(function(t){return ua(t,e.selector)})}(t,n).bind(function(r){return n.execute(t,e,r)})})]),nd=o([vf(df([32]),Ef)]),rd=Cf($f,Af,ed,nd,function(){return y.some(Gf)}),od=function(t,e,n,r){return jf(t,n,e).bind(function(t){var e=t.index();return function t(e,n,o){var i,a=zu(n,r,0,o.length-1);return a===e?y.none():(i=o[a],"button"===ao(i)&&"disabled"===ho(i,"disabled")?t(e,a,o):y.from(o[a]))}(e,e,t.candidates())})},id=[be("selector"),Ie("getInitial",y.none),Ie("execute",Tf),Sa("onEscape"),Ie("executeOnMove",!1),Ie("allowVertical",!0)],ad=function(t,e,n){return function(t,e){return e.focusManager.get(t).bind(function(t){return ua(t,e.selector)})}(t,n).bind(function(r){return n.execute(t,e,r)})},ud=function(t,e,n){e.getInitial(t).orThunk(function(){return aa(t.element(),e.selector)}).each(function(n){e.focusManager.set(t,n)})},sd=function(t,e,n){return od(t,n.selector,e,-1)},cd=function(t,e,n){return od(t,n.selector,e,1)},ld=function(t){return function(e,n,r,o){return t(e,n,r,o).bind(function(){return r.executeOnMove?ad(e,n,r):y.some(!0)})}},fd=function(t,e,n){return n.onEscape(t,e)},dd=o([vf(df([32]),Ef)]),hd=Cf(id,Lo.init,function(t,e,n,r){var o=[37].concat(n.allowVertical?[38]:[]),i=[39].concat(n.allowVertical?[40]:[]);return[vf(df(o),ld(zf(sd,cd))),vf(df(i),ld(Bf(sd,cd))),vf(df([13]),ad),vf(df([32]),ad),vf(df([27]),fd)]},dd,function(){return y.some(ud)}),md=jr(["rowIndex","columnIndex","cell"],[]),pd=function(t,e,n){return y.from(t[e]).bind(function(t){return y.from(t[n]).map(function(t){return md({rowIndex:e,columnIndex:n,cell:t})})})},gd=function(t,e,n,r){var o=t[e].length,i=zu(n,r,0,o-1);return pd(t,e,i)},vd=function(t,e,n,r){var o=zu(n,r,0,t.length-1),i=t[o].length,a=Bu(e,0,i-1);return pd(t,o,a)},bd=function(t,e,n,r){var o=t[e].length,i=Bu(n+r,0,o-1);return pd(t,e,i)},yd=function(t,e,n,r){var o=Bu(n+r,0,t.length-1),i=t[o].length,a=Bu(e,0,i-1);return pd(t,o,a)},xd=[ke("selectors",[be("row"),be("cell")]),Ie("cycles",!0),Ie("previousSelector",y.none),Ie("execute",Tf)],wd=function(t,e,n){e.previousSelector(t).orThunk(function(){var n=e.selectors;return aa(t.element(),n.cell)}).each(function(n){e.focusManager.set(t,n)})},Cd=function(t,e){return function(n,r,o){var i=o.cycles?t:e;return ua(r,o.selectors.row).bind(function(t){var e=ys(t,o.selectors.cell);return Uf(e,r).bind(function(e){var r=ys(n,o.selectors.row);return Uf(r,t).bind(function(t){var n=function(t,e){return L(r,function(t){return ys(t,e.selectors.cell)})}(0,o);return i(n,t,e).map(function(t){return t.cell()})})})})}},_d=Cd(function(t,e,n){return gd(t,e,n,-1)},function(t,e,n){return bd(t,e,n,-1)}),kd=Cd(function(t,e,n){return gd(t,e,n,1)},function(t,e,n){return bd(t,e,n,1)}),Sd=Cd(function(t,e,n){return vd(t,n,e,-1)},function(t,e,n){return yd(t,n,e,-1)}),Td=Cd(function(t,e,n){return vd(t,n,e,1)},function(t,e,n){return yd(t,n,e,1)}),Ed=o([vf(df([37]),zf(_d,kd)),vf(df([39]),Bf(_d,kd)),vf(df([38]),Lf(Sd)),vf(df([40]),Hf(Td)),vf(df([32].concat([13])),function(t,e,n){return Cu(t.element()).bind(function(r){return n.execute(t,e,r)})})]),Od=o([vf(df([32]),Ef)]),Dd=Cf(xd,Lo.init,Ed,Od,function(){return y.some(wd)}),Nd=[be("selector"),Ie("execute",Tf),Ie("moveOnTab",!1)],Ad=function(t,e,n){return n.focusManager.get(t).bind(function(r){return n.execute(t,e,r)})},Md=function(t,e,n){aa(t.element(),e.selector).each(function(n){e.focusManager.set(t,n)})},Id=function(t,e,n){return od(t,n.selector,e,-1)},zd=function(t,e,n){return od(t,n.selector,e,1)},Bd=o([vf(df([38]),Ff(Id)),vf(df([40]),Ff(zd)),vf(hf([mf,df([9])]),function(t,e,n,r){return n.moveOnTab?Ff(Id)(t,e,n,r):y.none()}),vf(hf([gf,df([9])]),function(t,e,n,r){return n.moveOnTab?Ff(zd)(t,e,n,r):y.none()}),vf(df([13]),Ad),vf(df([32]),Ad)]),Rd=o([vf(df([32]),Ef)]),Pd=Cf(Nd,Lo.init,Bd,Rd,function(){return y.some(Md)}),Ld=[Sa("onSpace"),Sa("onEnter"),Sa("onShiftEnter"),Sa("onLeft"),Sa("onRight"),Sa("onTab"),Sa("onShiftTab"),Sa("onUp"),Sa("onDown"),Sa("onEscape"),Ie("stopSpaceKeyup",!1),Ee("focusIn")],Hd=Cf(Ld,Lo.init,function(t,e,n){return[vf(df([32]),n.onSpace),vf(hf([gf,df([13])]),n.onEnter),vf(hf([mf,df([13])]),n.onShiftEnter),vf(hf([mf,df([9])]),n.onShiftTab),vf(hf([gf,df([9])]),n.onTab),vf(df([38]),n.onUp),vf(df([40]),n.onDown),vf(df([37]),n.onLeft),vf(df([39]),n.onRight),vf(df([32]),n.onSpace),vf(df([27]),n.onEscape)]},function(t,e,n){return n.stopSpaceKeyup?[vf(df([32]),Ef)]:[]},function(t){return t.focusIn}),Fd=kf.schema(),Vd=Sf.schema(),jd=hd.schema(),Ud=rd.schema(),Wd=Dd.schema(),qd=Nf.schema(),Yd=Pd.schema(),$d=Hd.schema(),Gd=mu({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Fd,cyclic:Vd,flow:jd,flatgrid:Ud,matrix:Wd,execution:qd,menu:Yd,special:$d}),name:"keying",active:{events:function(t,e){return t.handler.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,n,r,o,i){dt(r,"setGridSize")?r.setGridSize(o,i):e.console.error("Layout does not support setGridSize")}},state:Mf}),Kd=function(t,e,n,r){var o=t.getSystem().build(r);uc(t,o,n)},Xd=function(t,e,n,r){var o=Jd(t);U(o,function(t){return Cn(r.element(),t.element())}).each(cc)},Jd=function(t,e){return t.components()},Qd=function(t,e,n,r,o){var i=Jd(t);return y.from(i[r]).map(function(e){return Xd(t,0,0,e),o.each(function(e){Kd(t,0,function(t,e){!function(t,e,n){Kr(t,r).fold(function(){Zr(t,e)},function(t){Xr(t,e)})}(t,e)},e)}),e})},Zd=du({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(t,e,n,r){Kd(t,0,Zr,r)},prepend:function(t,e,n,r){Kd(t,0,Qr,r)},remove:Xd,replaceAt:Qd,replaceBy:function(t,e,n,r,o){var i=Jd(t);return W(i,r).bind(function(e){return Qd(t,0,0,e,o)})},set:function(t,e,n,r){_u(function(){var e=L(r,t.getSystem().build);ic(t,e)},t.element())},contents:Jd})}),th=function(t,e){return{key:t,value:{config:{},me:function(t,e){var n=kr(e);return du({fields:[be("enabled")],name:t,active:{events:o(n)}})}(t,e),configAsRaw:o({}),initialConfig:{},state:Lo}}},eh=function(t,e){e.ignore||(xu(t.element()),e.onFocus(t))},nh=Object.freeze({__proto__:null,focus:eh,blur:function(t,e){e.ignore||function(t){t.dom().blur()}(t.element())},isFocused:function(t){return function(t){var e=Ur(t).dom();return t.dom()===e.activeElement}(t.element())}}),rh=Object.freeze({__proto__:null,exhibit:function(t,e){var n=e.ignore?{}:{attributes:{tabindex:"-1"}};return Vo(n)},events:function(t){return kr([Er($n(),function(e,n){eh(e,t),n.stop()})].concat(t.stopMousedown?[Er(Mn(),function(t,e){e.event().prevent()})]:[]))}}),oh=[ka("onFocus"),Ie("stopMousedown",!1),Ie("ignore",!1)],ih=du({fields:oh,name:"focusing",active:rh,apis:nh}),ah=function(t,e,n){var r=e.aria;r.update(t,r,n.get())},uh=function(t,e,n){e.toggleClass.each(function(e){n.get()?Xo(t.element(),e):Jo(t.element(),e)})},sh=function(t,e,n){fh(t,e,n,!n.get())},ch=function(t,e,n){n.set(!0),uh(t,e,n),ah(t,e,n)},lh=function(t,e,n){n.set(!1),uh(t,e,n),ah(t,e,n)},fh=function(t,e,n,r){(r?ch:lh)(t,e,n)},dh=function(t,e,n){fh(t,e,n,e.selected)},hh=Object.freeze({__proto__:null,onLoad:dh,toggle:sh,isOn:function(t,e,n){return n.get()},on:ch,off:lh,set:fh}),mh=Object.freeze({__proto__:null,exhibit:function(){return Vo({})},events:function(t,e){var n,r,o,i=(n=t,r=e,o=sh,Lr(function(t){o(t,n,r)})),a=au(t,e,dh);return kr(q([t.toggleOnExecute?[i]:[],[a]]))}}),ph=function(t,e,n){fo(t.element(),"aria-expanded",n)},gh=[Ie("selected",!1),Ee("toggleClass"),Ie("toggleOnExecute",!0),ze("aria",{mode:"none"},ce("mode",{pressed:[Ie("syncWithExpanded",!1),Oa("update",function(t,e,n){fo(t.element(),"aria-pressed",n),e.syncWithExpanded&&ph(t,0,n)})],checked:[Oa("update",function(t,e,n){fo(t.element(),"aria-checked",n)})],expanded:[Oa("update",ph)],selected:[Oa("update",function(t,e,n){fo(t.element(),"aria-selected",n)})],none:[Oa("update",n)]}))],vh=du({fields:gh,name:"toggling",active:mh,apis:hh,state:(!1,{init:function(){var t=je(!1);return{get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(!1)},readState:function(){return t.get()}}}})}),bh=function(){var t=function(t,e){e.stop(),xr(t)};return[Er(Un(),t),Er(Zn(),t),Mr(On()),Mr(Mn())]},yh=function(t){return kr(q([t.map(function(t){return Lr(function(e,n){t(e),n.stop()})}).toArray(),bh()]))},xh=function(t){(Cu(t.element()).isNone()||ih.isFocused(t))&&(ih.isFocused(t)||ih.focus(t),yr(t,"alloy.item-hover",{item:t}))},wh=function(t){yr(t,"alloy.item-focus",{item:t})},Ch=o("alloy.item-hover"),_h=o("alloy.item-focus"),kh=[be("data"),be("components"),be("dom"),Ie("hasSubmenu",!1),Ee("toggling"),$c("itemBehaviours",[vh,ih,Gd,Uc]),Ie("ignoreFocus",!1),Ie("domModification",{}),Oa("builder",function(t){return{dom:t.dom,domModification:d(d({},t.domModification),{attributes:d(d(d({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Gc(t.itemBehaviours,[t.toggling.fold(vh.revoke,function(t){return vh.config(d({aria:{mode:"checked"}},t))}),ih.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){wh(t)}}),Gd.config({mode:"execution"}),Uc.config({store:{mode:"memory",initialValue:t.data}}),th("item-type-events",m(bh(),[Er(Rn(),xh),Er(Qn(),ih.focus)]))]),components:t.components,eventOrder:t.eventOrder}}),Ie("eventOrder",{})],Sh=[be("dom"),be("components"),Oa("builder",function(t){return{dom:t.dom,components:t.components,events:kr([Ir(Qn())])}})],Th=o([gl({name:"widget",overrides:function(t){return{behaviours:lu([Uc.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:function(){}}})])}}})]),Eh=[be("uid"),be("data"),be("components"),be("dom"),Ie("autofocus",!1),Ie("ignoreFocus",!1),$c("widgetBehaviours",[Uc,ih,Gd]),Ie("domModification",{}),Pl(Th()),Oa("builder",function(t){var e=Ol(0,t,Th()),n=Dl("item-widget",t,e.internals()),r=function(e){return Nl(e,t,"widget").map(function(t){return Gd.focusIn(t),t})},o=function(e,n){return $l(n.event().target())?y.none():t.autofocus?(n.setSource(e.element()),y.none()):y.none()};return{dom:t.dom,components:n,domModification:t.domModification,events:kr([Lr(function(t,e){r(t).each(function(t){e.stop()})}),Er(Rn(),xh),Er(Qn(),function(e,n){t.autofocus?r(e):ih.focus(e)})]),behaviours:Gc(t.widgetBehaviours,[Uc.config({store:{mode:"memory",initialValue:t.data}}),ih.config({ignore:t.ignoreFocus,onFocus:function(t){wh(t)}}),Gd.config({mode:"special",focusIn:t.autofocus?function(t){r(t)}:pu(),onLeft:o,onRight:o,onEscape:function(e,n){return ih.isFocused(e)||t.autofocus?t.autofocus?(n.setSource(e.element()),y.none()):y.none():(ih.focus(e),y.some(!0))}})])}})],Oh=ce("type",{widget:Eh,item:kh,separator:Sh}),Dh=o([yl({factory:{sketch:function(t){var e=ae("menu.spec item",Oh,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return e.hasOwnProperty("uid")?e:d(d({},e),{uid:Do("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Nh=o([be("value"),be("items"),be("dom"),be("components"),Ie("eventOrder",{}),Wc("menuBehaviours",[uf,Uc,Xl,Gd]),ze("movement",{mode:"menu",moveOnTab:!0},ce("mode",{grid:[Na(),Oa("config",function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}})],matrix:[Oa("config",function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}}),be("rowSelector")],menu:[Ie("moveOnTab",!0),Oa("config",function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}})]})),ye("markers",ya()),Ie("fakeFocus",!1),Ie("focusManager",yf()),ka("onHighlight")]),Ah=o("alloy.menu-focus"),Mh=ql({name:"Menu",configFields:Nh(),partFields:Dh(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Yc(t.menuBehaviours,[uf.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),Uc.config({store:{mode:"memory",initialValue:t.value}}),Xl.config({find:y.some}),Gd.config(t.movement.config(t,t.movement))]),events:kr([Er(_h(),function(t,e){var n=e.event();t.getSystem().getByDom(n.target()).each(function(n){uf.highlight(t,n),e.stop(),yr(t,Ah(),{menu:t,item:n})})}),Er(Ch(),function(t,e){var n=e.event().item();uf.highlight(t,n)})]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Ih=function(t,e){var n={};ot(t,function(t,e){H(t,function(t){n[t]=e})});var r=e,o=at(e,function(t,e){return{k:t,v:e}}),i=it(o,function(t,e){return[e].concat(function t(e,n,r,o){return lt(r,o).bind(function(o){return lt(e,o).bind(function(o){var i=t(e,n,r,o);return y.some([o].concat(i))})}).getOr([])}(n,r,o,e))});return it(n,function(t){return lt(i,t).getOr([t])})},zh=function(t){return"prepared"===t.type?y.some(t.menu):y.none()},Bh=function(){var t=je({}),e=je({}),n=je({}),r=je(y.none()),o=je({}),i=function(e,n,r){return a(e).bind(function(o){return function(e){return st(t.get(),function(t,n){return t===e})}(e).bind(function(t){return n(t).map(function(t){return{triggeredMenu:o,triggeringItem:t,triggeringPath:r}})})})},a=function(t){return u(t).bind(zh)},u=function(t){return lt(e.get(),t)},s=function(e){return lt(t.get(),e)};return{setMenuBuilt:function(t,n){var r;e.set(d(d({},e.get()),((r={})[t]={type:"prepared",menu:n},r)))},setContents:function(i,a,u,s){r.set(y.some(i)),t.set(u),e.set(a),o.set(s);var c=Ih(s,u);n.set(c)},expand:function(e){return lt(t.get(),e).map(function(t){var r=lt(n.get(),e).getOr([]);return[t].concat(r)})},refresh:function(t){return lt(n.get(),t)},collapse:function(t){return lt(n.get(),t).bind(function(t){return t.length>1?y.some(t.slice(1)):y.none()})},lookupMenu:u,lookupItem:s,otherMenus:function(t){var e=o.get();return K(nt(e),t)},getPrimary:function(){return r.get().bind(a)},getMenus:function(){return e.get()},clear:function(){t.set({}),e.set({}),n.set({}),r.set(y.none())},isClear:function(){return r.get().isNone()},getTriggeringPath:function(t,e){var o=F(s(t).toArray(),function(t){return a(t).isSome()});return lt(n.get(),t).bind(function(t){var n=G(o.concat(t));return function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return y.none();e.push(r.getOrDie())}return y.some(e)}(Y(n,function(t,o){return i(t,e,n.slice(0,o+1)).fold(function(){return r.get().is(t)?[]:[y.none()]},function(t){return[y.some(t)]})}))})}}},Rh=zh,Ph=o("collapse-item"),Lh=Wl({name:"TieredMenu",configFields:[Ea("onExecute"),Ea("onEscape"),Ta("onOpenMenu"),Ta("onOpenSubmenu"),ka("onRepositionMenu"),ka("onCollapseMenu"),Ie("highlightImmediately",!0),ke("data",[be("primary"),be("menus"),be("expansions")]),Ie("fakeFocus",!1),ka("onHighlight"),ka("onHover"),wa(),be("dom"),Ie("navigateOnHover",!0),Ie("stayInDom",!1),Wc("tmenuBehaviours",[Gd,uf,Xl,Zd]),Ie("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:function(t,e){var n,r=je(y.none()),o=Bh(),i=function(t){return Uc.getValue(t).value},a=function(e){return it(t.data.menus,function(t,e){return Y(t.items,function(t){return"separator"===t.type?[]:[t.data.value]})})},u=function(t,e){uf.highlight(t,e),uf.getHighlighted(e).orThunk(function(){return uf.getFirst(e)}).each(function(e){wr(t,e.element(),Qn())})},s=function(t,e){return Yl(L(e,function(e){return t.lookupMenu(e).bind(function(t){return"prepared"===t.type?y.some(t.menu):y.none()})}))},c=function(e,n,r){var o=s(n,n.otherMenus(r));H(o,function(n){ti(n.element(),[t.markers.backgroundMenu]),t.stayInDom||Zd.remove(e,n)})},l=function(e,n){var o=function(e){return r.get().getOrThunk(function(){var n={},o=ys(e.element(),"."+t.markers.item),a=F(o,function(t){return"true"===ho(t,"aria-haspopup")});return H(a,function(t){e.getSystem().getByDom(t).each(function(t){var e=i(t);n[e]=t})}),r.set(y.some(n)),n})}(e);ot(o,function(t,e){var r=B(n,e);fo(t.element(),"aria-expanded",r)})},f=function(e,n,r){return y.from(r[0]).bind(function(o){return n.lookupMenu(o).bind(function(o){if("notbuilt"===o.type)return y.none();var i=o.menu,a=s(n,r.slice(1));return H(a,function(e){Xo(e.element(),t.markers.backgroundMenu)}),ni(i.element())||Zd.append(e,Ei(i)),ti(i.element(),[t.markers.backgroundMenu]),u(e,i),c(e,n,r),y.some(i)})})};!function(t){t[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent"}(n||(n={}));var h=function(e,r,a){void 0===a&&(a=n.HighlightSubmenu);var u=i(r);return o.expand(u).bind(function(i){return l(e,i),y.from(i[0]).bind(function(u){return o.lookupMenu(u).bind(function(s){var c=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return o.setMenuBuilt(e,r),r}return n.menu}(e,u,s);return ni(c.element())||Zd.append(e,Ei(c)),t.onOpenSubmenu(e,r,c,G(i)),a===n.HighlightSubmenu?(uf.highlightFirst(c),f(e,o,i)):(uf.dehighlightAll(c),y.some(r))})})})},m=function(e,n){var r=i(n);return o.collapse(r).bind(function(r){return l(e,r),f(e,o,r).map(function(r){return t.onCollapseMenu(e,n,r),r})})},p=function(e){return function(n,r){return ua(r.getSource(),"."+t.markers.item).bind(function(t){return n.getSystem().getByDom(t).toOption().bind(function(t){return e(n,t).map(function(){return!0})})})}},g=kr([Er(Ah(),function(t,e){var n=e.event().item();o.lookupItem(i(n)).each(function(){var n=e.event().menu();uf.highlight(t,n);var r=i(e.event().item());o.refresh(r).each(function(e){return c(t,o,e)})})}),Lr(function(e,r){var o=r.event().target();e.getSystem().getByDom(o).each(function(r){0===i(r).indexOf("collapse-item")&&m(e,r),h(e,r,n.HighlightSubmenu).fold(function(){t.onExecute(e,r)},function(){})})}),Br(function(e,n){(function(e){var n=function(e,n,r){return it(r,function(r,o){var i=function(){return Mh.sketch(d(d({dom:r.dom},r),{value:o,items:r.items,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?xf():yf()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}})}(e,t.data.primary,t.data.menus),r=a();return o.setContents(t.data.primary,n,t.data.expansions,r),o.getPrimary()})(e).each(function(n){Zd.append(e,Ei(n)),t.onOpenMenu(e,n),t.highlightImmediately&&u(e,n)})})].concat(t.navigateOnHover?[Er(Ch(),function(e,r){var a=r.event().item();!function(t,e){var n=i(a);o.refresh(n).bind(function(e){return l(t,e),f(t,o,e)})}(e),h(e,a,n.HighlightParent),t.onHover(e,a)})]:[])),v=function(t){return uf.getHighlighted(t).bind(uf.getHighlighted)},b={collapseMenu:function(t){v(t).each(function(e){m(t,e)})},highlightPrimary:function(t){o.getPrimary().each(function(e){u(t,e)})},repositionMenus:function(e){o.getPrimary().bind(function(t){return v(e).bind(function(t){var e=i(t),n=ct(o.getMenus()),r=Yl(L(n,Rh));return o.getTriggeringPath(e,function(t){return e=t,et(r,function(t){if(!t.getSystem().isConnected())return y.none();var n=uf.getCandidates(t);return U(n,function(t){return i(t)===e})});var e})}).map(function(e){return{primary:t,triggeringPath:e}})}).fold(function(){(function(t){return y.from(t.components()[0]).filter(function(t){return"menu"===ho(t.element(),"role")})})(e).each(function(n){t.onRepositionMenu(e,n,[])})},function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)})}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Yc(t.tmenuBehaviours,[Gd.config({mode:"special",onRight:p(function(t,e){return $l(e.element())?y.none():h(t,e,n.HighlightSubmenu)}),onLeft:p(function(t,e){return $l(e.element())?y.none():m(t,e)}),onEscape:p(function(e,n){return m(e,n).orThunk(function(){return t.onEscape(e,n).map(function(){return e})})}),focusIn:function(t,e){o.getPrimary().each(function(e){wr(t,e.element(),Qn())})}}),uf.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),Xl.config({find:function(t){return uf.getHighlighted(t)}}),Zd.config({})]),eventOrder:t.eventOrder,apis:b,events:g}},extraApis:{tieredData:function(t,e,n){return{primary:t,menus:e,expansions:n}},singleData:function(t,e){return{primary:t,menus:Rt(t,e),expansions:{}}},collapseItem:function(t){return{value:wo(Ph()),meta:{text:t}}}}}),Hh=Wl({name:"InlineView",configFields:[be("lazySink"),ka("onShow"),ka("onHide"),Ae("onEscape"),Wc("inlineBehaviours",[_c,Uc,bu]),Me("fireDismissalEventInstead",[Ie("event",lr())]),Me("fireRepositionEventInstead",[Ie("event",fr())]),Ie("getRelated",y.none),Ie("eventOrder",y.none)],factory:function(t,e){var n=function(t,e,n,o){r(t,e,n,function(){return o.map(function(t){return Ji(t)})})},r=function(e,n,r,o){var i=t.lazySink(e).getOrDie();_c.openWhileCloaked(e,r,function(){return ec.positionWithinBounds(i,n,e,o())}),Uc.setValue(e,y.some({mode:"position",anchor:n,getBounds:o}))},i=function(e,n,r,o){var i=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},a="horizontal"===r.type?{layouts:{onLtr:function(){return ou()},onRtl:function(){return iu()}}}:{},u=function(t){return function(t){return 2===t.length}(t)?a:{}};return Lh.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return _c.close(e),t.onEscape.map(function(t){return t(e)}),y.some(!0)},onExecute:function(){return y.some(!0)},onOpenMenu:function(t,e){ec.positionWithinBounds(i().getOrDie(),n,e,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();ec.position(o,d({anchor:"submenu",item:e},u(r)),n)},onRepositionMenu:function(t,e,r){var a=i().getOrDie();ec.positionWithinBounds(a,n,e,o()),H(r,function(t){var e=u(t.triggeringPath);ec.position(a,d({anchor:"submenu",item:t.triggeringItem},e),t.triggeredMenu)})}})}(t,e,n,r,o);_c.open(e,i),Uc.setValue(e,y.some({mode:"menu",menu:i}))},a=function(e){_c.isOpen(e)&&Uc.getValue(e).each(function(n){switch(n.mode){case"menu":_c.getState(e).each(function(t){Lh.repositionMenus(t)});break;case"position":var r=t.lazySink(e).getOrDie();ec.positionWithinBounds(r,n.anchor,e,n.getBounds())}})},u={setContent:function(t,e){_c.setContent(t,e)},showAt:function(t,e,r){n(t,e,r,y.none())},showWithin:n,showWithinBounds:r,showMenuAt:function(t,e,n){i(t,e,n,function(){return y.none()})},showMenuWithinBounds:i,hide:function(t){_c.isOpen(t)&&(Uc.setValue(t,y.none()),_c.close(t))},getContent:function(t){return _c.getState(t)},reposition:a,isOpen:_c.isOpen};return{uid:t.uid,dom:t.dom,behaviours:Yc(t.inlineBehaviours,[_c.config({isPartOf:function(e,n,r){return la(n,r)||function(e,n){return t.getRelated(e).exists(function(t){return la(t,n)})}(e,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),Uc.config({store:{mode:"memory",initialValue:y.none()}}),bu.config({channels:d(d({},Oc(d({isExtraPart:o(!1)},t.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))),Nc(d(d({isExtraPart:o(!1)},t.fireRepositionEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})),{doReposition:a})))})]),eventOrder:t.eventOrder,apis:u}},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)}}}),Fh=function(t){return t.x()},Vh=function(t,e){return t.x()+t.width()/2-e.width()/2},jh=function(t,e){return t.x()+t.width()-e.width()},Uh=function(t){return t.y()},Wh=function(t,e){return t.y()+t.height()-e.height()},qh=function(t,e,n){return Aa(Fh(t),Wh(t,e),n.innerSoutheast(),Ia(),"layout-se")},Yh=function(t,e,n){return Aa(jh(t,e),Wh(t,e),n.innerSouthwest(),za(),"layout-sw")},$h=function(t,e,n){return Aa(Fh(t),Uh(t),n.innerNortheast(),Ba(),"layout-ne")},Gh=function(t,e,n){return Aa(jh(t,e),Uh(t),n.innerNorthwest(),Ra(),"layout-nw")},Kh=function(t,e,n){return Aa(Vh(t,e),Uh(t),n.innerNorth(),La(),"layout-n")},Xh=function(t,e,n){return Aa(Vh(t,e),Wh(t,e),n.innerSouth(),Pa(),"layout-s")},Jh=tinymce.util.Tools.resolve("tinymce.util.Delay"),Qh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Zh=tinymce.util.Tools.resolve("tinymce.EditorManager"),tm=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},em=function(t){return t.getParam("width",Qh.DOM.getStyle(t.getElement(),"width"))},nm=function(t){return y.from(t.settings.min_width).filter(D)},rm=function(t){return y.from(t.settings.min_height).filter(D)},om=function(t){return y.from(t.getParam("max_width")).filter(D)},im=function(t){return y.from(t.getParam("max_height")).filter(D)},am=function(t){return!1!==t.getParam("menubar",!0,"boolean")},um=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=k(e),o=T(e)&&e.length>0;return!cm(t)&&(o||r||n)},sm=function(t){var e=nt(t.settings),n=F(e,function(t){return/^toolbar([1-9])$/.test(t)}),r=L(n,function(e){return t.getParam(e,!1,"string")}),o=F(r,function(t){return"string"==typeof t});return o.length>0?y.some(o):y.none()},cm=function(t){return sm(t).fold(function(){return t.getParam("toolbar",[],"string[]").length>0},function(){return!0})};!function(t){t.default="wrap",t.floating="floating",t.sliding="sliding",t.scrolling="scrolling"}(wf||(wf={}));var lm,fm=function(t){return t.getParam("toolbar_mode","","string")};!function(t){t.top="top",t.bottom="bottom"}(lm||(lm={}));var dm=function(t){return t.getParam("toolbar_location",lm.top,"string")!==lm.bottom},hm=function(t){var e=function(t){return t.getParam("fixed_toolbar_container","","string")}(t);return e.length>0&&t.inline?aa(ri(),e):y.none()},mm=function(t){return t.inline&&hm(t).isSome()},pm=function(t){return t.inline&&!am(t)&&!um(t)&&!cm(t)},gm=function(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!mm(t)&&!pm(t)},vm=Wl({name:"Button",factory:function(t){var e=yh(t.action),n=t.dom.tag,r=function(e){return lt(t.dom,"attributes").bind(function(t){return lt(t,e)})};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:Gc(t.buttonBehaviours,[ih.config({}),Gd.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map(function(t){return{role:t}}).getOr({});return d({type:t},e)}return{role:r("role").getOr("button")}}()},eventOrder:t.eventOrder}},configFields:[Ie("uid",void 0),be("dom"),Ie("components",[]),$c("buttonBehaviours",[ih,Gd]),Ee("action"),Ee("role"),Ie("eventOrder",{})]}),bm=function(t){var e=function(t){return void 0!==t.uid}(t)&&dt(t,"uid")?t.uid:Do("memento");return{get:function(t){return t.getSystem().getByUid(e).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(e).toOption()},asSpec:function(){return d(d({},t),{uid:e})}}},ym=function(t){return y.from(t()["temporary-placeholder"]).getOr("!not found!")},xm=function(t,e){return y.from(e()[t]).getOrThunk(function(){return ym(e)})},wm=function(t,e){return et(t,function(t){return y.from(e()[t])}).getOrThunk(function(){return ym(e)})},Cm={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},_m=Wl({name:"Notification",factory:function(t){var e=bm({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:lu([Zd.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=bm({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:lu([Zd.config({})])}),i={updateProgress:function(t,e){t.getSystem().isConnected()&&o.getOpt(t).each(function(t){Zd.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},r(e)])})},updateText:function(t,n){if(t.getSystem().isConnected()){var r=e.get(t);Zd.set(r,[_i(n)])}}},a=q([t.icon.toArray(),t.level.toArray(),t.level.bind(function(t){return y.from(Cm[t])}).toArray()]);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"])},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:wm(a,t.iconProvider)}},{dom:{tag:"div",classes:["tox-notification__body"]},components:[e.asSpec()],behaviours:lu([Zd.config({})])}].concat(t.progress?[o.asSpec()]:[]).concat(t.closeButton?[vm.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:xm("close",t.iconProvider),attributes:{"aria-label":t.translationProvider("Close")}}}],action:function(e){t.onAction(e)}})]:[]),apis:i}},configFields:[Ee("level"),be("progress"),be("icon"),be("onAction"),be("text"),be("iconProvider"),be("translationProvider"),Le("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});var km,Sm=function(t,n){var r=null;return{cancel:function(){null!==r&&(e.clearTimeout(r),r=null)},throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];null!==r&&e.clearTimeout(r),r=e.setTimeout(function(){t.apply(null,o),r=null},n)}}},Tm=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Em=function(t,e,n,r,o){var i=Tm(t,function(e){return function(t,e){return t.isBlock(e)||B(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)}(t,e)});return y.from(i.backwards(e,n,r,o))},Om=function(t,e){return Dm(We.fromDom(t.selection.getNode())).getOrThunk(function(){var n=We.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Zr(n,We.fromDom(e.extractContents())),e.insertNode(n.dom()),Yr(n).each(function(t){return t.dom().normalize()}),function(t,e){return function t(n){for(var r=Gr(n),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return y.some(i);var a=t(i);if(a.isSome())return a}return y.none()}(t)}(n,bs).map(function(e){t.selection.setCursorLocation(e.dom(),function(t){return"img"===ao(t)?1:gs(t).fold(function(){return Gr(t).length},function(t){return t.length})}(e))}),n})},Dm=function(t){return ua(t,"[data-mce-autocompleter]")},Nm=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},Am=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},Mm=function(t,e){return t.substring(e.length)},Im=function(t,e,n,r){return void 0===r&&(r=0),Dm(We.fromDom(e.startContainer)).fold(function(){return function(t,e,n,r){if(void 0===r&&(r=0),!(o=e).collapsed||3!==o.startContainer.nodeType)return y.none();var o,i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return Em(t,e.startContainer,e.startOffset,function(t,e,r){return function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(Am(o))return y.none();if(o===n)break}return y.some(r)}(r,e,n).getOr(e)},i).bind(function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return y.none();var i=Nm(o);return 0!==i.lastIndexOf(n)||Mm(i,n).length<r?y.none():y.some({text:Mm(i,n),range:o,triggerChar:n})})}(t,e,n,r)},function(e){var r=t.createRng();r.selectNode(e.dom());var o=Nm(r);return y.some({range:r,text:Mm(o,n),triggerChar:n})})},zm=tinymce.util.Tools.resolve("tinymce.util.Promise"),Bm=function(t,e){return{container:t,offset:e}},Rm=function t(n,r){var o=n.childNodes;return o.length>0&&r<o.length?t(o[r],0):o.length>0&&function(t){return t.nodeType===e.Node.ELEMENT_NODE}(n)&&o.length===r?function t(n){if(function(t){return t.nodeType===e.Node.TEXT_NODE}(n))return Bm(n,n.data.length);var r=n.childNodes;return r.length>0?t(r[r.length-1]):Bm(n,r.length)}(o[o.length-1]):Bm(n,r)},Pm=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng().startContainer.nodeValue,a=F(o.lookupByChar(n.triggerChar),function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk(function(){return function(t){return function(e){var n=Rm(e.startContainer,e.startOffset);return!function(t,e){return Em(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!Am(e)}).isSome()}(t,n)}}(t.dom)})(n.range,i,n.text)});if(0===a.length)return y.none();var u=zm.all(L(a,function(t){return t.fetch(n.text,t.maxResults,r).then(function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction}})}));return y.some({lookupData:u,context:n})},Lm=$t([we("type"),Ne("text")]),Hm=$t([Ve("type",function(){return"autocompleteitem"}),Ve("active",function(){return!1}),Ve("disabled",function(){return!1}),Ie("meta",{}),we("value"),Ne("text"),Ne("icon")]),Fm=$t([we("type"),we("ch"),Be("minChars",1),Ie("columns",1),Be("maxResults",10),Ae("matches"),_e("fetch"),_e("onAction")]),Vm=[Le("disabled",!1),Ne("text"),Ne("shortcut"),Qt("value","value",Mt(function(){return wo("menuitem-value")}),le()),Ie("meta",{})],jm=$t([we("type"),He("onSetup",function(){return n}),He("onAction",n),Ne("icon")].concat(Vm)),Um=$t([we("type"),_e("getSubmenuItems"),He("onSetup",function(){return n}),Ne("icon")].concat(Vm)),Wm=$t([we("type"),Le("active",!1),He("onSetup",function(){return n}),_e("onAction")].concat(Vm)),qm=$t([we("type"),Le("active",!1),Ne("icon")].concat(Vm)),Ym=$t([we("type"),Ce("fancytype",["inserttable","colorswatch"]),He("onAction",n)]),$m=function(t,e,n){var r=ys(t.element(),"."+n);if(r.length>0){var o=W(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 y.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return y.none()},Gm=function(t){return function(t,e){return lu([th(t,e)])}(wo("unnamed-events"),t)},Km=[be("lazySink"),be("tooltipDom"),Ie("exclusive",!0),Ie("tooltipComponents",[]),Ie("delay",300),Pe("mode","normal",["normal","follow-highlight"]),Ie("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:o([Qa,Ja,$a,Ka,Ga,Xa]),onRtl:o([Qa,Ja,$a,Ka,Ga,Xa])}}}),ka("onHide"),ka("onShow")],Xm=Object.freeze({__proto__:null,init:function(){var t=je(y.none()),n=je(y.none()),r=function(){t.get().each(function(t){e.clearTimeout(t)})},i=o("not-implemented");return Ho({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(y.some(t))},clearTooltip:function(){n.set(y.none())},clearTimer:r,resetTimer:function(n,o){r(),t.set(y.some(e.setTimeout(function(){n()},o)))},readState:i})}}),Jm=wo("tooltip.exclusive"),Qm=wo("tooltip.show"),Zm=wo("tooltip.hide"),tp=function(t,e,n){t.getSystem().broadcastOn([Jm],{})},ep=Object.freeze({__proto__:null,hideAllExclusive:tp,setComponents:function(t,e,n,r){n.getTooltip().each(function(t){t.getSystem().isConnected()&&Zd.set(t,r)})}}),np=du({fields:Km,name:"tooltipping",active:Object.freeze({__proto__:null,events:function(t,e){var n=function(n){e.getTooltip().each(function(r){cc(r),t.onHide(n,r),e.clearTooltip()}),e.clearTimer()};return kr(q([[Er(Qm,function(n){e.resetTimer(function(){!function(n){if(!e.isShowing()){tp(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:kr("normal"===t.mode?[Er(Rn(),function(t){br(n,Qm)}),Er(zn(),function(t){br(n,Zm)})]:[]),behaviours:lu([Zd.config({})])});e.setTooltip(o),ac(r,o),t.onShow(n,o),ec.position(r,t.anchor(n),o)}}(n)},t.delay)}),Er(Zm,function(r){e.resetTimer(function(){n(r)},t.delay)}),Er(Xn(),function(t,e){B(e.channels(),Jm)&&n(t)}),Rr(function(t){n(t)})],"normal"===t.mode?[Er(Pn(),function(t){br(t,Qm)}),Er(Gn(),function(t){br(t,Zm)}),Er(Rn(),function(t){br(t,Qm)}),Er(zn(),function(t){br(t,Zm)})]:[Er(gr(),function(t,e){br(t,Qm)}),Er(vr(),function(t){br(t,Zm)})]]))}}),state:Xm,apis:ep}),rp=tinymce.util.Tools.resolve("tinymce.util.I18n"),op="tox-menu-nav__js",ip="tox-collection__item",ap={normal:op,color:"tox-swatch"},up="tox-collection__item-label",sp="tox-collection__item--active",cp=function(t){return lt(ap,t).getOr(op)},lp=tinymce.util.Tools.resolve("tinymce.Env"),fp=function(t){var e=lp.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},n=t.split("+"),r=L(n,function(t){var n=t.toLowerCase().trim();return ft(e,n)?e[n]:t});return lp.mac?r.join(""):r.join("+")},dp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon"],innerHtml:t}}},hp=function(t){return{dom:{tag:"div",classes:[up]},components:[_i(rp.translate(t))]}},mp=function(t,e){return{dom:{tag:"div",classes:[up]},components:[{dom:{tag:t.tag,styles:t.styles},components:[_i(rp.translate(e))]}]}},pp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:fp(t)}}},gp=function(t){return{dom:{tag:"div",classes:["tox-collection__item-icon","tox-collection__item-checkmark"],innerHtml:xm("checkmark",t)}}},vp=["list-num-default","list-num-lower-alpha","list-num-lower-greek","list-num-lower-roman","list-num-upper-alpha","list-num-upper-roman"],bp=["list-bull-circle","list-bull-default","list-bull-square"],yp=function(t,e,n,r){void 0===r&&(r=y.none());var o,i=rp.isRtl()&&t.iconContent.exists(function(t){return B(bp,t)}),u=(o=t.iconContent,o.map(function(t){return rp.isRtl()&&B(vp,t)?t+"-rtl":t})).map(function(t){return function(t,e,n){return y.from(e()[t]).or(n).getOrThunk(function(){return ym(e)})}(t,e.icons,r)}),s=y.from(t.meta).fold(function(){return hp},function(t){return ft(t,"style")?a(mp,t.style):hp});return"color"===t.presets?function(t,e,n,r){var o,i;return{dom:(o=u.getOr(""),i={tag:"div",attributes:t.map(function(t){return{title:r.translate(t)}}).getOr({}),classes:["tox-swatch"]},d(d({},i),"custom"===e?{tag:"button",classes:m(i.classes,["tox-swatches__picker-btn"]),innerHtml:o}:"remove"===e?{classes:m(i.classes,["tox-swatch--remove"]),innerHtml:o}:{attributes:d(d({},i.attributes),{"data-mce-color":e}),styles:{"background-color":e}})),optComponents:[]}}(t.ariaLabel,t.value,0,e):function(t,e,n,r,o){var i=n?t.checkMark.orThunk(function(){return e.or(y.some("")).map(dp)}):y.none(),a=t.ariaLabel.map(function(t){return{attributes:{title:rp.translate(t)}}}).getOr({});return{dom:d({tag:"div",classes:[op,ip].concat(o?["tox-collection__item-icon-rtl"]:[])},a),optComponents:[i,t.htmlContent.fold(function(){return t.textContent.map(r)},function(t){return y.some(function(t){return{dom:{tag:"div",classes:[up],innerHtml:t}}}(t))}),t.shortcutContent.map(pp),t.caret]}}(t,u,n,s,i)},xp=["input","button","textarea","select"],wp=function(t,e,n){e.disabled&&_p(t,e)},Cp=function(t,e){return!0===e.useNative&&B(xp,ao(t.element()))},_p=function(t,e,n){e.disableClass.each(function(e){Xo(t.element(),e)}),(Cp(t,e)?function(t){fo(t.element(),"disabled","disabled")}:function(t){fo(t.element(),"aria-disabled","true")})(t),e.onDisabled(t)},kp=function(t,e,n){e.disableClass.each(function(e){Jo(t.element(),e)}),(Cp(t,e)?function(t){po(t.element(),"disabled")}:function(t){fo(t.element(),"aria-disabled","false")})(t),e.onEnabled(t)},Sp=function(t,e){return Cp(t,e)?function(t){return mo(t.element(),"disabled")}(t):function(t){return"true"===ho(t.element(),"aria-disabled")}(t)},Tp=Object.freeze({__proto__:null,enable:kp,disable:_p,isDisabled:Sp,onLoad:wp,set:function(t,e,n,r){(r?_p:kp)(t,e,n)}}),Ep=Object.freeze({__proto__:null,exhibit:function(t,e){return Vo({classes:e.disabled?e.disableClass.map(X).getOr([]):[]})},events:function(t,e){return kr([Sr(Jn(),function(e,n){return Sp(e,t)}),au(t,e,wp)])}}),Op=[Ie("disabled",!1),Ie("useNative",!0),Ee("disableClass"),ka("onDisabled"),ka("onEnabled")],Dp=du({fields:Op,name:"disabling",active:Ep,apis:Tp}),Np=function(t){return Dp.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},Ap=function(t){return Dp.config({disabled:t})},Mp=function(t){return Dp.config({disabled:t,disableClass:"tox-tbtn--disabled"})},Ip=function(t){return Dp.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},zp=function(t,e){var n=t.getApi(e);return function(t){t(n)}},Bp=function(t,e){return Br(function(n){zp(t,n)(function(n){var r=t.onSetup(n);null!=r&&e.set(r)})})},Rp=function(t,e){return Rr(function(n){return zp(t,n)(e.get())})};!function(t){t[t.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",t[t.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(km||(km={}));var Pp,Lp=km,Hp=function(t,e){return Lr(function(n,r){zp(t,n)(t.onAction),t.triggersSubmenu||e!==Lp.CLOSE_ON_EXECUTE||(br(n,er()),r.stop())})},Fp={"alloy.execute":["disabling","alloy.base.behaviour","toggling","item-events"]},Vp=function(t){return Y(t,function(t){return t.toArray()})},jp=function(t,e,r){var o=je(n);return{type:"item",dom:e.dom,components:Vp(e.optComponents),data:t.data,eventOrder:Fp,hasSubmenu:t.triggersSubmenu,itemBehaviours:lu([th("item-events",[Hp(t,r),Bp(t,o),Rp(t,o)]),Np(t.disabled),Zd.config({})].concat(t.itemBehaviours))}},Up=function(t){return{value:t.value,meta:d({text:t.text.getOr("")},t.meta)}},Wp=function(t,e){return lt(t,"tooltipWorker").map(function(t){return[np.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{anchor:"submenu",item:t,overrides:{maxHeightFunction:ju}}},mode:"follow-highlight",onShow:function(e,n){t(function(t){np.setComponents(e,[ki({element:We.fromDom(t)})])})}})]}).getOr([])},qp=o(_l("item-widget",Th())),Yp=wo("cell-over"),$p=wo("cell-execute"),Gp=function(t,e,n){var r,o=function(n){return yr(n,$p,{row:t,col:e})},i=function(t,e){e.stop(),o(t)};return Ti({dom:{tag:"div",attributes:(r={role:"button"},r["aria-labelledby"]=n,r)},behaviours:lu([th("insert-table-picker-cell",[Er(Rn(),ih.focus),Er(Jn(),o),Er(Un(),i),Er(Zn(),i)]),vh.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),ih.config({onFocus:function(n){return yr(n,Yp,{row:t,col:e})}})])})},Kp=function(t){return Y(t,function(t){return L(t,Ei)})},Xp=function(t,e){return _i(e+1+"x"+(t+1))},Jp=function(t){return{value:o(t)}},Qp=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Zp=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,tg=function(t){return Qp.test(t)||Zp.test(t)},eg=function(t){var e=function(t){var e=t.value().replace(Qp,function(t,e,n,r){return e+e+n+n+r+r});return{value:o(e)}}(t),n=Zp.exec(e.value());return null===n?["FFFFFF","FF","FF","FF"]:n},ng=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},rg=function(t){var e=ng(t.red())+ng(t.green())+ng(t.blue());return Jp(e)},og=Math.min,ig=Math.max,ag=Math.round,ug=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,sg=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,cg=function(t,e,n,r){return{red:o(t),green:o(e),blue:o(n),alpha:o(r)}},lg=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},fg=function(t){var e,n,r,o=(t.hue()||0)%360,i=t.saturation()/100,a=t.value()/100;if(i=ig(0,og(i,1)),a=ig(0,og(a,1)),0===i)return e=n=r=ag(255*a),cg(e,n,r,1);var u=o/60,s=a*i,c=s*(1-Math.abs(u%2-1)),l=a-s;switch(Math.floor(u)){case 0:e=s,n=c,r=0;break;case 1:e=c,n=s,r=0;break;case 2:e=0,n=s,r=c;break;case 3:e=0,n=c,r=s;break;case 4:e=c,n=0,r=s;break;case 5:e=s,n=0,r=c;break;default:e=n=r=0}return e=ag(255*(e+l)),n=ag(255*(n+l)),r=ag(255*(r+l)),cg(e,n,r,1)},dg=function(t){var e=eg(t),n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16);return cg(n,r,o,1)},hg=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return cg(o,i,a,u)},mg=function(t){return"rgba("+t.red()+","+t.green()+","+t.blue()+","+t.alpha()+")"},pg=o(cg(255,0,0,1)),gg=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),vg="tinymce-custom-colors",bg="choiceitem",yg=[{type:bg,text:"Light Green",value:"#BFEDD2"},{type:bg,text:"Light Yellow",value:"#FBEEB8"},{type:bg,text:"Light Red",value:"#F8CAC6"},{type:bg,text:"Light Purple",value:"#ECCAFA"},{type:bg,text:"Light Blue",value:"#C2E0F4"},{type:bg,text:"Green",value:"#2DC26B"},{type:bg,text:"Yellow",value:"#F1C40F"},{type:bg,text:"Red",value:"#E03E2D"},{type:bg,text:"Purple",value:"#B96AD9"},{type:bg,text:"Blue",value:"#3598DB"},{type:bg,text:"Dark Turquoise",value:"#169179"},{type:bg,text:"Orange",value:"#E67E23"},{type:bg,text:"Dark Red",value:"#BA372A"},{type:bg,text:"Dark Purple",value:"#843FA1"},{type:bg,text:"Dark Blue",value:"#236FA1"},{type:bg,text:"Light Gray",value:"#ECF0F1"},{type:bg,text:"Medium Gray",value:"#CED4D9"},{type:bg,text:"Gray",value:"#95A5A6"},{type:bg,text:"Dark Gray",value:"#7E8C8D"},{type:bg,text:"Navy Blue",value:"#34495E"},{type:bg,text:"Black",value:"#000000"},{type:bg,text:"White",value:"#ffffff"}],xg=function(t){void 0===t&&(t=10);var e,n=gg.getItem(vg),r=k(n)?JSON.parse(n):[],o=t-(e=r).length<0?e.slice(0,t):e,i=function(t){o.splice(t,1)};return{add:function(e){(function(t,e){var n=z(t,e);return-1===n?y.none():y.some(n)})(o,e).each(i),o.unshift(e),o.length>t&&o.pop(),gg.setItem(vg,JSON.stringify(o))},state:function(){return o.slice(0)}}}(10),wg=function(t){var n=[],r=e.document.createElement("canvas");r.height=1,r.width=1;for(var o=r.getContext("2d"),i=function(t,e){var n=e/255;return("0"+Math.round(t*n+255*(1-n)).toString(16)).slice(-2).toUpperCase()},a=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();o.clearRect(0,0,r.width,r.height),o.fillStyle="#FFFFFF",o.fillStyle=t,o.fillRect(0,0,1,1);var e=o.getImageData(0,0,1,1).data,n=e[0],a=e[1],u=e[2],s=e[3];return"#"+i(n,s)+i(a,s)+i(u,s)},u=0;u<t.length;u+=2)n.push({text:t[u+1],value:a(t[u]),type:"choiceitem"});return n},Cg=function(t){return!1!==t.getParam("custom_colors")},_g=function(t){var e=function(t){return t.getParam("color_map")}(t);return void 0!==e?wg(e):yg},kg=function(t){xg.add(t)},Sg=function(t,e){return t.fire("ResizeContent",e)},Tg=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)}),n},Eg=function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))},Og=function(t){var e=_g(t);return function(t,e){return t.getParam("color_cols",e,"number")}(t,Eg(e.length))},Dg=function(t,e,n,r){"custom"===n?Bg(t)(function(n){n.each(function(n){kg(n),t.execCommand("mceApplyTextcolor",e,n),r(n)})},"#000000"):"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))},Ng=function(t,e){return t.concat(L(xg.state(),function(t){return{type:bg,text:t,value:t}}).concat(function(t){var e={type:"choiceitem",text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[e,{type:"choiceitem",text:"Custom color",icon:"color-picker",value:"custom"}]:[e]}(e)))},Ag=function(t,e){return function(n){n(Ng(t,e))}},Mg=function(t,e,n){var r,o;r="forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color",o=n,t.setIconFill(r,o),t.setIconStroke(r,o)},Ig=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){return y.from(Tg(t,n)).bind(function(t){return function(t){if("transparent"===t)return y.some(cg(0,0,0,0));var e=ug.exec(t);if(null!==e)return y.some(hg(e[1],e[2],e[3],"1"));var n=sg.exec(t);return null!==n?y.some(hg(n[1],n[2],n[3],n[4])):y.none()}(t).map(function(t){var n=rg(t).value();return an(e.toLowerCase(),n)})}).getOr(!1)},columns:Og(t),fetch:Ag(_g(t),Cg(t)),onAction:function(e){null!==o.get()&&Dg(t,n,o.get(),function(){})},onItemAction:function(r,i){Dg(t,n,i,function(n){o.set(n),function(t,e){t.fire("TextColorChange",e)}(t,{name:e,color:n})})},onSetup:function(n){null!==o.get()&&Mg(n,e,o.get());var r=function(t){t.name===e&&Mg(n,t.name,t.color)};return t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})},zg=function(t,e,r,o){t.ui.registry.addNestedMenuItem(e,{text:o,icon:"forecolor"===e?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(e){Dg(t,r,e.value,n)}}]}})},Bg=function(t){return function(e,n){var r={colorpicker:n},o=function(t){return function(e){var n=e.getData();t(y.from(n.colorpicker)),e.close()}}(e);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:r,onAction:function(t,e){"hex-valid"===e.name&&(e.value?t.enable("ok"):t.disable("ok"))},onSubmit:o,onClose:function(){},onCancel:function(){e(y.none())}})}},Rg={register:function(t){!function(t){t.addCommand("mceApplyTextcolor",function(e,n){!function(t,e,n){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:n}),t.nodeChanged()})}(t,e,n)}),t.addCommand("mceRemoveTextcolor",function(e){!function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})}(t,e)})}(t);var e=je(null),n=je(null);Ig(t,"forecolor","forecolor","Text color",e),Ig(t,"backcolor","hilitecolor","Background color",n),zg(t,"forecolor","forecolor","Text color"),zg(t,"backcolor","hilitecolor","Background color")},getColors:Ng,getFetch:Ag,colorPickerDialog:Bg,getCurrentColor:Tg,getColorCols:Og,calcCols:Eg},Pg=function(t){return"color"===t?"tox-swatches":"tox-menu"},Lg=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:Pg(t),tieredMenu:"tox-tiered-menu"}},Hg=function(t){var e=Lg(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:cp(t)}},Fg=function(t,e,n){var r=Lg(n);return{tag:"div",classes:q([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},Vg=[Mh.parts().items({})],jg=function(t,e,n){var r=Lg(n);return{dom:{tag:"div",classes:q([[r.tieredMenu]])},markers:Hg(n)}},Ug=function(t,e){return function(n){var r=P(n,e);return L(r,function(e){return{dom:t,components:e}})}},Wg=function(t,e){var n=[],r=[];return H(t,function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],ft(t.dom,"innerHtml")&&r.push(t)):r.push(t)}),r.length>0&&n.push(r),L(n,function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}})},qg=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Mh.parts().items({preprocess:function(n){return"auto"!==t&&t>1?Ug({tag:"div",classes:["tox-collection__group"]},t)(n):Wg(n,function(t,n){return"separator"===e[n].type})}})]}},Yg=function(t){return void 0!==t.icon||"togglemenuitem"===t.type||"choicemenuitem"===t.type},$g=function(t){return e.console.error(ue(t)),e.console.log(t),y.none()},Gg=function(t,e,n,r,o){var a;return"color"===o?{value:t,dom:(a=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Mh.parts().items({preprocess:"auto"!==t?Ug({tag:"div",classes:["tox-swatches__row"]},t):i})]}]}}(r)).dom,components:a.components,items:n}:"normal"===o&&"auto"===r?{value:t,dom:(a=qg(r,n)).dom,components:a.components,items:n}:"normal"===o&&1===r?{value:t,dom:(a=qg(1,n)).dom,components:a.components,items:n}:"normal"===o?{value:t,dom:(a=qg(r,n)).dom,components:a.components,items:n}:"listpreview"===o&&"auto"!==r?{value:t,dom:(a=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Mh.parts().items({preprocess:Ug({tag:"div",classes:["tox-collection__group"]},t)})]}}(r)).dom,components:a.components,items:n}:{value:t,dom:Fg(e,r,o),components:Vg,items:n}},Kg=function(t,e,n,r,o,i,a,u){var s=R(e,Yg),c=Xg(e,n,r,"color"!==o?"normal":"color",i,a,u);return Gg(t,s,c,r,o)},Xg=function(t,e,n,r,o,i,a){return Yl(L(t,function(t){return"choiceitem"===t.type?(u=t,oe("choicemenuitem",qm,u)).fold($g,function(u){return y.some(function(t,e,n,r,o,i,a){var u=yp({presets:n,textContent:e?t.text:y.none(),htmlContent:y.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:y.none(),checkMark:e?y.some(gp(a.icons)):y.none(),caret:y.none(),value:t.value},a,!0);return gt(jp({data:Up(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){vh.set(t,e)},isActive:function(){return vh.isOn(t)},isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)}}},onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),function(){}},triggersSubmenu:!1,itemBehaviours:[]},u,i),{toggling:{toggleClass:"tox-collection__item--enabled",toggleOnExecute:!1,selected:t.active}})}(u,1===n,r,e,i(t.value),o,a))}):y.none();var u}))},Jg=function(t,e){var n=Hg(e);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===e?"tox-swatches__row":"tox-collection__group")}},Qg={inserttable:function(t){var e=wo("size-label"),n=function(t,e,n){for(var r=[],o=0;o<e;o++){for(var i=[],a=0;a<n;a++)i.push(Gp(o,a,t));r.push(i)}return r}(e,10,10),r=bm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:e}},components:[_i("0x0")],behaviours:lu([Zd.config({})])});return{type:"widget",data:{value:wo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[qp().widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:Kp(n).concat(r.asSpec()),behaviours:lu([th("insert-table-picker",[Ar(Yp,function(t,e,o){var i=o.event().row(),a=o.event().col();(function(t,e,n,r,o){for(var i=0;i<r;i++)for(var a=0;a<o;a++)vh.set(t[i][a],i<=e&&a<=n)})(n,i,a,10,10),Zd.set(r.get(t),[Xp(i,a)])}),Ar($p,function(e,n,r){t.onAction({numRows:r.event().row()+1,numColumns:r.event().col()+1}),br(e,er())})]),Gd.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,e){var n=Rg.getColors(e.colorinput.getColors(),e.colorinput.hasCustomColors()),r=e.colorinput.getColorCols(),o=Kg(wo("menu-value"),n,function(e){t.onAction({value:e})},r,"color",Lp.CLOSE_ON_EXECUTE,function(){return!1},e.shared.providers),i=d(d({},o),{markers:Hg("color"),movement:Jg(r,"color")});return{type:"widget",data:{value:wo("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[qp().widget(Mh.sketch(i))]}}},Zg=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var s=yp({presets:r,textContent:y.none(),htmlContent:n?t.text.map(function(t){return function(t,e){var n=function(t){return Qh.DOM.encode(t)}(rp.translate(t));if(e.length>0){var r=new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return n.replace(r,function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"})}return n}(t,e)}):y.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:y.none(),checkMark:y.none(),caret:y.none(),value:t.value},a.providers,u,t.icon);return jp({data:Up(t),disabled:t.disabled,getApi:function(){return{}},onAction:function(e){return o(t.value,t.meta)},onSetup:function(){return function(){}},triggersSubmenu:!1,itemBehaviours:Wp(t.meta,a)},s,i)},tv=function(t){var e=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:d({tag:"div",classes:[ip,"tox-collection__group-heading"]},e),components:[]}},ev=function(t,e,r,o,i){void 0===o&&(o=!0),void 0===i&&(i=!1);var a,u=i?(a=r.icons,{dom:{tag:"div",classes:["tox-collection__item-caret"],innerHtml:xm("chevron-down",a)}}):function(t){return{dom:{tag:"div",classes:["tox-collection__item-caret"],innerHtml:xm("chevron-right",t)}}}(r.icons),s=yp({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:y.none(),ariaLabel:t.text,caret:y.some(u),checkMark:y.none(),shortcutContent:t.shortcut},r,o);return jp({data:Up(t),getApi:function(t){return{isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)}}},disabled:t.disabled,onAction:n,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},s,e)};!function(t){t[t.ContentFocus=0]="ContentFocus",t[t.UiFocus=1]="UiFocus"}(Pp||(Pp={}));var nv=function(t){return void 0!==t.icon||"togglemenuitem"===t.type||"choicemenuitem"===t.type},rv=function(t){return R(t,nv)},ov=function(t,n,r,o,i){var a,u=r.shared.providers,s=function(t){return i?d(d({},t),{shortcut:y.none(),icon:t.text.isSome()?y.none():t.icon}):t};switch(t.type){case"menuitem":return(a=t,oe("menuitem",jm,a)).fold($g,function(t){return y.some(function(t,e,n,r){void 0===r&&(r=!0);var o=yp({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:y.none(),ariaLabel:t.text,caret:y.none(),checkMark:y.none(),shortcutContent:t.shortcut},n,r);return jp({data:Up(t),getApi:function(t){return{isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e)}(s(t),n,u,o))});case"nestedmenuitem":return function(t){return oe("nestedmenuitem",Um,t)}(t).fold($g,function(t){return y.some(ev(s(t),n,u,o,i))});case"togglemenuitem":return function(t){return oe("togglemenuitem",Wm,t)}(t).fold($g,function(t){return y.some(function(t,e,n){var r=yp({iconContent:y.none(),textContent:t.text,htmlContent:y.none(),ariaLabel:t.text,checkMark:y.some(gp(n.icons)),caret:y.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,!0);return gt(jp({data:Up(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){vh.set(t,e)},isActive:function(){return vh.isOn(t)},isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,e),{toggling:{toggleClass:"tox-collection__item--enabled",toggleOnExecute:!1,selected:t.active}})}(s(t),n,u))});case"separator":return function(t){return oe("separatormenuitem",Lm,t)}(t).fold($g,function(t){return y.some(tv(t))});case"fancymenuitem":return function(t){return oe("fancymenuitem",Ym,t)}(t).fold($g,function(t){return function(t,e){return(n=Qg,r=t.fancytype,Object.prototype.hasOwnProperty.call(n,r)?y.some(n[r]):y.none()).map(function(n){return n(t,e)});var n,r}(s(t),r)});default:return e.console.error("Unknown item in general menu",t),y.none()}},iv=function(t,e,n,r,o){var i=rv(e),a=Yl(L(e,function(t){var e=function(t){return ov(t,n,r,function(t){return o?!t.hasOwnProperty("text"):i}(t),o)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?e(d(d({},t),{disabled:!0})):e(t)}));return(o?function(t,e,n,r,o){var i,a=(i=n,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Mh.parts().items({preprocess:function(t){return Wg(t,function(t,e){return"separator"===i[e].type})}})]});return{value:t,dom:a.dom,components:a.components,items:n}}:Gg)(t,i,a,1,"normal")},av=function(t){return Lh.singleData(t.value,t)},uv=function(t,n){var r=je(y.none()),o=je(!1),i=Ti(Hh.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:lu([th("dismissAutocompleter",[Er(lr(),function(){return s()})])]),lazySink:n.getSink})),a=function(){return r.get().isSome()},u=function(){a()&&Hh.hide(i)},s=function(){if(a()){var e=r.get().map(function(t){return t.element});Dm(e.getOr(We.fromDom(t.selection.getNode()))).each(ro),u(),r.set(y.none()),o.set(!1)}},c=bt(function(){return function(t){var e=t.ui.registry.getAll().popups,n=it(e,function(t){return(e=t,oe("Autocompleter",Fm,e)).fold(function(t){throw new Error(ue(t))},function(t){return t});var e}),r=function(t){var e={};return H(t,function(t){e[t]={}}),nt(e)}(ut(n,function(t){return t.ch})),o=ct(n);return{dataset:n,triggerChars:r,lookupByChar:function(t){return F(o,function(e){return e.ch===t})}}}(t)}),l=function(e,n,r,o){e.matchLength=n.text.length;var a=et(r,function(t){return y.from(t.columns)}).getOr(1);Hh.showAt(i,{anchor:"node",root:We.fromDom(t.getBody()),node:y.from(e.element)},Mh.sketch(function(t,e,n,r){var o=n===Pp.ContentFocus?xf():yf(),i=Jg(e,r),a=Hg(r);return{dom:t.dom,components:t.components,items:t.items,value:t.value,markers:{selectedItem:a.selectedItem,item:a.item},movement:i,fakeFocus:n===Pp.ContentFocus,focusManager:o,menuBehaviours:Gm("auto"!==e?[]:[Br(function(t,e){$m(t,4,a.item).each(function(e){var n=e.numColumns,r=e.numRows;Gd.setGridSize(t,r,n)})})])}}(Gg("autocompleter-value",!0,o,a,"normal"),a,Pp.ContentFocus,"normal"))),Hh.getContent(i).each(uf.highlightFirst)},f=function i(f){(function(e){return r.get().map(function(n){return Im(t.dom,t.selection.getRng(),n.triggerChar).bind(function(n){return Pm(t,c,n,e)})}).getOrThunk(function(){return function(t,e){var n=e(),r=t.selection.getRng();return function(t,e,n){return et(n.triggerChars,function(n){return Im(t,e,n)})}(t.dom,r,n).bind(function(n){return Pm(t,e,n)})}(t,c)})})(f).fold(s,function(c){!function(e){if(!a()){var n=Om(t,e.range);r.set(y.some({triggerChar:e.triggerChar,element:n,matchLength:e.text.length})),o.set(!1)}}(c.context),c.lookupData.then(function(a){r.get().map(function(r){var f,d,h,m=c.context;if(r.triggerChar===m.triggerChar){var p=(f=m.triggerChar,h=et(d=a,function(t){return y.from(t.columns)}).getOr(1),Y(d,function(r){return function(t,e,n,r,o,i){var a=1===r,u=!a||rv(t);return Yl(L(t,function(t){return"separator"===t.type?(r=t,oe("Autocompleter.Separator",Lm,r)).fold($g,function(t){return y.some(tv(t))}):function(t){return oe("Autocompleter.Item",Hm,t)}(t).fold($g,function(t){return y.some(Zg(t,e,a,"normal",n,o,i,u))});var r}))}(r.items,r.matchText,function(n,a){var c=t.selection.getRng();Im(t.dom,c,f).fold(function(){return e.console.error("Lost context. Cursor probably moved")},function(t){var e=t.range,c={hide:function(){s()},reload:function(t){u(),i(t)}};o.set(!0),r.onAction(c,e,n,a),o.set(!1)})},h,Lp.BUBBLE_TO_SANDBOX,n)}));p.length>0?l(r,m,a,p):m.text.length-r.matchLength>=10?s():u()}})})})};!function(t,e){e.on("keypress compositionend",t.onKeypress.throttle),e.on("remove",t.onKeypress.cancel);var n=function(t,e){yr(t,Hn(),{raw:e})};e.on("keydown",function(e){var r=function(){return t.getView().bind(uf.getHighlighted)};8===e.which&&t.onKeypress.throttle(e),t.isActive()&&(27===e.which&&t.cancelIfNecessary(),t.isMenuOpen()?13===e.which?(r().each(xr),e.preventDefault()):40===e.which?(r().fold(function(){t.getView().each(uf.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()&&Dm(We.fromDom(e.element)).isNone()&&t.cancelIfNecessary()})}({onKeypress:Sm(function(t){27!==t.which&&f()},50),cancelIfNecessary:s,isMenuOpen:function(){return Hh.isOpen(i)},isActive:a,isProcessingAction:o.get,getView:function(){return Hh.getContent(i)}},t)},sv=o(!0),cv=function(t,e,n){return function(t,e,n,r){return Fi(t,e,sv,r,!1)}(t,e,0,n)},lv=function(t,e,n){return function(t,e,n,r){return Fi(t,e,sv,r,!0)}(t,e,0,n)},fv=Hi,dv=function(t,e,n){return ua(t,e,n).isSome()};function hv(t,n){var r=null;return{cancel:function(){null!==r&&(e.clearTimeout(r),r=null)},schedule:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r=e.setTimeout(function(){t.apply(null,o),r=null},n)}}}var mv=function(t){var e=t.raw();return void 0===e.touches||1!==e.touches.length?y.none():y.some(e.touches[0])},pv=function(t){var e=je(y.none()),n=je(!1),r=hv(function(e){t.triggerEvent(tr(),e),n.set(!0)},400),i=Pt([{key:On(),value:function(t){return mv(t).each(function(i){r.cancel();var a={x:o(i.clientX),y:o(i.clientY),target:t.target};r.schedule(t),n.set(!1),e.set(y.some(a))}),y.none()}},{key:Dn(),value:function(t){return r.cancel(),mv(t).each(function(t){e.get().each(function(n){(function(t,e){var n=Math.abs(t.clientX-e.x()),r=Math.abs(t.clientY-e.y());return n>5||r>5})(t,n)&&e.set(y.none())})}),y.none()}},{key:Nn(),value:function(o){return r.cancel(),e.get().filter(function(t){return Cn(t.target(),o.target())}).map(function(e){return n.get()?(o.prevent(),!1):t.triggerEvent(Zn(),o)})}}]);return{fireIfReady:function(t,e){return lt(i,e).bind(function(e){return e(t)})}}},gv=hn().browser.isFirefox(),vv=Yt([_e("triggerEvent"),Ie("stopBackspace",!0)]),bv=function(t,n){var r=ae("Getting GUI events settings",vv,n),o=pv(r),i=L(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),function(e){return cv(t,e,function(t){o.fireIfReady(t,e).each(function(e){e&&t.kill()}),r.triggerEvent(e,t)&&t.kill()})}),a=je(y.none()),u=cv(t,"paste",function(t){o.fireIfReady(t,"paste").each(function(e){e&&t.kill()}),r.triggerEvent("paste",t)&&t.kill(),a.set(y.some(e.setTimeout(function(){r.triggerEvent(Kn(),t)},0)))}),s=cv(t,"keydown",function(t){r.triggerEvent("keydown",t)?t.kill():!0===r.stopBackspace&&function(t){return 8===t.raw().which&&!B(["input","textarea"],ao(t.target()))&&!dv(t.target(),'[contenteditable="true"]')}(t)&&t.prevent()}),c=function(t,e){return gv?lv(t,"focus",e):cv(t,"focusin",e)}(t,function(t){r.triggerEvent("focusin",t)&&t.kill()}),l=je(y.none()),f=function(t,e){return gv?lv(t,"blur",e):cv(t,"focusout",e)}(t,function(t){r.triggerEvent("focusout",t)&&t.kill(),l.set(y.some(e.setTimeout(function(){r.triggerEvent(Gn(),t)},0)))});return{unbind:function(){H(i,function(t){t.unbind()}),s.unbind(),c.unbind(),f.unbind(),u.unbind(),a.get().each(e.clearTimeout),l.get().each(e.clearTimeout)}}},yv=function(t,e){var n=lt(t,"target").map(function(t){return t()}).getOr(e);return je(n)},xv=ht([{stopped:[]},{resume:["element"]},{complete:[]}]),wv=function(t,e,n,r,i,a){var u=t(e,r),s=function(t,e){var n=je(!1),r=je(!1);return{stop:function(){n.set(!0)},cut:function(){r.set(!0)},isStopped:n.get,isCut:r.get,event:o(t),setSource:e.set,getSource:e.get}}(n,i);return u.fold(function(){return a.logEventNoHandlers(e,r),xv.complete()},function(t){var n=t.descHandler();return Uo(n)(s),s.isStopped()?(a.logEventStopped(e,t.element(),n.purpose()),xv.stopped()):s.isCut()?(a.logEventCut(e,t.element(),n.purpose()),xv.complete()):Yr(t.element()).fold(function(){return a.logNoParent(e,t.element(),n.purpose()),xv.complete()},function(r){return a.logEventResponse(e,t.element(),n.purpose()),xv.resume(r)})})},Cv=function(t,e,r){var i=function(t){var e=je(!1);return{stop:function(){e.set(!0)},cut:n,isStopped:e.get,isCut:o(!1),event:o(t),setSource:s("Cannot set source of a broadcasted event"),getSource:s("Cannot get source of a broadcasted event")}}(e);return H(t,function(t){var e=t.descHandler();Uo(e)(i)}),i.isStopped()},_v=function(t,e,n,r,o){return function t(e,n,r,o,i,a){return wv(e,n,r,o,i,a).fold(function(){return!0},function(o){return t(e,n,r,o,i,a)},function(){return!1})}(t,e,n,r,yv(n,r),o)},kv=Hr("element","descHandler"),Sv=function(t,e){return{id:o(t),descHandler:o(e)}};function Tv(){var t=function(){var t={};return{registerId:function(e,n,r){ot(r,function(r,o){var i=void 0!==t[o]?t[o]:{};i[n]=jo(r,e),t[o]=i})},unregisterId:function(e){ot(t,function(t,n){t.hasOwnProperty(e)&&delete t[e]})},filterByType:function(e){return lt(t,e).map(function(t){return ut(t,function(t,e){return Sv(e,t)})}).getOr([])},find:function(e,n,r){var o=lt(t,n);return Sn(r,function(t){return function(t,e){return Oo(e).fold(function(){return y.none()},function(n){return t.bind(function(t){return lt(t,n)}).map(function(t){return kv(e,t)})})}(o,t)},e)}}}(),e={},n=function(n){Oo(n.element()).each(function(n){delete e[n],t.unregisterId(n)})};return{find:function(e,n,r){return t.find(e,n,r)},filter:function(e){return t.filterByType(e)},register:function(r){var o=function(t){var e=t.element();return Oo(e).fold(function(){return To("uid-",t.element())},function(t){return t})}(r);dt(e,o)&&function(t,r){var o=e[r];if(o!==t)throw new Error('The tagId "'+r+'" is already used by: '+vo(o.element())+"\nCannot use it for: "+vo(t.element())+"\nThe conflicting element is"+(ni(o.element())?" ":" not ")+"already in the DOM");n(t)}(r,o);var i=[r];t.registerId(i,o,r.events()),e[o]=r},unregister:n,getById:function(t){return lt(e,t)}}}var Ev=Wl({name:"Container",factory:function(t){var e=t.dom,n=e.attributes,r=h(e,["attributes"]);return{uid:t.uid,dom:d({tag:"div",attributes:d({role:"presentation"},n)},r),components:t.components,behaviours:qc(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[Ie("components",[]),Wc("containerBehaviours",[]),Ie("events",{}),Ie("domModification",{}),Ie("eventOrder",{})]}),Ov=function(t){var e=function(e){return Yr(t.element()).fold(function(){return!0},function(t){return Cn(e,t)})},r=Tv(),i=function(t,n){return r.find(e,t,n)},a=bv(t.element(),{triggerEvent:function(t,e){return pa(t,e.target(),function(n){return function(t,e,n,r){var o=n.target();return _v(t,e,n,o,r)}(i,t,e,n)})}}),u={debugInfo:o("real"),triggerEvent:function(t,e,n){pa(t,e,function(r){return _v(i,t,n,e,r)})},triggerFocus:function(t,e){Oo(t).fold(function(){xu(t)},function(r){pa($n(),t,function(r){return function(t,e,n,r,o){var i=yv(n,r);wv(t,e,n,r,i,o)}(i,$n(),{originator:o(e),kill:n,prevent:n,target:o(t)},t,r),!1})})},triggerEscape:function(t,e){u.triggerEvent("keydown",t.element(),e.event())},getByUid:function(t){return g(t)},getByDom:function(t){return v(t)},build:Ti,addToGui:function(t){l(t)},removeFromGui:function(t){f(t)},addToWorld:function(t){s(t)},removeFromWorld:function(t){c(t)},broadcast:function(t){h(t)},broadcastOn:function(t,e){m(t,e)},broadcastEvent:function(t,e){p(t,e)},isConnected:o(!0)},s=function t(e){e.connect(u),co(e.element())||(r.register(e),H(e.components(),t),u.triggerEvent(rr(),e.element(),{target:o(e.element())}))},c=function t(e){co(e.element())||(H(e.components(),t),r.unregister(e)),e.disconnect()},l=function(e){ac(t,e)},f=function(t){cc(t)},d=function(t){var e=r.filter(Xn());H(e,function(e){var n=e.descHandler();Uo(n)(t)})},h=function(t){d({universal:o(!0),data:o(t)})},m=function(t,e){d({universal:o(!1),channels:o(t),data:o(e)})},p=function(t,e){var n=r.filter(t);return Cv(n,e)},g=function(t){return r.getById(t).fold(function(){return C.error(new Error('Could not find component with uid: "'+t+'" in system.'))},C.value)},v=function(t){var e=Oo(t).getOr("not found");return g(e)};return s(t),{root:o(t),element:t.element,destroy:function(){a.unbind(),no(t.element())},add:l,remove:f,getByUid:g,getByDom:v,addToWorld:s,removeFromWorld:c,broadcast:h,broadcastOn:m,broadcastEvent:p}},Dv=wo("form-component-change"),Nv=wo("form-close"),Av=wo("form-cancel"),Mv=wo("form-action"),Iv=wo("form-submit"),zv=wo("form-block"),Bv=wo("form-unblock"),Rv=wo("form-tabchange"),Pv=wo("form-resize"),Lv=o([Ie("prefix","form-field"),Wc("fieldBehaviours",[Xl,Uc])]),Hv=o([bl({schema:[be("dom")],name:"label"}),bl({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[be("text")],name:"aria-descriptor"}),gl({factory:{sketch:function(t){var e=Bt(t,["factory"]);return t.factory.sketch(e)}},schema:[be("factory")],name:"field"})]),Fv=ql({name:"FormField",configFields:Lv(),partFields:Hv(),factory:function(t,e,n,r){var o=Yc(t.fieldBehaviours,[Xl.config({find:function(e){return Nl(e,t,"field")}}),Uc.config({store:{mode:"manual",getValue:function(t){return Xl.getCurrent(t).bind(Uc.getValue)},setValue:function(t,e){Xl.getCurrent(t).each(function(t){Uc.setValue(t,e)})}}})]),i=kr([Br(function(e,n){var r=Ml(e,t,["label","field","aria-descriptor"]);r.field().each(function(e){var n=wo(t.prefix);r.label().each(function(t){fo(t.element(),"for",n),fo(e.element(),"id",n)}),r["aria-descriptor"]().each(function(n){var r=wo(t.prefix);fo(n.element(),"id",r),fo(e.element(),"aria-describedby",r)})})})]),a={getField:function(e){return Nl(e,t,"field")},getLabel:function(e){return Nl(e,t,"label")}};return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:a}},apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),Vv=o([Ee("data"),Ie("inputAttributes",{}),Ie("inputStyles",{}),Ie("tag","input"),Ie("inputClasses",[]),ka("onSetValue"),Ie("styles",{}),Ie("eventOrder",{}),Wc("inputBehaviours",[Uc,ih]),Ie("selectOnFocus",!0)]),jv=function(t){return lu([ih.config({onFocus:t.selectOnFocus?function(t){var e=t.element(),n=vi(e);e.dom().setSelectionRange(0,n.length)}:n})])},Uv=function(t){return d(d({},jv(t)),Yc(t.inputBehaviours,[Uc.config({store:d(d({mode:"manual"},t.data.map(function(t){return{initialValue:t}}).getOr({})),{getValue:function(t){return vi(t.element())},setValue:function(t,e){vi(t.element())!==e&&bi(t.element(),e)}}),onSetValue:t.onSetValue})]))},Wv=function(t){return{tag:t.tag,attributes:d({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},qv=Wl({name:"Input",configFields:Vv(),factory:function(t,e){return{uid:t.uid,dom:Wv(t),components:[],behaviours:Uv(t),eventOrder:t.eventOrder}}}),Yv={},$v={exports:Yv};!function(e,n,r,o){!function(e){"object"==_typeof(n)&&void 0!==r?r.exports=e():("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof o&&o;if(!s&&c)return c(u,!0);if(a)return a(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[u]={exports:{}};e[u][0].call(f.exports,function(t){return i(e[u][1][t]||t)},f,f.exports,t,e,n,r)}return n[u].exports}for(var a="function"==typeof o&&o,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var t=s(h);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new p(t,e)),1!==l.length||f||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,e,n){(function(t){!function(n){var r=setTimeout;function o(){}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 a(t,e){for(;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(t){return void s(e.promise,t)}u(e.promise,r)}else(1===t._state?u:s)(e.promise,t._value)})):t._deferreds.push(e)}function u(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 c(t);if("function"==typeof n)return void f((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){s(t,e)}var r,o}function s(t,e){t._state=2,t._value=e,c(t)}function c(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++)a(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,u(e,t))},function(t){n||(n=!0,s(e,t))})}catch(t){if(n)return;n=!0,s(e,t)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(o);return a(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,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){o(i,t)},n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}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 t?function(e){t(e)}:function(t){r(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},void 0!==e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(t,e,n){(function(e,r){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},s=0;function c(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n.setImmediate="function"==typeof e?e:function(t){var e=s++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o(function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))}),e},n.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)})}(0,Yv,$v,void 0);var Gv,Kv=$v.exports.boltExport,Xv=function t(n){var r=y.none(),o=[],i=function(t){a()?u(t):o.push(t)},a=function(){return r.isSome()},u=function(t){r.each(function(n){e.setTimeout(function(){t(n)},0)})};return n(function(t){r=y.some(t),function(t){H(t,u)}(o),o=[]}),{get:i,map:function(e){return t(function(t){i(function(n){t(e(n))})})},isReady:a}},Jv=Xv,Qv=function(t){e.setTimeout(function(){throw t},0)},Zv=function t(e){var n=function(t){e().then(t,Qv)};return{map:function(n){return t(function(){return e().then(n)})},bind:function(n){return t(function(){return e().then(function(t){return n(t).toPromise()})})},anonBind:function(n){return t(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return Jv(n)},toCached:function(){var n=null;return t(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}},tb=function(t){return Zv(function(){return new Kv(t)})},eb=function(t){return Zv(function(){return Kv.resolve(t)})},nb=["input","textarea"],rb=function(t){var e=ao(t);return B(nb,e)},ob=function(t,e){var n=e.getRoot(t).getOr(t.element());Jo(n,e.invalidClass),e.notify.each(function(e){rb(t.element())&&fo(t.element(),"aria-invalid",!1),e.getContainer(t).each(function(t){io(t,e.validHtml)}),e.onValid(t)})},ib=function(t,e,n,r){var o=e.getRoot(t).getOr(t.element());Xo(o,e.invalidClass),e.notify.each(function(e){rb(t.element())&&fo(t.element(),"aria-invalid",!0),e.getContainer(t).each(function(t){io(t,r)}),e.onInvalid(t,r)})},ab=function(t,e,n){return e.validator.fold(function(){return eb(C.value(!0))},function(e){return e.validate(t)})},ub=function(t,e,n){return e.notify.each(function(e){e.onValidate(t)}),ab(t,e).map(function(n){return t.getSystem().isConnected()?n.fold(function(n){return ib(t,e,0,n),C.error(n)},function(n){return ob(t,e),C.value(n)}):C.error("No longer in system")})},sb=Object.freeze({__proto__:null,markValid:ob,markInvalid:ib,query:ab,run:ub,isInvalid:function(t,e){var n=e.getRoot(t).getOr(t.element());return Qo(n,e.invalidClass)}}),cb=Object.freeze({__proto__:null,events:function(t,e){return t.validator.map(function(e){return kr([Er(e.onEvent,function(e){ub(e,t).get(i)})].concat(e.validateOnLoad?[Br(function(e){ub(e,t).get(n)})]:[]))}).getOr({})}}),lb=[be("invalidClass"),Ie("getRoot",y.none),Me("notify",[Ie("aria","alert"),Ie("getContainer",y.none),Ie("validHtml",""),ka("onValid"),ka("onInvalid"),ka("onValidate")]),Me("validator",[be("validate"),Ie("onEvent","input"),Ie("validateOnLoad",!0)])],fb=du({fields:lb,name:"invalidating",active:cb,apis:sb,extra:{validation:function(t){return function(e){var n=Uc.getValue(e);return eb(t(n))}}}}),db=Object.freeze({__proto__:null,exhibit:function(t,e){return Vo({attributes:Pt([{key:e.tabAttr,value:"true"}])})}}),hb=[Ie("tabAttr","data-alloy-tabstop")],mb=du({fields:hb,name:"tabstopping",active:db}),pb=function(t,e,n,r){var o=gb(t,e,n,r);return Fv.sketch(o)},gb=function(t,e,n,r){return{dom:vb(n),components:t.toArray().concat([e]),fieldBehaviours:lu(r)}},vb=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},bb=function(t,e){return Fv.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},yb=Object.freeze({__proto__:null,getCoupled:function(t,e,n,r){return n.getOrCreate(t,e,r)}}),xb=[ye("others",re(C.value,le()))],wb=du({fields:xb,name:"coupling",apis:yb,state:Object.freeze({__proto__:null,init:function(){var t={},e=o({});return Ho({readState:e,getOrCreate:function(e,n,r){var o=nt(n.others);if(o)return lt(t,r).getOrThunk(function(){var o=lt(n.others,r).getOrDie("No information found for coupled component: "+r)(e),i=e.getSystem().build(o);return t[r]=i,i});throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})}),Cb=o("sink"),_b=o(bl({name:Cb(),overrides:o({dom:{tag:"div"},behaviours:lu([ec.config({useFixed:l})]),events:kr([Mr(Hn()),Mr(Mn()),Mr(Un())])})}));!function(t){t[t.HighlightFirst=0]="HighlightFirst",t[t.HighlightNone=1]="HighlightNone"}(Gv||(Gv={}));var kb=function(t,e){var n=t.getHotspot(e).getOr(e),r=t.getAnchorOverrides();return t.layouts.fold(function(){return{anchor:"hotspot",hotspot:n,overrides:r}},function(t){return{anchor:"hotspot",hotspot:n,overrides:r,layouts:t}})},Sb=function(t,e,n,r,o,i,a){return function(t,e,n,r,o,i,a){var u=function(t,e,n){return(0,t.fetch)(n).map(e)}(t,e,r),s=Eb(r,t);return u.map(function(t){return t.bind(function(t){return y.from(Lh.sketch(d(d({},i.menu()),{uid:Do(""),data:t,highlightImmediately:a===Gv.HighlightFirst,onOpenMenu:function(t,e){var r=s().getOrDie();ec.position(r,n,e),_c.decloak(o)},onOpenSubmenu:function(t,e,n){var r=s().getOrDie();ec.position(r,{anchor:"submenu",item:e},n),_c.decloak(o)},onRepositionMenu:function(t,e,r){var o=s().getOrDie();ec.position(o,n,e),H(r,function(t){ec.position(o,{anchor:"submenu",item:t.triggeringItem},t.triggeredMenu)})},onEscape:function(){return ih.focus(r),_c.close(o),y.some(!0)}})))})})}(t,e,kb(t,n),n,r,o,a).map(function(t){return t.fold(function(){_c.isOpen(r)&&_c.close(r)},function(t){_c.cloak(r),_c.open(r,t),i(r)}),r})},Tb=function(t,e,n,r,o,i){var a=wb.getCoupled(n,"sandbox");return(_c.isOpen(a)?function(t,e,n,r,o,i,a){return _c.close(r),eb(r)}:Sb)(t,e,n,a,r,o,i)},Eb=function(t,e){return t.getSystem().getByUid(e.uid+"-"+Cb()).map(function(t){return function(){return C.value(t)}}).getOrThunk(function(){return e.lazySink.fold(function(){return function(){return C.error(new Error("No internal sink is specified, nor could an external sink be found"))}},function(e){return function(){return e(t)}})})},Ob=function(t){_c.getState(t).each(function(t){Lh.repositionMenus(t)})},Db=function(t,e,n){var r=sa(),i=Eb(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id(),role:"listbox"}},behaviours:Gc(t.sandboxBehaviours,[Uc.config({store:{mode:"memory",initialValue:e}}),_c.config({onOpen:function(o,i){var a=kb(t,e);r.link(e.element()),t.matchWidth&&function(t,e,n){var r=Xl.getCurrent(e).getOr(e),o=Pi(t.element());n?ui(r.element(),"min-width",o+"px"):function(t,e){Ri.set(t,e)}(r.element(),o)}(a.hotspot,i,t.useMinWidth),t.onOpen(a,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},onClose:function(t,o){r.unlink(e.element()),void 0!==n&&void 0!==n.onClose&&n.onClose(t,o)},isPartOf:function(t,n,r){return la(n,r)||la(e,r)},getAttachPoint:function(){return i().getOrDie()}}),Xl.config({find:function(t){return _c.getState(t).bind(function(t){return Xl.getCurrent(t)})}}),bu.config({channels:d(d({},Oc({isExtraPart:o(!1)})),Nc({isExtraPart:o(!1),doReposition:Ob}))})])}},Nb=function(t){var e=wb.getCoupled(t,"sandbox");Ob(e)},Ab=function(){return[Ie("sandboxClasses",[]),$c("sandboxBehaviours",[Xl,bu,_c,Uc])]},Mb=o([be("dom"),be("fetch"),ka("onOpen"),Sa("onExecute"),Ie("getHotspot",y.some),Ie("getAnchorOverrides",o({})),ts(),Wc("dropdownBehaviours",[vh,wb,Gd,ih]),be("toggleClass"),Ie("eventOrder",{}),Ee("lazySink"),Ie("matchWidth",!1),Ie("useMinWidth",!1),Ee("role")].concat(Ab())),Ib=o([vl({schema:[wa()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),_b()]),zb=ql({name:"Dropdown",configFields:Mb(),partFields:Ib(),factory:function(t,e,r,o){var i,a=function(t){_c.getState(t).each(function(t){Lh.highlightPrimary(t)})},u={expand:function(e){vh.isOn(e)||Tb(t,function(t){return t},e,o,n,Gv.HighlightNone).get(n)},open:function(e){vh.isOn(e)||Tb(t,function(t){return t},e,o,n,Gv.HighlightFirst).get(n)},isOpen:vh.isOn,close:function(e){vh.isOn(e)&&Tb(t,function(t){return t},e,o,n,Gv.HighlightFirst).get(n)},repositionMenus:function(t){vh.isOn(t)&&Nb(t)}},s=function(t,e){return xr(t),y.some(!0)};return{uid:t.uid,dom:t.dom,components:e,behaviours:Yc(t.dropdownBehaviours,[vh.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),wb.config({others:{sandbox:function(e){return Db(t,e,{onOpen:function(){vh.on(e)},onClose:function(){vh.off(e)}})}}}),Gd.config({mode:"special",onSpace:s,onEnter:s,onDown:function(t,e){if(zb.isOpen(t)){var n=wb.getCoupled(t,"sandbox");a(n)}else zb.open(t);return y.some(!0)},onEscape:function(t,e){return zb.isOpen(t)?(zb.close(t),y.some(!0)):y.none()}}),ih.config({})]),events:yh(y.some(function(e){Tb(t,function(t){return t},e,o,a,Gv.HighlightFirst).get(n)})),eventOrder:d(d({},t.eventOrder),(i={},i[Jn()]=["disabling","toggling","alloy.base.behaviour"],i)),apis:u,domModification:{attributes:d(d({"aria-haspopup":"true"},t.role.fold(function(){return{}},function(t){return{role:t}})),"button"===t.dom.tag?{type:("type",lt(t.dom,"attributes").bind(function(t){return lt(t,"type")})).getOr("button")}:{})}}},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)}}}),Bb=Object.freeze({__proto__:null,events:function(){return kr([Sr(qn(),o(!0))])},exhibit:function(){return Vo({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}}),Rb=du({fields:[],name:"unselecting",active:Bb}),Pb=wo("color-input-change"),Lb=wo("color-swatch-change"),Hb=wo("color-picker-cancel"),Fb=function(t,e,n){return{hue:o(t),saturation:o(e),value:o(n)}},Vb=o(wo("rgb-hex-update")),jb=o(wo("slider-update")),Ub=o(wo("palette-update")),Wb=bl({schema:[be("dom")],name:"label"}),qb=function(t){return bl({name:t+"-edge",overrides:function(e){return e.model.manager.edgeActions[t].fold(function(){return{}},function(t){return{events:kr([Or(On(),function(e,n,r){return t(e,r)},[e]),Or(Mn(),function(e,n,r){return t(e,r)},[e]),Or(In(),function(e,n,r){r.mouseIsDown.get()&&t(e,r)},[e])])}})}})},Yb=qb("top-left"),$b=qb("top"),Gb=qb("top-right"),Kb=qb("right"),Xb=qb("bottom-right"),Jb=qb("bottom"),Qb=qb("bottom-left"),Zb=[Wb,qb("left"),Kb,$b,Jb,Yb,Gb,Qb,Xb,gl({name:"thumb",defaults:o({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:kr([Nr(On(),t,"spectrum"),Nr(Dn(),t,"spectrum"),Nr(Nn(),t,"spectrum"),Nr(Mn(),t,"spectrum"),Nr(In(),t,"spectrum"),Nr(Bn(),t,"spectrum")])}}}),gl({schema:[Ve("mouseIsDown",function(){return je(!1)})],name:"spectrum",overrides:function(t){var e=t.model.manager,n=function(n,r){return e.getValueFromEvent(r).map(function(r){return e.setValueFrom(n,t,r)})};return{behaviours:lu([Gd.config({mode:"special",onLeft:function(n){return e.onLeft(n,t)},onRight:function(n){return e.onRight(n,t)},onUp:function(n){return e.onUp(n,t)},onDown:function(n){return e.onDown(n,t)}}),ih.config({})]),events:kr([Er(On(),n),Er(Dn(),n),Er(Mn(),n),Er(In(),function(e,r){t.mouseIsDown.get()&&n(e,r)})])}}})],ty=o("slider.change.value"),ey=function(t){var e=t.event().raw();if(-1!==e.type.indexOf("touch")){var n=e;return void 0!==n.touches&&1===n.touches.length?y.some(n.touches[0]).map(function(t){return Mi(t.clientX,t.clientY)}):y.none()}var r=e;return void 0!==r.clientX?y.some(r).map(function(t){return Mi(t.clientX,t.clientY)}):y.none()},ny=function(t){return t.model.minX},ry=function(t){return t.model.minY},oy=function(t){return t.model.minX-1},iy=function(t){return t.model.minY-1},ay=function(t){return t.model.maxX},uy=function(t){return t.model.maxY},sy=function(t){return t.model.maxX+1},cy=function(t){return t.model.maxY+1},ly=function(t,e,n){return e(t)-n(t)},fy=function(t){return ly(t,ay,ny)},dy=function(t){return ly(t,uy,ry)},hy=function(t){return fy(t)/2},my=function(t){return dy(t)/2},py=function(t){return t.stepSize},gy=function(t){return t.snapToGrid},vy=function(t){return t.snapStart},by=function(t){return t.rounded},yy=function(t,e){return void 0!==t[e+"-edge"]},xy=function(t){return yy(t,"left")},wy=function(t){return yy(t,"right")},Cy=function(t){return yy(t,"top")},_y=function(t){return yy(t,"bottom")},ky=function(t){return t.model.value.get()},Sy=function(t){return{x:o(t)}},Ty=function(t){return{y:o(t)}},Ey=function(t,e){return{x:o(t),y:o(e)}},Oy=function(t,e){yr(t,ty(),{value:e})},Dy=function(t,e,n,r){return t<e?t:t>n?n:t===e?e-1:Math.max(e,t-r)},Ny=function(t,e,n,r){return t>n?t:t<e?e:t===n?n+1:Math.min(n,t+r)},Ay=function(t,e,n){return Math.max(e,Math.min(n,t))},My=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,a=t.snap,u=t.snapStart,s=t.rounded,c=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,h=t.screenRange,m=c?e-1:e,p=l?n+1:n;if(o<f)return m;if(o>d)return p;var g=function(t,e,n){return Math.min(n,Math.max(t,e))-e}(o,f,d),v=Ay(g/h*r+e,m,p);return a&&v>=e&&v<=n?function(t,e,n,r,o){return u.fold(function(){var o=t-e,i=Math.round(o/r)*r;return Ay(e+i,e-1,n+1)},function(e){var o=(t-e)%r,i=Math.round(o/r),a=Math.floor((t-e)/r),u=Math.floor((n-e)/r),s=e+Math.min(u,a+i)*r;return Math.max(e,s)})}(v,e,n,i):s?Math.round(v):v},Iy=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,s=t.maxOffset,c=t.centerMinEdge,l=t.centerMaxEdge;return o<e?i?0:c:o>n?a?u:l:(o-e)/r*s},zy=function(t){return t.element().dom().getBoundingClientRect()},By=function(t,e){return t[e]},Ry=function(t){var e=zy(t);return By(e,"left")},Py=function(t){var e=zy(t);return By(e,"right")},Ly=function(t){var e=zy(t);return By(e,"top")},Hy=function(t){var e=zy(t);return By(e,"bottom")},Fy=function(t){var e=zy(t);return By(e,"width")},Vy=function(t){var e=zy(t);return By(e,"height")},jy=function(t,e,n){return(t+e)/2-n},Uy=function(t,e){var n=zy(t),r=zy(e),o=By(n,"left"),i=By(n,"right"),a=By(r,"left");return jy(o,i,a)},Wy=function(t,e){var n=zy(t),r=zy(e),o=By(n,"top"),i=By(n,"bottom"),a=By(r,"top");return jy(o,i,a)},qy=function(t,e){yr(t,ty(),{value:e})},Yy=function(t){return{x:o(t)}},$y=function(t,e,n){var r={min:ny(e),max:ay(e),range:fy(e),value:n,step:py(e),snap:gy(e),snapStart:vy(e),rounded:by(e),hasMinEdge:xy(e),hasMaxEdge:wy(e),minBound:Ry(t),maxBound:Py(t),screenRange:Fy(t)};return My(r)},Gy=function(t){return function(e,n){return function(t,e,n){var r=(t>0?Ny:Dy)(ky(n).x(),ny(n),ay(n),py(n));return qy(e,Yy(r)),y.some(r)}(t,e,n).map(function(){return!0})}},Ky=function(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=Fy(t),a=r.bind(function(e){return y.some(Uy(e,t))}).getOr(0),u=o.bind(function(e){return y.some(Uy(e,t))}).getOr(i),s={min:ny(e),max:ay(e),range:fy(e),value:n,hasMinEdge:xy(e),hasMaxEdge:wy(e),minBound:Ry(t),minOffset:0,maxBound:Py(t),maxOffset:i,centerMinEdge:a,centerMaxEdge:u};return Iy(s)}(e,i,n,r,o);return Ry(e)-Ry(t)+a},Xy=Gy(-1),Jy=Gy(1),Qy=y.none,Zy=y.none,tx={"top-left":y.none(),top:y.none(),"top-right":y.none(),right:y.some(function(t,e){Oy(t,Sy(sy(e)))}),"bottom-right":y.none(),bottom:y.none(),"bottom-left":y.none(),left:y.some(function(t,e){Oy(t,Sy(oy(e)))})},ex=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=$y(t,e,n),o=Yy(r);return qy(t,o),r},setToMin:function(t,e){var n=ny(e);qy(t,Yy(n))},setToMax:function(t,e){var n=ay(e);qy(t,Yy(n))},findValueOfOffset:$y,getValueFromEvent:function(t){return ey(t).map(function(t){return t.left()})},findPositionOfValue:Ky,setPositionFromValue:function(t,e,n,r){var o=ky(n),i=Ky(t,r.getSpectrum(t),o.x(),r.getLeftEdge(t),r.getRightEdge(t),n),a=Pi(e.element())/2;ui(e.element(),"left",i-a+"px")},onLeft:Xy,onRight:Jy,onUp:Qy,onDown:Zy,edgeActions:tx}),nx=function(t,e){yr(t,ty(),{value:e})},rx=function(t){return{y:o(t)}},ox=function(t,e,n){var r={min:ry(e),max:uy(e),range:dy(e),value:n,step:py(e),snap:gy(e),snapStart:vy(e),rounded:by(e),hasMinEdge:Cy(e),hasMaxEdge:_y(e),minBound:Ly(t),maxBound:Hy(t),screenRange:Vy(t)};return My(r)},ix=function(t){return function(e,n){return function(t,e,n){var r=(t>0?Ny:Dy)(ky(n).y(),ry(n),uy(n),py(n));return nx(e,rx(r)),y.some(r)}(t,e,n).map(function(){return!0})}},ax=function(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=Vy(t),a=r.bind(function(e){return y.some(Wy(e,t))}).getOr(0),u=o.bind(function(e){return y.some(Wy(e,t))}).getOr(i),s={min:ry(e),max:uy(e),range:dy(e),value:n,hasMinEdge:Cy(e),hasMaxEdge:_y(e),minBound:Ly(t),minOffset:0,maxBound:Hy(t),maxOffset:i,centerMinEdge:a,centerMaxEdge:u};return Iy(s)}(e,i,n,r,o);return Ly(e)-Ly(t)+a},ux=y.none,sx=y.none,cx=ix(-1),lx=ix(1),fx={"top-left":y.none(),top:y.some(function(t,e){Oy(t,Ty(iy(e)))}),"top-right":y.none(),right:y.none(),"bottom-right":y.none(),bottom:y.some(function(t,e){Oy(t,Ty(cy(e)))}),"bottom-left":y.none(),left:y.none()},dx=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=ox(t,e,n),o=rx(r);return nx(t,o),r},setToMin:function(t,e){var n=ry(e);nx(t,rx(n))},setToMax:function(t,e){var n=uy(e);nx(t,rx(n))},findValueOfOffset:ox,getValueFromEvent:function(t){return ey(t).map(function(t){return t.top()})},findPositionOfValue:ax,setPositionFromValue:function(t,e,n,r){var o=ky(n),i=ax(t,r.getSpectrum(t),o.y(),r.getTopEdge(t),r.getBottomEdge(t),n),a=Ni(e.element())/2;ui(e.element(),"top",i-a+"px")},onLeft:ux,onRight:sx,onUp:cx,onDown:lx,edgeActions:fx}),hx=function(t,e){yr(t,ty(),{value:e})},mx=function(t,e){return{x:o(t),y:o(e)}},px=function(t,e){return function(n,r){return function(t,e,n,r){var o=t>0?Ny:Dy,i=e?ky(r).x():o(ky(r).x(),ny(r),ay(r),py(r)),a=e?o(ky(r).y(),ry(r),uy(r),py(r)):ky(r).y();return hx(n,mx(i,a)),y.some(i)}(t,e,n,r).map(function(){return!0})}},gx=px(-1,!1),vx=px(1,!1),bx=px(-1,!0),yx=px(1,!0),xx={"top-left":y.some(function(t,e){Oy(t,Ey(oy(e),iy(e)))}),top:y.some(function(t,e){Oy(t,Ey(hy(e),iy(e)))}),"top-right":y.some(function(t,e){Oy(t,Ey(sy(e),iy(e)))}),right:y.some(function(t,e){Oy(t,Ey(sy(e),my(e)))}),"bottom-right":y.some(function(t,e){Oy(t,Ey(sy(e),cy(e)))}),bottom:y.some(function(t,e){Oy(t,Ey(hy(e),cy(e)))}),"bottom-left":y.some(function(t,e){Oy(t,Ey(oy(e),cy(e)))}),left:y.some(function(t,e){Oy(t,Ey(oy(e),my(e)))})},wx=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=$y(t,e,n.left()),o=ox(t,e,n.top()),i=mx(r,o);return hx(t,i),i},setToMin:function(t,e){var n=ny(e),r=ry(e);hx(t,mx(n,r))},setToMax:function(t,e){var n=ay(e),r=uy(e);hx(t,mx(n,r))},getValueFromEvent:function(t){return ey(t)},setPositionFromValue:function(t,e,n,r){var o=ky(n),i=Ky(t,r.getSpectrum(t),o.x(),r.getLeftEdge(t),r.getRightEdge(t),n),a=ax(t,r.getSpectrum(t),o.y(),r.getTopEdge(t),r.getBottomEdge(t),n),u=Pi(e.element())/2,s=Ni(e.element())/2;ui(e.element(),"left",i-u+"px"),ui(e.element(),"top",a-s+"px")},onLeft:gx,onRight:vx,onUp:bx,onDown:yx,edgeActions:xx}),Cx=ql({name:"Slider",configFields:[Ie("stepSize",1),Ie("onChange",n),Ie("onChoose",n),Ie("onInit",n),Ie("onDragStart",n),Ie("onDragEnd",n),Ie("snapToGrid",!1),Ie("rounded",!0),Ee("snapStart"),ye("model",ce("mode",{x:[Ie("minX",0),Ie("maxX",100),Ve("value",function(t){return je(t.mode.minX)}),be("getInitialValue"),Oa("manager",ex)],y:[Ie("minY",0),Ie("maxY",100),Ve("value",function(t){return je(t.mode.minY)}),be("getInitialValue"),Oa("manager",dx)],xy:[Ie("minX",0),Ie("maxX",100),Ie("minY",0),Ie("maxY",100),Ve("value",function(t){return je({x:o(t.mode.minX),y:o(t.mode.minY)})}),be("getInitialValue"),Oa("manager",wx)]})),Wc("sliderBehaviours",[Gd,Uc]),Ve("mouseIsDown",function(){return je(!1)})],partFields:Zb,factory:function(t,e,n,r){var i,a=function(e){return Al(e,t,"thumb")},u=function(e){return Al(e,t,"spectrum")},s=function(e){return Nl(e,t,"left-edge")},c=function(e){return Nl(e,t,"right-edge")},l=function(e){return Nl(e,t,"top-edge")},f=function(e){return Nl(e,t,"bottom-edge")},d=t.model,h=d.manager,m=function(e,n){h.setPositionFromValue(e,n,t,{getLeftEdge:s,getRightEdge:c,getTopEdge:l,getBottomEdge:f,getSpectrum:u})},p=function(e,n){d.value.set(n);var r=a(e);return m(e,r),t.onChange(e,r,n),y.some(!0)},g=function(e){var n=t.mouseIsDown.get();t.mouseIsDown.set(!1),n&&Nl(e,t,"thumb").each(function(n){var r=d.value.get();t.onChoose(e,n,r)})},v=function(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,a(e))},b=function(e,n){n.stop(),t.onDragEnd(e,a(e)),g(e)};return{uid:t.uid,dom:t.dom,components:e,behaviours:Yc(t.sliderBehaviours,[Gd.config({mode:"special",focusIn:function(e){return Nl(e,t,"spectrum").map(Gd.focusIn).map(o(!0))}}),Uc.config({store:{mode:"manual",getValue:function(t){return d.value.get()}}}),bu.config({channels:(i={},i[Tc()]={onReceive:g},i)})]),events:kr([Er(ty(),function(t,e){p(t,e.event().value())}),Br(function(e,n){var r=d.getInitialValue();d.value.set(r);var o=a(e);m(e,o);var i=u(e);t.onInit(e,o,i,d.value.get())}),Er(On(),v),Er(Nn(),b),Er(Mn(),v),Er(Bn(),b)]),apis:{resetToMin:function(e){h.setToMin(e,t)},resetToMax:function(e){h.setToMax(e,t)},changeValue:p,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),_x=function(t,e){var n=Cx.parts().spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=Cx.parts().thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return Cx.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:o({y:o(0)})},components:[n,r],sliderBehaviours:lu([ih.config({})]),onChange:function(t,e,n){yr(t,jb(),{value:n})}})},kx=[Wc("formBehaviours",[Uc])],Sx=function(t){return"<alloy.field."+t+">"},Tx=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:Yc(t.formBehaviours,[Uc.config({store:{mode:"manual",getValue:function(e){var n=Il(e,t);return it(n,function(t,e){return t().bind(function(t){var n,r;return n=Xl.getCurrent(t),r=new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+vo(t.element())),n.fold(function(){return C.error(r)},C.value)}).map(Uc.getValue)})},setValue:function(e,n){ot(n,function(n,r){Nl(e,t,r).each(function(t){Xl.getCurrent(t).each(function(t){Uc.setValue(t,n)})})})}}})]),apis:{getField:function(e,n){return Nl(e,t,n).bind(Xl.getCurrent)}}}},Ex={getField:Po(function(t,e,n){return t.getField(e,n)}),sketch:function(t){var e=function(){var t=[];return{field:function(e,n){return t.push(e),Sl("form",Sx(e),n)},record:function(){return t}}}(),n=t(e),r=e.record(),o=L(r,function(t){return gl({name:t,pname:Sx(t)})});return Fl("form",kx,o,Tx,n)}},Ox=wo("valid-input"),Dx=wo("invalid-input"),Nx=wo("validating-input"),Ax=function(t,e,r,i){var a=function(n,r){return fb.config({invalidClass:e("invalid"),notify:{onValidate:function(t){yr(t,Nx,{type:n})},onValid:function(t){yr(t,Ox,{type:n,value:Uc.getValue(t)})},onInvalid:function(t){yr(t,Dx,{type:n,value:Uc.getValue(t)})}},validator:{validate:function(e){var n=Uc.getValue(e),o=r(n)?C.value(!0):C.error(t("aria.input.invalid"));return eb(o)},validateOnLoad:!1}})},u=function(r,o,i,u,s){var c=t("colorcustom.rgb.range"),l=[Fv.parts().label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":u}}}),Fv.parts().field({data:s,factory:qv,inputAttributes:d({type:"text"},"hex"===o?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:lu([a(o,r),mb.config({})]),onSetValue:function(t){fb.isInvalid(t)&&fb.run(t).get(n)}})],f="hex"!==o?[Fv.parts()["aria-descriptor"]({text:c})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:l.concat(f)}},s=function(t,e){var n=e.red(),r=e.green(),o=e.blue();Uc.setValue(t,{red:n,green:r,blue:o})},c=bm({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),l=function(t,e){c.getOpt(t).each(function(t){ui(t.element(),"background-color","#"+e.value())})};return Wl({factory:function(){var n={red:o(je(y.some(255))),green:o(je(y.some(255))),blue:o(je(y.some(255))),hex:o(je(y.some("ffffff")))},a=function(t){return n[t]().get()},f=function(t,e){n[t]().set(e)},d=function(t){var e=t.red(),n=t.green(),r=t.blue();f("red",y.some(e)),f("green",y.some(n)),f("blue",y.some(r))},h=function(t,e){var n=e.event();"hex"!==n.type()?f(n.type(),y.none()):i(t)},m=function(t,e){var n=e.event();"hex"!==n.type()?function(t,e,n){var r=parseInt(n,10);f(e,y.some(r)),a("red").bind(function(t){return a("green").bind(function(e){return a("blue").map(function(n){return cg(t,e,n,1)})})}).each(function(e){var n=function(t,e){var n=rg(e);return Ex.getField(t,"hex").each(function(e){ih.isFocused(e)||Uc.setValue(t,{hex:n.value()})}),n}(t,e);l(t,n)})}(t,n.type(),n.value()):function(t,e){r(t);var n=Jp(e);f("hex",y.some(e));var o=dg(n);s(t,o),d(o),yr(t,Vb(),{hex:n}),l(t,n)}(t,n.value())},p=function(e){return{label:t("colorcustom.rgb."+e+".label"),description:t("colorcustom.rgb."+e+".description")}},g=p("red"),v=p("green"),b=p("blue"),x=p("hex");return gt(Ex.sketch(function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",Fv.sketch(u(lg,"red",g.label,g.description,255))),n.field("green",Fv.sketch(u(lg,"green",v.label,v.description,255))),n.field("blue",Fv.sketch(u(lg,"blue",b.label,b.description,255))),n.field("hex",Fv.sketch(u(tg,"hex",x.label,x.description,"ffffff"))),c.asSpec()],formBehaviours:lu([fb.config({invalidClass:e("form-invalid")}),th("rgb-form-events",[Er(Ox,m),Er(Dx,h),Er(Nx,h)])])}}),{apis:{updateHex:function(t,e){Uc.setValue(t,{hex:e.value()}),function(t,e){var n=dg(e);s(t,n),d(n)}(t,e),l(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})},Mx=function(t,e){return Wl({name:"ColourPicker",configFields:[be("dom"),Ie("onValidHex",n),Ie("onInvalidHex",n)],factory:function(n){var r,i=Ax(t,e,n.onValidHex,n.onInvalidHex),a=function(t,e){var n=Cx.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),r=Cx.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"<div class="+e("sv-palette-inner-thumb")+' role="presentation"></div>'}}),i=function(t,e){var n=t.width,r=t.height,o=t.getContext("2d");if(null!==o){o.fillStyle=e,o.fillRect(0,0,n,r);var i=o.createLinearGradient(0,0,n,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),o.fillStyle=i,o.fillRect(0,0,n,r);var a=o.createLinearGradient(0,0,0,r);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=a,o.fillRect(0,0,n,r)}};return Wl({factory:function(t){var a=o({x:o(0),y:o(0)}),u=lu([Xl.config({find:y.some}),ih.config({})]);return Cx.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[n,r],onChange:function(t,e,n){yr(t,Ub(),{value:n})},onInit:function(t,e,n,r){i(n.element().dom(),mg(pg()))},sliderBehaviours:u})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,e,n){!function(t,e){var n=t.components()[0].element().dom();i(n,mg(e))}(e,n)}},extraApis:{}})}(0,e),u={paletteRgba:o(je(pg()))},s=bm(a.sketch({})),c=bm(i.sketch({})),l=function(t,e){s.getOpt(t).each(function(t){var n=dg(e);u.paletteRgba().set(n),a.setRgba(t,n)})},f=function(t,e){c.getOpt(t).each(function(t){i.updateHex(t,e)})},d=function(t,e,n){H(n,function(n){n(t,e)})};return{uid:n.uid,dom:n.dom,components:[s.asSpec(),_x(0,e),c.asSpec()],behaviours:lu([th("colour-picker-events",[Er(Ub(),(r=[f],function(t,e){var n=e.event().value(),o=function(t){var e,n=0,r=0,o=t.red()/255,i=t.green()/255,a=t.blue()/255,u=Math.min(o,Math.min(i,a)),s=Math.max(o,Math.max(i,a));return u===s?Fb(0,0,100*(r=u)):(n=60*((n=o===u?3:a===u?1:5)-(o===u?i-a:a===u?o-i:a-o)/(s-u)),e=(s-u)/s,r=s,Fb(Math.round(n),Math.round(100*e),Math.round(100*r)))}(u.paletteRgba().get()),i=Fb(o.hue(),n.x(),100-n.y()),a=fg(i),s=rg(a);d(t,s,r)})),Er(jb(),function(){var t=[l,f];return function(e,n){var r=function(t){var e=Fb((100-t)/100*360,100,100),n=fg(e);return rg(n)}(n.event().value().y());d(e,r,t)}}())]),Xl.config({find:function(t){return c.getOpt(t)}}),Gd.config({mode:"acyclic"})])}}})},Ix=function(){return Xl.config({find:y.some})},zx=function(t){return Xl.config({find:t.getOpt})},Bx=function(t){return Xl.config({find:function(e){return Kr(e.element(),t).bind(function(t){return e.getSystem().getByDom(t).toOption()})}})},Rx={"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"},Px=function(t){return function(t){return Rx[t]}(t)},Lx=tinymce.util.Tools.resolve("tinymce.Resource"),Hx=$t([Ie("preprocess",i),Ie("postprocess",i)]),Fx=function(t,e,n){return Uc.config(gt({store:{mode:"manual",getValue:e,setValue:n}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},Vx=function(t,e){var n=ae("RepresentingConfigs.memento processors",Hx,e);return Uc.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=Uc.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);Uc.setValue(i,o)}}})},jx=Fx,Ux=function(t){return function(t,e,n){return Fx(t,function(t){return e(t.element())},function(t,e){return n(t.element(),e)})}(t,oo,io)},Wx=function(t){return Uc.config({store:{mode:"memory",initialValue:t}})},qx=wo("alloy-fake-before-tabstop"),Yx=wo("alloy-fake-after-tabstop"),$x=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:lu([ih.config({ignore:!0}),mb.config({})])}},Gx=function(t,e){yr(t,Hn(),{raw:{which:9,shiftKey:e}})},Kx=function(t){return dv(t,["."+qx,"."+Yx].join(","),o(!1))},Xx=function(t,e){var n=e.element();Qo(n,qx)?Gx(t,!0):Qo(n,Yx)&&Gx(t,!1)},Jx=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[$x([qx]),t,$x([Yx])],behaviours:lu([Bx(1)])}},Qx=!(hn().browser.isIE()||hn().browser.isEdge());function Zx(t,n){return nw(e.document.createElement("canvas"),t,n)}function tw(t){var e=Zx(t.width,t.height);return ew(e).drawImage(t,0,0),e}function ew(t){return t.getContext("2d")}function nw(t,e,n){return t.width=e,t.height=n,t}function rw(t){return t.naturalWidth||t.width}function ow(t){return t.naturalHeight||t.height}var iw=window.Promise?window.Promise:function(){var t=function(t){if("object"!=_typeof(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,r(a,this),r(u,this))},n=t.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){e.setTimeout(t,1)};function r(t,e){return function(){return t.apply(e,arguments)}}var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t){var e=this;null!==this._state?n(function(){var n=e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void t.reject(e)}t.resolve(r)}else(e._state?t.resolve:t.reject)(e._value)}):this._deferreds.push(t)}function a(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==_typeof(t)||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void l(r(e,t),r(a,this),r(u,this))}this._state=!0,this._value=t,s.call(this)}catch(t){u.call(this,t)}}function u(t){this._state=!1,this._value=t,s.call(this)}function s(){for(var t=0,e=this._deferreds;t<e.length;t++){var n=e[t];i.call(this,n)}this._deferreds=[]}function c(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function l(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(t){if(r)return;r=!0,n(t)}}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.then=function(e,n){var r=this;return new t(function(t,o){i.call(r,new c(e,n,t,o))})},t.all=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=Array.prototype.slice.call(1===e.length&&o(e[0])?e[0]:e);return new t(function(t,e){if(0===r.length)return t([]);var n=r.length;function o(i,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){o(i,t)},e)}r[i]=a,0==--n&&t(r)}catch(t){e(t)}}for(var i=0;i<r.length;i++)o(i,r[i])})},t.resolve=function(e){return e&&"object"==_typeof(e)&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,o=e;r<o.length;r++)o[r].then(t,n)})},t}();function aw(t,n,r){return n=n||"image/png",e.HTMLCanvasElement.prototype.toBlob?new iw(function(e,o){t.toBlob(function(t){t?e(t):o()},n,r)}):function(t){return new iw(function(n,r){(function(t){var n=t.split(","),r=/data:([^;]+)/.exec(n[0]);if(!r)return y.none();for(var o=r[1],i=n[1],a=e.atob(i),u=a.length,s=Math.ceil(u/1024),c=new Array(s),l=0;l<s;++l){for(var f=1024*l,d=Math.min(f+1024,u),h=new Array(d-f),m=f,p=0;m<d;++p,++m)h[p]=a[m].charCodeAt(0);c[l]=new Uint8Array(h)}return y.some(new e.Blob(c,{type:o}))})(t).fold(function(){r("uri is not base64: "+t)},n)})}(t.toDataURL(n,r))}function uw(t){return function(t){return new iw(function(n,r){var o=e.URL.createObjectURL(t),i=new e.Image,a=function(){i.removeEventListener("load",u),i.removeEventListener("error",s)};function u(){a(),n(i)}function s(){a(),r("Unable to load data of type "+t.type+": "+o)}i.addEventListener("load",u),i.addEventListener("error",s),i.src=o,i.complete&&u()})}(t).then(function(t){!function(t){e.URL.revokeObjectURL(t.src)}(t);var n=Zx(rw(t),ow(t));return ew(n).drawImage(t,0,0),n})}function sw(t,e,n){var r=e.type;function i(e,n){return t.then(function(t){return function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)}(t,e,n)})}return{getType:o(r),toBlob:function(){return iw.resolve(e)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then(function(t){return aw(t,e,n)})},toAdjustedDataURL:i,toAdjustedBase64:function(t,e){return i(t,e).then(function(t){return t.split(",")[1]})},toCanvas:function(){return t.then(tw)}}}function cw(t,e){return aw(t,e).then(function(e){return sw(iw.resolve(t),e,t.toDataURL())})}function lw(t,e,n){var r="string"==typeof t?parseFloat(t):t;return r>n?r=n:r<e&&(r=e),r}var fw=[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];function dw(t,e){for(var n,r=[],o=new Array(25),i=0;i<5;i++){for(var a=0;a<5;a++)r[a]=e[a+5*i];for(a=0;a<5;a++){n=0;for(var u=0;u<5;u++)n+=t[a+5*u]*r[u];o[a+5*i]=n}}return o}function hw(t,e){return t.toCanvas().then(function(n){return function(t,e,n){var r=ew(t),o=function(t,e){for(var n,r,o,i,a=t.data,u=e[0],s=e[1],c=e[2],l=e[3],f=e[4],d=e[5],h=e[6],m=e[7],p=e[8],g=e[9],v=e[10],b=e[11],y=e[12],x=e[13],w=e[14],C=e[15],_=e[16],k=e[17],S=e[18],T=e[19],E=0;E<a.length;E+=4)n=a[E],r=a[E+1],o=a[E+2],i=a[E+3],a[E]=n*u+r*s+o*c+i*l+f,a[E+1]=n*d+r*h+o*m+i*p+g,a[E+2]=n*v+r*b+o*y+i*x+w,a[E+3]=n*C+r*_+o*k+i*S+T;return t}(r.getImageData(0,0,t.width,t.height),n);return r.putImageData(o,0,0),cw(t,e)}(n,t.getType(),e)})}function mw(t){return function(e,n){return hw(e,t([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],n))}}var pw,gw,vw=function(t){return function(e){return hw(e,t)}}([-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]),bw=mw(function(t,e){return dw(t,[1,0,0,0,e=lw(255*e,-255,255),0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])}),yw=mw(function(t,e){var n;return e=lw(e,-1,1),dw(t,[(n=(e*=100)<0?127+e/100*127:127*(n=0==(n=e%1)?fw[e]:fw[Math.floor(e)]*(1-n)+fw[Math.floor(e)+1]*n)+127)/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])}),xw=(pw=[0,-1,0,-1,5,-1,0,-1,0],function(t){return function(t,e){return t.toCanvas().then(function(n){return function(t,e,n){var r=ew(t),o=r.getImageData(0,0,t.width,t.height),i=r.getImageData(0,0,t.width,t.height);return i=function(t,e,n){function r(t,e,n){return t>n?t=n:t<e&&(t=e),t}for(var o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=t.data,u=e.data,s=t.width,c=t.height,l=0;l<c;l++)for(var f=0;f<s;f++){for(var d=0,h=0,m=0,p=0;p<o;p++)for(var g=0;g<o;g++){var v=r(f+g-i,0,s-1),b=4*(r(l+p-i,0,c-1)*s+v),y=n[p*o+g];d+=a[b]*y,h+=a[b+1]*y,m+=a[b+2]*y}var x=4*(l*s+f);u[x]=r(d,0,255),u[x+1]=r(h,0,255),u[x+2]=r(m,0,255)}return e}(o,i,n),r.putImageData(i,0,0),cw(t,e)}(n,t.getType(),e)})}(t,pw)}),ww=(gw=function(t,e){return 255*Math.pow(t/255,1-e)},function(t,e){return t.toCanvas().then(function(n){return function(t,e,n){for(var r=ew(t),o=new Array(256),i=0;i<o.length;i++)o[i]=gw(i,n);var a=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}(r.getImageData(0,0,t.width,t.height),o);return r.putImageData(a,0,0),cw(t,e)}(n,t.getType(),e)})});var Cw=function(t){return vw(t)},_w=function(t){return xw(t)},kw=function(t,e){return ww(t,e)},Sw=function(t,e){return bw(t,e)},Tw=function(t,e){return yw(t,e)},Ew=function(t,e){return function(t,e){return t.toCanvas().then(function(n){return function(t,e,n){var r=Zx(t.width,t.height),o=ew(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),cw(r,e)}(n,t.getType(),e)})}(t,e)},Ow=function(t,e,n){return function(t,e,n){return t.toCanvas().then(function(r){return function t(e,n,r){var o=rw(e),i=ow(e),a=n/o,u=r/i,s=!1;(a<.5||a>2)&&(a=a<.5?.5:2,s=!0),(u<.5||u>2)&&(u=u<.5?.5:2,s=!0);var c=function(t,e,n){return new iw(function(r){var o=rw(t),i=ow(t),a=Math.floor(o*e),u=Math.floor(i*n),s=Zx(a,u);ew(s).drawImage(t,0,0,o,i,0,0,a,u),r(s)})}(e,a,u);return s?c.then(function(e){return t(e,n,r)}):c}(r,e,n).then(function(e){return cw(e,t.getType())})})}(t,e,n)},Dw=function(t,e){return function(t,e){return t.toCanvas().then(function(n){return function(t,e,n){var r=Zx(t.width,t.height),o=ew(r),i=0,a=0;return 90!==(n=n<0?360+n:n)&&270!==n||nw(r,r.height,r.width),90!==n&&180!==n||(i=r.width),270!==n&&180!==n||(a=r.height),o.translate(i,a),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),cw(r,e)}(n,t.getType(),e)})}(t,e)},Nw=function(t,e){return d({dom:{tag:"span",innerHtml:t,classes:["tox-icon","tox-tbtn__icon-wrap"]}},e)},Aw=function(t,e){return Nw(xm(t,e),{})},Mw=function(t,e){return Nw(xm(t,e),{behaviours:lu([Zd.config({})])})},Iw=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:lu([Zd.config({})])}},zw=wo("toolbar.button.execute"),Bw={"alloy.execute":["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]},Rw=wo("update-menu-text"),Pw=wo("update-menu-icon"),Lw=function(t,e,r){var o=je(n),i=t.text.map(function(t){return bm(Iw(t,e,r.providers))}),a=t.icon.map(function(t){return bm(Mw(t,r.providers.icons))}),u=function(t,e){var n=Uc.getValue(t);return ih.focus(n),yr(n,"keydown",{raw:e.event().raw()}),zb.close(n),y.some(!0)},s=t.role.fold(function(){return{}},function(t){return{role:t}}),c=t.tooltip.fold(function(){return{}},function(t){var e=r.providers.translate(t);return{title:e,"aria-label":e}});return bm(zb.sketch(d(d({},s),{dom:{tag:"button",classes:[e,e+"--select"].concat(L(t.classes,function(t){return e+"--"+t})),attributes:d({},c)},components:Vp([a.map(function(t){return t.asSpec()}),i.map(function(t){return t.asSpec()}),y.some({dom:{tag:"div",classes:[e+"__select-chevron"],innerHtml:xm("chevron-down",r.providers.icons)}})]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:lu(m(t.dropdownBehaviours,[Ap(t.disabled),Rb.config({}),Zd.config({}),th("dropdown-events",[Bp(t,o),Rp(t,o)]),th("menubutton-update-display-text",[Er(Rw,function(t,e){i.bind(function(e){return e.getOpt(t)}).each(function(t){Zd.set(t,[_i(r.providers.translate(e.event().text()))])})}),Er(Pw,function(t,e){a.bind(function(e){return e.getOpt(t)}).each(function(t){Zd.set(t,[Mw(e.event().icon(),r.providers.icons)])})})])])),eventOrder:gt(Bw,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:lu([Gd.config({mode:"special",onLeft:u,onRight:u})]),lazySink:r.getSink,toggleClass:e+"--active",parts:{menu:jg(0,t.columns,t.presets)},fetch:function(){return tb(t.fetch)}}))).asSpec()},Hw=function(t){return"separator"===t.type},Fw={type:"separator"},Vw=function(t,e){return function(t){return ft(t,"getSubmenuItems")}(t)?function(t,e){var n=t.getSubmenuItems(),r=jw(n,e);return{item:t,menus:gt(r.menus,Rt(t.value,r.items)),expansions:gt(r.expansions,Rt(t.value,t.value))}}(t,e):{item:t,menus:{},expansions:{}}},jw=function(t,e){var n=function(t,e){var n=j(t,function(t,n){return k(n)?""===n?t:"|"===n?t.length>0&&!Hw(t[t.length-1])?t.concat([Fw]):t:ft(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])},[]);return n.length>0&&Hw(n[n.length-1])&&n.pop(),n}(k(t)?t.split(" "):t,e);return V(n,function(t,n){var r=function(t){if(Hw(t))return t;var e=lt(t,"value").getOrThunk(function(){return wo("generated-menu-item")});return gt({value:e},t)}(n),o=Vw(r,e);return{menus:gt(t.menus,o.menus),items:[o.item].concat(t.items),expansions:gt(t.expansions,o.expansions)}},{menus:{},expansions:{},items:[]})},Uw=function(t,e,n,r){var o=wo("primary-menu"),i=jw(t,n.shared.providers.menuItems());if(0===i.items.length)return y.none();var a=iv(o,i.items,e,n,r),u=it(i.menus,function(t,r){return iv(r,t,e,n,!1)}),s=gt(u,Rt(o,a));return y.from(Lh.tieredData(o,s,i.expansions))},Ww=function(t){return{isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)},setActive:function(e){var n=t.element();e?(Xo(n,"tox-tbtn--enabled"),fo(n,"aria-pressed",!0)):(Jo(n,"tox-tbtn--enabled"),po(n,"aria-pressed"))},isActive:function(){return Qo(t.element(),"tox-tbtn--enabled")}}},qw=function(t,e,n,r){return Lw({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e){t.fetch(function(t){e(Uw(t,Lp.CLOSE_ON_EXECUTE,n,!1))})},onSetup:t.onSetup,getApi:Ww,columns:1,presets:"normal",classes:[],dropdownBehaviours:[mb.config({})]},e,n.shared)},Yw=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){xu(e.element()),yr(e,Mv,{name:t.name,value:t.storage.get()})})})}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e(L(t,function(t){var e=t.text.fold(function(){return{}},function(t){return{text:t}});return d(d({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})}))}},$w=function(t,e,n,r,o){void 0===n&&(n=[]);var i=e.fold(function(){return{}},function(t){return{action:t}}),a=d({buttonBehaviours:lu([Ap(t.disabled),mb.config({}),th("button press",[Tr("click"),Tr("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},i),u=gt(a,{dom:r});return gt(u,{components:o})},Gw=function(t,e,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map(function(t){return{"aria-label":n.translate(t),title:n.translate(t)}}).getOr({})},i=t.icon.map(function(t){return Aw(t,n.icons)}),a=Vp([i]);return $w(t,e,r,o,a)},Kw=function(t,e,n,r){void 0===r&&(r=[]);var o=Gw(t,y.some(e),n,r);return vm.sketch(o)},Xw=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map(function(t){return Aw(t,n.icons)}):y.none(),u=a.isSome()?Vp([a]):[],s=a.isSome()?{}:{innerHtml:i},c=m(t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],a.isSome()?["tox-button--icon"]:[],t.borderless?["tox-button--naked"]:[],o),l=d(d({tag:"button",classes:c},s),{attributes:{title:i}});return $w(t,e,r,l,u)},Jw=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=Xw(t,y.some(e),n,r,o);return vm.sketch(i)},Qw=function(t,n){return function(r){"custom"===n?yr(r,Mv,{name:t,value:{}}):"submit"===n?br(r,Iv):"cancel"===n?br(r,Av):e.console.error("Unknown button type: ",n)}},Zw=function(t,r,o){if("menu"===r){var i=t,a=d(d({},t),{onSetup:function(e){return e.setDisabled(t.disabled),n},fetch:Yw(i.items,function(){return u},o)}),u=bm(qw(a,"tox-tbtn",o,y.none()));return u.asSpec()}if("custom"===r||"cancel"===r||"submit"===r){var s=Qw(t.name,r),c=d(d({},t),{borderless:!1});return Jw(c,s,o.shared.providers,[])}e.console.error("Unknown footer button type: ",r)},tC=o([Ie("field1Name","field1"),Ie("field2Name","field2"),Ta("onLockedChange"),Ca(["lockClass"]),Ie("locked",!1),$c("coupledFieldBehaviours",[Xl,Uc])]),eC=function(t,e){return gl({factory:Fv,name:t,overrides:function(t){return{fieldBehaviours:lu([th("coupled-input-behaviour",[Er(Vn(),function(n){(function(t,e,n){return Nl(t,e,n).bind(Xl.getCurrent)})(n,t,e).each(function(e){Nl(n,t,"lock").each(function(r){vh.isOn(r)&&t.onLockedChange(n,e,r)})})})])])}}})},nC=o([eC("field1","field2"),eC("field2","field1"),gl({factory:vm,schema:[be("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:lu([vh.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),rC=ql({name:"FormCoupledInputs",configFields:tC(),partFields:nC(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Gc(t.coupledFieldBehaviours,[Xl.config({find:y.some}),Uc.config({store:{mode:"manual",getValue:function(e){var n,r=Bl(e,t,["field1","field2"]);return(n={})[t.field1Name]=Uc.getValue(r.field1()),n[t.field2Name]=Uc.getValue(r.field2()),n},setValue:function(e,n){var r=Bl(e,t,["field1","field2"]);dt(n,t.field1Name)&&Uc.setValue(r.field1(),n[t.field1Name]),dt(n,t.field2Name)&&Uc.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return Nl(e,t,"field1")},getField2:function(e){return Nl(e,t,"field2")},getLock:function(e){return Nl(e,t,"lock")}}}},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)}}}),oC=function(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null!==e){var n=parseFloat(e[1]),r=e[2];return C.value({value:n,unit:r})}return C.error(t)},iC=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return Object.prototype.hasOwnProperty.call(n,t)};return t.unit===e?y.some(t.value):r(t.unit)&&r(e)?n[t.unit]===n[e]?y.some(t.value):y.some(t.value/n[t.unit]*n[e]):y.none()},aC=function(t){return y.none()},uC=function(t,e){var n=aC,r=wo("ratio-event"),o=rC.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:[{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__lock"],innerHtml:xm("lock",e.icons)}},{dom:{tag:"span",classes:["tox-icon","tox-lock-icon__unlock"],innerHtml:xm("unlock",e.icons)}}],buttonBehaviours:lu([Ap(t.disabled),mb.config({})])}),i=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},a=function(e){return Fv.parts().field({factory:qv,inputClasses:["tox-textfield"],inputBehaviours:lu([Dp.config({disabled:t.disabled}),mb.config({}),th("size-input-events",[Er(Pn(),function(t,n){yr(t,r,{isField1:e})}),Er(jn(),function(e,n){yr(e,Dv,{name:t.name})})])]),selectOnFocus:!1})},u=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},s=rC.parts().field1(i([Fv.parts().label(u("Width")),a(!0)])),c=rC.parts().field2(i([Fv.parts().label(u("Height")),a(!1)]));return rC.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,c,i([u("&nbsp;"),o])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){oC(Uc.getValue(t)).each(function(t){n(t).each(function(t){Uc.setValue(e,function(t){var e,n={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},r=t.value.toFixed((e=t.unit)in n?n[e]:1);return-1!==r.indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+t.unit}(t))})})},coupledFieldBehaviours:lu([Dp.config({disabled:t.disabled,onDisabled:function(t){rC.getField1(t).bind(Fv.getField).each(Dp.disable),rC.getField2(t).bind(Fv.getField).each(Dp.disable),rC.getLock(t).each(Dp.disable)},onEnabled:function(t){rC.getField1(t).bind(Fv.getField).each(Dp.enable),rC.getField2(t).bind(Fv.getField).each(Dp.enable),rC.getLock(t).each(Dp.enable)}}),th("size-input-events2",[Er(r,function(t,e){var r=e.event().isField1(),o=r?rC.getField1(t):rC.getField2(t),i=r?rC.getField2(t):rC.getField1(t),a=o.map(Uc.getValue).getOr(""),u=i.map(Uc.getValue).getOr("");n=function(t,e){var n,r,o;return(n=oC(t).toOption(),r=oC(e).toOption(),o=function(t,e){return iC(t,e.unit).map(function(t){return e.value/t}).map(function(t){return function(t,e){return function(n){return iC(n,e).map(function(n){return{value:n*t,unit:e}})}}(t,e.unit)}).getOr(aC)},n.isSome()&&r.isSome()?y.some(o(n.getOrDie(),r.getOrDie())):y.none()).getOr(aC)}(a,u)})])])})},sC={undo:o(wo("undo")),redo:o(wo("redo")),zoom:o(wo("zoom")),back:o(wo("back")),apply:o(wo("apply")),swap:o(wo("swap")),transform:o(wo("transform")),tempTransform:o(wo("temp-transform")),transformApply:o(wo("transform-apply"))},cC=o("save-state"),lC=o("disable"),fC=o("enable"),dC={formActionEvent:Mv,saveState:cC,disable:lC,enable:fC},hC=function(t,e){var r=function(t,n,r,o){return bm(Jw({name:t,text:t,disabled:r,primary:o,icon:y.none(),borderless:!1},n,e))},i=function(t,n,r,o){return bm(Kw({name:t,icon:y.some(t),tooltip:y.some(n),disabled:o,primary:!1,borderless:!1},r,e))},a=function(t,e){t.map(function(t){var n=t.get(e);n.hasConfigured(Dp)&&Dp.disable(n)})},u=function(t,e){t.map(function(t){var n=t.get(e);n.hasConfigured(Dp)&&Dp.enable(n)})},s={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},c=n,l=function(t,e,n){yr(t,e,n)},f=function(t){return br(t,dC.disable())},d=function(t){return br(t,dC.enable())},h=function(t,e){f(t),l(t,sC.transform(),{transform:e}),d(t)},m=function(t){return function(){et.getOpt(t).each(function(t){Zd.set(t,[Z])})}},p=function(t,e){f(t),l(t,sC.transformApply(),{transform:e,swap:m(t)}),d(t)},g=function(){return r("Back",function(t){return l(t,sC.back(),{swap:m(t)})},!1,!1)},v=function(){return bm({dom:{tag:"div",classes:["tox-spacer"]},behaviours:lu([Dp.config({})])})},b=function(){return r("Apply",function(t){return l(t,sC.apply(),{swap:m(t)})},!0,!0)},x=function(){return function(e){var n=t.getRect();return function(t,e,n,r,o){return function(t,e,n,r,o){return t.toCanvas().then(function(i){return function(t,e,n,r,o,i){var a=Zx(o,i);return ew(a).drawImage(t,-n,-r),cw(a,e)}(i,t.getType(),e,n,r,o)})}(t,e,n,r,o)}(e,n.x,n.y,n.w,n.h)}},w=[g(),v(),r("Apply",function(e){var n=x();p(e,n),t.hideCrop()},!1,!0)],C=Ev.sketch({dom:s,components:w.map(function(t){return t.asSpec()}),containerBehaviours:lu([th("image-tools-crop-buttons-events",[Er(dC.disable(),function(t,e){a(w,t)}),Er(dC.enable(),function(t,e){u(w,t)})])])}),_=bm(uC({name:"size",label:y.none(),constrain:!0,disabled:!1},e)),k=[g(),v(),_,v(),r("Apply",function(t){_.getOpt(t).each(function(e){var n=Uc.getValue(e),r=function(t,e){return function(n){return Ow(n,t,e)}}(parseInt(n.width,10),parseInt(n.height,10));p(t,r)})},!1,!0)],S=Ev.sketch({dom:s,components:k.map(function(t){return t.asSpec()}),containerBehaviours:lu([th("image-tools-resize-buttons-events",[Er(dC.disable(),function(t,e){a(k,t)}),Er(dC.enable(),function(t,e){u(k,t)})])])}),T=function(t,e){return function(n){return t(n,e)}},E=T(Ew,"h"),O=T(Ew,"v"),D=T(Dw,-90),N=T(Dw,90),A=function(t,e){!function(t,e){f(t),l(t,sC.tempTransform(),{transform:e}),d(t)}(t,e)},M=[g(),v(),i("flip-horizontally","Flip horizontally",function(t){A(t,E)},!1),i("flip-vertically","Flip vertically",function(t){A(t,O)},!1),i("rotate-left","Rotate counterclockwise",function(t){A(t,D)},!1),i("rotate-right","Rotate clockwise",function(t){A(t,N)},!1),v(),b()],I=Ev.sketch({dom:s,components:M.map(function(t){return t.asSpec()}),containerBehaviours:lu([th("image-tools-fliprotate-buttons-events",[Er(dC.disable(),function(t,e){a(M,t)}),Er(dC.enable(),function(t,e){u(M,t)})])])}),z=function(t,n,r,i,a){var u=Cx.parts().label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),s=Cx.parts().spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=Cx.parts().thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return bm(Cx.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:a,getInitialValue:o({x:o(i)})},components:[u,s,c],sliderBehaviours:lu([ih.config({})]),onChoose:n}))},B=function(t,e,n,r,o){return z(t,function(t,n,r){var o=T(e,r.x()/100);h(t,o)},n,r,o)},R=function(t,e,n,r,o){var i=function(t,e,n,r,o){return[g(),B(t,e,n,r,o),b()]}(t,e,n,r,o);return Ev.sketch({dom:s,components:i.map(function(t){return t.asSpec()}),containerBehaviours:lu([th("image-tools-filter-panel-buttons-events",[Er(dC.disable(),function(t,e){a(i,t)}),Er(dC.enable(),function(t,e){u(i,t)})])])})},P=[g(),v(),b()],L=Ev.sketch({dom:s,components:P.map(function(t){return t.asSpec()})}),H=R("Brightness",Sw,-100,0,100),F=R("Contrast",Tw,-100,0,100),V=R("Gamma",kw,-100,0,100),j=function(t,e,n){return function(r){return function(t,e,n,r){return function(t,e,n,r){return hw(t,function(t,e,n,r){return dw([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],[e=lw(e,0,2),0,0,0,0,0,n=lw(n,0,2),0,0,0,0,0,r=lw(r,0,2),0,0,0,0,0,1,0,0,0,0,0,1])}(0,e,n,r))}(t,e,n,r)}(r,t,e,n)}},U=function(t){return z(t,function(t,e,n){var r=W.getOpt(t),o=Y.getOpt(t),i=q.getOpt(t);r.each(function(e){o.each(function(n){i.each(function(r){var o=Uc.getValue(e).x()/100,i=Uc.getValue(r).x()/100,a=Uc.getValue(n).x()/100,u=j(o,i,a);h(t,u)})})})},0,100,200)},W=U("R"),q=U("G"),Y=U("B"),$=[g(),W,q,Y,b()],G=Ev.sketch({dom:s,components:$.map(function(t){return t.asSpec()})}),K=function(t,e,n){return function(r){l(r,sC.swap(),{transform:e,swap:function(){et.getOpt(r).each(function(e){Zd.set(e,[t]),n(e)})}})}},X=y.some(_w),J=y.some(Cw),Q=[i("crop","Crop",K(C,y.none(),function(e){t.showCrop()}),!1),i("resize","Resize",K(S,y.none(),function(e){_.getOpt(e).each(function(e){var n=t.getMeasurements(),r=n.width,o=n.height;Uc.setValue(e,{width:r,height:o})})}),!1),i("orientation","Orientation",K(I,y.none(),c),!1),i("brightness","Brightness",K(H,y.none(),c),!1),i("sharpen","Sharpen",K(L,X,c),!1),i("contrast","Contrast",K(F,y.none(),c),!1),i("color-levels","Color levels",K(G,y.none(),c),!1),i("gamma","Gamma",K(V,y.none(),c),!1),i("invert","Invert",K(L,J,c),!1)],Z=Ev.sketch({dom:s,components:Q.map(function(t){return t.asSpec()})}),tt=Ev.sketch({dom:{tag:"div"},components:[Z],containerBehaviours:lu([Zd.config({})])}),et=bm(tt);return{memContainer:et,getApplyButton:function(t){return et.getOpt(t).map(function(t){var e=t.components()[0];return e.components()[e.components().length-1]})}}},mC=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),pC=tinymce.util.Tools.resolve("tinymce.geom.Rect"),gC=tinymce.util.Tools.resolve("tinymce.util.Observable"),vC=tinymce.util.Tools.resolve("tinymce.util.Tools"),bC=tinymce.util.Tools.resolve("tinymce.util.VK");function yC(t){var e,n;if(t.changedTouches)for(e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]}function xC(t,n){var r,o,i,a,u,s,c,l=n.document||e.document;n=n||{};var f=l.getElementById(n.handle||t);i=function(t){var i,d,h=function(t){var e,n,r,o,i,a,u,s=Math.max;return e=t.documentElement,n=t.body,r=s(e.scrollWidth,n.scrollWidth),o=s(e.clientWidth,n.clientWidth),i=s(e.offsetWidth,n.offsetWidth),a=s(e.scrollHeight,n.scrollHeight),u=s(e.clientHeight,n.clientHeight),{width:r<i?o:r,height:a<s(e.offsetHeight,n.offsetHeight)?u:a}}(l);yC(t),t.preventDefault(),o=t.button,i=f,s=t.screenX,c=t.screenY,d=e.window.getComputedStyle?e.window.getComputedStyle(i,null).getPropertyValue("cursor"):i.runtimeStyle.cursor,r=mC("<div></div>").css({position:"absolute",top:0,left:0,width:h.width,height:h.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(l.body),mC(l).on("mousemove touchmove",u).on("mouseup touchend",a),n.start(t)},u=function(t){if(yC(t),t.button!==o)return a(t);t.deltaX=t.screenX-s,t.deltaY=t.screenY-c,t.preventDefault(),n.drag(t)},a=function(t){yC(t),mC(l).off("mousemove touchmove",u).off("mouseup touchend",a),r.remove(),n.stop&&n.stop(t)},this.destroy=function(){mC(f).off()},mC(f).on("mousedown touchstart",i)}var wC,CC,_C=0,kC=function(t){var e=bm({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),n=je(1),r=je(y.none()),o=je({x:0,y:0,w:1,h:1}),i=je({x:0,y:0,w:1,h:1}),a=function(t,i){c.getOpt(t).each(function(t){var a=n.get(),u=Pi(t.element()),s=Ni(t.element()),c=i.dom().naturalWidth*a,l=i.dom().naturalHeight*a,f=Math.max(0,u/2-c/2),d=Math.max(0,s/2-l/2),h={left:f.toString()+"px",top:d.toString()+"px",width:c.toString()+"px",height:l.toString()+"px",position:"absolute"};si(i,h),e.getOpt(t).each(function(t){si(t.element(),h)}),r.get().each(function(t){var e=o.get();t.setRect({x:e.x*a+f,y:e.y*a+d,w:e.w*a,h:e.h*a}),t.setClampRect({x:f,y:d,w:c,h:l}),t.setViewPortRect({x:0,y:0,w:u,h:s})})})},u=function(t,e){var r,u=We.fromTag("img");return fo(u,"src",e),(r=u.dom(),new zm(function(t){r.complete?t(r):r.addEventListener("load",function e(){r.removeEventListener("load",e),t(r)})})).then(function(){return c.getOpt(t).map(function(t){var e=ki({element:u});Zd.replaceAt(t,1,y.some(e));var r=i.get(),s={x:0,y:0,w:u.dom().naturalWidth,h:u.dom().naturalHeight};i.set(s);var l=pC.inflate(s,-20,-20);return o.set(l),r.w===s.w&&r.h===s.h||function(t,e){c.getOpt(t).each(function(t){var r=Pi(t.element()),o=Ni(t.element()),i=e.dom().naturalWidth,a=e.dom().naturalHeight,u=Math.min(r/i,o/a);u>=1?n.set(1):n.set(u)})}(t,u),a(t,u),u})})},s=Ev.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[e.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:lu([th("image-panel-crop-events",[Br(function(t){c.getOpt(t).each(function(t){var e=function(t,e,n,r,o){var i,a,u,s="tox-",c=s+"crid-"+_C++,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"}];u=["top","right","bottom","left"];var f=function(t,e){return{x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},d=function(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}};function h(e,r,o,a){var u,s,c,l,f;u=r.x,s=r.y,c=r.w,l=r.h,u+=o*e.deltaX,s+=a*e.deltaY,(c+=o*e.deltaW)<20&&(c=20),(l+=a*e.deltaH)<20&&(l=20),f=t=pC.clamp({x:u,y:s,w:c,h:l},n,"move"===e.name),f=d(n,f),i.fire("updateRect",{rect:f}),g(f)}function m(t){function n(t,e){e.h<0&&(e.h=0),e.w<0&&(e.w=0),mC("#"+c+"-"+t,r).css({left:e.x,top:e.y,width:e.w,height:e.h})}vC.each(l,function(e){mC("#"+c+"-"+e.name,r).css({left:t.w*e.xMul+t.x,top:t.h*e.yMul+t.y})}),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)}function p(e){m(t=e)}function g(t){p(f(n,t))}return mC('<div id="'+c+'" class="'+s+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(r),vC.each(u,function(t){mC("#"+c,r).append('<div id="'+c+"-"+t+'"class="'+s+'croprect-block" style="display: none" data-mce-bogus="all">')}),vC.each(l,function(t){mC("#"+c,r).append('<div id="'+c+"-"+t.name+'" class="'+s+"croprect-handle "+s+"croprect-handle-"+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false" title="'+t.label+'">')}),a=vC.map(l,function(e){var n;return new xC(c,{document:r.ownerDocument,handle:c+"-"+e.name,start:function(){n=t},drag:function(t){h(e,n,t.deltaX,t.deltaY)}})}),m(t),mC(r).on("focusin focusout",function(t){mC(t.target).attr("aria-grabbed","focus"===t.type?"true":"false")}),mC(r).on("keydown",function(e){var n;function r(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),h(n,r,o,i)}switch(vC.each(l,function(t){if(e.target.id===c+"-"+t.name)return n=t,!1}),e.keyCode){case bC.LEFT:r(e,0,t,-10,0);break;case bC.RIGHT:r(e,0,t,10,0);break;case bC.UP:r(e,0,t,0,-10);break;case bC.DOWN:r(e,0,t,0,10);break;case bC.ENTER:case bC.SPACEBAR:e.preventDefault(),o()}}),i=vC.extend({toggleVisibility:function(t){var e;e=vC.map(l,function(t){return"#"+c+"-"+t.name}).concat(vC.map(u,function(t){return"#"+c+"-"+t})).join(","),t?mC(e,r).show():mC(e,r).hide()},setClampRect:function(e){n=e,m(t)},setRect:p,getInnerRect:function(){return d(n,t)},setInnerRect:g,setViewPortRect:function(n){e=n,m(t)},destroy:function(){vC.each(a,function(t){t.destroy()}),a=[]}},gC)}({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},t.element().dom(),function(){});e.toggleVisibility(!1),e.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(y.some(e))})})])])}],containerBehaviours:lu([Zd.config({}),th("image-panel-events",[Br(function(e){u(e,t)})])])}),c=bm(s);return{memContainer:c,updateSrc:u,zoom:function(t,e){var r=n.get(),o=e>0?Math.min(2,r+.1):Math.max(.1,r-.1);n.set(o),c.getOpt(t).each(function(t){var e=t.components()[1].element();a(t,e)})},showCrop:function(){r.get().each(function(t){t.toggleVisibility(!0)})},hideCrop:function(){r.get().each(function(t){t.toggleVisibility(!1)})},getRect:function(){return o.get()},getMeasurements:function(){var t=i.get();return{width:t.w,height:t.h}}}},SC=function(t,e,n,r,o){return Kw({name:t,icon:y.some(e),disabled:n,tooltip:y.some(t),primary:!1,borderless:!1},r,o)},TC=function(t,e){e?Dp.enable(t):Dp.disable(t)},EC=function(t,r){var o=function(t){var n=je(t),r=je(y.none()),o=function(){var t=[],e=-1;function n(){return e>0}function r(){return-1!==e&&e<t.length-1}return{data:t,add:function(n){var r;return r=t.splice(++e),t.push(n),{state:n,removed:r}},undo:function(){if(n())return t[--e]},redo:function(){if(r())return t[++e]},canUndo:n,canRedo:r}}();o.add(t);var i=function(t){n.set(t)},a=function(t){return{blob:t,url:e.URL.createObjectURL(t)}},u=function(t){e.URL.revokeObjectURL(t.url)},s=function(){r.get().each(u),r.set(y.none())},c=function(t){var e,n=a(t);return i(n),e=o.add(n).removed,vC.each(e,u),n.url};return{getBlobState:function(){return n.get()},setBlobState:i,addBlobState:c,getTempState:function(){return r.get().fold(function(){return n.get()},function(t){return t})},updateTempState:function(t){var e=a(t);return s(),r.set(y.some(e)),e.url},addTempState:function(t){var e=a(t);return r.set(y.some(e)),e.url},applyTempState:function(t){return r.get().fold(function(){},function(e){c(e.blob),t()})},destroyTempState:s,undo:function(){var t=o.undo();return i(t),t.url},redo:function(){var t=o.redo();return i(t),t.url},getHistoryStates:function(){return{undoEnabled:o.canUndo(),redoEnabled:o.canRedo()}}}}(t.currentState),i=function(t){var e=o.getHistoryStates();m.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),yr(t,dC.formActionEvent,{name:dC.saveState(),value:e.undoEnabled})},a=function(t){return t.toBlob()},u=function(t){yr(t,dC.formActionEvent,{name:dC.disable(),value:{}})},s=function(t){p.getApplyButton(t).each(function(t){Dp.enable(t)}),yr(t,dC.formActionEvent,{name:dC.enable(),value:{}})},c=function(t,e){return u(t),h.updateSrc(t,e)},l=function(t,n,r,o,l){return u(t),function(t){return function(t){return new iw(function(n){var r=new e.FileReader;r.onloadend=function(){n(r.result)},r.readAsDataURL(t)})}(t).then(function(e){return sw(uw(t),t,e)})}(n).then(r).then(a).then(o).then(function(e){return c(t,e).then(function(e){return i(t),l(),s(t),e})}).catch(function(n){return e.console.log(n),s(t),n})},f=function(t,e,n){var r=o.getBlobState().blob;l(t,r,e,function(t){return o.updateTempState(t)},n)},d=function(t){var e=o.getBlobState().url;return o.destroyTempState(),i(t),e},h=kC(t.currentState.url),m=function(t){var e=bm(SC("Undo","undo",!0,function(t){yr(t,sC.undo(),{direction:1})},t)),n=bm(SC("Redo","redo",!0,function(t){yr(t,sC.redo(),{direction:1})},t));return{container:Ev.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[e.asSpec(),n.asSpec(),SC("Zoom in","zoom-in",!1,function(t){yr(t,sC.zoom(),{direction:1})},t),SC("Zoom out","zoom-out",!1,function(t){yr(t,sC.zoom(),{direction:-1})},t)]}),updateButtonUndoStates:function(t,r,o){e.getOpt(t).each(function(t){TC(t,r)}),n.getOpt(t).each(function(t){TC(t,o)})}}}(r),p=hC(h,r);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[p.memContainer.asSpec(),h.memContainer.asSpec(),m.container],behaviours:lu([Uc.config({store:{mode:"manual",getValue:function(){return o.getBlobState()}}}),th("image-tools-events",[Er(sC.undo(),function(t,e){var n=o.undo();c(t,n).then(function(e){s(t),i(t)})}),Er(sC.redo(),function(t,e){var n=o.redo();c(t,n).then(function(e){s(t),i(t)})}),Er(sC.zoom(),function(t,e){var n=e.event().direction();h.zoom(t,n)}),Er(sC.back(),function(t,e){!function(t){var e=d(t);c(t,e).then(function(e){s(t)})}(t),e.event().swap()(),h.hideCrop()}),Er(sC.apply(),function(t,e){o.applyTempState(function(){d(t),e.event().swap()()})}),Er(sC.transform(),function(t,e){return f(t,e.event().transform(),n)}),Er(sC.tempTransform(),function(t,e){return function(t,e){var r=o.getTempState().blob;l(t,r,e,function(t){return o.addTempState(t)},n)}(t,e.event().transform())}),Er(sC.transformApply(),function(t,e){return function(t,e,n){var r=o.getBlobState().blob;l(t,r,e,function(e){var n=o.addBlobState(e);return d(t),n},n)}(t,e.event().transform(),e.event().swap())}),Er(sC.swap(),function(t,e){!function(t){m.updateButtonUndoStates(t,!1,!1)}(t);var n=e.event().transform(),r=e.event().swap();n.fold(function(){r()},function(e){f(t,e,r)})})]),Ix()])}},OC=Wl({name:"HtmlSelect",configFields:[be("options"),Wc("selectBehaviours",[ih,Uc]),Ie("selectClasses",[]),Ie("selectAttributes",{}),Ee("data")],factory:function(t,e){var n=L(t.options,function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}}),r=t.data.map(function(t){return Rt("initialValue",t)}).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:Yc(t.selectBehaviours,[ih.config({}),Uc.config({store:d({mode:"manual",getValue:function(t){return vi(t.element())},setValue:function(e,n){U(t.options,function(t){return t.value===n}).isSome()&&bi(e.element(),n)}},r)})])}}}),DC=function(t,e){var n=t.label.map(function(t){return bb(t,e)}),r=[Dp.config({disabled:t.disabled}),Gd.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return br(t,Iv),y.some(!0)}}),th("textfield-change",[Er(Vn(),function(e,n){yr(e,Dv,{name:t.name})}),Er(Kn(),function(e,n){yr(e,Dv,{name:t.name})})]),mb.config({})],i=t.validation.map(function(t){return fb.config({getRoot:function(t){return Yr(t.element())},invalidClass:"tox-invalid",validator:{validate:function(e){var n=Uc.getValue(e),r=t.validator(n);return eb(!0===r?C.value(n):C.error(r))},validateOnLoad:t.validateOnLoad}})}).toArray(),a=t.placeholder.fold(o({}),function(t){return{placeholder:e.translate(t)}}),u=t.inputMode.fold(o({}),function(t){return{inputmode:t}}),s=d(d({},a),u),c=Fv.parts().field({tag:!0===t.multiline?"textarea":"input",inputAttributes:s,inputClasses:[t.classname],inputBehaviours:lu(q([r,i])),selectOnFocus:!1,factory:qv}),l=(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),f=[Dp.config({disabled:t.disabled,onDisabled:function(t){Fv.getField(t).each(Dp.disable)},onEnabled:function(t){Fv.getField(t).each(Dp.enable)}})];return pb(n,c,l,f)},NC=Object.freeze({__proto__:null,events:function(t,e){var n=t.stream.streams.setup(t,e);return kr([Er(t.event,n),Rr(function(){return e.cancel()})].concat(t.cancelEvent.map(function(t){return[Er(t,function(){return e.cancel()})]}).getOr([])))}}),AC=function(t){var e=je(null);return Ho({readState:function(){return{timer:null!==e.get()?"set":"unset"}},setTimer:function(t){e.set(t)},cancel:function(){var t=e.get();null!==t&&t.cancel()}})},MC=Object.freeze({__proto__:null,throttle:AC,init:function(t){return t.stream.streams.state(t)}}),IC=[ye("stream",ce("mode",{throttle:[be("delay"),Ie("stopEvent",!0),Oa("streams",{setup:function(t,e){var n=t.stream,r=Sm(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},state:AC})]})),Ie("event","input"),Ee("cancelEvent"),Ta("onStream")],zC=du({fields:IC,name:"streaming",active:NC,state:MC}),BC=function(t,e,n){var r=Uc.getValue(n);Uc.setValue(e,r),PC(e)},RC=function(t,e){var n=t.element(),r=vi(n),o=n.dom();"number"!==ho(n,"type")&&e(o,r)},PC=function(t){RC(t,function(t,e){return t.setSelectionRange(e.length,e.length)})},LC=o("alloy.typeahead.itemexecute"),HC=o([Ee("lazySink"),be("fetch"),Ie("minChars",5),Ie("responseTime",1e3),ka("onOpen"),Ie("getHotspot",y.some),Ie("getAnchorOverrides",o({})),Ie("layouts",y.none()),Ie("eventOrder",{}),Fe("model",{},[Ie("getDisplayText",function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value}),Ie("selectsOver",!0),Ie("populateFromBrowse",!0)]),ka("onSetValue"),Sa("onExecute"),ka("onItemExecute"),Ie("inputClasses",[]),Ie("inputAttributes",{}),Ie("inputStyles",{}),Ie("matchWidth",!0),Ie("useMinWidth",!1),Ie("dismissOnBlur",!0),Ca(["openClass"]),Ee("initialData"),Wc("typeaheadBehaviours",[ih,Uc,zC,Gd,vh,wb]),Ve("previewing",function(){return je(!0)})].concat(Vv()).concat(Ab())),FC=o([vl({schema:[wa()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each(function(r){(function(t,e,n){if(t.selectsOver){var r=Uc.getValue(e),o=t.getDisplayText(r),i=Uc.getValue(n);return 0===t.getDisplayText(i).indexOf(o)?y.some(function(){BC(0,e,n),function(t,e){RC(t,function(t,n){return t.setSelectionRange(e,n.length)})}(e,o.length)}):y.none()}return y.none()})(t.model,r,n).fold(function(){return uf.dehighlight(e,n)},function(t){return t()})}):e.getSystem().getByUid(t.uid).each(function(e){t.model.populateFromBrowse&&BC(t.model,e,n)}),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOption().map(function(t){return yr(t,LC(),{item:n}),!0})},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each(function(e){t.model.populateFromBrowse&&BC(t.model,e,n)})}}}})]),VC=ql({name:"Typeahead",configFields:HC(),partFields:FC(),factory:function(t,e,r,o){var i=function(e,r,i){t.previewing.set(!1);var a=wb.getCoupled(e,"sandbox");_c.isOpen(a)?Xl.getCurrent(a).each(function(t){uf.getHighlighted(t).fold(function(){i(t)},function(){_r(a,t.element(),"keydown",r)})}):Sb(t,u(e),e,a,o,function(t){Xl.getCurrent(t).each(i)},Gv.HighlightFirst).get(n)},a=jv(t),u=function(t){return function(e){return e.map(function(e){var n=ct(e.menus),r=Y(n,function(t){return F(t.items,function(t){return"item"===t.type})});return Uc.getState(t).update(L(r,function(t){return t.data})),e})}},s=[ih.config({}),Uc.config({onSetValue:t.onSetValue,store:d({mode:"dataset",getDataKey:function(t){return vi(t.element())},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){bi(e.element(),t.model.getDisplayText(n))}},t.initialData.map(function(t){return Rt("initialValue",t)}).getOr({}))}),zC.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,r){var i=wb.getCoupled(e,"sandbox");if(ih.isFocused(e)&&vi(e.element()).length>=t.minChars){var a=Xl.getCurrent(i).bind(function(t){return uf.getHighlighted(t).map(Uc.getValue)});t.previewing.set(!0),Sb(t,u(e),e,i,o,function(e){Xl.getCurrent(i).each(function(e){a.fold(function(){t.model.selectsOver&&uf.highlightFirst(e)},function(t){uf.highlightBy(e,function(e){return Uc.getValue(e).value===t.value}),uf.getHighlighted(e).orThunk(function(){return uf.highlightFirst(e),y.none()})})})},Gv.HighlightFirst).get(n)}},cancelEvent:nr()}),Gd.config({mode:"special",onDown:function(t,e){return i(t,e,uf.highlightFirst),y.some(!0)},onEscape:function(t){var e=wb.getCoupled(t,"sandbox");return _c.isOpen(e)?(_c.close(e),y.some(!0)):y.none()},onUp:function(t,e){return i(t,e,uf.highlightLast),y.some(!0)},onEnter:function(e){var n=wb.getCoupled(e,"sandbox"),r=_c.isOpen(n);if(r&&!t.previewing.get())return Xl.getCurrent(n).bind(function(t){return uf.getHighlighted(t)}).map(function(t){return yr(e,LC(),{item:t}),!0});var o=Uc.getValue(e);return br(e,nr()),t.onExecute(n,e,o),r&&_c.close(n),y.some(!0)}}),vh.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),wb.config({others:{sandbox:function(e){return Db(t,e,{onOpen:function(){return vh.on(e)},onClose:function(){return vh.off(e)}})}}}),th("typeaheadevents",[Lr(function(e){var r=n;Tb(t,u(e),e,o,r,Gv.HighlightFirst).get(n)}),Er(LC(),function(e,n){var r=wb.getCoupled(e,"sandbox");BC(t.model,e,n.event().item()),br(e,nr()),t.onItemExecute(e,r,n.event().item(),Uc.getValue(e)),_c.close(r),PC(e)})].concat(t.dismissOnBlur?[Er(Gn(),function(t){var e=wb.getCoupled(t,"sandbox");Cu(e.element()).isNone()&&_c.close(e)})]:[]))];return{uid:t.uid,dom:Wv(gt(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:d(d({},a),Yc(t.typeaheadBehaviours,s)),eventOrder:t.eventOrder}}}),jC=function(t){return function t(n){return d(d({},n),{toCached:function(){return t(n.toCached())},bindFuture:function(e){return t(n.bind(function(t){return t.fold(function(t){return eb(C.error(t))},function(t){return e(t)})}))},bindResult:function(e){return t(n.map(function(t){return t.bind(e)}))},mapResult:function(e){return t(n.map(function(t){return t.map(e)}))},mapError:function(e){return t(n.map(function(t){return t.mapError(e)}))},foldResult:function(t,e){return n.map(function(n){return n.fold(t,e)})},withTimeout:function(r,o){return t(tb(function(t){var i=!1,a=e.setTimeout(function(){i=!0,t(C.error(o()))},r);n.get(function(n){i||(e.clearTimeout(a),t(n))})}))}})}(tb(t))},UC={type:"separator"},WC=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:function(){}}},qC=function(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:function(){}}},YC=function(t,e){return function(t){return L(t,WC)}(function(t,e){return F(e,function(e){return e.type===t})}(t,e))},$C=function(t){return YC("header",t.targets)},GC=function(t){return YC("anchor",t.targets)},KC=function(t){return y.from(t.anchorTop).map(function(t){return qC("<top>",t)}).toArray()},XC=function(t){return y.from(t.anchorBottom).map(function(t){return qC("<bottom>",t)}).toArray()},JC=function(t,e){var n=t.toLowerCase();return F(e,function(t){var e=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text;return an(e.toLowerCase(),n)||an(t.value.toLowerCase(),n)})},QC=wo("aria-invalid"),ZC=function(t){return function(e,n,r){return lt(n,"name").fold(function(){return t(n,r)},function(o){return e.field(o,t(n,r))})}},t_={bar:ZC(function(t,e){return function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:L(t.items,e.interpreter)}}(t,e.shared)}),collection:ZC(function(t,e){return function(t,e){var n,r=t.label.map(function(t){return bb(t,e)}),o=function(t){return function(e,n){ua(n.event().target(),"[data-collection-item-value]").each(function(r){t(e,n,r,ho(r,"data-collection-item-value"))})}},a=o(function(e,n,r,o){n.stop(),yr(e,Mv,{name:t.name,value:o})}),u=[Er(Rn(),o(function(t,e,n){xu(n)})),Er(Un(),a),Er(Zn(),a),Er(Pn(),o(function(t,e,n){aa(t.element(),"."+sp).each(function(t){Jo(t,sp)}),Xo(n,sp)})),Er(Ln(),o(function(t){aa(t.element(),"."+sp).each(function(t){Jo(t,sp)})})),Lr(o(function(e,n,r,o){yr(e,Mv,{name:t.name,value:o})}))],s=Fv.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:i},behaviours:lu([Zd.config({}),Uc.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,n){!function(e,n){var r=L(n,function(e){var n,r=rp.translate(e.text),o=1===t.columns?'<div class="tox-collection__item-label">'+r+"</div>":"",i='<div class="tox-collection__item-icon">'+e.icon+"</div>",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,function(t){return a[t]});return'<div class="tox-collection__item" tabindex="-1" data-collection-item-value="'+('"'===(n=e.value)?"&quot;":n)+'" title="'+u+'" aria-label="'+u+'">'+i+o+"</div>"}),o=t.columns>1&&"auto"!==t.columns?P(r,t.columns):[r],i=L(o,function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"});io(e.element(),i.join(""))}(e,n),"auto"===t.columns&&$m(e,5,"tox-collection__item").each(function(t){var n=t.numRows,r=t.numColumns;Gd.setGridSize(e,n,r)}),br(e,Pv)}}),mb.config({}),Gd.config((n=t.columns,1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+ip}})),th("collection-events",u)])});return pb(r,s,["tox-form__group--collection"],[])}(t,e.shared.providers)}),alertbanner:ZC(function(t,e){return function(t,e){return Ev.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:[vm.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:xm(t.icon,e.icons),attributes:{title:e.translate(t.iconTooltip)}},action:function(e){yr(e,Mv,{name:"alert-banner",value:t.url})}})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(t.text)}}]})}(t,e.shared.providers)}),input:ZC(function(t,e){return function(t,e){return DC({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:y.none(),maximized:t.maximized},e)}(t,e.shared.providers)}),textarea:ZC(function(t,e){return function(t,e){return DC({name:t.name,multiline:!0,label:t.label,inputMode:y.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:y.none(),maximized:t.maximized},e)}(t,e.shared.providers)}),label:ZC(function(t,e){return function(t,e){var n={dom:{tag:"label",innerHtml:e.providers.translate(t.label),classes:["tox-label"]}},r=L(t.items,e.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[n].concat(r),behaviours:lu([Ix(),Zd.config({}),Ux(y.none()),Gd.config({mode:"acyclic"})])}}(t,e.shared)}),iframe:function(t){return function(e,n,r){var o=gt(n,{source:"dynamic"});return ZC(t)(e,o,r)}}(function(t,e){return function(t,e){var n=Qx&&t.sandboxed,r=d(d({},t.label.map(function(t){return{title:t}}).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=function(t){var e=je("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)fo(n.element(),"srcdoc",r);else{fo(n.element(),"src","javascript:''");var o=n.element().dom().contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}}(n),i=t.label.map(function(t){return bb(t,e)}),a=Fv.parts().field({factory:{sketch:function(t){return Jx({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:lu([mb.config({}),ih.config({}),jx(y.none(),o.getValue,o.setValue)])})}}});return pb(i,a,["tox-form__group--stretched"],[])}(t,e.shared.providers)}),button:ZC(function(t,e){return function(t,e){var n,r,o=Qw(t.name,"custom");return n=y.none(),r=Fv.parts().field(d({factory:vm},Xw(t,y.some(o),e,[Wx(""),Ix()]))),pb(n,r,[],[])}(t,e.shared.providers)}),checkbox:ZC(function(t,e){return function(t,e){var n=Uc.config({store:{mode:"manual",getValue:function(t){return t.element().dom().checked},setValue:function(t,e){t.element().dom().checked=e}}}),r=function(t){return t.element().dom().click(),y.some(!0)},o=Fv.parts().field({factory:{sketch:i},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:lu([Ix(),Dp.config({disabled:t.disabled}),mb.config({}),ih.config({}),n,Gd.config({mode:"special",onEnter:r,onSpace:r,stopSpaceKeyup:!0}),th("checkbox-events",[Er(jn(),function(e,n){yr(e,Dv,{name:t.name})})])])}),a=Fv.parts().label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:e.translate(t.label)},behaviours:lu([Rb.config({})])}),u=function(t){return{dom:{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t],innerHtml:xm("checked"===t?"selected":"unselected",e.icons)}}},s=bm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[u("checked"),u("unchecked")]});return Fv.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[o,s.asSpec(),a],fieldBehaviours:lu([Dp.config({disabled:t.disabled,disableClass:"tox-checkbox--disabled",onDisabled:function(t){Fv.getField(t).each(Dp.disable)},onEnabled:function(t){Fv.getField(t).each(Dp.enable)}})])})}(t,e.shared.providers)}),colorinput:ZC(function(t,e){return function(t,e,n){var r=Fv.parts().field({factory:qv,inputClasses:["tox-textfield"],onSetValue:function(t){return fb.run(t).get(function(){})},inputBehaviours:lu([mb.config({}),fb.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return Yr(t.element())},notify:{onValid:function(t){var e=Uc.getValue(t);yr(t,Pb,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=Uc.getValue(t);if(0===e.length)return eb(C.value(!0));var n=We.fromTag("span");ui(n,"background-color",e);var r=di(n,"background-color").fold(function(){return C.error("blah")},function(t){return C.value(e)});return eb(r)}}})]),selectOnFocus:!1}),o=t.label.map(function(t){return bb(t,e.providers)}),i=function(t,e){yr(t,Lb,{value:e})},a=bm(function(t,e){return zb.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:lu([Rb.config({}),mb.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:e.getSink,fetch:function(n){return tb(function(e){return t.fetch(e)}).map(function(r){return y.from(av(gt(Kg(wo("menu-value"),r,function(e){t.onItemAction(n,e)},t.columns,t.presets,Lp.CLOSE_ON_EXECUTE,function(){return!1},e.providers),{movement:Jg(t.columns,t.presets)})))})},parts:{menu:jg(0,0,t.presets)}})}({dom:{tag:"span",attributes:{"aria-label":e.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[$a]},onLtr:function(){return[Ga]}},components:[],fetch:Rg.getFetch(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:function(t,e){a.getOpt(t).each(function(t){"custom"===e?n.colorPicker(function(e){e.fold(function(){return br(t,Hb)},function(e){i(t,e),kg(e)})},"#ffffff"):i(t,"remove"===e?"":e)})}},e));return Fv.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:o.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,a.asSpec()]}]),fieldBehaviours:lu([th("form-field-events",[Er(Pb,function(e,n){a.getOpt(e).each(function(t){ui(t.element(),"background-color",n.event().color())}),yr(e,Dv,{name:t.name})}),Er(Lb,function(t,e){Fv.getField(t).each(function(n){Uc.setValue(n,e.event().value()),Xl.getCurrent(t).each(ih.focus)})}),Er(Hb,function(t,e){Fv.getField(t).each(function(e){Xl.getCurrent(t).each(ih.focus)})})])])})}(t,e.shared,e.colorinput)}),colorpicker:ZC(function(t){var n=function(t){return"tox-"+t},r=Mx(Px,n),o=bm(r.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(t){yr(t,Mv,{name:"hex-valid",value:!0})},onInvalidHex:function(t){yr(t,Mv,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[o.asSpec()],behaviours:lu([Uc.config({store:{mode:"manual",getValue:function(t){var e=o.get(t);return Xl.getCurrent(e).bind(function(t){return Uc.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,n){var r=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n),i=o.get(t);Xl.getCurrent(i).fold(function(){e.console.log("Can not find form")},function(t){Uc.setValue(t,{hex:y.from(r[1]).getOr("")}),Ex.getField(t,"hex").each(function(t){br(t,Vn())})})}}}),Ix()])}}),dropzone:ZC(function(t,e){return function(t,e){var n=function(t,e){e.stop()},r=function(t){return function(e,n){H(t,function(t){t(e,n)})}},o=function(t,e){if(!Dp.isDisabled(t)){var n=e.event().raw();a(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event().raw().target.files;a(t,n)},a=function(e,n){Uc.setValue(e,function(t){var e=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i");return F(tt(t),function(t){return e.test(t.name)})}(n)),yr(e,Dv,{name:t.name})},u=bm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:lu([th("input-file-events",[Mr(Un()),Mr(Zn())])])}),s=t.label.map(function(t){return bb(t,e)}),c=Fv.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:lu([Wx([]),Ix(),Dp.config({}),vh.config({toggleClass:"dragenter",toggleOnExecute:!1}),th("dropzone-events",[Er("dragenter",r([n,vh.toggle])),Er("dragleave",r([n,vh.toggle])),Er("dragover",n),Er("drop",r([n,o])),Er(jn(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},vm.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){u.get(t).element().dom().click()},buttonBehaviours:lu([mb.config({})])})]}]}}}});return pb(s,c,["tox-form__group--stretched"],[])}(t,e.shared.providers)}),grid:ZC(function(t,e){return function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:L(t.items,e.interpreter)}}(t,e.shared)}),selectbox:ZC(function(t,e){return function(t,e){var n=L(t.items,function(t){return{text:e.translate(t.text),value:t.value}}),r=t.label.map(function(t){return bb(t,e)}),o=Fv.parts().field({dom:{},selectAttributes:{size:t.size},options:n,factory:OC,selectBehaviours:lu([Dp.config({disabled:t.disabled}),mb.config({}),th("selectbox-change",[Er(jn(),function(e,n){yr(e,Dv,{name:t.name})})])])}),i=t.size>1?y.none():y.some({dom:{tag:"div",classes:["tox-selectfield__icon-js"],innerHtml:xm("chevron-down",e.icons)}}),a={dom:{tag:"div",classes:["tox-selectfield"]},components:q([[o],i.toArray()])};return Fv.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:q([r.toArray(),[a]]),fieldBehaviours:lu([Dp.config({disabled:t.disabled,onDisabled:function(t){Fv.getField(t).each(Dp.disable)},onEnabled:function(t){Fv.getField(t).each(Dp.enable)}})])})}(t,e.shared.providers)}),sizeinput:ZC(function(t,e){return uC(t,e.shared.providers)}),urlinput:ZC(function(t,e){return function(t,e,r){var o,i=e.shared.providers,a=function(e){var n=Uc.getValue(e);r.addToHistory(n.value,t.filetype)},u=Fv.parts().field({factory:VC,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":QC,type:"url"},minChars:0,responseTime:0,fetch:function(n){var o=function(t,e,n){var r=Uc.getValue(e),o=void 0!==r.meta.text?r.meta.text:r.value;return n.getLinkInformation().fold(function(){return[]},function(e){var r,i=JC(o,function(t){return L(t,function(t){return qC(t,t)})}(n.getHistory(t)));return"file"===t?(r=[i,JC(o,$C(e)),JC(o,q([KC(e),GC(e),XC(e)]))],j(r,function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(UC,e)},[])):i})}(t.filetype,n,r),i=Uw(o,Lp.BUBBLE_TO_SANDBOX,e,!1);return eb(i)},getHotspot:function(t){return m.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(fb)&&fb.run(t).get(n)},typeaheadBehaviours:lu(q([r.getValidationHandler().map(function(e){return fb.config({getRoot:function(t){return Yr(t.element())},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){c.getOpt(t).each(function(t){fo(t.element(),"title",i.translate(e))})}},validator:{validate:function(n){var r=Uc.getValue(n);return jC(function(n){e({type:t.filetype,url:r.value},function(t){if("invalid"===t.status){var e=C.error(t.message);n(e)}else{var r=C.value(t.message);n(r)}})})},validateOnLoad:!1}})}).toArray(),[Dp.config({disabled:t.disabled}),mb.config({}),th("urlinput-events",q(["file"===t.filetype?[Er(Vn(),function(e){yr(e,Dv,{name:t.name})})]:[],[Er(jn(),function(e){yr(e,Dv,{name:t.name}),a(e)}),Er(Kn(),function(e){yr(e,Dv,{name:t.name}),a(e)})]]))]])),eventOrder:(o={},o[Vn()]=["streaming","urlinput-events","invalidating"],o),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:jg(0,0,"normal")},onExecute:function(t,e,n){yr(e,Iv,{})},onItemExecute:function(e,n,r,o){a(e),yr(e,Dv,{name:t.name})}}),s=t.label.map(function(t){return bb(t,i)}),c=bm(function(t,e,n,r){return void 0===n&&(n=t),void 0===r&&(r=t),{dom:{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],innerHtml:xm(n,i.icons),attributes:d({title:i.translate(r),"aria-live":"polite"},e.fold(function(){return{}},function(t){return{id:t}}))}}}("invalid",y.some(QC),"warning")),l=bm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[c.asSpec()]}),f=r.getUrlPicker(t.filetype),h=wo("browser.url.event"),m=bm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[u,l.asSpec()],behaviours:lu([Dp.config({disabled:t.disabled})])}),p=bm(Jw({name:t.name,icon:y.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},function(t){return br(t,h)},i,[],["tox-browse-url"]));return Fv.sketch({dom:vb([]),components:s.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:q([[m.asSpec()],f.map(function(){return p.asSpec()}).toArray()])}]),fieldBehaviours:lu([Dp.config({disabled:t.disabled,onDisabled:function(t){Fv.getField(t).each(Dp.disable),p.getOpt(t).each(Dp.disable)},onEnabled:function(t){Fv.getField(t).each(Dp.enable),p.getOpt(t).each(Dp.enable)}}),th("url-input-events",[Er(h,function(e){Xl.getCurrent(e).each(function(n){var r=Uc.getValue(n),o=d({fieldname:t.name},r);f.each(function(r){r(o).get(function(r){Uc.setValue(n,r),yr(e,Dv,{name:t.name})})})})})])])})}(t,e,e.urlinput)}),customeditor:ZC(function(t){var e=je(y.none()),n=bm({dom:{tag:t.tag}}),r=je(y.none());return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:lu([th("editor-foo-events",[Br(function(o){n.getOpt(o).each(function(n){(!function(t){return Object.prototype.hasOwnProperty.call(t,"init")}(t)?Lx.load(t.scriptId,t.scriptUrl).then(function(e){return e(n.element().dom(),t.settings)}):t.init(n.element().dom())).then(function(t){r.get().each(function(e){t.setValue(e)}),r.set(y.none()),e.set(y.some(t))})})})]),Uc.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(y.some(n))},function(t){return t.setValue(n)})}}}),Ix()]),components:[n.asSpec()]}}),htmlpanel:ZC(function(t){return"presentation"===t.presets?Ev.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):Ev.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:lu([mb.config({}),ih.config({})])})}),imagetools:ZC(function(t,e){return EC(t,e.shared.providers)}),table:ZC(function(t,e){return function(t,e){var n,r,o=function(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(r=t.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:L(r,function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}})}]}),(n=t.cells,{dom:{tag:"tbody"},components:L(n,function(t){return{dom:{tag:"tr"},components:L(t,o)}})})],behaviours:lu([mb.config({}),ih.config({})])}}(t,e.shared.providers)}),panel:ZC(function(t,e){return function(t,e){return{dom:{tag:"div",classes:t.classes},components:L(t.items,e.shared.interpreter)}}(t,e)})},e_={field:function(t,e){return e}},n_=function(t,e,n){var r=gt(n,{shared:{interpreter:function(e){return r_(t,e,r)}}});return r_(t,e,r)},r_=function(t,n,r){return lt(t_,n.type).fold(function(){return e.console.error('Unknown factory type "'+n.type+'", defaulting to container: ',n),n},function(e){return e(t,n,r)})},o_={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},i_=function(t,e,n){return n?function(){return{anchor:"node",root:t(),node:y.from(t()),bubble:$u(-12,-12,o_),layouts:{onRtl:function(){return[$h]},onLtr:function(){return[Gh]}},overrides:{maxHeightFunction:ju()}}}:function(){return{anchor:"hotspot",hotspot:e(),bubble:$u(-12,12,o_),layouts:{onRtl:function(){return[$a]},onLtr:function(){return[Ga]}},overrides:{maxHeightFunction:ju()}}}},a_=function(t,e,n){return n?function(){return{anchor:"node",root:t(),node:y.from(t()),layouts:{onRtl:function(){return[Kh]},onLtr:function(){return[Kh]}}}}:function(){return{anchor:"hotspot",hotspot:e(),layouts:{onRtl:function(){return[Qa]},onLtr:function(){return[Qa]}}}}},u_=function(t,e){return function(){return{anchor:"selection",root:e(),getSelection:function(){var e=t.selection.getRng();return y.some(ss.range(We.fromDom(e.startContainer),e.startOffset,We.fromDom(e.endContainer),e.endOffset))}}}},s_=function(t){return function(e){return{anchor:"node",root:t(),node:e}}},c_=function(t,e){var n=function(){return We.fromDom(t.getBody())},r=mm(t)||!dm(t);return{inlineDialog:i_(n,e,r),banner:a_(n,e,r),cursor:u_(t,n),node:s_(n)}},l_=function(t){return function(e,n){Rg.colorPickerDialog(t)(e,n)}},f_=function(t){return function(){return Cg(t)}},d_=function(t){return function(){return _g(t)}},h_=function(t){return function(){return Rg.getColorCols(t)}},m_=function(t){return{colorPicker:l_(t),hasCustomColors:f_(t),getColors:d_(t),getColorCols:h_(t)}},p_=function(t){return function(){return function(t){return t.getParam("draggable_modal",!1,"boolean")}(t)}},g_=function(t){return{isDraggableModal:p_(t)}},v_=[{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",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strike-through",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"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",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}]}],b_=function(t){return function(t){return y.from(t.getParam("style_formats")).filter(T)}(t).map(function(e){var n=function(t,e){var n=function t(e){return j(e,function(e,n){if(ft(n,"items")){var r=t(n.items);return{customFormats:e.customFormats.concat(r.customFormats),formats:e.formats.concat([{title:n.title,items:r.formats}])}}if(ft(n,"inline")||ft(n,"block")||ft(n,"selector")){var o="custom-"+n.title.toLowerCase();return{customFormats:e.customFormats.concat([{name:o,format:n}]),formats:e.formats.concat([{title:n.title,format:o,icon:n.icon}])}}return d(d({},e),{formats:e.formats.concat(n)})},{customFormats:[],formats:[]})}(e),r=function(e){H(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}(t,e);return function(t){return t.getParam("style_formats_merge",!1,"boolean")}(t)?v_.concat(n):n}).getOr(v_)},y_=function(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return gt(t,r)},x_=function(t,e,n,r){return function e(o){return L(o,function(o){var i=nt(o);if(dt(o,"items")){var a=e(o.items);return gt(gt(o,{type:"submenu"}),{getStyleItems:function(){return a}})}return dt(o,"format")?y_(o,n,r):1===i.length&&B(i,"title")?gt(o,{type:"separator"}):function(e){var o=wo(e.title),i={type:"formatter",format:o,isSelected:n(o),getStylePreview:r(o)},a=gt(e,i);return t.formatter.register(o,a),a}(o)})}(e)},w_=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?y.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):y.none()}},r=function t(e){var n=e.items;return void 0!==n&&n.length>0?Y(n,t):[e.format]},o=je([]),i=je([]),a=je([]),u=je([]),s=je(!1);return t.on("PreInit",function(a){var u=b_(t),s=x_(t,u,e,n);o.set(s),i.set(Y(s,r))}),t.on("addStyleModifications",function(o){var i=x_(t,o.items,e,n);a.set(i),s.set(o.replace),u.set(Y(i,r))}),{getData:function(){var t=s.get()?[]:o.get(),e=a.get();return t.concat(e)},getFlattenedKeys:function(){var t=s.get()?[]:i.get(),e=u.get();return t.concat(e)}}},C_=vC.trim,__=function(t){return function(e){if(e&&1===e.nodeType){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},k_=__("true"),S_=__("false"),T_=function(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}},E_=function(t){return t.innerText||t.textContent},O_=function(t){return function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)}(t)&&N_(t)},D_=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},N_=function(t){return function(t){for(;t=t.parentNode;){var e=t.contentEditable;if(e&&"inherit"!==e)return k_(t)}return!1}(t)&&!S_(t)},A_=function(t){return D_(t)&&N_(t)},M_=function(t){var e=function(t){return t.id?t.id:wo("h")}(t);return T_("header",E_(t),"#"+e,function(t){return D_(t)?parseInt(t.nodeName.substr(1),10):0}(t),function(){t.id=e})},I_=function(t){var e=t.id||t.name,r=E_(t);return T_("anchor",r||"#"+e,"#"+e,0,n)},z_=function(t){return C_(t.title).length>0},B_=function(t){var e=function(t){var e;return e=t,L(ys(We.fromDom(e),"h1,h2,h3,h4,h5,h6,a:not([href])"),function(t){return t.dom()})}(t);return F(L(F(e,A_),M_).concat(L(F(e,O_),I_)),z_)},R_="tinymce-url-history",P_=function(t){return k(t)&&/^https?/.test(t)},L_=function(t){return S(t)&&st(t,function(t){return!(T(e=t)&&e.length<=5&&$(e,P_));var e}).isNone()},H_=function(){var t,n=e.localStorage.getItem(R_);if(null===n)return{};try{t=JSON.parse(n)}catch(t){if(t instanceof SyntaxError)return e.console.log("Local storage "+R_+" was not valid JSON",t),{};throw t}return L_(t)?t:(e.console.log("Local storage "+R_+" was not valid format",t),{})},F_=function(t){var e=H_();return Object.prototype.hasOwnProperty.call(e,t)?e[t]:[]},V_=function(t,n){if(P_(t)){var r=H_(),o=Object.prototype.hasOwnProperty.call(r,n)?r[n]:[],i=F(o,function(e){return e!==t});r[n]=[t].concat(i).slice(0,5),function(t){if(!L_(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));e.localStorage.setItem(R_,JSON.stringify(t))}(r)}},j_=Object.prototype.hasOwnProperty,U_=function(t){return!!t},W_=function(t){return it(vC.makeMap(t,/[, ]/),U_)},q_=function(t,e,n){var r,o,i=(r=t,o=e,j_.call(r,o)?y.some(r[o]):y.none()).getOr(n);return k(i)?y.some(i):y.none()},Y_=function(t){return y.some(t.file_picker_callback).filter(O)},$_=function(t){return{getHistory:F_,addToHistory:V_,getLinkInformation:function(){return function(t){return!1===t.settings.typeahead_urls?y.none():y.some({targets:B_(t.getBody()),anchorTop:q_(t.settings,"anchor_top","#top").getOrUndefined(),anchorBottom:q_(t.settings,"anchor_bottom","#bottom").getOrUndefined()})}(t)},getValidationHandler:function(){return function(t){return y.from(t.settings.file_picker_validator_handler).filter(O).orThunk(function(){return y.from(t.settings.filepicker_validator_handler).filter(O)})}(t)},getUrlPicker:function(e){return function(t,e){return function(t,e){var n=function(t){var e=y.some(t.file_picker_types).filter(U_),n=y.some(t.file_browser_callback_types).filter(U_),r=e.or(n).map(W_);return Y_(t).fold(function(){return!1},function(t){return r.fold(function(){return!0},function(t){return nt(t).length>0&&t})})}(t);return E(n)?n?Y_(t):y.none():n[e]?Y_(t):y.none()}(t.settings,e).map(function(n){return function(r){return tb(function(o){var i=d({filetype:e,fieldname:r.fieldname},y.from(r.meta).getOr({}));n.call(t,function(t,e){if(!k(t))throw new Error("Expected value to be string");if(void 0!==e&&!S(e))throw new Error("Expected meta to be a object");o({value:t,meta:e})},r.value,i)})}})}(t,e)}}},G_=o(function(t,e){!function(t,e){var n=Ri.max(t,e,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);ui(t,"max-width",n+"px")}(t,Math.floor(e))}),K_=o([be("items"),Ca(["itemSelector"]),Wc("tgroupBehaviours",[Gd])]),X_=o([yl({name:"items",unit:"item"})]),J_=ql({name:"ToolbarGroup",configFields:K_(),partFields:X_(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Yc(t.tgroupBehaviours,[Gd.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),Q_=o([be("dom"),Ie("shell",!0),Wc("toolbarBehaviours",[Zd])]),Z_=o([bl({name:"groups",overrides:function(){return{behaviours:lu([Zd.config({})])}}})]),tk=ql({name:"Toolbar",configFields:Q_(),partFields:Z_(),factory:function(t,n,r,o){var i=function(e){return t.shell?y.some(e):Nl(e,t,"groups")},a=t.shell?{behaviours:[Zd.config({})],components:[]}:{behaviours:[],components:n};return{uid:t.uid,dom:t.dom,components:a.components,behaviours:Yc(t.toolbarBehaviours,a.behaviours),apis:{setGroups:function(t,n){i(t).fold(function(){throw e.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){Zd.set(t,n)})}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),ek=Hr("within","extra","withinWidth"),nk=function(t,e,n){var r,i=(r=function(t,e){var r=n(t);return y.some({element:o(t),start:o(e),finish:o(e+r),width:o(r)})},j(t,function(t,e){return r(e,t.len).fold(o(t),function(e){return{len:e.finish(),list:t.list.concat([e])}})},{len:0,list:[]}).list),a=F(i,function(t){return t.finish()<=e}),u=V(a,function(t,e){return t+e.width()},0),s=i.slice(a.length);return{within:o(a),extra:o(s),withinWidth:o(u)}},rk=function(t){return L(t,function(t){return t.element()})},ok=function(t,e){var n=L(e,function(t){return Ei(t)});tk.setGroups(t,n)},ik=function(t,e,n){var r=Al(t,e,"primary"),o=wb.getCoupled(t,"overflowGroup");ui(r.element(),"visibility","hidden");var i=e.builtGroups.get().concat([o]),a=et(i,function(t){return Cu(t.element()).bind(function(e){return t.getSystem().getByDom(e).toOption()})});n([]),ok(r,i);var u=function(t,e,n,r){var o=function(t,e,n){var r=nk(e,t,n);return 0===r.extra().length?y.some(r):y.none()}(t,e,n).getOrThunk(function(){return nk(e,t-n(r),n)}),i=o.within(),a=o.extra(),u=o.withinWidth();return 1===a.length&&a[0].width()<=n(r)?function(t,e,n){var r=rk(i.concat(e));return ek(r,[],n)}(0,a,u):a.length>=1?function(t,e,n,r){var o=rk(i).concat([n]);return ek(o,rk(e),r)}(0,a,r,u):function(t,e,n){return ek(rk(i),[],n)}(0,0,u)}(Pi(r.element()),e.builtGroups.get(),function(t){return Pi(t.element())},o);0===u.extra().length?(Zd.remove(r,o),n([])):(ok(r,u.within()),n(u.extra())),pi(r.element(),"visibility"),gi(r.element()),a.each(ih.focus)},ak=o([Wc("splitToolbarBehaviours",[wb]),Ve("builtGroups",function(){return je([])})]),uk=o([Ca(["overflowToggledClass"]),Ae("getOverflowBounds"),be("lazySink"),Ve("overflowGroups",function(){return je([])})].concat(ak())),sk=o([gl({factory:tk,schema:Q_(),name:"primary"}),vl({schema:Q_(),name:"overflow"}),vl({name:"overflow-button"}),vl({name:"overflow-group"})]),ck=o([Ca(["toggledClass"]),be("lazySink"),_e("fetch"),Ae("getBounds"),Me("fireDismissalEventInstead",[Ie("event",lr())]),ts()]),lk=o([vl({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:lu([vh.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),vl({factory:tk,schema:Q_(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:lu([Gd.config({mode:"cyclic",onEscape:function(e){return Nl(e,t,"button").each(ih.focus),y.none()}})])}}})]),fk=function(t,e){var n=wb.getCoupled(t,"toolbarSandbox");_c.isOpen(n)?_c.close(n):_c.open(n,e.toolbar())},dk=function(t,e,n,r){var o=n.getBounds.map(function(t){return t()}),i=n.lazySink(t).getOrDie();ec.positionWithinBounds(i,{anchor:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:G_()}},e,o)},hk=function(t,e,n,r,o){tk.setGroups(e,o),dk(t,e,n,r),vh.on(t)},mk=ql({name:"FloatingToolbarButton",factory:function(t,e,n,r){return d(d({},vm.sketch(d(d({},r.button()),{action:function(t){fk(t,r)},buttonBehaviours:Gc({dump:r.button().buttonBehaviours},[wb.config({others:{toolbarSandbox:function(e){return function(t,e,n){var r=sa();return{dom:{tag:"div",attributes:{id:r.id()}},behaviours:lu([Gd.config({mode:"special",onEscape:function(t){return _c.close(t),y.some(!0)}}),_c.config({onOpen:function(o,i){n.fetch().get(function(o){hk(t,i,n,e.layouts,o),r.link(t.element()),Gd.focusIn(i)})},onClose:function(){vh.off(t),ih.focus(t),r.unlink(t.element())},isPartOf:function(e,n,r){return la(n,r)||la(t,r)},getAttachPoint:function(){return n.lazySink(t).getOrDie()}}),bu.config({channels:d(d({},Oc(d({isExtraPart:o(!1)},n.fireDismissalEventInstead.map(function(t){return{fireEventInstead:{event:t.event}}}).getOr({})))),Nc({isExtraPart:o(!1),doReposition:function(){_c.getState(wb.getCoupled(t,"toolbarSandbox")).each(function(r){dk(t,r,n,e.layouts)})}}))})])}}(e,n,t)}}})])}))),{apis:{setGroups:function(e,r){_c.getState(wb.getCoupled(e,"toolbarSandbox")).each(function(o){hk(e,o,t,n.layouts,r)})},reposition:function(e){_c.getState(wb.getCoupled(e,"toolbarSandbox")).each(function(r){dk(e,r,t,n.layouts)})},toggle:function(t){fk(t,r)},getToolbar:function(t){return _c.getState(wb.getCoupled(t,"toolbarSandbox"))}}})},configFields:ck(),partFields:lk(),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)}}}),pk=function(t){return L(t,function(t){return Ei(t)})},gk=function(t,e,n){ik(t,n,function(r){n.overflowGroups.set(r),e.getOpt(t).each(function(t){mk.setGroups(t,pk(r))})})},vk=ql({name:"SplitFloatingToolbar",configFields:uk(),partFields:sk(),factory:function(t,e,n,r){var o=bm(mk.sketch({fetch:function(){return tb(function(e){e(pk(t.overflowGroups.get()))})},layouts:{onLtr:function(){return[Ga]},onRtl:function(){return[$a]},onBottomLtr:function(){return[Xa]},onBottomRtl:function(){return[Ka]}},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:Yc(t.splitToolbarBehaviours,[wb.config({others:{overflowGroup:function(){return J_.sketch(d(d({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(L(n,e.getSystem().build)),gk(e,o,t)},refresh:function(e){return gk(e,o,t)},toggle:function(t){o.getOpt(t).each(function(t){mk.toggle(t)})},reposition:function(t){o.getOpt(t).each(function(t){mk.reposition(t)})},getOverflow:function(t){return o.getOpt(t).bind(function(t){return mk.getToolbar(t)})}},domModification:{attributes:{role:"group"}}}},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)},getOverflow:function(t,e){return t.getOverflow(e)}}}),bk=function(t,e){return e.getAnimationRoot.fold(function(){return t.element()},function(e){return e(t)})},yk=function(t){return t.dimension.property},xk=function(t,e){return t.dimension.getDimension(e)},wk=function(t,e){var n=bk(t,e);ti(n,[e.shrinkingClass,e.growingClass])},Ck=function(t,e){Jo(t.element(),e.openClass),Xo(t.element(),e.closedClass),ui(t.element(),yk(e),"0px"),gi(t.element())},_k=function(t,e){Jo(t.element(),e.closedClass),Xo(t.element(),e.openClass),pi(t.element(),yk(e))},kk=function(t,e,n,r){n.setCollapsed(),ui(t.element(),yk(e),xk(e,t.element())),gi(t.element()),wk(t,e),Ck(t,e),e.onStartShrink(t),e.onShrunk(t)},Sk=function(t,e,n){var r=xk(e,t.element());("0px"===r?kk:function(t,e,n,r){var o=r.getOrThunk(function(){return xk(e,t.element())});n.setCollapsed(),ui(t.element(),yk(e),o),gi(t.element());var i=bk(t,e);Jo(i,e.growingClass),Xo(i,e.shrinkingClass),Ck(t,e),e.onStartShrink(t)})(t,e,n,y.some(r))},Tk=function(t,e,n){var r=bk(t,e),o=Qo(r,e.shrinkingClass),i=xk(e,t.element());_k(t,e);var a=xk(e,t.element());(o?function(){ui(t.element(),yk(e),i),gi(t.element())}:function(){Ck(t,e)})(),Jo(r,e.shrinkingClass),Xo(r,e.growingClass),_k(t,e),ui(t.element(),yk(e),a),n.setExpanded(),e.onStartGrow(t)},Ek=function(t,e,n){var r=bk(t,e);return!0===Qo(r,e.growingClass)},Ok=function(t,e,n){var r=bk(t,e);return!0===Qo(r,e.shrinkingClass)},Dk=Object.freeze({__proto__:null,refresh:function(t,e,n){if(n.isExpanded()){pi(t.element(),yk(e));var r=xk(e,t.element());ui(t.element(),yk(e),r)}},grow:function(t,e,n){n.isExpanded()||Tk(t,e,n)},shrink:function(t,e,n){n.isExpanded()&&Sk(t,e,n)},immediateShrink:function(t,e,n){n.isExpanded()&&kk(t,e,n,y.none())},hasGrown:function(t,e,n){return n.isExpanded()},hasShrunk:function(t,e,n){return n.isCollapsed()},isGrowing:Ek,isShrinking:Ok,isTransitioning:function(t,e,n){return!0===Ek(t,e)||!0===Ok(t,e)},toggleGrow:function(t,e,n){(n.isExpanded()?Sk:Tk)(t,e,n)},disableTransitions:wk}),Nk=Object.freeze({__proto__:null,exhibit:function(t,e){var n=e.expanded;return Vo(n?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:Rt(e.dimension.property,"0px")})},events:function(t,e){return kr([zr(Wn(),function(n,r){r.event().raw().propertyName===t.dimension.property&&(wk(n,t),e.isExpanded()&&pi(n.element(),t.dimension.property),(e.isExpanded()?t.onGrown:t.onShrunk)(n))})])}}),Ak=[be("closedClass"),be("openClass"),be("shrinkingClass"),be("growingClass"),Ee("getAnimationRoot"),ka("onShrunk"),ka("onStartShrink"),ka("onGrown"),ka("onStartGrow"),Ie("expanded",!1),ye("dimension",ce("property",{width:[Oa("property","width"),Oa("getDimension",function(t){return Pi(t)+"px"})],height:[Oa("property","height"),Oa("getDimension",function(t){return Ni(t)+"px"})]}))],Mk=du({fields:Ak,name:"sliding",active:Nk,apis:Dk,state:Object.freeze({__proto__:null,init:function(t){var e=je(t.expanded);return Ho({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:a(e.set,!1),setExpanded:a(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),Ik=o([Ca(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),ka("onOpened"),ka("onClosed")].concat(ak())),zk=o([gl({factory:tk,schema:Q_(),name:"primary"}),gl({factory:tk,schema:Q_(),name:"overflow",overrides:function(t){return{toolbarBehaviours:lu([Mk.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){Nl(e,t,"overflow-button").each(function(t){vh.off(t),ih.focus(t)}),t.onClosed(e)},onGrown:function(e){Gd.focusIn(e),t.onOpened(e)},onStartGrow:function(e){Nl(e,t,"overflow-button").each(vh.on)}}),Gd.config({mode:"acyclic",onEscape:function(e){return Nl(e,t,"overflow-button").each(ih.focus),y.some(!0)}})])}}}),vl({name:"overflow-button",overrides:function(t){return{buttonBehaviours:lu([vh.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),vl({name:"overflow-group"})]),Bk=function(t,e){Nl(t,e,"overflow").each(function(n){ik(t,e,function(t){var e=L(t,function(t){return Ei(t)});tk.setGroups(n,e)}),Nl(t,e,"overflow-button").each(function(t){Mk.hasGrown(n)&&vh.on(t)}),Mk.refresh(n)})},Rk=ql({name:"SplitSlidingToolbar",configFields:Ik(),partFields:zk(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Yc(t.splitToolbarBehaviours,[wb.config({others:{overflowGroup:function(t){return J_.sketch(d(d({},r["overflow-group"]()),{items:[vm.sketch(d(d({},r["overflow-button"]()),{action:function(e){br(t,"alloy.toolbar.toggle")}}))]}))}}}),th("toolbar-toggle-events",[Er("alloy.toolbar.toggle",function(e){Nl(e,t,"overflow").each(function(n){Bk(e,t),Mk.toggleGrow(n)})})])]),apis:{setGroups:function(e,n){!function(e,n){var r=L(n,e.getSystem().build);t.builtGroups.set(r)}(e,n),Bk(e,t)},refresh:function(e){return Bk(e,t)},toggle:function(e){return function(t,e){Nl(t,e,"overflow").each(function(n){Bk(t,e),Mk.toggleGrow(n)})}(e,t)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)}}}),Pk=o(wo("toolbar-height-change")),Lk=$t([("readonly",ye("readonly",me))]),Hk=function(t,e){var n=t.outerContainer;!function(t,e){var n=t.outerContainer.element();e&&(t.mothership.broadcastOn([kc()],{target:n}),t.uiMothership.broadcastOn([kc()],{target:n})),t.mothership.broadcastOn(["silver.readonly"],{readonly:e}),t.uiMothership.broadcastOn(["silver.readonly"],{readonly:e})}(t,e),wn("*",n.element()).forEach(function(t){n.getSystem().getByDom(t).each(function(t){t.hasConfigured(Dp)&&Dp.set(t,e)})})},Fk=function(t,e){t.on("init",function(){t.readonly&&Hk(e,!0)}),t.on("SwitchMode",function(){return Hk(e,t.readonly)}),function(t){return t.getParam("readonly",!1,"boolean")}(t)&&t.setMode("readonly")},Vk=function(t){var e;return bu.config({channels:(e={},e["silver.readonly"]={schema:Lk,onReceive:function(e,n){t(e).each(function(t){!function(t,e){wn("*",t.element()).forEach(function(n){t.getSystem().getByDom(n).each(function(t){t.hasConfigured(Dp)&&Dp.set(t,e)})})}(t,n.readonly)})}},e)})},jk=function(t){var e=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:d({tag:"div",classes:["tox-toolbar__group"]},e),components:[J_.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:lu([mb.config({}),ih.config({})])}},Uk=function(t){return J_.sketch(jk(t))},Wk=function(t,e,n){var r=Br(function(e){var n=L(t.initGroups,Uk);tk.setGroups(e,n)});return lu([Gd.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),th("toolbar-events",[r]),Vk(n)])},qk=function(t,e){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":jk({title:y.none(),items:[]}),"overflow-button":Gw({name:"more",icon:y.some("more-drawer"),disabled:!1,tooltip:y.some("More..."),primary:!1,borderless:!1},y.none(),t.backstage.shared.providers)},splitToolbarBehaviours:Wk(t,n,e)}},Yk=function(t){var e=qk(t,vk.getOverflow),n=vk.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return vk.sketch(d(d({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element(),n=Qi(e),r=Wr(e),o=Qi(r);return Xi(n.x()+4,o.y(),n.width()-8,o.height())},parts:d(d({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},$k=function(t){var e=Rk.parts().primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=Rk.parts().overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=qk(t,y.none);return Rk.sketch(d(d({},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([Pk()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([Pk()],{type:"closed"})}}))},Gk=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return tk.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===wf.scrolling?["tox-toolbar--scrolling"]:[])},components:[tk.parts().groups({})],toolbarBehaviours:Wk(t,e,o(y.none()))})},Kk=[Le("disabled",!1),Ne("tooltip"),Ne("icon"),Ne("text"),He("onSetup",function(){return n})],Xk=$t([we("type"),_e("onAction")].concat(Kk)),Jk=function(t){return oe("toolbarbutton",Xk,t)},Qk=[Ne("text"),Ne("tooltip"),Ne("icon"),_e("fetch"),He("onSetup",function(){return n})],Zk=$t(m([we("type")],Qk)),tS=function(t){return oe("menubutton",Zk,t)},eS=$t([we("type"),Ne("tooltip"),Ne("icon"),Ne("text"),Ae("select"),_e("fetch"),He("onSetup",function(){return n}),Pe("presets","normal",["normal","color","listpreview"]),Ie("columns",1),_e("onAction"),_e("onItemAction")]),nS=[Le("active",!1)].concat(Kk),rS=$t(nS.concat([we("type"),_e("onAction")])),oS=function(t){return oe("ToggleButton",rS,t)},iS=$t([we("type"),ye("items",(wC=[ee([we("name"),Te("items",he)]),he],{extract:function(t,e,n){for(var r=[],o=0,i=wC;o<i.length;o++){var a=i[o].extract(t,e,n);if(a.stype===p.Value)return a;r.push(a)}return Ht(r)},toString:function(){return"oneOf("+L(wC,function(t){return t.toString()}).join(", ")+")"}}))].concat(Kk)),aS=[He("predicate",function(){return!1}),Pe("scope","node",["node","editor"]),Pe("position","selection",["node","selection","line"])],uS=Kk.concat([Ie("type","contextformbutton"),Ie("primary",!1),_e("onAction"),Ve("original",i)]),sS=nS.concat([Ie("type","contextformbutton"),Ie("primary",!1),_e("onAction"),Ve("original",i)]),cS=Kk.concat([Ie("type","contextformbutton")]),lS=nS.concat([Ie("type","contextformtogglebutton")]),fS=ce("type",{contextformbutton:uS,contextformtogglebutton:sS}),dS=$t([Ie("type","contextform"),He("initValue",function(){return""}),Ne("label"),Te("commands",fS),Oe("launch",ce("type",{contextformbutton:cS,contextformtogglebutton:lS}))].concat(aS)),hS=$t([Ie("type","contexttoolbar"),we("items")].concat(aS)),mS=Object.freeze({__proto__:null,getState:function(t,e,n){return n}}),pS=Object.freeze({__proto__:null,events: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=L(o,n.getSystem().build);ic(n,i)})};return kr([Er(Xn(),function(e,r){var o=r,i=t.channel;B(o.channels(),i)&&n(e,o.data())}),Br(function(e,r){t.initialData.each(function(t){n(e,t)})})])}}),gS=Object.freeze({__proto__:null,init:function(){var t=je(y.none());return{readState:function(){return t.get().fold(function(){return"none"},function(t){return t})},get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(y.none())}}}}),vS=[be("channel"),Ee("renderComponents"),Ee("updateState"),Ee("initialData")],bS=du({fields:vS,name:"reflecting",active:pS,apis:mS,state:gS}),yS=o([be("toggleClass"),be("fetch"),Ta("onExecute"),Ie("getHotspot",y.some),Ie("getAnchorOverrides",o({})),ts(),Ta("onItemExecute"),Ee("lazySink"),be("dom"),ka("onOpen"),Wc("splitDropdownBehaviours",[wb,Gd,ih]),Ie("matchWidth",!1),Ie("useMinWidth",!1),Ie("eventOrder",{}),Ee("role")].concat(Ab())),xS=gl({factory:vm,schema:[be("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:lu([ih.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(xr)},buttonBehaviours:lu([vh.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),wS=gl({factory:vm,schema:[be("dom")],name:"button",defaults:function(){return{buttonBehaviours:lu([ih.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)})}}}}),CS=o([xS,wS,bl({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[be("text")],name:"aria-descriptor"}),vl({schema:[wa()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each(function(r){t.onItemExecute(r,e,n)})}}}}),_b()]),_S=ql({name:"SplitDropdown",configFields:yS(),partFields:CS(),factory:function(t,e,r,o){var i=function(t){Xl.getCurrent(t).each(function(t){uf.highlightFirst(t),Gd.focusIn(t)})},a=function(e){Tb(t,function(t){return t},e,o,i,Gv.HighlightFirst).get(n)},u=function(e){var n=Al(e,t,"button");return xr(n),y.some(!0)},s=d(d({},kr([Br(function(e,n){Nl(e,t,"aria-descriptor").each(function(t){var n=wo("aria");fo(t.element(),"id",n),fo(e.element(),"aria-describedby",n)})})])),yh(y.some(a))),c={repositionMenus:function(t){vh.isOn(t)&&Nb(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:c,eventOrder:d(d({},t.eventOrder),{"alloy.execute":["disabling","toggling","alloy.base.behaviour"]}),events:s,behaviours:Yc(t.splitDropdownBehaviours,[wb.config({others:{sandbox:function(e){var n=Al(e,t,"arrow");return Db(t,e,{onOpen:function(){vh.on(n),vh.on(e)},onClose:function(){vh.off(n),vh.off(e)}})}}}),Gd.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return a(t),y.some(!0)}}),ih.config({}),vh.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),kS=function(t){return{isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)}}},SS=function(t){return{setActive:function(e){vh.set(t,e)},isActive:function(){return vh.isOn(t)},isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)}}},TS=function(t,e){return t.map(function(t){return{"aria-label":e.translate(t),title:e.translate(t)}}).getOr({})},ES=wo("focus-button"),OS=["checklist","ordered-list"],DS=["indent","outdent","table-insert-column-after","table-insert-column-before","unordered-list"],NS=function(t,e,n,r,o,i){var a,u=function(t){return rp.isRtl()&&B(OS,t)?t+"-rtl":t},s=rp.isRtl()&&t.exists(function(t){return B(DS,t)});return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]).concat(s?["tox-tbtn__icon-rtl"]:[]),attributes:TS(n,i)},components:Vp([t.map(function(t){return Aw(u(t),i.icons)}),e.map(function(t){return Iw(t,"tox-tbtn",i)})]),eventOrder:(a={},a[Mn()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:lu([th("common-button-display-events",[Er(Mn(),function(t,e){e.event().prevent(),br(t,ES)})])].concat(r.map(function(n){return bS.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return Vp([t.icon.map(function(t){return Aw(u(t),i.icons)}),t.text.map(function(t){return Iw(t,"tox-tbtn",i)})])}})}).toArray()).concat(o.getOr([])))}},AS=function(t,e,r){var o,i=je(n),a=NS(t.icon,t.text,t.tooltip,y.none(),y.none(),r);return vm.sketch({dom:a.dom,components:a.components,eventOrder:Bw,buttonBehaviours:lu([th("toolbar-button-events",[(o={onAction:t.onAction,getApi:e.getApi},Lr(function(t,e){zp(o,t)(function(e){yr(t,zw,{buttonApi:e}),o.onAction(e)})})),Bp(e,i),Rp(e,i)]),Ip(t.disabled)].concat(e.toolbarButtonBehaviours))})},MS=function(t,e,n){return AS(t,{toolbarButtonBehaviours:[].concat(n.length>0?[th("toolbarButtonWith",n)]:[]),getApi:kS,onSetup:t.onSetup},e)},IS=function(t,e,n){return gt(AS(t,{toolbarButtonBehaviours:[Zd.config({}),vh.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(n.length>0?[th("toolbarToggleButtonWith",n)]:[]),getApi:SS,onSetup:t.onSetup},e))},zS=function(t,e,n){return function(r){return tb(function(t){return e.fetch(t)}).map(function(o){return y.from(av(gt(Kg(wo("menu-value"),o,function(n){e.onItemAction(t(r),n)},e.columns,e.presets,Lp.CLOSE_ON_EXECUTE,e.select.getOr(function(){return!1}),n),{movement:Jg(e.columns,e.presets),menuBehaviours:Gm("auto"!==e.columns?[]:[Br(function(t,n){$m(t,4,cp(e.presets)).each(function(e){var n=e.numRows,r=e.numColumns;Gd.setGridSize(t,n,r)})})])})))})}},BS=function(t,e){return Er(zw,function(n,r){var o=function(t){return{hide:function(){return br(t,er())},getValue:function(){return Uc.getValue(t)}}}(t.get(n));e.onAction(o,r.event().buttonApi())})},RS=function(t,e,n){var r=e.label.fold(function(){return{}},function(t){return{"aria-label":t}}),o=bm(qv.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:r,selectOnFocus:!0,inputBehaviours:lu([Gd.config({mode:"special",onEnter:function(t){return i.findPrimary(t).map(function(t){return xr(t),!0})},onLeft:function(t,e){return e.cut(),y.none()},onRight:function(t,e){return e.cut(),y.none()}})])})),i=function(t,e,n){var r=L(e,function(e){return bm(function(t,e,n){var r={backstage:{shared:{providers:n}}};return"contextformtogglebutton"===e.type?function(t,e,n){var r=e.original,o=(r.primary,h(r,["primary"])),i=ie(oS(d(d({},o),{type:"togglebutton",onAction:function(){}})));return IS(i,n.backstage.shared.providers,[BS(t,e)])}(t,e,r):function(t,e,n){var r=e.original,o=(r.primary,h(r,["primary"])),i=ie(Jk(d(d({},o),{type:"button",onAction:function(){}})));return MS(i,n.backstage.shared.providers,[BS(t,e)])}(t,e,r)}(t,e,n))});return{asSpecs:function(){return L(r,function(t){return t.asSpec()})},findPrimary:function(t){return et(e,function(e,n){return e.primary?y.from(r[n]).bind(function(e){return e.getOpt(t)}).filter(u(Dp.isDisabled)):y.none()})}}}(o,e.commands,n.shared.providers);return Gk({type:t,uid:wo("context-toolbar"),initGroups:[{title:y.none(),items:[o.asSpec()]},{title:y.none(),items:i.asSpecs()}],onEscape:y.none,cyclicKeying:!0})},PS=function(t){var n=qi(e.window),r=Ji(We.fromDom(t.getContentAreaContainer())),o=am(t)||um(t)||cm(t),i=function(t,e){var n=Math.max(e.x(),t.x()),r=t.right()-n,o=e.width()-(n-e.x());return{x:n,width:Math.min(r,o)}}(r,n),a=i.x,u=i.width;if(t.inline&&!o)return Xi(a,n.y(),u,n.height());var s=function(t,e,n){var r=We.fromDom(t.getContainer()),o=aa(r,".tox-editor-header").getOr(r),i=Ji(o),a=i.y()>=e.bottom(),u=dm(t)&&!a;if(t.inline&&u)return{y:Math.max(i.bottom(),n.y()),bottom:n.bottom()};if(t.inline&&!u)return{y:n.y(),bottom:Math.min(i.y(),n.bottom())};var s=Ji(r);return u?{y:Math.max(i.bottom(),n.y()),bottom:Math.min(s.bottom(),n.bottom())}:{y:Math.max(s.y(),n.y()),bottom:Math.min(i.y(),n.bottom())}}(t,r,n),c=s.y,l=s.bottom;return Xi(a,c,u,l-c)},LS=function(t,e){return et(e,function(e){return e.predicate(t.dom())?y.some({toolbarApi:e,elem:t}):y.none()})},HS=function(t,e){var n={},r=[],o=[],i={},a={},u=function(t,u){var s=ie(oe("ContextForm",dS,u));n[t]=s,s.launch.map(function(n){i["form:"+t]=d(d({},u.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){e(s)}})}),"editor"===s.scope?o.push(s):r.push(s),a[t]=s},s=nt(t);return H(s,function(e){var n=t[e];"contextform"===n.type?u(e,n):"contexttoolbar"===n.type&&function(t,e){var n;(n=e,oe("ContextToolbar",hS,n)).each(function(n){"editor"===e.scope?o.push(n):r.push(n),a[t]=n})}(e,n)}),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}},FS=wo("forward-slide"),VS=wo("backward-slide"),jS=wo("change-slide-event"),US=function(t,e){return function(n){var r=je(y.none()),o=function(){n.setActive(t.formatter.match(e));var o=t.formatter.formatChanged(e,n.setActive).unbind;r.set(y.some(o))};return t.initialized?o():t.on("init",o),function(){return r.get().each(function(t){return t()})}}},WS=function(t){return function(e){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)})}}},qS=function(t,e,n){var r=function(t,r,i,a){var u=e.shared.providers.translate(t.title);if("separator"===t.type)return y.some({type:"separator",text:u});if("submenu"===t.type){var s=Y(t.getStyleItems(),function(t){return o(t,r,a)});return 0===r&&s.length<=0?y.none():y.some({type:"nestedmenuitem",text:u,disabled:s.length<=0,getSubmenuItems:function(){return Y(t.getStyleItems(),function(t){return o(t,r,a)})}})}return y.some(d({type:"togglemenuitem",text:u,active:t.isSelected(a),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 Y(t,function(t){return o(t,r,e)})};return{validateItems:i,getFetch:function(t,e){return function(n){var r=e(),o=i(r);n(Uw(o,Lp.CLOSE_ON_EXECUTE,t,!1))}}}},YS=function(t,e,n){var r=n.dataset,o="basic"===r.type?function(){return L(r.data,function(t){return y_(t,n.isSelectedFor,n.getPreviewFor)})}:r.getData;return{items:qS(0,e,n),getStyleItems:o}},$S=function(t,e,r){var o=YS(0,e,r),i=o.items,a=o.getStyleItems;return Lw({text:r.icon.isSome()?y.none():y.some(""),icon:r.icon,tooltip:y.from(r.tooltip),role:y.none(),fetch:i.getFetch(e,a),onSetup:function(e){return r.setInitialValue.each(function(t){return t(e.getComponent())}),r.nodeChangeHandler.map(function(n){var r=n(e.getComponent());return t.on("NodeChange",r),function(){t.off("NodeChange",r)}}).getOr(n)},getApi:function(t){return{getComponent:function(){return t}}},columns:1,presets:"normal",classes:r.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)};!function(t){t[t.SemiColon=0]="SemiColon",t[t.Space=1]="Space"}(CC||(CC={}));var GS,KS=function(t,e,n,r){return{type:"basic",data:function(t){return L(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}})}(function(t,e){return r===CC.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")}(lt(t.settings,e).getOr(n)))}},XS=[{title:"Left",icon:"align-left",format:"alignleft"},{title:"Center",icon:"align-center",format:"aligncenter"},{title:"Right",icon:"align-right",format:"alignright"},{title:"Justify",icon:"align-justify",format:"alignjustify"}],JS=function(t){var e=function(e){var n=U(XS,function(e){return t.formatter.match(e.format)}).fold(function(){return"left"},function(t){return t.title.toLowerCase()});yr(e,Pw,{icon:"align-"+n})},n=y.some(function(t){return function(){return e(t)}}),r=y.some(function(t){return e(t)}),i={type:"basic",data:XS};return{tooltip:"Align",icon:y.some("align-left"),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:o(y.none()),getPreviewFor:function(t){return function(){return y.none()}},onAction:WS(t),setInitialValue:r,nodeChangeHandler:n,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},QS=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],ZS=function(t){var e=t.split(/\s*,\s*/);return L(e,function(t){return t.replace(/^['"]+|['"]+$/g,"")})},tT=function(t){var e=function(){var e=function(t){return t?ZS(t)[0]:""},n=t.queryCommandValue("FontName"),r=i.data,o=n?n.toLowerCase():"";return{matchOpt:U(r,function(t){var n=t.format;return n.toLowerCase()===o||e(n).toLowerCase()===e(o).toLowerCase()}).orThunk(function(){return 0===(t=o).indexOf("-apple-system")&&(e=ZS(t.toLowerCase()),$(QS,function(t){return e.indexOf(t.toLowerCase())>-1}))?y.from({title:"System Font",format:o}):y.none();var t,e}),font:n}},n=function(t){var n=e(),r=n.matchOpt,o=n.font,i=r.fold(function(){return o},function(t){return t.title});yr(t,Rw,{text:i})},r=y.some(function(t){return function(){return n(t)}}),o=y.some(function(t){return n(t)}),i=KS(t,"font_formats","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",CC.SemiColon);return{tooltip:"Fonts",icon:y.none(),isSelectedFor:function(t){return function(e){return e.exists(function(e){return e.format===t})}},getCurrentValue:function(){return e().matchOpt},getPreviewFor:function(t){return function(){return y.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(e){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("FontName",!1,e.format)})}},setInitialValue:o,nodeChangeHandler:r,dataset:i,shouldHide:!1,isInvalid:function(){return!1}}},eT={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},nT=function(t){var e=function(){var e=y.none(),n=u.data,r=t.queryCommandValue("FontSize");if(r)for(var o=function(t){var o=function(t,e){return/[0-9.]+px$/.test(t)?function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}(72*parseInt(t,10)/96,e||0)+"pt":t}(r,t),i=lt(eT,o).getOr("");e=U(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=o(o(y.none())),r=function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(function(){return o},function(t){return t.title});yr(t,Rw,{text:i})},i=y.some(function(t){return function(){return r(t)}}),a=y.some(function(t){return r(t)}),u=KS(t,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",CC.Space);return{tooltip:"Font sizes",icon:y.none(),isSelectedFor:function(t){return function(e){return e.exists(function(e){return e.format===t})}},getPreviewFor:n,getCurrentValue:function(){return e().matchOpt},onAction:function(e){return function(){t.undoManager.transact(function(){t.focus(),t.execCommand("FontSize",!1,e.format)})}},setInitialValue:a,nodeChangeHandler:i,dataset:u,shouldHide:!1,isInvalid:function(){return!1}}},rT=function(t,e,n){var r=e();return et(n,function(e){return U(r,function(n){return t.formatter.matchNode(e,n.format)})}).orThunk(function(){return t.formatter.match("p")?y.some({title:"Paragraph",format:"p"}):y.none()})},oT=function(t){var e=t.selection.getStart(!0)||t.getBody();return t.dom.getParents(e,function(){return!0},t.getBody())},iT=function(t){var e=function(e,n){var r=rT(t,function(){return i.data},e).fold(function(){return"Paragraph"},function(t){return t.title});yr(n,Rw,{text:r})},n=y.some(function(t){return function(n){return e(n.parents,t)}}),r=y.some(function(n){var r=oT(t);e(r,n)}),i=KS(t,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",CC.SemiColon);return{tooltip:"Blocks",icon:y.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:o(y.none()),getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return y.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},onAction:WS(t),setInitialValue:r,nodeChangeHandler:n,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},aT=function(t,e){var n=function(e,n){var r=Y(b_(t),function t(e){var n=e.items;return void 0!==n&&n.length>0?Y(n,t):[{title:e.title,format:e.format}]}),o=rT(t,function(){return r},e).fold(function(){return"Paragraph"},function(t){return t.title});yr(n,Rw,{text:o})},r=y.some(function(t){return function(e){return n(e.parents,t)}}),i=y.some(function(e){var r=oT(t);n(r,e)});return{tooltip:"Formats",icon:y.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:o(y.none()),getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return void 0!==n?y.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):y.none()}},onAction:WS(t),setInitialValue:i,nodeChangeHandler:r,shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}},uT=[{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"]}],sT=function(t,e){return function(n,r,o){var i=t(n).mapError(function(t){return ue(t)}).getOrDie();return e(i,r,o)}},cT={button:sT(Jk,function(t,e){return n=t,r=e.backstage.shared.providers,MS(n,r,[]);var n,r}),togglebutton:sT(oS,function(t,e){return n=t,r=e.backstage.shared.providers,IS(n,r,[]);var n,r}),menubutton:sT(tS,function(t,e){return qw(t,"tox-tbtn",e.backstage,y.none())}),splitbutton:sT(function(t){return oe("SplitButton",eS,t)},function(t,e){return function(t,e){var r,o=wo("channel-update-split-dropdown-display"),i=function(t){return{isDisabled:function(){return Dp.isDisabled(t)},setDisabled:function(e){return Dp.set(t,e)},setIconFill:function(e,n){aa(t.element(),'svg path[id="'+e+'"], rect[id="'+e+'"]').each(function(t){fo(t,"fill",n)})},setIconStroke:function(e,n){aa(t.element(),'svg path[id="'+e+'"], rect[id="'+e+'"]').each(function(t){fo(t,"stroke",n)})},setActive:function(e){fo(t.element(),"aria-pressed",e),aa(t.element(),"span").each(function(n){t.getSystem().getByDom(n).each(function(t){return vh.set(t,e)})})},isActive:function(){return aa(t.element(),"span").exists(function(e){return t.getSystem().getByDom(e).exists(vh.isOn)})}}},a=je(n),u={getApi:i,onSetup:t.onSetup};return _S.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:d({"aria-pressed":!1},TS(t.tooltip,e.providers))},onExecute:function(e){t.onAction(i(e))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:lu([Mp(!1),th("split-dropdown-events",[Er(ES,ih.focus),Bp(u,a),Rp(u,a)]),Rb.config({})]),eventOrder:(r={},r[sr()]=["alloy.base.behaviour","split-dropdown-events"],r),toggleClass:"tox-tbtn--enabled",lazySink:e.getSink,fetch:zS(i,t,e.providers),parts:{menu:jg(0,t.columns,t.presets)},components:[_S.parts().button(NS(t.icon,t.text,y.none(),y.some(o),y.some([vh.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),e.providers)),_S.parts().arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:xm("chevron-down",e.providers.icons)}}),_S.parts()["aria-descriptor"]({text:e.providers.translate("To open the popup, press Shift+Enter")})]})}(t,e.backstage.shared)}),grouptoolbarbutton:sT(function(t){return oe("GroupToolbarButton",iS,t)},function(t,e,n){var r,o=n.ui.registry.getAll().buttons,i=((r={})[Qu]=dm(n)?fa.TopToBottom:fa.BottomToTop,r);switch(fm(n)){case wf.floating:return function(t,e,n,r){var o=e.shared;return mk.sketch({lazySink:o.getSink,fetch:function(){return tb(function(e){e(L(n(t.items),Uk))})},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:NS(t.icon,t.text,t.tooltip,y.none(),y.none(),o.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:r}}}})}(t,e.backstage,function(t){return hT(n,{buttons:o,toolbar:t,allowToolbarGroups:!1},e,y.none())},i);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}}),styleSelectButton:function(t,e){return function(t,e){var n=d({type:"advanced"},e.styleselect);return $S(t,e,aT(t,n))}(t,e.backstage)},fontsizeSelectButton:function(t,e){return function(t,e){return $S(t,e,nT(t))}(t,e.backstage)},fontSelectButton:function(t,e){return function(t,e){return $S(t,e,tT(t))}(t,e.backstage)},formatButton:function(t,e){return function(t,e){return $S(t,e,iT(t))}(t,e.backstage)},alignMenuButton:function(t,e){return function(t,e){return $S(t,e,JS(t))}(t,e.backstage)}},lT={styleselect:cT.styleSelectButton,fontsizeselect:cT.fontsizeSelectButton,fontselect:cT.fontSelectButton,formatselect:cT.formatButton,align:cT.alignMenuButton},fT=function(t){var n,r=t.toolbar,o=t.buttons;return!1===r?[]:void 0===r||!0===r?function(t){var e=L(uT,function(e){var n=F(e.items,function(e){return ft(t,e)||ft(lT,e)});return{name:e.name,items:n}});return F(e,function(t){return t.items.length>0})}(o):k(r)?(n=r.split("|"),L(n,function(t){return{items:t.trim().split(" ")}})):N(r,function(t){return ft(t,"name")&&ft(t,"items")})?r:(e.console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},dT=function(t,n,r,o,i,a){return lt(n,r.toLowerCase()).orThunk(function(){return a.bind(function(t){return et(t,function(t){return lt(n,t+r.toLowerCase())})})}).fold(function(){return lt(lT,r.toLowerCase()).map(function(e){return e(t,i)}).orThunk(function(){return y.none()})},function(n){return"grouptoolbarbutton"!==n.type||o?function(t,n,r){return lt(cT,t.type).fold(function(){return e.console.error("skipping button defined by",t),y.none()},function(e){return y.some(e(t,n,r))})}(n,i,t):(e.console.warn("Ignoring the '"+r+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),y.none())})},hT=function(t,e,n,r){var o=fT(e),i=L(o,function(o){var i=Y(o.items,function(o){return 0===o.trim().length?[]:dT(t,e.buttons,o,e.allowToolbarGroups,n,r).toArray()});return{title:y.from(t.translate(o.name)),items:i}});return F(i,function(t){return t.items.length>0})},mT={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"]},pT={maxHeightFunction:ju(),maxWidthFunction:G_()},gT={onLtr:function(){return[Ja,Qa,Ka,$a,Xa,Ga,Kh,Xh,$h,qh,Gh,Yh]},onRtl:function(){return[Ja,Qa,Xa,Ga,Ka,$a,Kh,Xh,Gh,Yh,$h,qh]}},vT={onLtr:function(){return[Qa,$a,Ga,Ka,Xa,Ja,Kh,Xh,$h,qh,Gh,Yh]},onRtl:function(){return[Qa,Ga,$a,Xa,Ka,Ja,Kh,Xh,Gh,Yh,$h,qh]}},bT=function(t,e,n,r){var o,i,a=hn().deviceType.isTouch,u=Ti((o={sink:n,onEscape:function(){return t.focus(),y.some(!0)}},i=je([]),Hh.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){i.set([]),Hh.getContent(t).each(function(t){pi(t.element(),"visibility")}),Jo(t.element(),"tox-pop--resizing"),pi(t.element(),"width")},inlineBehaviours:lu([th("context-toolbar-events",[zr(Wn(),function(t,e){Hh.getContent(t).each(function(t){}),Jo(t.element(),"tox-pop--resizing"),pi(t.element(),"width")}),Er(jS,function(t,e){pi(t.element(),"width");var n=Pi(t.element());Hh.setContent(t,e.event().contents()),Xo(t.element(),"tox-pop--resizing");var r=Pi(t.element());ui(t.element(),"width",n+"px"),Hh.getContent(t).each(function(n){e.event().focus().bind(function(e){return xu(e),Cu(t.element())}).orThunk(function(){return Gd.focusIn(n),wu()})}),Jh.setTimeout(function(){ui(t.element(),"width",r+"px")},0)}),Er(FS,function(t,e){Hh.getContent(t).each(function(t){i.set(i.get().concat([{bar:t,focus:wu()}]))}),yr(t,jS,{contents:e.event().forwardContents(),focus:y.none()})}),Er(VS,function(t,e){Z(i.get()).each(function(e){i.set(i.get().slice(0,i.get().length-1)),yr(t,jS,{contents:Ei(e.bar),focus:e.focus})})})]),Gd.config({mode:"special",onEscape:function(t){return Z(i.get()).fold(function(){return o.onEscape()},function(e){return br(t,VS),y.some(!0)})}})]),lazySink:function(){return C.value(o.sink)}}))),s=function(){return PS(t)},c=function(){if(a()&&r.backstage.isContextMenuOpen())return!0;var e,n,o,i,u,c,l=(e=m.get().map(function(t){return t.getBoundingClientRect()}).getOrThunk(function(){return t.selection.getRng().getBoundingClientRect()}),n=t.inline?ji().top():Qi(We.fromDom(t.getBody())).y(),{y:e.top+n,bottom:e.bottom+n}),f=s();return o=l.y,i=l.bottom,u=f.y(),c=f.bottom(),!(Math.max(o,u)<=Math.min(i,c))},l=function(){Hh.hide(u)},f=function(){h.get().each(function(t){var e=u.element();pi(e,"display"),c()?ui(e,"display","none"):ec.positionWithinBounds(n,t,u,y.some(s()))})},h=je(y.none()),m=je(y.none()),p=je(null),g=function(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:lu([Gd.config({mode:"acyclic"}),th("pop-dialog-wrap-events",[Br(function(e){t.shortcuts.add("ctrl+F9","focus statusbar",function(){return Gd.focusIn(e)})}),Rr(function(e){t.shortcuts.remove("ctrl+F9")})])])}},v=bt(function(){return HS(e,function(t){var e=b(t);yr(u,FS,{forwardContents:g(e)})})}),b=function(e){var n,o,i=t.ui.registry.getAll().buttons,a=fm(t)===wf.scrolling?wf.scrolling:wf.default,u=v();return"contexttoolbar"===e.type?(n=d(d({},i),u.formNavigators),o=hT(t,{buttons:n,toolbar:e.items,allowToolbarGroups:!1},r,y.some(["form:"])),Gk({type:a,uid:wo("context-toolbar"),initGroups:o,onEscape:y.none,cyclicKeying:!0})):RS(a,e,r.backstage)};t.on("contexttoolbar-show",function(e){var n=v();lt(n.lookupTable,e.toolbarKey).each(function(n){x(n,e.target===t?y.none():y.some(e)),Hh.getContent(u).each(Gd.focusIn)})});var x=function(t,e){if(_(),!a()||!r.backstage.isContextMenuOpen()){var n=b(t),o=e.map(We.fromDom),i=function(t,e){var n="node"===t?r.backstage.shared.anchors.node(e):r.backstage.shared.anchors.cursor();return gt(n,function(t,e){return"line"===t?{bubble:$u(12,0,mT),layouts:{onLtr:function(){return[Za]},onRtl:function(){return[tu]}},overrides:pT}:{bubble:$u(0,12,mT),layouts:e?vT:gT,overrides:pT}}(t,a()))}(t.position,o);h.set(y.some(i)),m.set(e);var l=u.element();pi(l,"display"),Hh.showWithinBounds(u,i,g(n),function(){return y.some(s())}),c()&&ui(l,"display","none")}},w=function(){(function(t,e){var n=We.fromDom(e.getBody()),r=function(t){return Cn(t,n)},o=We.fromDom(e.selection.getNode());return _n(o,n)?y.none():LS(o,t.inNodeScope).orThunk(function(){return LS(o,t.inEditorScope).orThunk(function(){return kn(o,function(e){return r(e)?y.none():LS(e,t.inNodeScope)},r)})})})(v(),t).fold(function(){h.set(y.none()),Hh.hide(u)},function(t){x(t.toolbarApi,y.some(t.elem.dom()))})},_=function(){var t=p.get();null!==t&&(Jh.clearTimeout(t),p.set(null))},k=function(t){_(),p.set(t)};t.on("init",function(){t.on("contexttoolbar-hide",l),t.on("ScrollContent ScrollWindow longpress",f),t.on("click keyup SetContent ObjectResized ResizeEditor",function(e){k(Jh.setEditorTimeout(t,w,0))}),t.on("focusout",function(e){Jh.setEditorTimeout(t,function(){Cu(n.element()).isNone()&&Cu(u.element()).isNone()&&(h.set(y.none()),Hh.hide(u))},0)}),t.on("SwitchMode",function(){t.readonly&&(h.set(y.none()),Hh.hide(u))}),t.on("NodeChange",function(e){Cu(u.element()).fold(function(){k(Jh.setEditorTimeout(t,w,0))},function(t){})})})},yT=function(t,n,r){var o=function(t,e){H([n,r],function(n){n.broadcastEvent(t,e)})},i=function(t,e){H([n,r],function(n){n.broadcastOn([t],e)})},a=function(t){return i(kc(),{target:t.target()})},u=cv(We.fromDom(e.document),"touchstart",a),s=cv(We.fromDom(e.document),"touchmove",function(t){return o(or(),t)}),c=cv(We.fromDom(e.document),"touchend",function(t){return o(ir(),t)}),l=cv(We.fromDom(e.document),"mousedown",a),f=cv(We.fromDom(e.document),"mouseup",function(t){0===t.raw().button&&i(Tc(),{target:t.target()})}),d=function(t){return i(kc(),{target:We.fromDom(t.target)})},h=function(t){0===t.button&&i(Tc(),{target:We.fromDom(t.target)})},m=function(t){return o(ar(),fv(t))},p=function(t){i(Sc(),{}),o(ur(),fv(t))},g=function(){return i(Sc(),{})};t.on("PostRender",function(){t.on("click",d),t.on("tap",d),t.on("mouseup",h),t.on("ScrollWindow",m),t.on("ResizeWindow",p),t.on("ResizeEditor",g)}),t.on("remove",function(){t.off("click",d),t.off("tap",d),t.off("mouseup",h),t.off("ScrollWindow",m),t.off("ResizeWindow",p),t.off("ResizeEditor",g),l.unbind(),u.unbind(),s.unbind(),c.unbind(),f.unbind()}),t.on("detach",function(){hc(n),hc(r),n.destroy(),r.destroy()})},xT=Ll,wT=wl,CT=o([Ie("shell",!1),be("makeItem"),Ie("setupItem",n),$c("listBehaviours",[Zd])]),_T=bl({name:"items",overrides:function(){return{behaviours:lu([Zd.config({})])}}}),kT=o([_T]),ST=ql({name:o("CustomList")(),configFields:CT(),partFields:kT(),factory:function(t,n,r,o){var i=t.shell?{behaviours:[Zd.config({})],components:[]}:{behaviours:[],components:n};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:Yc(t.listBehaviours,i.behaviours),apis:{setItems:function(n,r){(function(e){return t.shell?y.some(e):Nl(e,t,"items")})(n).fold(function(){throw e.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(e){var o=Zd.contents(e),i=r.length,a=i-o.length,u=a>0?function(t,e){for(var n=[],r=0;r<t;r++)n.push(e());return n}(a,function(){return t.makeItem()}):[],s=o.slice(i);H(s,function(t){return Zd.remove(e,t)}),H(u,function(t){return Zd.append(e,t)});var c=Zd.contents(e);H(c,function(e,o){t.setupItem(n,e,r[o],o)})})}}}},apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),TT=function(t){return(di(t,"position").is("fixed")?y.none():$r(t)).orThunk(function(){var e=We.fromTag("span");return Yr(t).bind(function(t){Zr(t,e);var n=$r(e);return no(e),n})})},ET=function(t){return TT(t).map(zi).getOrThunk(function(){return Mi(0,0)})},OT=ht([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),DT=function(t,e,n){return $(t,function(t){switch(t){case"bottom":return function(t,e){return t.bottom()<=e.bottom()}(e,n);case"top":return function(t,e){return t.y()>=e.y()}(e,n)}})},NT=function(t,e){return e.getInitialPosition().map(function(e){return Xi(e.bounds.x(),e.bounds.y(),Pi(t),Ni(t))})},AT=function(t,e,n){return n.getInitialPosition().bind(function(r){switch(n.setInitialPosition(y.none()),r.position){case"static":return y.some(OT.static());case"absolute":var o=TT(t).map(Ji).getOrThunk(function(){return Ji(ri())});return y.some(OT.absolute(ku("absolute",lt(r.style,"left").map(function(t){return e.x()-o.x()}),lt(r.style,"top").map(function(t){return e.y()-o.y()}),lt(r.style,"right").map(function(t){return o.right()-e.right()}),lt(r.style,"bottom").map(function(t){return o.bottom()-e.bottom()}))));default:return y.none()}})},MT=function(t,e,n,r){var o=t.element();return di(o,"position").is("fixed")?function(t,e,n,r){return NT(t,r).filter(function(t){return DT(e.modes,t,n)}).bind(function(e){return AT(t,e,r)})}(o,e,n,r):function(t,e,n,r){var o=Ji(t);if(DT(e.modes,o,n))return y.none();!function(t,e,n){r.setInitialPosition(y.some({style:hi(t),position:li(t,"position")||"static",bounds:e}))}(t,o);var i=Zi(),a=o.x()-i.x(),u=n.y()-i.y(),s=i.bottom()-n.bottom(),c=o.y()<=n.y();return y.some(OT.fixed(ku("fixed",y.some(a),c?y.some(u):y.none(),y.none(),c?y.none():y.some(s))))}(o,e,n,r)},IT=function(t,e){H(["left","right","top","bottom","position"],function(e){return pi(t.element(),e)}),e.onUndocked(t)},zT=function(t,e,n){Su(t.element(),n),("fixed"===n.position()?e.onDocked:e.onUndocked)(t)},BT=function(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each(function(e){e.lazyContext(t).each(function(i){var a=function(t,e){return t.y()<e.bottom()&&t.bottom()>e.y()}(i,r);a!==n.isVisible()&&(n.setVisible(a),o&&!a?(Zo(t.element(),[e.fadeOutClass]),e.onHide(t)):(a?function(t,e){var n=t.element();Xo(n,e.transitionClass),Jo(n,e.fadeOutClass),Xo(n,e.fadeInClass),e.onShow(t)}:function(t,e){var n=t.element();Xo(n,e.transitionClass),Jo(n,e.fadeInClass),Xo(n,e.fadeOutClass),e.onHide(t)})(t,e))})})},RT=function(t,e,r){var o=t.element();r.setDocked(!1),function(t,e){var n=t.element();return NT(n,e).bind(function(t){return AT(n,t,e)})}(t,r).each(function(r){r.fold(function(){return IT(t,e)},function(n){return zT(t,e,n)},n)}),r.setVisible(!0),e.contextual.each(function(e){ti(o,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(t)}),PT(t,e,r)},PT=function(t,e,n){t.getSystem().isConnected()&&function(t,e,n){var r=e.lazyViewport(t),o=n.isDocked();o&&BT(t,e,n,r),MT(t,e,r,n).each(function(i){n.setDocked(!o),i.fold(function(){return IT(t,e)},function(n){return zT(t,e,n)},function(o){BT(t,e,n,r,!0),zT(t,e,o)})})}(t,e,n)},LT=function(t,e,n){n.isDocked()&&RT(t,e,n)},HT=Object.freeze({__proto__:null,refresh:PT,reset:LT,isDocked:function(t,e,n){return n.isDocked()}}),FT=Object.freeze({__proto__:null,events:function(t,e){return kr([zr(Wn(),function(n,r){t.contextual.each(function(t){Qo(n.element(),t.transitionClass)&&(ti(n.element(),[t.transitionClass,t.fadeInClass]),(e.isVisible()?t.onShown:t.onHidden)(n)),r.stop()})}),Er(ar(),function(n,r){PT(n,t,e)}),Er(ur(),function(n,r){LT(n,t,e)})])}}),VT=[Me("contextual",[we("fadeInClass"),we("fadeOutClass"),we("transitionClass"),_e("lazyContext"),ka("onShow"),ka("onShown"),ka("onHide"),ka("onHidden")]),He("lazyViewport",Zi),ze("modes",["top","bottom"],Gt(he)),ka("onDocked"),ka("onUndocked")],jT=Object.freeze({__proto__:null,init:function(){var t=je(!1),e=je(!0),n=je(y.none());return Ho({isDocked:function(){return t.get()},setDocked:function(e){return t.set(e)},getInitialPosition:function(){return n.get()},setInitialPosition:function(t){return n.set(t)},isVisible:function(){return e.get()},setVisible:function(t){return e.set(t)},readState:function(){return"docked:  "+t.get()+", visible: "+e.get()}})}}),UT=du({fields:VT,name:"docking",active:FT,apis:HT,state:jT}),WT={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},qT=function(t,e){var n=t.element();Yr(n).each(function(r){var o="padding-"+(e?"top":"bottom");if(UT.isDocked(t)){var i=Pi(r);ui(n,"width",i+"px"),ui(r,o,function(t){return Ai(t)+(parseInt(li(t,"margin-top"),10)||0)+(parseInt(li(t,"margin-bottom"),10)||0)}(n)+"px")}else pi(n,"width"),pi(r,o)})},YT=function(t,e){e?(Jo(t,WT.fadeOutClass),Zo(t,[WT.transitionClass,WT.fadeInClass])):(Jo(t,WT.fadeInClass),Zo(t,[WT.fadeOutClass,WT.transitionClass]))},$T=function(t,e){var n=We.fromDom(t.getContainer());e?(Xo(n,"tox-tinymce--toolbar-sticky-on"),Jo(n,"tox-tinymce--toolbar-sticky-off")):(Xo(n,"tox-tinymce--toolbar-sticky-off"),Jo(n,"tox-tinymce--toolbar-sticky-on"))},GT=function(t,e){var n=je(y.none()),r=dm(t),o=function(t){e().each(function(e){return t(e.element())})},i=function(n){t.inline||qT(n,r),$T(t,UT.isDocked(n)),n.getSystem().broadcastOn([Sc()],{}),e().each(function(t){return t.getSystem().broadcastOn([Sc()],{})})},a=t.inline?[]:function(t){var e;return[bu.config({channels:(e={},e[Pk()]={onReceive:function(e){qT(e,t)}},e)})]}(r);return m([ih.config({}),UT.config({contextual:d({lazyContext:function(e){var n=Ai(e.element()),o=t.inline?t.getContentAreaContainer():t.getContainer(),i=Ji(We.fromDom(o)),a=i.height()-n,u=i.y()+(r?0:n);return y.some(Xi(i.x(),u,i.width(),a))},onShow:function(){o(function(t){return YT(t,!0)})},onShown:function(t){o(function(t){return ti(t,[WT.transitionClass,WT.fadeInClass])}),n.get().each(function(e){var r,o,i;r=t.element(),i=Ur(o=e),wu(i).filter(function(t){return!Cn(o,t)}).filter(function(t){return Cn(t,We.fromDom(i.dom().body))||_n(r,t)}).each(function(){return xu(o)}),n.set(y.none())})},onHide:function(t){n.set(function(t,e){return Cu(t).orThunk(function(){return e().toOption().bind(function(t){return Cu(t.element())})})}(t.element(),e)),o(function(t){return YT(t,!1)})},onHidden:function(){o(function(t){return ti(t,[WT.transitionClass])})}},WT),modes:[r?"top":"bottom"],onDocked:i,onUndocked:i})],a)},KT=Object.freeze({__proto__:null,setup:function(t,e){t.inline||(dm(t)||t.on("ResizeEditor",function(){e().each(UT.reset)}),t.on("ResizeWindow ResizeEditor",function(){e().each(function(e){return qT(e,dm(t))})}),t.on("SkinLoaded",function(){e().each(function(t){UT.isDocked(t)?UT.reset(t):UT.refresh(t)})}),t.on("FullscreenStateChanged",function(){e().each(UT.reset)})),t.on("AfterScrollIntoView",function(t){e().each(function(e){UT.refresh(e);var n=e.element();Vf(n)&&function(t,e){var n=Ur(e),r=n.dom().defaultView.innerHeight,o=ji(n),i=We.fromDom(t.elm),a=Qi(i),u=Ni(i),s=a.y(),c=s+u,l=zi(e),f=Ni(e),d=l.top(),h=d+f,m=Math.abs(d-o.top())<2,p=Math.abs(h-(o.top()+r))<2;if(m&&s<h)Ui(o.left(),s-f,n);else if(p&&c>d){var g=s-r+u+f;Ui(o.left(),g,n)}}(t,n)})}),t.on("PostRender",function(){$T(t,!1)})},isDocked:function(t){return t().map(UT.isDocked).getOr(!1)},getBehaviours:GT}),XT=n,JT=c,QT=o([]),ZT=Object.freeze({__proto__:null,setup:XT,isDocked:JT,getBehaviours:QT}),tE=Wl({factory:function(t,e){var n={focus:Gd.focusIn,setMenus:function(t,n){var r=L(n,function(t){var n={type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}},r=tS(n).mapError(function(t){return ue(t)}).getOrDie();return qw(r,"tox-mbtn",e.backstage,y.some("menuitem"))});Zd.set(t,r)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:lu([Zd.config({}),th("menubar-events",[Br(function(e){t.onSetup(e)}),Er(Rn(),function(t,e){aa(t.element(),".tox-mbtn--active").each(function(n){ua(e.event().target(),".tox-mbtn").each(function(e){Cn(n,e)||t.getSystem().getByDom(n).each(function(n){t.getSystem().getByDom(e).each(function(t){zb.expand(t),zb.close(n),ih.focus(t)})})})})}),Er(dr(),function(t,e){e.event().prevFocus().bind(function(e){return t.getSystem().getByDom(e).toOption()}).each(function(n){e.event().newFocus().bind(function(e){return t.getSystem().getByDom(e).toOption()}).each(function(t){zb.isOpen(n)&&(zb.expand(t),zb.close(n))})})})]),Gd.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),y.some(!0)}}),mb.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[be("dom"),be("uid"),be("onEscape"),be("backstage"),Ie("onSetup",n)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),eE=[Wc("slotBehaviours",[])],nE=function(t){return"<alloy.field."+t+">"},rE=function(t,e){var n,r=function(e){return zl(t)},o=function(e,n){return function(r,o){return Nl(r,t,o).map(function(t){return e(t,o)}).getOr(n)}},i=function(t,e){return"true"!==ho(t.element(),"aria-hidden")},a=o(i,!1),u=o(function(t,e){if(i(t)){var n=t.element();ui(n,"display","none"),fo(n,"aria-hidden","true"),yr(t,hr(),{name:e,visible:!1})}}),s=(n=u,function(t,e){H(e,function(e){return n(t,e)})}),c=o(function(t,e){if(!i(t)){var n=t.element();pi(n,"display"),po(n,"aria-hidden"),yr(t,hr(),{name:e,visible:!0})}}),l={getSlotNames:r,getSlot:function(e,n){return Nl(e,t,n)},isShowing:a,hideSlot:u,hideAllSlots:function(t){return s(t,r())},showSlot:c};return{uid:t.uid,dom:t.dom,components:e,behaviours:qc(t.slotBehaviours),apis:l}},oE=it({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 Po(t)}),iE=d(d({},oE),{sketch:function(t){var e=function(){var t=[];return{slot:function(e,n){return t.push(e),Sl("container",nE(e),n)},record:function(){return t}}}(),n=t(e),r=e.record(),o=L(r,function(t){return gl({name:t,pname:nE(t)})});return Fl("container",eE,o,rE,n)}}),aE=$t([Ne("icon"),Ne("tooltip"),He("onShow",n),He("onHide",n),He("onSetup",function(){return n})]),uE=function(t){return{element:function(){return t.element().dom()}}},sE=function(t,e){var r=L(nt(e),function(t){var n=e[t],r=ie(oe("sidebar",aE,n));return{name:t,getApi:uE,onSetup:r.onSetup,onShow:r.onShow,onHide:r.onHide}});return L(r,function(e){var o=je(n);return t.slot(e.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Gm([Bp(e,o),Rp(e,o),Er(hr(),function(t,e){var n=e.event();U(r,function(t){return t.name===n.name()}).each(function(e){(n.visible()?e.onShow:e.onHide)(e.getApi(t))})})])})})},cE=function(t){return iE.sketch(function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:sE(e,t),slotBehaviours:Gm([Br(function(t){return iE.hideAllSlots(t)})])}})},lE=function(t){return Xl.getCurrent(t).bind(function(t){return Mk.isGrowing(t)||Mk.hasGrown(t)?Xl.getCurrent(t).bind(function(t){return U(iE.getSlotNames(t),function(e){return iE.isShowing(t,e)})}):y.none()})},fE=wo("FixSizeEvent"),dE=wo("AutoSizeEvent"),hE=function(t){var e=We.fromHtml(t),n=Gr(e),r=function(t){var e=void 0!==t.dom().attributes?t.dom().attributes:[];return j(e,function(t,e){var n;return"class"===e.name?t:d(d({},t),((n={})[e.name]=e.value,n))},{})}(e),o=function(t){return Array.prototype.slice.call(t.dom().classList,0)}(e),i=0===n.length?{}:{innerHtml:oo(e)};return d({tag:ao(e),classes:o,attributes:r},i)},mE=function(t){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading...")},classes:["tox-throbber__busy-spinner"]},components:[{dom:hE('<div class="tox-spinner"><div></div><div></div><div></div></div>')}],behaviours:lu([Gd.config({mode:"special",onTab:function(){return y.some(!0)},onShiftTab:function(){return y.some(!0)}}),ih.config({})])}},pE=function(t,e,n){var r=je(!1),o=je(y.none()),i=function(t){t!==r.get()&&(function(t,e,n){var r=t.element();!0===e?(Zd.set(t,[mE(n)]),pi(r,"display"),po(r,"aria-hidden")):(Zd.set(t,[]),ui(r,"display","none"),fo(r,"aria-hidden","true"))}(e(),t,n.providers),r.set(t))};t.on("ProgressState",function(e){if(o.get().each(Jh.clearTimeout),D(e.time)){var n=Jh.setEditorTimeout(t,function(){return i(e.state)},e.time);o.set(y.some(n))}else i(e.state),o.set(y.none())})},gE=wT.optional({factory:tE,name:"menubar",schema:[be("backstage")]}),vE=wT.optional({factory:{sketch:function(t){return ST.sketch({uid:t.uid,dom:t.dom,listBehaviours:lu([Gd.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return Gk({type:t.type,uid:wo("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],onEscape:function(){return y.none()}})},setupItem:function(t,e,n,r){tk.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[be("dom"),be("onEscape")]}),bE=wT.optional({factory:{sketch:function(t){return function(t){return t.type===wf.sliding?$k:t.type===wf.floating?Yk:Gk}(t)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),y.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,backstage:t.backstage,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[be("dom"),be("onEscape"),be("getSink")]}),yE=wT.optional({factory:{sketch:function(t){var e=t.editor,n=t.sticky?GT:QT;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:lu(n(e,t.getSink))}}},name:"header",schema:[be("dom")]}),xE=wT.optional({name:"socket",schema:[be("dom")]}),wE=wT.optional({factory:{sketch: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:lu([mb.config({}),ih.config({}),Mk.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){Xl.getCurrent(t).each(iE.hideAllSlots),br(t,dE)},onGrown:function(t){br(t,dE)},onStartGrow:function(t){yr(t,fE,{width:di(t.element(),"width").getOr("")})},onStartShrink:function(t){yr(t,fE,{width:Pi(t.element())+"px"})}}),Zd.config({}),Xl.config({find:function(t){var e=Zd.contents(t);return Q(e)}})])}],behaviours:lu([Bx(0),th("sidebar-sliding-events",[Er(fE,function(t,e){ui(t.element(),"width",e.event().width())}),Er(dE,function(t,e){pi(t.element(),"width")})])])}}},name:"sidebar",schema:[be("dom")]}),CE=wT.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:lu([Zd.config({})]),components:[]}}},name:"throbber",schema:[be("dom")]}),_E=ql({name:"OuterContainer",factory:function(t,e,n){var r={getSocket:function(e){return xT.getPart(e,t,"socket")},setSidebar:function(e,n){xT.getPart(e,t,"sidebar").each(function(t){return function(t,e){Xl.getCurrent(t).each(function(t){return Zd.set(t,[cE(e)])})}(t,n)})},toggleSidebar:function(e,n){xT.getPart(e,t,"sidebar").each(function(t){return function(t,e){Xl.getCurrent(t).each(function(t){Xl.getCurrent(t).each(function(n){Mk.hasGrown(t)?iE.isShowing(n,e)?Mk.shrink(t):(iE.hideAllSlots(n),iE.showSlot(n,e)):(iE.hideAllSlots(n),iE.showSlot(n,e),Mk.grow(t))})})}(t,n)})},whichSidebar:function(e){return xT.getPart(e,t,"sidebar").bind(lE).getOrNull()},getHeader:function(e){return xT.getPart(e,t,"header")},getToolbar:function(e){return xT.getPart(e,t,"toolbar")},setToolbar:function(e,n){xT.getPart(e,t,"toolbar").each(function(t){t.getApis().setGroups(t,n)})},setToolbars:function(e,n){xT.getPart(e,t,"multiple-toolbar").each(function(t){ST.setItems(t,n)})},refreshToolbar:function(e){xT.getPart(e,t,"toolbar").each(function(t){return t.getApis().refresh(t)})},getThrobber:function(e){return xT.getPart(e,t,"throbber")},focusToolbar:function(e){xT.getPart(e,t,"toolbar").orThunk(function(){return xT.getPart(e,t,"multiple-toolbar")}).each(function(t){Gd.focusIn(t)})},setMenubar:function(e,n){xT.getPart(e,t,"menubar").each(function(t){tE.setMenus(t,n)})},focusMenubar:function(e){xT.getPart(e,t,"menubar").each(function(t){tE.focus(t)})}};return{uid:t.uid,dom:t.dom,components:e,apis:r,behaviours:t.behaviours}},configFields:[be("dom"),be("behaviours")],partFields:[yE,gE,bE,vE,xE,wE,CE],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=L(n,function(t){return Uk(t)});t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=L(n,function(t){return L(t,Uk)});t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(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)}}}),kE={file:{title:"File",items:"newdocument restoredraft | preview | 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 | forecolor backcolor | 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"}},SE=function(t){return"string"==typeof t?t.split(" "):t},TE=function(t,e){var n=d(d({},kE),e.menus),r=nt(e.menus).length>0,o=void 0===e.menubar||!0===e.menubar?SE("file edit view insert format tools table help"):SE(!1===e.menubar?"":e.menubar),i=F(o,function(t){return r&&e.menus.hasOwnProperty(t)&&e.menus[t].hasOwnProperty("items")||kE.hasOwnProperty(t)}),a=L(i,function(r){var o=n[r];return function(t,e,n){var r=n.getParam("removed_menuitems","").split(/[ ,]/);return{text:t.title,getItems:function(){return Y(t.items,function(t){var n=t.toLowerCase();return 0===n.trim().length?[]:R(r,function(t){return t===n})?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]})}}}({title:o.title,items:SE(o.items)},e,t)});return F(a,function(t){return t.getItems().length>0&&R(t.getItems(),function(t){return"separator"!==t.type})})},EE=function(t){var e=function(){t._skinLoaded=!0,function(t){t.fire("SkinLoaded")}(t)};return function(){t.initialized?e():t.on("init",e)}},OE=function(t,e){var n,r=function(t){var e=t.settings,n=e.skin,r=e.skin_url;if(!1!==n){var o=n||"oxide";r=r?t.documentBaseURI.toAbsolute(r):Zh.baseURL+"/skins/ui/"+o}return r}(e);r&&(n=r+"/skin.min.css",e.contentCSS.push(r+(t?"/content.inline":"/content")+".min.css")),!1==(!1===e.getParam("skin"))&&n?Qh.DOM.styleSheetLoader.load(n,EE(e),function(t,e){return function(){return function(t,e){return t.fire("SkinLoadError",e)}(t,{message:e})}}(e,"Skin could not be loaded")):EE(e)()},DE=a(OE,!1),NE=a(OE,!0),AE=function(t,e,n,r){var o=e.outerContainer,i=n.toolbar,a=n.buttons;if(N(i,k)){var u=i.map(function(e){var o={toolbar:e,buttons:a,allowToolbarGroups:n.allowToolbarGroups};return hT(t,o,{backstage:r},y.none())});_E.setToolbars(o,u)}else _E.setToolbar(o,hT(t,n,{backstage:r},y.none()))},ME=Qh.DOM,IE=hn(),zE=IE.os.isiOS()&&IE.os.version.major<=12,BE={render:function(t,n,r,o,i){var a=je(0);DE(t),function(t,e){dc(t,e,Jr)}(We.fromDom(i.targetNode),n.mothership),fc(ri(),n.uiMothership),t.on("PostRender",function(){AE(t,n,r,o),a.set(t.getWin().innerWidth),_E.setMenubar(n.outerContainer,TE(t,r)),_E.setSidebar(n.outerContainer,r.sidebar),function(t){var e=t.getWin(),n=t.getDoc().documentElement,r=je(Mi(e.innerWidth,e.innerHeight)),o=je(Mi(n.offsetWidth,n.offsetHeight)),i=function(n){var i=t.getDoc().documentElement,a=r.get(),u=o.get();a.left()!==e.innerWidth||a.top()!==e.innerHeight?(r.set(Mi(e.innerWidth,e.innerHeight)),Sg(t,n)):u.left()===i.offsetWidth&&u.top()===i.offsetHeight||(o.set(Mi(i.offsetWidth,i.offsetHeight)),Sg(t,n))},a=function(e){return function(t,e){return t.fire("ScrollContent",e)}(t,e)};ME.bind(e,"resize",i),ME.bind(e,"scroll",a);var u=lv(We.fromDom(t.getBody()),"load",i);t.on("remove",function(){u.unbind(),ME.unbind(e,"resize",i),ME.unbind(e,"scroll",a)})}(t)});var u,s,c=_E.getSocket(n.outerContainer).getOrDie("Could not find expected socket element");if(!0===zE){si(c.element(),{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var l=(u=function(){t.fire("ScrollContent")},20,s=null,{cancel:function(){null!==s&&(e.clearTimeout(s),s=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null===s&&(s=e.setTimeout(function(){u.apply(null,t),s=null},20))}});cv(c.element(),"scroll",l.throttle)}Fk(t,n),t.addCommand("ToggleSidebar",function(e,r){_E.toggleSidebar(n.outerContainer,r),t.fire("ToggleSidebar")}),t.addQueryValueHandler("ToggleSidebar",function(){return _E.whichSidebar(n.outerContainer)});var f=fm(t);return f!==wf.sliding&&f!==wf.floating||t.on("ResizeWindow ResizeEditor ResizeContent",function(){var e=t.getWin().innerWidth;e!==a.get()&&(_E.refreshToolbar(n.outerContainer),a.set(e))}),{iframeContainer:c.element().dom(),editorContainer:n.outerContainer.element().dom()}}},RE=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)},PE=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?y.some(parseInt(""+t,10)):y.none()},LE=function(t){return D(t)?t+"px":t},HE=function(t){var e=em(t),n=nm(t),r=om(t);return PE(e).map(function(t){return RE(t,n,r)})},FE=function(t,e){var n=Ji(t);return e?n.y():n.bottom()},VE={render:function(t,e,n,r,o){var i,a=Qh.DOM,u=mm(t),s=gm(t),c=We.fromDom(o.targetNode),l=om(t).or(HE(t)),f=fm(t),d=f===wf.floating,h=f===wf.sliding||d,m=dm(t),p=je(FE(c,m)),g=je(!1);NE(t);var v=function(t){void 0===t&&(t=!1),h&&_E.refreshToolbar(e.outerContainer),u||function(t){var n=h?t.fold(function(){return 0},function(t){return t.components().length>1?Ni(t.components()[1].element()):0}):0,r=Ji(c),o=m?r.y()-Ni(i.element())+n:r.bottom();si(e.outerContainer.element(),{position:"absolute",top:Math.round(o)+"px",left:Math.round(r.x())+"px"});var a=l.getOrThunk(function(){var t=PE(li(ri(),"margin-left")).getOr(0);return Pi(ri())-r.x()+t});ui(i.element(),"max-width",a+"px")}(_E.getToolbar(e.outerContainer)),s&&(t?UT.reset(i):UT.refresh(i)),d&&_E.getToolbar(e.outerContainer).each(function(t){vk.reposition(t)})},b=function(){g.set(!0),ui(e.outerContainer.element(),"display","flex"),a.addClass(t.getBody(),"mce-edit-focus"),pi(e.uiMothership.element(),"display"),v()},y=function(){g.set(!1),e.outerContainer&&(ui(e.outerContainer.element(),"display","none"),a.removeClass(t.getBody(),"mce-edit-focus")),ui(e.uiMothership.element(),"display","none")},x=function(){if(i)b();else{i=_E.getHeader(e.outerContainer).getOrDie();var o=function(t){return hm(t).getOr(ri())}(t);fc(o,e.mothership),fc(o,e.uiMothership),AE(t,e,n,r),_E.setMenubar(e.outerContainer,TE(t,n)),b(),t.on("activate",b),t.on("deactivate",y),t.on("SkinLoaded ResizeWindow",function(){g.get()&&v(!0)}),t.on("NodeChange keydown",function(){Jh.requestAnimationFrame(function(){var t=FE(c,m);g.get()&&t!==p.get()&&(v(!0),p.set(t))})}),t.nodeChanged()}};return t.on("focus",x),t.on("blur hide",y),t.on("init",function(){t.hasFocus()&&x()}),Fk(t,e),{editorContainer:e.outerContainer.element().dom()}}},jE=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},UE=function(t){(function(t){!function(t){vC.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:US(t,e.name),onAction:jE(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:US(t,n),onAction:jE(t,n)})}}(t),function(t){vC.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:function(){return t.execCommand(e.action)}})})}(t),function(t){vC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:function(){return t.execCommand(e.action)},onSetup:US(t,e.name)})})}(t)})(t),function(t){vC.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:function(){return t.execCommand(e.action)}})}),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:jE(t,"code")})}(t)},WE=function(t,e,n){var r=function(){return!!e.undoManager&&e.undoManager[n]()},o=function(){t.setDisabled(e.readonly||!r())};return t.setDisabled(!r()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o),function(){return e.off("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",o)}},qE=function(t,e){(function(t){vC.each([{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"}],function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,onAction:function(){return t.execCommand(e.cmd)},icon:e.icon,onSetup:US(t,e.name)})});t.ui.registry.addButton("alignnone",{tooltip:"No alignment",onAction:function(){return t.execCommand("JustifyNone")},icon:"align-none"})})(t),UE(t),function(t,e){!function(t,e){var n=YS(0,e,JS(t));t.ui.registry.addNestedMenuItem("align",{text:e.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=YS(0,e,tT(t));t.ui.registry.addNestedMenuItem("fontformats",{text:e.shared.providers.translate("Fonts"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=d({type:"advanced"},e.styleselect),r=YS(0,e,aT(t,n));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})}(t,e),function(t,e){var n=YS(0,e,iT(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=YS(0,e,nT(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e)}(t,e),function(t){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:function(e){return WE(e,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:function(e){return WE(e,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(t),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",onSetup:function(e){return WE(e,t,"hasUndo")},onAction:function(){return t.execCommand("undo")}}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",onSetup:function(e){return WE(e,t,"hasRedo")},onAction:function(){return t.execCommand("redo")}})}(t)}(t),Rg.register(t),function(t){!function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:function(){return t.execCommand("mceToggleVisualAid")}})}(t),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:function(e){return function(t,e){t.setActive(e.hasVisual);var n=function(e){t.setActive(e.hasVisual)};return e.on("VisualAid",n),function(){return e.off("VisualAid",n)}}(e,t)},onAction:function(){t.execCommand("mceToggleVisualAid")}})}(t)}(t),function(t){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:function(e){return function(t,e){t.setDisabled(!e.queryCommandState("outdent"));var n=function(){t.setDisabled(!e.queryCommandState("outdent"))};return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}(e,t)},onAction:function(){return t.execCommand("outdent")}}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:function(){return t.execCommand("indent")}})}(t)}(t)},YE=function(t,e){return{anchor:"makeshift",x:t,y:e}},$E=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},GE=function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?function(t){if($E(t)){var e=t.touches[0];return YE(e.pageX,e.pageY)}return YE(t.pageX,t.pageY)}(e):function(t,e){var n=Qh.DOM.getPos(t);return function(t,e,n){return YE(t.x+e,t.y+n)}(e,n.x,n.y)}(t.getContentAreaContainer(),function(t){if($E(t)){var e=t.touches[0];return YE(e.clientX,e.clientY)}return YE(t.clientX,t.clientY)}(e)):KE(t)},KE=function(t){return{anchor:"selection",root:We.fromDom(t.selection.getNode())}},XE=function(t){return{anchor:"node",node:y.some(We.fromDom(t.selection.getNode())),root:We.fromDom(t.getBody())}},JE={onLtr:function(){return[Qa,$a,Ga,Ka,Xa,Ja,Kh,Xh,$h,qh,Gh,Yh]},onRtl:function(){return[Qa,Ga,$a,Xa,Ka,Ja,Kh,Xh,Gh,Yh,$h,qh]}},QE={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"]},ZE=function(t,e,n,r,o,i){var a=hn(),u=a.os.isiOS(),s=a.os.isOSX(),c=a.os.isAndroid(),l=a.deviceType.isTouch(),f=function(){var a=n();!function(t,e,n,r,o,i,a){var u=function(t,e,n){var r=i?XE(t):GE(t,n);return d({bubble:$u(0,12,QE),layouts:JE,overrides:{maxWidthFunction:G_(),maxHeightFunction:ju()}},r)}(t,0,e);Uw(n,Lp.CLOSE_ON_EXECUTE,r,!0).map(function(n){e.preventDefault(),Hh.showMenuWithinBounds(o,u,{menu:{markers:Hg("normal"),highlightImmediately:a},data:n,type:"horizontal"},function(){return y.some(PS(t))}),t.fire("contexttoolbar-hide")})}(t,e,a,r,o,i,!(c||u||s&&l))};if(!s&&!u||i)c&&!i&&t.selection.setCursorLocation(e.target,0),f();else{var h=function(){!function(t){var e=t.selection.getRng(),n=function(){Jh.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)}}(t),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();return ws(t.getWin(),ss.domRange(o)).exists(function(t){return t.left()<=r.clientX&&t.right()>=r.clientX&&t.top()<=r.clientY&&t.bottom()>=r.clientY})}(t,e)?(t.once("selectionchange",h),t.once("touchend",function(){return t.off("selectionchange",h)})):h()}},tO=function(t){return"string"==typeof t?t.split(/[ ,]/):t},eO=function(t){return t.settings.contextmenu_never_use_native||!1},nO=function(t){return k(t)?"|"===t:"separator"===t.type},rO={type:"separator"},oO=function t(e){if(k(e))return e;switch(e.type){case"separator":return rO;case"submenu":return{type:"nestedmenuitem",text:e.text,icon:e.icon,getSubmenuItems:function(){var n=e.getSubmenuItems();return k(n)?n:L(n,t)}};default:return{type:"menuitem",text:e.text,icon:e.icon,onAction:(n=e.onAction,function(){return n()})}}var n},iO=function(t,e){if(0===e.length)return t;var n=Z(t).filter(function(t){return!nO(t)}).fold(function(){return[]},function(t){return[rO]});return t.concat(n).concat(e).concat([rO])},aO=function(t,e,n){var r=hn().deviceType.isTouch,o=Ti(Hh.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:lu([th("dismissContextMenu",[Er(lr(),function(e,n){_c.close(e),t.focus()})])])})),i=function(t){return Hh.hide(o)},a=function(e){if(eO(t)&&e.preventDefault(),!function(t,e){return e.ctrlKey&&!eO(t)}(t,e)&&!function(t){return!1===t.getParam("contextmenu")}(t)){var i=function(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)}(t,e);(r()?ZE:function(t,e,n,r,o,i){var a=n(),u=function(t,e,n){return i?XE(t):GE(t,e)}(t,e);Uw(a,Lp.CLOSE_ON_EXECUTE,r,!1).map(function(t){e.preventDefault(),Hh.showMenuAt(o,u,{menu:{markers:Hg("normal")},data:t})})})(t,e,function(){var n=i?t.selection.getStart(!0):e.target,r=t.ui.registry.getAll(),o=function(t){return function(t,e,n){var r=t.ui.registry.getAll().contextMenus;return lt(t.settings,"contextmenu").map(tO).getOrThunk(function(){return F(tO("link linkchecker image imagetools table spellchecker configurepermanentpen"),function(t){return ft(r,t)})})}(t)}(t);return function(t,e,n){var r=j(o,function(e,r){if(ft(t,r)){var o=t[r].update(n);if(k(o))return iO(e,o.split(" "));if(o.length>0){var i=L(o,oO);return iO(e,i)}return e}return e.concat([r])},[]);return r.length>0&&nO(r[r.length-1])&&r.pop(),r}(r.contextMenus,0,n)},n,o,i)}};t.on("init",function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(r()?"":" ResizeWindow");t.on(e,i),t.on("longpress contextmenu",a)})},uO=ht([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),sO=function(t){return function(e){return e.translate(-t.left(),-t.top())}},cO=function(t){return function(e){return e.translate(t.left(),t.top())}},lO=function(t){return function(e,n){return j(t,function(t,e){return e(t)},Mi(e,n))}},fO=function(t,e,n){return t.fold(lO([cO(n),sO(e)]),lO([sO(e)]),lO([]))},dO=function(t,e,n){return t.fold(lO([cO(n)]),lO([]),lO([cO(e)]))},hO=function(t,e,n){return t.fold(lO([]),lO([sO(n)]),lO([cO(e),sO(n)]))},mO=function(t,e,n){var r=t.fold(function(t,e){return{position:y.some("absolute"),left:y.some(t+"px"),top:y.some(e+"px")}},function(t,e){return{position:y.some("absolute"),left:y.some(t-n.left()+"px"),top:y.some(e-n.top()+"px")}},function(t,e){return{position:y.some("fixed"),left:y.some(t+"px"),top:y.some(e+"px")}});return d({right:y.none(),bottom:y.none()},r)},pO=function(t,e,n,r){var o=function(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left()),a.getOr(u.top()))}};return t.fold(o(hO,gO),o(dO,vO),o(fO,bO))},gO=uO.offset,vO=uO.absolute,bO=uO.fixed,yO=function(t,e,n,r,o,i){var a=function(t,e,n,r){return function(t,e){var n=t.element(),r=parseInt(ho(n,e.leftAttr),10),o=parseInt(ho(n,e.topAttr),10);return isNaN(r)||isNaN(o)?y.none():y.some(Mi(r,o))}(t,e).fold(function(){return n},function(t){return bO(t.left()+r.left(),t.top()+r.top())})}(t,e,n,r),u=e.mustSnap?wO(t,e,a,o,i):CO(t,e,a,o,i),s=fO(a,o,i);return function(t,e,n){var r=t.element();fo(r,e.leftAttr,n.left()+"px"),fo(r,e.topAttr,n.top()+"px")}(t,e,s),u.fold(function(){return{coord:bO(s.left(),s.top()),extra:y.none()}},function(t){return{coord:t.output(),extra:t.extra()}})},xO=function(t,e,n,r){return et(t,function(t){var i=t.sensor();return function(t,e,n,r,o,i){var a=dO(t,o,i),u=dO(e,o,i);return Math.abs(a.left()-u.left())<=n&&Math.abs(a.top()-u.top())<=r}(e,i,t.range().left(),t.range().top(),n,r)?y.some({output:o(pO(t.output(),e,n,r)),extra:t.extra}):y.none()})},wO=function(t,e,n,r,i){var a=e.getSnapPoints(t);return xO(a,n,r,i).orThunk(function(){return j(a,function(t,e){var o=e.sensor(),a=function(t,e,n,r,o,i){var a=dO(t,o,i),u=dO(e,o,i),s=Math.abs(a.left()-u.left()),c=Math.abs(a.top()-u.top());return Mi(s,c)}(n,o,e.range().left(),e.range().top(),r,i);return t.deltas.fold(function(){return{deltas:y.some(a),snap:y.some(e)}},function(n){return(a.left()+a.top())/2<=(n.left()+n.top())/2?{deltas:y.some(a),snap:y.some(e)}:t})},{deltas:y.none(),snap:y.none()}).snap.map(function(t){return{output:o(pO(t.output(),n,r,i)),extra:t.extra}})})},CO=function(t,e,n,r,o){var i=e.getSnapPoints(t);return xO(i,n,r,o)},_O=Object.freeze({__proto__:null,snapTo:function(t,e,n,r){var o=e.getTarget(t.element());if(e.repositionTarget){var i=Ur(t.element()),a=ji(i),u=ET(o),s=function(t,e,n){return{coord:pO(t.output(),t.output(),e,n),extra:t.extra()}}(r,a,u),c=mO(s.coord,0,u);ci(o,c)}}}),kO=function(t,e){t.getSystem().addToGui(e),function(t){Yr(t.element()).filter(so).each(function(e){di(e,"z-index").each(function(t){fo(e,"data-initial-z-index",t)}),ui(e,"z-index",li(t.element(),"z-index"))})}(e)},SO=function(t){!function(t){Yr(t.element()).filter(so).each(function(t){var e=ho(t,"data-initial-z-index");mo(t,"data-initial-z-index")?ui(t,"z-index",e):pi(t,"z-index"),po(t,"data-initial-z-index")})}(t),t.getSystem().removeFromGui(t)},TO=function(t,e,n){return t.getSystem().build(Ev.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))},EO=Me("snaps",[be("getSnapPoints"),ka("onSensor"),be("leftAttr"),be("topAttr"),Ie("lazyViewport",Zi),Ie("mustSnap",!1)]),OO=[Ie("useFixed",c),be("blockerClass"),Ie("getTarget",i),Ie("onDrag",n),Ie("repositionTarget",!0),Ie("onDrop",n),He("getBounds",Zi),EO],DO=function(t,e){return{bounds:t.getBounds(),height:Ai(e.element()),width:Li(e.element())}},NO=function(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk(function(){return DO(e,t)});i.each(function(n){!function(t,e,n,r){var o=e.getTarget(t.element());if(e.repositionTarget){var i=Ur(t.element()),a=ji(i),u=ET(o),s=function(t){return(e=di(t,"left"),n=di(t,"top"),r=di(t,"position"),o=function(t,e,n){return("fixed"===n?bO:gO)(parseInt(t,10),parseInt(e,10))},e.isSome()&&n.isSome()&&r.isSome()?y.some(o(e.getOrDie(),n.getOrDie(),r.getOrDie())):y.none()).getOrThunk(function(){var e=zi(t);return vO(e.left(),e.top())});var e,n,r,o}(o),c=function(t,e,n,r,o,i,a){return function(t,e,n,r,o){var i=o.bounds,a=dO(e,n,r),u=Bu(a.left(),i.x(),i.x()+i.width()-o.width),s=Bu(a.top(),i.y(),i.y()+i.height()-o.height),c=vO(u,s);return e.fold(function(){var t=hO(c,n,r);return gO(t.left(),t.top())},function(){return c},function(){var t=fO(c,n,r);return bO(t.left(),t.top())})}(0,e.fold(function(){var t,e,a,u=(t=n,e=i.left(),a=i.top(),t.fold(function(t,n){return gO(t+e,n+a)},function(t,n){return vO(t+e,n+a)},function(t,n){return bO(t+e,n+a)})),s=fO(u,r,o);return bO(s.left(),s.top())},function(e){var a=yO(t,e,n,i,r,o);return a.extra.each(function(n){e.onSensor(t,n)}),a.coord}),r,o,a)}(t,e.snaps,s,a,u,r,n),l=mO(c,0,u);ci(o,l)}e.onDrag(t,o,r)}(t,e,a,n)})},AO=function(t,e,n,r){e.each(SO),n.snaps.each(function(e){!function(t,e){!function(t,e){var n=t.element();po(n,e.leftAttr),po(n,e.topAttr)}(t,e)}(t,e)});var o=n.getTarget(t.element());r.reset(),n.onDrop(t,o)},MO=function(t){return function(e,n){var r=function(t){n.setStartData(DO(e,t))};return kr(m([Er(ar(),function(t){n.getStartData().each(function(){return r(t)})})],t(e,n,r)))}},IO=Object.freeze({__proto__:null,getData:function(t){return y.from(Mi(t.x(),t.y()))},getDelta:function(t,e){return Mi(e.left()-t.left(),e.top()-t.top())}}),zO=function(t,e,n){return[Er(Mn(),function(r,o){if(0===o.event().raw().button){o.stop();var i=function(){return AO(r,y.some(s),t,e)},a=hv(i,200),u={drop:i,delayDrop:a.schedule,forceDrop:i,move:function(n){a.cancel(),NO(r,t,e,IO,n)}},s=TO(r,t.blockerClass,function(t){return kr([Er(Mn(),t.forceDrop),Er(Bn(),t.drop),Er(In(),function(e,n){t.move(n.event())}),Er(zn(),t.delayDrop)])}(u));n(r),kO(r,s)}})]},BO=m(OO,[Oa("dragger",{handlers:MO(zO)})]),RO=Object.freeze({__proto__:null,getData:function(t){var e=t.raw().touches;return 1===e.length?function(t){var e=t[0];return y.some(Mi(e.clientX,e.clientY))}(e):y.none()},getDelta:function(t,e){return Mi(e.left()-t.left(),e.top()-t.top())}}),PO=function(t,e,n){var r=je(y.none());return[Er(On(),function(o,i){i.stop();var a=function(){AO(o,r.get(),t,e),r.set(y.none())},u={drop:a,delayDrop:function(){},forceDrop:a,move:function(n){NO(o,t,e,RO,n)}},s=TO(o,t.blockerClass,function(t){return kr([Er(On(),t.forceDrop),Er(Nn(),t.drop),Er(An(),t.drop),Er(Dn(),function(e,n){t.move(n.event())})])}(u));r.set(y.some(s)),n(o),kO(o,s)}),Er(Dn(),function(n,r){r.stop(),NO(n,t,e,RO,r.event())}),Er(Nn(),function(n,o){o.stop(),AO(n,r.get(),t,e),r.set(y.none())}),Er(An(),function(n){AO(n,r.get(),t,e),r.set(y.none())})]},LO=BO,HO=m(OO,[Oa("dragger",{handlers:MO(PO)})]),FO=m(OO,[Oa("dragger",{handlers:MO(function(t,e,n){return m(zO(t,e,n),PO(t,e,n))})})]),VO=Object.freeze({__proto__:null,mouse:LO,touch:HO,mouseOrTouch:FO}),jO=Object.freeze({__proto__:null,init:function(){var t=y.none(),e=y.none(),n=o({});return Ho({readState:n,reset:function(){t=y.none(),e=y.none()},update:function(e,n){return e.getData(n).bind(function(n){return function(e,n){var r=t.map(function(t){return e.getDelta(t,n)});return t=y.some(n),r}(e,n)})},getStartData:function(){return e},setStartData:function(t){e=y.some(t)}})}}),UO=mu({branchKey:"mode",branches:VO,name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:jr(["sensor","range","output"],["extra"])},state:jO,apis:_O}),WO=hn(),qO=function(t,e,n,r,o,i){return t.fold(function(){return UO.snap({sensor:vO(n-20,r-20),range:Mi(o,i),output:vO(y.some(n),y.some(r)),extra:{td:e}})},function(t){var o=n-20,i=r-20,a=t.element().dom().getBoundingClientRect();return UO.snap({sensor:vO(o,i),range:Mi(40,40),output:vO(y.some(n-a.width/2),y.some(r-a.height/2)),extra:{td:e}})})},YO=function(t,e,n){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,r){var o=r.td;(function(t,e){return t.exists(function(t){return Cn(t,e)})})(e.get(),o)||(e.set(y.some(o)),n(o))},mustSnap:!0}},$O=function(t){return bm(vm.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:lu([UO.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),Rb.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},GO=function(t,e){var n=je([]),r=je([]),o=je(!1),i=je(y.none()),a=je(y.none()),u=function(t){var n=Qi(t);return qO(f.getOpt(e),t,n.x(),n.y(),n.width(),n.height())},s=function(t){var n=Qi(t);return qO(d.getOpt(e),t,n.right(),n.bottom(),n.width(),n.height())},c=YO(function(){return L(n.get(),function(t){return u(t)})},i,function(e){a.get().each(function(n){t.fire("TableSelectorChange",{start:e,finish:n})})}),l=YO(function(){return L(r.get(),function(t){return s(t)})},a,function(e){i.get().each(function(n){t.fire("TableSelectorChange",{start:n,finish:e})})}),f=$O(c),d=$O(l),h=Ti(f.asSpec()),m=Ti(d.asSpec()),p=function(e,n,r,o){var i=r(n);UO.snapTo(e,i),function(e,n,r,o){var i=n.dom().getBoundingClientRect();pi(e.element(),"display");var a=qr(We.fromDom(t.getBody())).dom().innerHeight,u=r(i),s=o(i,a);(u||s)&&ui(e.element(),"display","none")}(e,n,function(t){return t[o]<0},function(t,e){return t[o]>e})},g=function(t){return p(h,t,u,"top")},v=function(t){return p(m,t,s,"bottom")};WO.deviceType.isTouch()&&(t.on("TableSelectionChange",function(t){o.get()||(ac(e,h),ac(e,m),o.set(!0)),i.set(y.some(t.start)),a.set(y.some(t.finish)),t.otherCells.each(function(e){n.set(e.upOrLeftCells),r.set(e.downOrRightCells),g(t.start),v(t.finish)})}),t.on("ResizeEditor ResizeWindow ScrollContent",function(){i.get().each(g),a.get().each(v)}),t.on("TableSelectionClear",function(){o.get()&&(cc(h),cc(m),o.set(!1)),i.set(y.none()),a.set(y.none())}))};!function(t){t[t.None=0]="None",t[t.Both=1]="Both",t[t.Vertical=2]="Vertical"}(GS||(GS={}));var KO=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},XO=function(t,e){var n,r,o=function(){var n,r=[];return t.getParam("elementpath",!0,"boolean")&&r.push(function(t,e){return e.delimiter||(e.delimiter="»"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:lu([Gd.config({mode:"flow",selector:"div[role=button]"}),mb.config({}),Zd.config({}),th("elementPathEvents",[Br(function(n,r){t.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Gd.focusIn(n)}),t.on("NodeChange",function(r){var o,i,a=function(e){for(var n=[],r=e.length;r-- >0;){var o=e[r];if(1===o.nodeType&&!KO(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}(r.parents);a.length>0?Zd.set(n,(o=L(a||[],function(e,n){return vm.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":n,"tab-index":-1,"aria-level":n+1},innerHtml:e.name},action:function(n){t.focus(),t.selection.select(e.element),t.nodeChanged()}})}),i={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+e.delimiter+" "}},j(o.slice(1),function(t,e){var n=t;return n.push(i),n.push(e),n},[o[0]]))):Zd.set(n,[])})})])]),components:[]}}(t,{})),an(t.settings.plugins,"wordcount")&&r.push(function(t,e){var n=function(t,n,r){return Zd.set(t,[_i(e.translate(["{0} "+r,n[r]]))])};return vm.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:lu([mb.config({}),Zd.config({}),Uc.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),th("wordcount-events",[Lr(function(t){var e=Uc.getValue(t),r="words"===e.mode?"characters":"words";Uc.setValue(t,{mode:r,count:e.count}),n(t,e.count,r)}),Br(function(e){t.on("wordCountUpdate",function(t){var r=Uc.getValue(e).mode;Uc.setValue(e,{mode:r,count:t.wordCount}),n(e,t.wordCount,r)})})])])})}(t,e)),t.getParam("branding",!0,"boolean")&&r.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<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="'+(n=rp.translate(["Powered by {0}","Tiny"]))+'">'+n+"</a>"}}),r.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(n=o(),r=function(t){var e=!an(t.settings.plugins,"autoresize"),n=t.getParam("resize",e);return!1===n?GS.None:"both"===n?GS.Both:GS.Vertical}(t),r!==GS.None&&n.push(function(n){return{dom:{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:e.translate("Resize"),"aria-hidden":"true"},innerHtml:xm("resize-handle",e.icons)},behaviours:lu([UO.config({mode:"mouse",repositionTarget:!1,onDrag:function(e,r,o){!function(t,e,n){var r=We.fromDom(t.getContainer()),o=function(t,e,n,r,o){var i={};return i.height=RE(r+e.top(),rm(t),im(t)),n===GS.Both&&(i.width=RE(o+e.left(),nm(t),om(t))),i}(t,e,n,Ni(r),Pi(r));ot(o,function(t,e){return ui(r,e,LE(t))}),function(t){t.fire("ResizeEditor")}(t)}(t,o,n)},blockerClass:"tox-blocker"})])}}(r)),n)}},JO=function(t){var e,n=t.inline,r=n?VE:BE,o=gm(t)?KT:ZT,i=y.none(),a=hn(),u=a.browser.isIE()?["tox-platform-ie"]:[],s=a.deviceType.isTouch()?["tox-platform-touch"]:[],c=dm(t),l=rp.isRtl()?{attributes:{dir:"rtl"}}:{},f={attributes:(e={},e[Qu]=c?fa.TopToBottom:fa.BottomToTop,e)},h=function(){return i.bind(_E.getHeader)},m=Ti({dom:d({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(u).concat(s)},l),behaviours:lu([ec.config({useFixed:function(){return o.isDocked(h)}})])}),p=function(){return C.value(m)},g=bm({dom:{tag:"div",classes:["tox-anchorbar"]}}),v=function(){return i.bind(function(t){return _E.getThrobber(t)}).getOrDie("Could not find throbber element")},b=function(t,e,n){var r=je(!1),o={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:rp.translate},interpreter:function(t){return function(t,e){return r_(e_,t,o)}(t)},anchors:c_(e,n),getSink:function(){return C.value(t)}},urlinput:$_(e),styleselect:w_(e),colorinput:m_(e),dialog:g_(e),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(t){return r.set(t)}};return o}(m,t,function(){return i.bind(function(t){return g.getOpt(t)}).getOrDie("Could not find a anchor bar element")}),x=_E.parts().menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:b,onEscape:function(){t.focus()}}),w=fm(t),_=_E.parts().toolbar(d({dom:{tag:"div",classes:["tox-toolbar"]},getSink:p,backstage:b,onEscape:function(){t.focus()},type:w,lazyToolbar:function(){return i.bind(function(t){return _E.getToolbar(t)}).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return h().getOrDie("Could not find header element")}},f)),k=_E.parts()["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},onEscape:function(){},type:w}),S=_E.parts().socket({dom:{tag:"div",classes:["tox-edit-area"]}}),T=_E.parts().sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),E=_E.parts().throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:b}),O=t.getParam("statusbar",!0,"boolean")&&!n?y.some(XO(t,b.shared.providers)):y.none(),D={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[S,T]},N=cm(t),A=um(t),M=am(t),I=_E.parts().header({dom:d({tag:"div",classes:["tox-editor-header"]},f),components:q([M?[x]:[],N?[k]:A?[_]:[],mm(t)?[]:[g.asSpec()]]),sticky:gm(t),editor:t,getSink:p}),z=q([c?[I]:[],n?[]:[D],c?[]:[I]]),B=q([[{dom:{tag:"div",classes:["tox-editor-container"]},components:z}],n?[]:O.toArray(),[E]]),R=pm(t),P=d(d({role:"application"},rp.isRtl()?{dir:"rtl"}:{}),R?{"aria-hidden":"true"}:{}),L=Ti(_E.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(n?["tox-tinymce-inline"]:[]).concat(c?[]:["tox-tinymce--toolbar-bottom"]).concat(s).concat(u),styles:d({visibility:"hidden"},R?{opacity:"0",border:"0"}:{}),attributes:P},components:B,behaviours:lu([Gd.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"})])}));i=y.some(L),t.shortcuts.add("alt+F9","focus menubar",function(){_E.focusMenubar(L)}),t.shortcuts.add("alt+F10","focus toolbar",function(){_E.focusToolbar(L)});var F=Ov(L),V=Ov(m);yT(t,F,V);var j=function(){var e=LE(function(t){return function(t){var e=tm(t),n=rm(t),r=im(t);return PE(e).map(function(t){return RE(t,n,r)})}(t).getOr(tm(t))}(t)),n=LE(function(t){return HE(t).getOr(em(t))}(t));return t.inline||(mi("div","width",n)&&ui(L.element(),"width",n),mi("div","height",e)?ui(L.element(),"height",e):ui(L.element(),"height","200px")),e};return{mothership:F,uiMothership:V,backstage:b,renderUI:function(){o.setup(t,h),qE(t,b),aO(t,p,b),function(t){var e=t.ui.registry.getAll().sidebars;H(nt(e),function(n){var r=e[n],o=function(){return y.from(t.queryCommandValue("ToggleSidebar")).is(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)}}})})}(t),pE(t,v,b.shared),it(function(t){return t.getParam("toolbar_groups",{},"object")}(t),function(e,n){t.ui.registry.addGroupToolbarButton(n,e)});var e=t.ui.registry.getAll(),n=e.buttons,i=e.menuItems,a=e.contextToolbars,u=e.sidebars,s=sm(t),c={menuItems:i,menus:t.settings.menu?it(t.settings.menu,function(t){return d(d({},t),{items:t.items})}):{},menubar:t.settings.menubar,toolbar:s.getOrThunk(function(){return t.getParam("toolbar",!0)}),allowToolbarGroups:w===wf.floating,buttons:n,sidebar:u};bT(t,a,m,{backstage:b}),GO(t,m);var l=t.getElement(),f=j(),g={mothership:F,uiMothership:V,outerContainer:L},x={targetNode:l,height:f};return r.render(t,g,c,b,x)},getUi:function(){return{channels:{broadcastAll:V.broadcast,broadcastOn:V.broadcastOn,register:function(){}}}}}},QO=o([be("lazySink"),Ee("dragBlockClass"),He("getBounds",Zi),Ie("useTabstopAt",o(!0)),Ie("eventOrder",{}),Wc("modalBehaviours",[Gd]),Sa("onExecute"),Ea("onEscape")]),ZO={sketch:i},tD=o([bl({name:"draghandle",overrides:function(t,e){return{behaviours:lu([UO.config({mode:"mouse",getTarget:function(t){return ia(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})])}}}),gl({schema:[be("dom")],name:"title"}),gl({factory:ZO,schema:[be("dom")],name:"close"}),gl({factory:ZO,schema:[be("dom")],name:"body"}),bl({factory:ZO,schema:[be("dom")],name:"footer"}),vl({factory:{sketch:function(t,e){return d(d({},t),{dom:e.dom,components:e.components})}},schema:[Ie("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ie("components",[])],name:"blocker"})]),eD=ql({name:"ModalDialog",configFields:QO(),partFields:tD(),factory:function(t,e,n,r){var o=wo("alloy.dialog.busy"),a=wo("alloy.dialog.idle"),u=lu([Gd.config({mode:"special",onTab:function(){return y.some(!0)},onShiftTab:function(){return y.some(!0)}}),ih.config({})]),s=wo("modal-events"),c=d(d({},t.eventOrder),{"alloy.system.attached":[s].concat(t.eventOrder["alloy.system.attached"]||[])});return{uid:t.uid,dom:t.dom,components:e,apis:{show:function(e){var n=t.lazySink(e).getOrDie(),i=je(y.none()),s=r.blocker(),c=n.getSystem().build(d(d({},s),{components:s.components.concat([Ei(e)]),behaviours:lu([ih.config({}),th("dialog-blocker-events",[zr(Pn(),function(){Gd.focusIn(e)}),Er(a,function(t,n){mo(e.element(),"aria-busy")&&(po(e.element(),"aria-busy"),i.get().each(function(t){return Zd.remove(e,t)}))}),Er(o,function(t,n){fo(e.element(),"aria-busy","true");var r=n.event().getBusySpec();i.get().each(function(t){Zd.remove(e,t)});var o=r(e,u),a=t.getSystem().build(o);i.set(y.some(a)),Zd.append(e,Ei(a)),a.hasConfigured(Gd)&&Gd.focusIn(a)})])])}));ac(n,c),Gd.focusIn(e)},hide:function(t){Yr(t.element()).each(function(e){t.getSystem().getByDom(e).each(function(t){cc(t)})})},getBody:function(e){return Al(e,t,"body")},getFooter:function(e){return Al(e,t,"footer")},setIdle:function(t){br(t,a)},setBusy:function(t,e){yr(t,o,{getBusySpec:e})}},eventOrder:c,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Yc(t.modalBehaviours,[Zd.config({}),Gd.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),th(s,[Br(function(e){var n,r,o;(function(t,e){var n=y.from(ho(t,"id")).fold(function(){var t=wo("dialog-label");return fo(e,"id",t),t},i);fo(t,"aria-labelledby",n)})(e.element(),Al(e,t,"title").element()),n=e.element(),r=Al(e,t,"body").element(),o=y.from(ho(n,"id")).fold(function(){var t=wo("dialog-describe");return fo(r,"id",t),t},i),fo(n,"aria-describedby",o)})])])}},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)}}}),nD=[we("type"),we("text"),Ce("level",["info","warn","error","success"]),we("icon"),Ie("url","")],rD=$t(nD),oD=[we("type"),we("text"),Le("disabled",!1),Le("primary",!1),Qt("name","name",Mt(function(){return wo("button-name")}),he),Ne("icon"),Le("borderless",!1)],iD=$t(oD),aD=[we("type"),we("name"),we("label"),Le("disabled",!1)],uD=$t(aD),sD=me,cD=[we("type"),we("name")],lD=cD.concat([Ne("label")]),fD=$t(lD),dD=he,hD=$t(lD),mD=he,pD=$t(lD),gD=Gt(te),vD=function(t){return[we("type"),xe("columns"),t]},bD=lD.concat([Le("sandboxed",!0)]),yD=$t(bD),xD=he,wD=lD.concat([Ne("inputMode"),Ne("placeholder"),Le("maximized",!1),Le("disabled",!1)]),CD=$t(wD),_D=he,kD=lD.concat([Se("items",[we("text"),we("value")]),Be("size",1),Le("disabled",!1)]),SD=$t(kD),TD=he,ED=lD.concat([Le("constrain",!0),Le("disabled",!1)]),OD=$t(ED),DD=$t([we("width"),we("height")]),ND=lD.concat([Ne("placeholder"),Le("maximized",!1),Le("disabled",!1)]),AD=$t(ND),MD=he,ID=lD.concat([Pe("filetype","file",["image","media","file"]),Ie("disabled",!1)]),zD=$t(ID),BD=$t([we("value"),Ie("meta",{})]),RD=cD.concat([Re("tag","textarea"),we("scriptId"),we("scriptUrl"),ze("settings",void 0,ge)]),PD=cD.concat([Re("tag","textarea"),_e("init")]),LD=ne(function(t){return oe("customeditor.old",Yt(PD),t).orThunk(function(){return oe("customeditor.new",Yt(RD),t)})}),HD=he,FD=[we("type"),we("html"),Pe("presets","presentation",["presentation","document"])],VD=$t(FD),jD=lD.concat([ye("currentState",$t([be("blob"),we("url")]))]),UD=$t(jD),WD=lD.concat([Ie("columns","auto")]),qD=$t(WD),YD=ee([we("value"),we("text"),we("icon")]),$D=function(t){return[we("type"),we("label"),t]},GD=[we("type"),Te("header",he),Te("cells",Gt(he))],KD=$t(GD),XD=function(t){return Qt("items","items",Nt(),Gt(ne(function(e){return oe("Checking item of "+t,JD,e).fold(function(t){return C.error(ue(t))},function(t){return C.value(t)})})))},JD=function(t){return{extract:function(e,n,r){return t().extract(e,n,r)},toString:function(){return t().toString()}}}(function(){return se("type",{alertbanner:rD,bar:$t((t=XD("bar"),[we("type"),t])),button:iD,checkbox:uD,colorinput:fD,colorpicker:hD,dropzone:pD,grid:$t(vD(XD("grid"))),iframe:yD,input:CD,selectbox:SD,sizeinput:OD,textarea:AD,urlinput:zD,customeditor:LD,htmlpanel:VD,imagetools:UD,collection:qD,label:$t($D(XD("label"))),table:KD,panel:ZD});var t}),QD=[we("type"),Ie("classes",[]),Te("items",JD)],ZD=$t(QD),tN=[Qt("name","name",Mt(function(){return wo("tab-name")}),he),we("title"),Te("items",JD)],eN=[we("type"),Se("tabs",tN)],nN=$t(eN),rN=$t([we("type"),we("name")].concat(Vm)),oN=me,iN=[Qt("name","name",Mt(function(){return wo("button-name")}),he),Ne("icon"),Pe("align","end",["start","end"]),Le("primary",!1),Le("disabled",!1)],aN=m(iN,[we("text")]),uN=m([Ce("type",["submit","cancel","custom"])],aN),sN=m([Ce("type",["menu"]),Ne("text"),Ne("tooltip"),Ne("icon"),Te("items",rN)],iN),cN=aN,lN=ce("type",{submit:uN,cancel:uN,custom:uN,menu:sN}),fN=$t([we("title"),ye("body",se("type",{panel:ZD,tabpanel:nN})),Re("size","normal"),Te("buttons",lN),Ie("initialData",{}),He("onAction",n),He("onChange",n),He("onSubmit",n),He("onClose",n),He("onCancel",n),Ie("onTabChange",n)]),dN=function(t){return k(t.type)&&k(t.name)},hN={checkbox:sD,colorinput:dD,colorpicker:mD,dropzone:gD,input:_D,iframe:xD,sizeinput:DD,selectbox:TD,size:DD,textarea:MD,urlinput:BD,customeditor:HD,collection:YD,togglemenuitem:oN},mN=function(t){var e=function(t){return F(function t(e){return S(e)?[e].concat(Y(ct(e),t)):T(e)?Y(e,t):[]}(t),dN)}(t),n=Y(e,function(t){return function(t){return y.from(hN[t.type])}(t).fold(function(){return[]},function(e){return[ye(t.name,e)]})});return $t(n)},pN=$t(m([Ce("type",["cancel","custom"])],cN)),gN=$t([we("title"),we("url"),De("height"),De("width"),Oe("buttons",Gt(pN)),He("onAction",n),He("onCancel",n),He("onClose",n),He("onMessage",n)]),vN=function(t){return{internalDialog:ie(oe("dialog",fN,t)),dataValidator:mN(t),initialData:t.initialData}},bN={open:function(t,e){var n=vN(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){return t(ie(oe("dialog",gN,e)))},redial:function(t){return vN(t)}},yN=function(t){var e=[],n={};return ot(t,function(t,r){t.fold(function(){e.push(r)},function(t){n[r]=t})}),e.length>0?C.error(e):C.value(n)},xN=function(t,n){var r=bm(Ex.sketch(function(e){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:L(t.items,function(t){return n_(e,t,n)})}}));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[r.asSpec()]}],behaviours:lu([Gd.config({mode:"acyclic",useTabstopAt:u(Kx)}),zx(r),Vx(r,{postprocess:function(t){return yN(t).fold(function(t){return e.console.error(t),{}},function(t){return t})}})])}},wN=Wl({name:"TabButton",configFields:[Ie("uid",void 0),be("value"),Qt("dom","dom",It(function(){return{attributes:{role:"tab",id:wo("aria"),"aria-selected":"false"}}}),le()),Ee("action"),Ie("domModification",{}),Wc("tabButtonBehaviours",[ih,Gd,Uc]),be("view")],factory:function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:yh(t.action),behaviours:Yc(t.tabButtonBehaviours,[ih.config({}),Gd.config({mode:"execution",useSpace:!0,useEnter:!0}),Uc.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),CN=o([be("tabs"),be("dom"),Ie("clickToDismiss",!1),Wc("tabbarBehaviours",[uf,Gd]),Ca(["tabClass","selectedClass"])]),_N=yl({factory:wN,name:"tabs",unit:"tab",overrides:function(t){return{action:function(e){var r=e.getSystem().getByUid(t.uid).getOrDie(),o=uf.isHighlighted(r,e);(o&&t.clickToDismiss?function(t,e){uf.dehighlight(t,e),yr(t,pr(),{tabbar:t,button:e})}:o?n:function(t,e){uf.highlight(t,e),yr(t,mr(),{tabbar:t,button:e})})(r,e)},domModification:{classes:[t.markers.tabClass]}}}}),kN=o([_N]),SN=ql({name:"Tabbar",configFields:CN(),partFields:kN(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Yc(t.tabbarBehaviours,[uf.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){fo(e.element(),"aria-selected","true")},onDehighlight:function(t,e){fo(e.element(),"aria-selected","false")}}),Gd.config({mode:"flow",getInitial:function(t){return uf.getHighlighted(t).map(function(t){return t.element()})},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),TN=Wl({name:"Tabview",configFields:[Wc("tabviewBehaviours",[Zd])],factory:function(t,e){return{uid:t.uid,dom:t.dom,behaviours:Yc(t.tabviewBehaviours,[Zd.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),EN=o([Ie("selectFirst",!0),ka("onChangeTab"),ka("onDismissTab"),Ie("tabs",[]),Wc("tabSectionBehaviours",[])]),ON=gl({factory:SN,schema:[be("dom"),ke("markers",[be("tabClass"),be("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),DN=gl({factory:TN,name:"tabview"}),NN=o([ON,DN]),AN=ql({name:"TabSection",configFields:EN(),partFields:NN(),factory:function(t,e,n,r){var o=function(e){var n=Uc.getValue(e);Nl(e,t,"tabview").each(function(r){U(t.tabs,function(t){return t.value===n}).each(function(n){var o=n.view();(function(t,e){return y.from(ho(t,"id"))})(e.element()).each(function(t){fo(r.element(),"aria-labelledby",t)}),Zd.set(r,o),t.onChangeTab(r,e,o)})})},i=function(e,n){Nl(e,t,"tabbar").each(function(t){n(t).each(xr)})};return{uid:t.uid,dom:t.dom,components:e,behaviours:qc(t.tabSectionBehaviours),events:kr(q([t.selectFirst?[Br(function(t,e){i(t,uf.getFirst)})]:[],[Er(mr(),function(t,e){var n=e.event().button();o(n)}),Er(pr(),function(e,n){var r=n.event().button();t.onDismissTab(e,r)})]])),apis:{getViewItems:function(e){return Nl(e,t,"tabview").map(function(t){return Zd.contents(t)}).getOr([])},showTab:function(t,e){i(t,function(t){var n=uf.getCandidates(t);return U(n,function(t){return Uc.getValue(t)===e}).filter(function(e){return!uf.isHighlighted(t,e)})})}}}},apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),MN=function(t,e){ui(t,"height",e+"px"),hn().browser.isIE()?pi(t,"flex-basis"):ui(t,"flex-basis",e+"px")},IN=function(t,n,r){ia(t,'[role="dialog"]').each(function(t){aa(t,'[role="tablist"]').each(function(o){r.get().map(function(r){return ui(n,"height","0"),ui(n,"flex-basis","0"),Math.min(r,function(t,n,r){var o,i=Wr(t).dom(),a=ia(t,".tox-dialog-wrap").getOr(t);o="fixed"===li(a,"position")?Math.max(i.clientHeight,e.window.innerHeight):Math.max(i.offsetHeight,i.scrollHeight);var u=Ni(n),s=n.dom().offsetLeft>=r.dom().offsetLeft+Pi(r)?Math.max(Ni(r),u):u,c=parseInt(li(t,"margin-top"),10)||0,l=parseInt(li(t,"margin-bottom"),10)||0;return o-(Ni(t)+c+l-s)}(t,n,o))}).each(function(t){MN(n,t)})})})},zN=function(t){return aa(t,'[role="tabpanel"]')},BN=function(t,e){var n=je({}),r=function(t){var e=Uc.getValue(t),r=yN(e).getOr({}),o=n.get(),i=gt(o,r);n.set(i)},o=function(t){var e=n.get();Uc.setValue(t,e)},i=je(null),a=L(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[Ex.sketch(function(n){return{dom:{tag:"div",classes:["tox-form"]},components:L(t.items,function(t){return n_(n,t,e)}),formBehaviours:lu([Gd.config({mode:"acyclic",useTabstopAt:u(Kx)}),th("TabView.form.events",[Br(o),Rr(r)]),bu.config({channels:Pt([{key:"send-data-to-section",value:{onReceive:r}},{key:"send-data-to-view",value:{onReceive:o}}])})])}})]}}}),s=function(t){var e;return{smartTabHeight:(e=je(y.none()),{extraEvents:[Br(function(n){var r=n.element();zN(r).each(function(o){ui(o,"visibility","hidden"),n.getSystem().getByDom(o).toOption().each(function(n){var r=function(t){return Q(J(t,function(t,e){return t>e?-1:t<e?1:0}))}(function(t,e,n){return L(t,function(r,o){Zd.set(n,t[o].view());var i=e.dom().getBoundingClientRect();return Zd.set(n,[]),i.height})}(t,o,n));e.set(r)}),IN(r,o,e),pi(o,"visibility"),function(t,e){Q(t).each(function(t){return AN.showTab(e,t.value)})}(t,n),Jh.requestAnimationFrame(function(){IN(r,o,e)})})}),Er(ur(),function(t){var n=t.element();zN(n).each(function(t){IN(n,t,e)})}),Er(Pv,function(t,n){var r=t.element();zN(r).each(function(t){var n=wu();ui(t,"visibility","hidden");var o=di(t,"height").map(function(t){return parseInt(t,10)});pi(t,"height"),pi(t,"flex-basis");var i=t.dom().getBoundingClientRect().height;o.forall(function(t){return i>t})?(e.set(y.from(i)),IN(r,t,e)):o.each(function(e){MN(t,e)}),pi(t,"visibility"),n.each(xu)})})],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}}(a).smartTabHeight;return AN.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=Uc.getValue(e);yr(t,Rv,{name:r,oldName:i.get()}),i.set(r)},tabs:a,components:[AN.parts().tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[SN.parts().tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:lu([mb.config({})])}),AN.parts().tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:s.selectFirst,tabSectionBehaviours:lu([th("tabpanel",s.extraEvents),Gd.config({mode:"acyclic"}),Xl.config({find:function(t){return Q(AN.getViewItems(t))}}),Uc.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn(["send-data-to-section"],{}),n.get()},setValue:function(t,e){n.set(e),t.getSystem().broadcastOn(["send-data-to-view"],{})}}})])})},RN=wo("update-dialog"),PN=wo("update-title"),LN=wo("update-body"),HN=wo("update-footer"),FN=wo("body-send-message"),VN=function(t,e,n,r){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:d(d({},e.map(function(t){return{id:t}}).getOr({})),r?{"aria-live":"polite"}:{})},components:[],behaviours:lu([Bx(0),bS.config({channel:LN,updateState:function(t,e){return y.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},renderComponents:function(t){switch(t.body.type){case"tabpanel":return[BN(t.body,n)];default:return[xN(t.body,n)]}},initialData:t})])}},jN=function(t,e){return[Ar(Pn(),Xx),t(Nv,function(t,n){e.onClose(),n.onClose()}),t(Av,function(t,e,n,r){e.onCancel(t),br(r,Nv)}),Er(Bv,function(t,n){return e.onUnblock()}),Er(zv,function(t,n){return e.onBlock(n.event())})]},UN=function(t,e){var n=function(e,n){return Er(e,function(e,o){r(e,function(r,i){n(t(),r,o.event(),e)})})},r=function(t,e){bS.getState(t).get().each(function(n){e(n,t)})};return m(jN(n,e),[n(Mv,function(t,e,n){e.onAction(t,{name:n.name()})})])},WN=function(t,e){var n=function(e,n){return Er(e,function(e,o){r(e,function(r,i){n(t(),r,o.event(),e)})})},r=function(t,e){bS.getState(t).get().each(function(n){e(n.internalDialog,t)})};return m(jN(n,e),[n(Iv,function(t,e){return e.onSubmit(t)}),n(Dv,function(t,e,n){e.onChange(t,{name:n.name()})}),n(Mv,function(t,e,n,r){var o=function(){return Gd.focusIn(r)},i=wu();e.onAction(t,{name:n.name(),value:n.value()}),wu().fold(function(){o()},function(t){!_n(r.element(),t)||mo(t,"disabled")?o():_n(t,i.getOrNull())&&mo(i.getOrDie(),"disabled")&&o()})}),n(Rv,function(t,e,n){e.onTabChange(t,{newTabName:n.name(),oldTabName:n.oldName()})}),Rr(function(e){var n=t();Uc.setValue(e,n.getData())})])},qN=function(t,e){var n=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a)?n:r).push(a)}return{pass:n,fail:r}}(e.map(function(t){return t.footerButtons}).getOr([]),function(t){return"start"===t.align}),r=function(t,e){return Ev.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:L(e,function(t){return t.memento.asSpec()})})};return[r("start",n.pass),r("end",n.fail)]},YN=function(t,e){return{dom:hE('<div class="tox-dialog__footer"></div>'),components:[],behaviours:lu([bS.config({channel:HN,initialData:t,updateState:function(t,n){var r=L(n.buttons,function(t){var n=bm(function(t,e){return Zw(t,t.type,e)}(t,e));return{name:t.name,align:t.align,memento:n}});return y.some({lookupByName:function(t,e){return function(t,e,n){return U(r,function(t){return t.name===n}).bind(function(e){return e.memento.getOpt(t)})}(t,0,e)},footerButtons:r})},renderComponents:qN})])}},$N=function(t,e){return eD.parts().footer(YN(t,e))},GN=function(t,e){if(t.getRoot().getSystem().isConnected()){var n=Xl.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return Ex.getField(n,e).fold(function(){var r=t.getFooter();return bS.getState(r).get().bind(function(t){return t.lookupByName(n,e)})},function(t){return y.some(t)})}return y.none()},KN=function(t,e,n){var r=function(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)},o={getData:function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=Uc.getValue(r),i=it(n,function(t){return t.get()});return d(d({},o),i)},setData:function(e){r(function(r){var i=o.getData(),a=d(d({},i),e),u=function(t,e){var n=t.getRoot();return bS.getState(n).get().map(function(t){return ie(oe("data",t.dataValidator,e))}).getOr(e)}(t,a),s=t.getFormWrapper();Uc.setValue(s,u),ot(n,function(t,e){ft(a,e)&&t.set(a[e])})})},disable:function(e){GN(t,e).each(Dp.disable)},enable:function(e){GN(t,e).each(Dp.enable)},focus:function(e){GN(t,e).each(ih.focus)},block:function(t){if(!k(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r(function(e){yr(e,zv,{message:t})})},unblock:function(){r(function(t){br(t,Bv)})},showTab:function(e){r(function(n){var r=t.getBody();bS.getState(r).get().exists(function(t){return t.isTabPanel()})&&Xl.getCurrent(r).each(function(t){AN.showTab(t,e)})})},redial:function(t){r(function(n){var r=e(t);n.getSystem().broadcastOn([RN],r),n.getSystem().broadcastOn([PN],r.internalDialog),n.getSystem().broadcastOn([LN],r.internalDialog),n.getSystem().broadcastOn([HN],r.internalDialog),o.setData(r.initialData)})},close:function(){r(function(t){br(t,Nv)})}};return o},XN=lp.deviceType.isTouch(),JN=function(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}},QN=function(t,e){return eD.parts().close(vm.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:lu([mb.config({})])}))},ZN=function(){return eD.parts().title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},tA=function(t,e){return eD.parts().body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:hE("<p>"+e.translate(t)+"</p>")}]}]})},eA=function(t){return eD.parts().footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},nA=function(t,e){return[Ev.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),Ev.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]},rA=function(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return eD.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),y.some(!0)},useTabstopAt:function(t){return!Kx(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:d({position:"relative"},t.extraStyles)},components:m([t.header,t.body],t.footer.toArray()),parts:{blocker:{dom:hE('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:XN?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:lu(m([ih.config({}),th("dialog-events",t.dialogEvents.concat([zr(Pn(),function(t,e){Gd.focusIn(t)})])),th("scroll-lock",[Br(function(){Xo(ri(),i)}),Rr(function(){Jo(ri(),i)})])],t.extraBehaviours)),eventOrder:d((e={},e[Jn()]=["dialog-events"],e[sr()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[cr()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})},oA=function(t){return vm.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:[{dom:{tag:"div",classes:["tox-icon"],innerHtml:'<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M17.953 7.453L13.422 12l4.531 4.547-1.406 1.406L12 13.422l-4.547 4.531-1.406-1.406L10.578 12 6.047 7.453l1.406-1.406L12 10.578l4.547-4.531z" fill-rule="evenodd"></path></svg>'}}],action:function(t){br(t,Av)}})},iA=function(t,e,n){var r=function(t){return[_i(n.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:d({},e.map(function(t){return{id:t}}).getOr({}))},components:r(t),behaviours:lu([bS.config({channel:PN,renderComponents:r})])}},aA=function(){return{dom:hE('<div class="tox-dialog__draghandle"></div>')}},uA=function(t,e){return function(t,e){var n=eD.parts().title(iA(t,y.none(),e)),r=eD.parts().draghandle(aA()),o=eD.parts().close(oA(e)),i=[n].concat(t.draggable?[r]:[]).concat([o]);return Ev.sketch({dom:hE('<div class="tox-dialog__header"></div>'),components:i})}({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},e.shared.providers)},sA=function(t,e){return{onClose:function(){return e.closeWindow()},onBlock:function(e){eD.setBusy(t(),function(t,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.message()},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:n,components:[{dom:hE('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}})},onUnblock:function(){eD.setIdle(t())}}},cA=function(t,e,n,r){var o;return Ti(rA(d(d({},t),{lazySink:r.shared.getSink,extraBehaviours:m([bS.config({channel:RN,updateState:function(t,e){return y.some(e)},initialData:e}),Wx({})],t.extraBehaviours),onEscape:function(t){br(t,Av)},dialogEvents:n,eventOrder:(o={},o[Xn()]=["reflecting","receiving"],o[sr()]=["scroll-lock","reflecting","messages","dialog-events","alloy.base.behaviour"],o[cr()]=["alloy.base.behaviour","dialog-events","messages","reflecting","scroll-lock"],o)})))},lA=function(t){return L(t,function(t){return"menu"===t.type?function(t){var e=L(t.items,function(t){var e=je(!1);return d(d({},t),{storage:e})});return d(d({},t),{items:e})}(t):t})},fA=function(t){return j(t,function(t,e){return"menu"===e.type?j(e.items,function(t,e){return t[e.name]=e.storage,t},t):t},{})},dA=tinymce.util.Tools.resolve("tinymce.util.URI"),hA=["insertContent","setContent","execCommand","close","block","unblock"],mA=function(t){return S(t)&&-1!==hA.indexOf(t.mceAction)},pA=function(t,n,r,o){var i,a,s,c=uA(t.title,o),l=function(t){var e={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[Jx({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:lu([mb.config({}),ih.config({})])})]}],behaviours:lu([Gd.config({mode:"acyclic",useTabstopAt:u(Kx)})])};return eD.parts().body(e)}(t),f=t.buttons.bind(function(t){return 0===t.length?y.none():y.some($N({buttons:t},o))}),h=UN(function(){return C},sA(function(){return w},n)),m=d(d({},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"}})),p=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],g=new dA(t.url,{base_uri:new dA(e.window.location.href)}),v=g.protocol+"://"+g.host+(g.port?":"+g.port:""),b=je(y.none()),x=[th("messages",[Br(function(){var n=cv(We.fromDom(e.window),"message",function(e){if(g.isSameOrigin(new dA(e.raw().origin))){var n=e.raw().data;mA(n)?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=!!E(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()}}(r,C,n):function(t){return!mA(t)&&S(t)&&ft(t,"mceAction")}(n)&&t.onMessage(C,n)}});b.set(y.some(n))}),Rr(function(){b.get().each(function(t){return t.unbind()})})]),bu.config({channels:(i={},i[FN]={onReceive:function(t,e){aa(t.element(),"iframe").each(function(t){t.dom().contentWindow.postMessage(e,v)})}},i)})],w=cA({header:c,body:l,footer:f,extraClasses:p,extraBehaviours:x,extraStyles:m},t,h,o),C=(a=w,s=function(t){a.getSystem().isConnected()&&t(a)},{block:function(t){if(!k(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");s(function(e){yr(e,zv,{message:t})})},unblock:function(){s(function(t){br(t,Bv)})},close:function(){s(function(t){br(t,Nv)})},sendMessage:function(t){s(function(e){e.getSystem().broadcastOn([FN],t)})}});return{dialog:w,instanceApi:C}},gA=function(t,e,n){return e&&n?[]:[UT.config({contextual:{lazyContext:function(){return y.some(Ji(We.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},vA=function(t){var e=t.backstage,n=t.editor,r=gm(n),o=dm(n),i=function(t){var e=t.backstage.shared;return{open:function(n,r){var o=function(){eD.hide(s),r()},i=bm(Zw({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:y.none()},"cancel",t.backstage)),a=ZN(),u=QN(o,e.providers),s=Ti(rA({lazySink:function(){return e.getSink()},header:JN(a,u),body:tA(n,e.providers),footer:y.some(eA(nA([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Er(Av,o)],eventOrder:{}}));eD.show(s);var c=i.get(s);ih.focus(c)}}}(t),a=function(t){var e=t.backstage.shared;return{open:function(n,r){var o=function(t){eD.hide(c),r(t)},i=bm(Zw({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:y.none()},"submit",t.backstage)),a=Zw({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:y.none()},"cancel",t.backstage),u=ZN(),s=QN(function(){return o(!1)},e.providers),c=Ti(rA({lazySink:function(){return e.getSink()},header:JN(u,s),body:tA(n,e.providers),footer:y.some(eA(nA([],[a,i.asSpec()]))),onEscape:function(){return o(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Er(Av,function(){return o(!1)}),Er(Iv,function(){return o(!0)})],eventOrder:{}}));eD.show(c);var l=i.get(c);ih.focus(l)}}}(t),u=function(t,r){return bN.openUrl(function(t){var o=pA(t,{closeWindow:function(){eD.hide(o.dialog),r(o.instanceApi)}},n,e);return eD.show(o.dialog),o.instanceApi},t)},s=function(t,n){return bN.open(function(t,r,o){var i=r,a=function(t,e,n){var r=uA(t.internalDialog.title,n),o=function(t,e){var n=VN(t,y.none(),e,!1);return eD.parts().body(n)}({body:t.internalDialog.body},n),i=lA(t.internalDialog.buttons),a=fA(i),u=$N({buttons:i},n),s=WN(function(){return d},sA(function(){return f},e)),c="normal"!==t.internalDialog.size?"large"===t.internalDialog.size?["tox-dialog--width-lg"]:["tox-dialog--width-md"]:[],l={header:r,body:o,footer:y.some(u),extraClasses:c,extraBehaviours:[],extraStyles:{}},f=cA(l,t,s,n),d=KN({getRoot:function(){return f},getBody:function(){return eD.getBody(f)},getFooter:function(){return eD.getFooter(f)},getFormWrapper:function(){var t=eD.getBody(f);return Xl.getCurrent(t).getOr(t)}},e.redial,a);return{dialog:f,instanceApi:d}}({dataValidator:o,initialData:i,internalDialog:t},{redial:bN.redial,closeWindow:function(){eD.hide(a.dialog),n(a.instanceApi)}},e);return eD.show(a.dialog),a.instanceApi.setData(i),a.instanceApi},t)},c=function(t,i,a,u){return bN.open(function(t,s,c){var l,f=ie(oe("data",c,s)),h=(l=je(y.none()),{clear:function(){l.set(y.none())},set:function(t){l.set(y.some(t))},isSet:function(){return l.get().isSome()},on:function(t){l.get().each(t)}}),p=function(){return h.on(function(t){Hh.reposition(t),UT.refresh(t)})},g=function(t,e,n,r){var o,i,a,u,s,c=wo("dialog-label"),l=wo("dialog-content"),f=bm((a={title:t.internalDialog.title,draggable:!0},u=c,s=n.shared.providers,Ev.sketch({dom:hE('<div class="tox-dialog__header"></div>'),components:[iA(a,y.some(u),s),aA(),oA(s)],containerBehaviours:lu([UO.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return ua(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),d=bm(function(t,e,n,r){return VN(t,y.some(e),n,r)}({body:t.internalDialog.body},l,n,r)),h=lA(t.internalDialog.buttons),m=fA(h),p=bm(YN({buttons:h},n)),g=WN(function(){return b},{onBlock:function(){},onUnblock:function(){},onClose:function(){return e.closeWindow()}}),v=Ti({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(o={role:"dialog"},o["aria-labelledby"]=c,o["aria-describedby"]=""+l,o)},eventOrder:(i={},i[Xn()]=[bS.name(),bu.name()],i[Jn()]=["execute-on-form"],i[sr()]=["reflecting","execute-on-form"],i),behaviours:lu([Gd.config({mode:"cyclic",onEscape:function(t){return br(t,Nv),y.some(!0)},useTabstopAt:function(t){return!Kx(t)&&("button"!==ao(t)||"disabled"!==ho(t,"disabled"))}}),bS.config({channel:RN,updateState:function(t,e){return y.some(e)},initialData:t}),ih.config({}),th("execute-on-form",g.concat([zr(Pn(),function(t,e){Gd.focusIn(t)})])),Wx({})]),components:[f.asSpec(),d.asSpec(),p.asSpec()]}),b=KN({getRoot:function(){return v},getFooter:function(){return p.get(v)},getBody:function(){return d.get(v)},getFormWrapper:function(){var t=d.get(v);return Xl.getCurrent(t).getOr(t)}},e.redial,m);return{dialog:v,instanceApi:b}}({dataValidator:c,initialData:f,internalDialog:t},{redial:bN.redial,closeWindow:function(){h.on(Hh.hide),n.off("ResizeEditor",p),h.clear(),a(g.instanceApi)}},e,u),v=Ti(Hh.sketch(d(d({lazySink:e.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},o?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:lu(m([th("window-manager-inline-events",[Er(lr(),function(t,e){br(g.dialog,Av)})])],gA(n,r,o)))})));return h.set(v),Hh.showWithin(v,i,Ei(g.dialog),y.some(ri())),r&&o||(UT.refresh(v),n.on("ResizeEditor",p)),g.instanceApi.setData(f),Gd.focusIn(g.dialog),g.instanceApi},t)};return{open:function(t,n,r){return void 0!==n&&"toolbar"===n.inline?c(t,e.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?c(t,e.shared.anchors.cursor(),r,n.ariaAttrs):s(t,r)},openUrl:function(t,e){return u(t,e)},alert:function(t,e){i.open(t,function(){e()})},close:function(t){t.close()},confirm:function(t,e){a.open(t,function(t){e(t)})}}};f.add("silver",function(t){var e=JO(t),n=e.uiMothership,r=e.backstage,i=e.renderUI,a=e.getUi;uv(t,r.shared);var u=vA({editor:t,backstage:r});return{renderUI:i,getWindowManagerImpl:o(u),getNotificationManagerImpl:function(){return function(t,e,n){var r=e.backstage,o=dm(t);return{open:function(t,i){var a=!t.closeButton&&t.timeout&&(t.timeout>0||t.timeout<0),u=function(){i(),Hh.hide(c)},s=Ti(_m.sketch({text:t.text,level:B(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:y.from(t.icon),closeButton:!a,onAction:u,iconProvider:r.shared.providers.icons,translationProvider:r.shared.providers.translate})),c=Ti(Hh.sketch(d({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:e.backstage.shared.getSink,fireDismissalEventInstead:{}},o?{}:{fireRepositionEventInstead:{}})));return n.add(c),t.timeout>0&&Jh.setTimeout(function(){u()},t.timeout),{close:u,moveTo:function(t,e){Hh.showAt(c,{anchor:"makeshift",x:t,y:e},Ei(s))},moveRel:function(t,n){if("banner"!==n){var r=function(t){switch(n){case"bc-bc":return Xh;case"tc-tc":return Kh;case"tc-bc":return Ja;case"bc-tc":default:return Qa}}(),o={anchor:"node",root:ri(),node:y.some(We.fromDom(t)),layouts:{onRtl:function(){return[r]},onLtr:function(){return[r]}}};Hh.showAt(c,o,Ei(s))}else Hh.showAt(c,e.backstage.shared.anchors.banner(),Ei(s))},text:function(t){_m.updateText(s,t)},settings:t,getEl:function(){return s.element().dom()},progressBar:{value:function(t){_m.updateProgress(s,t)}}}},close:function(t){t.close()},reposition:function(t){!function(t){H(t,function(t){return t.moveTo(0,0)})}(t),function(t){t.length>0&&(Q(t).each(function(t){return t.moveRel(null,"banner")}),H(t,function(e,n){n>0&&e.moveRel(t[n-1].getEl(),"bc-tc")}))}(t)},getArgs:function(t){return t.settings}}}(t,{backstage:r},n)},ui:a()}})}(window)}).call(this,n("yLpj"))},CgaS:function(t,e,n){"use strict";var r=n("xTJ+"),o=n("MLWZ"),i=n("9rSQ"),a=n("UnBK"),u=n("SntB");function s(t){this.defaults=t,this.interceptors={request:new i,response:new i}}s.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},s.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(t){s.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}}),r.forEach(["post","put","patch"],function(t){s.prototype[t]=function(e,n,o){return this.request(r.merge(o||{},{method:t,url:e,data:n}))}}),t.exports=s},CumE:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,r){return!!t.data(e,r[3])}})})?r.apply(e,o):r)||(t.exports=i)},DWi2:function(t,e,n){n("Aw8l")},DfZB:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},EVdn:function(t,e,n){var r;!function(e,n){"use strict";"object"==_typeof(t.exports)?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,o){"use strict";var i=[],a=n.document,u=Object.getPrototypeOf,s=i.slice,c=i.concat,l=i.push,f=i.indexOf,d={},h=d.toString,m=d.hasOwnProperty,p=m.toString,g=p.call(Object),v={};function b(t,e){var n=(e=e||a).createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}var y=function t(e,n){return new t.fn.init(e,n)},x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^-ms-/,C=/-([a-z])/g,_=function(t,e){return e.toUpperCase()};function k(t){var e=!!t&&"length"in t&&t.length,n=y.type(t);return"function"!==n&&!y.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}y.fn=y.prototype={jquery:"3.1.1",constructor:y,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=y.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return y.each(this,t)},map:function(t){return this.pushStack(y.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:i.sort,splice:i.splice},y.extend=y.fn.extend=function(){var t,e,n,r,o,i,a=arguments[0]||{},u=1,s=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[u]||{},u++),"object"==_typeof(a)||y.isFunction(a)||(a={}),u===s&&(a=this,u--);u<s;u++)if(null!=(t=arguments[u]))for(e in t)n=a[e],a!==(r=t[e])&&(c&&r&&(y.isPlainObject(r)||(o=y.isArray(r)))?(o?(o=!1,i=n&&y.isArray(n)?n:[]):i=n&&y.isPlainObject(n)?n:{},a[e]=y.extend(c,i,r)):void 0!==r&&(a[e]=r));return a},y.extend({expando:"jQuery"+("3.1.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===y.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=y.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=u(t))&&("function"!=typeof(n=m.call(e,"constructor")&&e.constructor)||p.call(n)!==g))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==_typeof(t)||"function"==typeof t?d[h.call(t)]||"object":_typeof(t)},globalEval:function(t){b(t)},camelCase:function(t){return t.replace(w,"ms-").replace(C,_)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,r=0;if(k(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},trim:function(t){return null==t?"":(t+"").replace(x,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(k(Object(t))?y.merge(n,"string"==typeof t?[t]:t):l.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:f.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,o=t.length;r<n;r++)t[o++]=e[r];return t.length=o,t},grep:function(t,e,n){for(var r=[],o=0,i=t.length,a=!n;o<i;o++)!e(t[o],o)!==a&&r.push(t[o]);return r},map:function(t,e,n){var r,o,i=0,a=[];if(k(t))for(r=t.length;i<r;i++)null!=(o=e(t[i],i,n))&&a.push(o);else for(i in t)null!=(o=e(t[i],i,n))&&a.push(o);return c.apply([],a)},guid:1,proxy:function(t,e){var n,r,o;if("string"==typeof e&&(n=t[e],e=t,t=n),y.isFunction(t))return r=s.call(arguments,2),(o=function(){return t.apply(e||this,r.concat(s.call(arguments)))}).guid=t.guid=t.guid||y.guid++,o},now:Date.now,support:v}),"function"==typeof Symbol&&(y.fn[Symbol.iterator]=i[Symbol.iterator]),y.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){d["[object "+e+"]"]=e.toLowerCase()});var S=function(t){var e,n,r,o,i,a,u,s,c,l,f,d,h,m,p,g,v,b,y,x="sizzle"+1*new Date,w=t.document,C=0,_=0,k=at(),S=at(),T=at(),E=function(t,e){return t===e&&(f=!0),0},O={}.hasOwnProperty,D=[],N=D.pop,A=D.push,M=D.push,I=D.slice,z=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",P="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",L="\\["+R+"*("+P+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+R+"*\\]",H=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+L+")*)|.*)\\)|)",F=new RegExp(R+"+","g"),V=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),j=new RegExp("^"+R+"*,"+R+"*"),U=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),W=new RegExp("="+R+"*([^\\]'\"]*?)"+R+"*\\]","g"),q=new RegExp(H),Y=new RegExp("^"+P+"$"),$={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),tt=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)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){d()},ot=bt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{M.apply(D=I.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(t){M={apply:D.length?function(t,e){A.apply(t,I.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function it(t,e,r,o){var i,u,c,l,f,m,v,b=e&&e.ownerDocument,C=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==C&&9!==C&&11!==C)return r;if(!o&&((e?e.ownerDocument||e:w)!==h&&d(e),e=e||h,p)){if(11!==C&&(f=J.exec(t)))if(i=f[1]){if(9===C){if(!(c=e.getElementById(i)))return r;if(c.id===i)return r.push(c),r}else if(b&&(c=b.getElementById(i))&&y(e,c)&&c.id===i)return r.push(c),r}else{if(f[2])return M.apply(r,e.getElementsByTagName(t)),r;if((i=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return M.apply(r,e.getElementsByClassName(i)),r}if(n.qsa&&!T[t+" "]&&(!g||!g.test(t))){if(1!==C)b=e,v=t;else if("object"!==e.nodeName.toLowerCase()){for((l=e.getAttribute("id"))?l=l.replace(et,nt):e.setAttribute("id",l=x),u=(m=a(t)).length;u--;)m[u]="#"+l+" "+vt(m[u]);v=m.join(","),b=Q.test(t)&&pt(e.parentNode)||e}if(v)try{return M.apply(r,b.querySelectorAll(v)),r}catch(t){}finally{l===x&&e.removeAttribute("id")}}}return s(t.replace(V,"$1"),e,r,o)}function at(){var t=[];return function e(n,o){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function ut(t){return t[x]=!0,t}function st(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var n=t.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=e}function lt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function ht(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ut(function(e){return e=+e,ut(function(n,r){for(var o,i=t([],n.length,e),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function pt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=it.support={},i=it.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=it.setDocument=function(t){var e,o,a=t?t.ownerDocument||t:w;return a!==h&&9===a.nodeType&&a.documentElement?(m=(h=a).documentElement,p=!i(h),w!==h&&(o=h.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),n.attributes=st(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=st(function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(h.getElementsByClassName),n.getById=st(function(t){return m.appendChild(t).id=x,!h.getElementsByName||!h.getElementsByName(x).length}),n.getById?(r.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n,r,o,i=e.getElementById(t);if(i){if((n=i.getAttributeNode("id"))&&n.value===t)return[i];for(o=e.getElementsByName(t),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===t)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&p)return e.getElementsByClassName(t)},v=[],g=[],(n.qsa=X.test(h.querySelectorAll))&&(st(function(t){m.appendChild(t).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+R+"*(?:value|"+B+")"),t.querySelectorAll("[id~="+x+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]")}),st(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),m.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=X.test(b=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&st(function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),v.push("!=",H)}),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=X.test(m.compareDocumentPosition),y=e||X.test(m.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)for(;e=e.parentNode;)if(e===t)return!0;return!1},E=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t===h||t.ownerDocument===w&&y(w,t)?-1:e===h||e.ownerDocument===w&&y(w,e)?1:l?z(l,t)-z(l,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,o=t.parentNode,i=e.parentNode,a=[t],u=[e];if(!o||!i)return t===h?-1:e===h?1:o?-1:i?1:l?z(l,t)-z(l,e):0;if(o===i)return lt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?lt(a[r],u[r]):a[r]===w?-1:u[r]===w?1:0},h):h},it.matches=function(t,e){return it(t,null,null,e)},it.matchesSelector=function(t,e){if((t.ownerDocument||t)!==h&&d(t),e=e.replace(W,"='$1']"),n.matchesSelector&&p&&!T[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var r=b.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return it(e,h,null,[t]).length>0},it.contains=function(t,e){return(t.ownerDocument||t)!==h&&d(t),y(t,e)},it.attr=function(t,e){(t.ownerDocument||t)!==h&&d(t);var o=r.attrHandle[e.toLowerCase()],i=o&&O.call(r.attrHandle,e.toLowerCase())?o(t,e,!p):void 0;return void 0!==i?i:n.attributes||!p?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},it.escape=function(t){return(t+"").replace(et,nt)},it.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},it.uniqueSort=function(t){var e,r=[],o=0,i=0;if(f=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(E),f){for(;e=t[i++];)e===t[i]&&(o=r.push(i));for(;o--;)t.splice(r[o],1)}return l=null,t},o=it.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=o(e);return n},(r=it.selectors={cacheLength:50,createPseudo:ut,match:$,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(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===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]||it.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]&&it.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return $.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=a(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(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=k[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&k(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var o=it.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.replace(F," ")+" ").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),a="last"!==t.slice(-4),u="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,s){var c,l,f,d,h,m,p=i!==a?"nextSibling":"previousSibling",g=e.parentNode,v=u&&e.nodeName.toLowerCase(),b=!s&&!u,y=!1;if(g){if(i){for(;p;){for(d=e;d=d[p];)if(u?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;m=p="only"===t&&!m&&"nextSibling"}return!0}if(m=[a?g.firstChild:g.lastChild],a&&b){for(y=(h=(c=(l=(f=(d=g)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===C&&c[1])&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[p]||(y=h=0)||m.pop();)if(1===d.nodeType&&++y&&d===e){l[t]=[C,h,y];break}}else if(b&&(y=h=(c=(l=(f=(d=e)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===C&&c[1]),!1===y)for(;(d=++h&&d&&d[p]||(y=h=0)||m.pop())&&((u?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++y||(b&&((l=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]=[C,y]),d!==e)););return(y-=o)===r||y%r==0&&y/r>=0}}},PSEUDO:function(t,e){var n,o=r.pseudos[t]||r.setFilters[t.toLowerCase()]||it.error("unsupported pseudo: "+t);return o[x]?o(e):o.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ut(function(t,n){for(var r,i=o(t,e),a=i.length;a--;)t[r=z(t,i[a])]=!(n[r]=i[a])}):function(t){return o(t,0,n)}):o}},pseudos:{not:ut(function(t){var e=[],n=[],r=u(t.replace(V,"$1"));return r[x]?ut(function(t,e,n,o){for(var i,a=r(t,null,o,[]),u=t.length;u--;)(i=a[u])&&(t[u]=!(e[u]=i))}):function(t,o,i){return e[0]=t,r(e,null,i,n),e[0]=null,!n.pop()}}),has:ut(function(t){return function(e){return it(t,e).length>0}}),contains:ut(function(t){return t=t.replace(Z,tt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}}),lang:ut(function(t){return Y.test(t||"")||it.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(e){var n;do{if(n=p?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===m},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:ht(!1),disabled:ht(!0),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!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return G.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:mt(function(){return[0]}),last:mt(function(t,e){return[e-1]}),eq:mt(function(t,e,n){return[n<0?n+e:n]}),even:mt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:mt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:mt(function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t}),gt:mt(function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=dt(e);function gt(){}function vt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function bt(t,e,n){var r=e.dir,o=e.next,i=o||r,a=n&&"parentNode"===i,u=_++;return e.first?function(e,n,o){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,o);return!1}:function(e,n,s){var c,l,f,d=[C,u];if(s){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,s))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(l=(f=e[x]||(e[x]={}))[e.uniqueID]||(f[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[r]||e;else{if((c=l[i])&&c[0]===C&&c[1]===u)return d[2]=c[2];if(l[i]=d,d[2]=t(e,n,s))return!0}return!1}}function yt(t){return t.length>1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function xt(t,e,n,r,o){for(var i,a=[],u=0,s=t.length,c=null!=e;u<s;u++)(i=t[u])&&(n&&!n(i,r,o)||(a.push(i),c&&e.push(u)));return a}function wt(t,e,n,r,o,i){return r&&!r[x]&&(r=wt(r)),o&&!o[x]&&(o=wt(o,i)),ut(function(i,a,u,s){var c,l,f,d=[],h=[],m=a.length,p=i||function(t,e,n){for(var r=0,o=e.length;r<o;r++)it(t,e[r],n);return n}(e||"*",u.nodeType?[u]:u,[]),g=!t||!i&&e?p:xt(p,d,t,u,s),v=n?o||(i?t:m||r)?[]:a:g;if(n&&n(g,v,u,s),r)for(c=xt(v,h),r(c,[],u,s),l=c.length;l--;)(f=c[l])&&(v[h[l]]=!(g[h[l]]=f));if(i){if(o||t){if(o){for(c=[],l=v.length;l--;)(f=v[l])&&c.push(g[l]=f);o(null,v=[],c,s)}for(l=v.length;l--;)(f=v[l])&&(c=o?z(i,f):d[l])>-1&&(i[c]=!(a[c]=f))}}else v=xt(v===a?v.splice(m,v.length):v),o?o(null,a,v,s):M.apply(a,v)})}function Ct(t){for(var e,n,o,i=t.length,a=r.relative[t[0].type],u=a||r.relative[" "],s=a?1:0,l=bt(function(t){return t===e},u,!0),f=bt(function(t){return z(e,t)>-1},u,!0),d=[function(t,n,r){var o=!a&&(r||n!==c)||((e=n).nodeType?l(t,n,r):f(t,n,r));return e=null,o}];s<i;s++)if(n=r.relative[t[s].type])d=[bt(yt(d),n)];else{if((n=r.filter[t[s].type].apply(null,t[s].matches))[x]){for(o=++s;o<i&&!r.relative[t[o].type];o++);return wt(s>1&&yt(d),s>1&&vt(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(V,"$1"),n,s<o&&Ct(t.slice(s,o)),o<i&&Ct(t=t.slice(o)),o<i&&vt(t))}d.push(n)}return yt(d)}return gt.prototype=r.filters=r.pseudos,r.setFilters=new gt,a=it.tokenize=function(t,e){var n,o,i,a,u,s,c,l=S[t+" "];if(l)return e?0:l.slice(0);for(u=t,s=[],c=r.preFilter;u;){for(a in n&&!(o=j.exec(u))||(o&&(u=u.slice(o[0].length)||u),s.push(i=[])),n=!1,(o=U.exec(u))&&(n=o.shift(),i.push({value:n,type:o[0].replace(V," ")}),u=u.slice(n.length)),r.filter)!(o=$[a].exec(u))||c[a]&&!(o=c[a](o))||(n=o.shift(),i.push({value:n,type:a,matches:o}),u=u.slice(n.length));if(!n)break}return e?u.length:u?it.error(t):S(t,s).slice(0)},u=it.compile=function(t,e){var n,o=[],i=[],u=T[t+" "];if(!u){for(e||(e=a(t)),n=e.length;n--;)(u=Ct(e[n]))[x]?o.push(u):i.push(u);(u=T(t,function(t,e){var n=e.length>0,o=t.length>0,i=function(i,a,u,s,l){var f,m,g,v=0,b="0",y=i&&[],x=[],w=c,_=i||o&&r.find.TAG("*",l),k=C+=null==w?1:Math.random()||.1,S=_.length;for(l&&(c=a===h||a||l);b!==S&&null!=(f=_[b]);b++){if(o&&f){for(m=0,a||f.ownerDocument===h||(d(f),u=!p);g=t[m++];)if(g(f,a||h,u)){s.push(f);break}l&&(C=k)}n&&((f=!g&&f)&&v--,i&&y.push(f))}if(v+=b,n&&b!==v){for(m=0;g=e[m++];)g(y,x,a,u);if(i){if(v>0)for(;b--;)y[b]||x[b]||(x[b]=N.call(s));x=xt(x)}M.apply(s,x),l&&!i&&x.length>0&&v+e.length>1&&it.uniqueSort(s)}return l&&(C=k,c=w),y};return n?ut(i):i}(i,o))).selector=t}return u},s=it.select=function(t,e,n,o){var i,s,c,l,f,d="function"==typeof t&&t,h=!o&&a(t=d.selector||t);if(n=n||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===e.nodeType&&p&&r.relative[s[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(Z,tt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(s.shift().value.length)}for(i=$.needsContext.test(t)?0:s.length;i--&&(c=s[i],!r.relative[l=c.type]);)if((f=r.find[l])&&(o=f(c.matches[0].replace(Z,tt),Q.test(s[0].type)&&pt(e.parentNode)||e))){if(s.splice(i,1),!(t=o.length&&vt(s)))return M.apply(n,o),n;break}}return(d||u(t,h))(o,e,!p,n,!e||Q.test(t)&&pt(e.parentNode)||e),n},n.sortStable=x.split("").sort(E).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=st(function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))}),st(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&&st(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),st(function(t){return null==t.getAttribute("disabled")})||ct(B,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),it}(n);y.find=S,y.expr=S.selectors,y.expr[":"]=y.expr.pseudos,y.uniqueSort=y.unique=S.uniqueSort,y.text=S.getText,y.isXMLDoc=S.isXML,y.contains=S.contains,y.escapeSelector=S.escape;var T=function(t,e,n){for(var r=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&y(t).is(n))break;r.push(t)}return r},E=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},O=y.expr.match.needsContext,D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,N=/^.[^:#\[\.,]*$/;function A(t,e,n){return y.isFunction(e)?y.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?y.grep(t,function(t){return t===e!==n}):"string"!=typeof e?y.grep(t,function(t){return f.call(e,t)>-1!==n}):N.test(e)?y.filter(e,t,n):(e=y.filter(e,t),y.grep(t,function(t){return f.call(e,t)>-1!==n&&1===t.nodeType}))}y.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?y.find.matchesSelector(r,t)?[r]:[]:y.find.matches(t,y.grep(e,function(t){return 1===t.nodeType}))},y.fn.extend({find:function(t){var e,n,r=this.length,o=this;if("string"!=typeof t)return this.pushStack(y(t).filter(function(){for(e=0;e<r;e++)if(y.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<r;e++)y.find(t,o[e],n);return r>1?y.uniqueSort(n):n},filter:function(t){return this.pushStack(A(this,t||[],!1))},not:function(t){return this.pushStack(A(this,t||[],!0))},is:function(t){return!!A(this,"string"==typeof t&&O.test(t)?y(t):t||[],!1).length}});var M,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(y.fn.init=function(t,e,n){var r,o;if(!t)return this;if(n=n||M,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof y?e[0]:e,y.merge(this,y.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),D.test(r[1])&&y.isPlainObject(e))for(r in e)y.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(o=a.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y.isFunction(t)?void 0!==n.ready?n.ready(t):t(y):y.makeArray(t,this)}).prototype=y.fn,M=y(a);var z=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}y.fn.extend({has:function(t){var e=y(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(y.contains(this,e[t]))return!0})},closest:function(t,e){var n,r=0,o=this.length,i=[],a="string"!=typeof t&&y(t);if(!O.test(t))for(;r<o;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&y.find.matchesSelector(n,t))){i.push(n);break}return this.pushStack(i.length>1?y.uniqueSort(i):i)},index:function(t){return t?"string"==typeof t?f.call(y(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(y.uniqueSort(y.merge(this.get(),y(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),y.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,n){return T(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,n){return T(t,"nextSibling",n)},prevUntil:function(t,e,n){return T(t,"previousSibling",n)},siblings:function(t){return E((t.parentNode||{}).firstChild,t)},children:function(t){return E(t.firstChild)},contents:function(t){return t.contentDocument||y.merge([],t.childNodes)}},function(t,e){y.fn[t]=function(n,r){var o=y.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=y.filter(r,o)),this.length>1&&(B[t]||y.uniqueSort(o),z.test(t)&&o.reverse()),this.pushStack(o)}});var P=/[^\x20\t\r\n\f]+/g;function L(t){return t}function H(t){throw t}function F(t,e,n){var r;try{t&&y.isFunction(r=t.promise)?r.call(t).done(e).fail(n):t&&y.isFunction(r=t.then)?r.call(t,e,n):e.call(void 0,t)}catch(t){n.call(void 0,t)}}y.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return y.each(t.match(P)||[],function(t,n){e[n]=!0}),e}(t):y.extend({},t);var e,n,r,o,i=[],a=[],u=-1,s=function(){for(o=t.once,r=e=!0;a.length;u=-1)for(n=a.shift();++u<i.length;)!1===i[u].apply(n[0],n[1])&&t.stopOnFalse&&(u=i.length,n=!1);t.memory||(n=!1),e=!1,o&&(i=n?[]:"")},c={add:function(){return i&&(n&&!e&&(u=i.length-1,a.push(n)),function e(n){y.each(n,function(n,r){y.isFunction(r)?t.unique&&c.has(r)||i.push(r):r&&r.length&&"string"!==y.type(r)&&e(r)})}(arguments),n&&!e&&s()),this},remove:function(){return y.each(arguments,function(t,e){for(var n;(n=y.inArray(e,i,n))>-1;)i.splice(n,1),n<=u&&u--}),this},has:function(t){return t?y.inArray(t,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||e||(i=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},y.extend({Deferred:function(t){var e=[["notify","progress",y.Callbacks("memory"),y.Callbacks("memory"),2],["resolve","done",y.Callbacks("once memory"),y.Callbacks("once memory"),0,"resolved"],["reject","fail",y.Callbacks("once memory"),y.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return y.Deferred(function(n){y.each(e,function(e,r){var o=y.isFunction(t[r[4]])&&t[r[4]];i[r[1]](function(){var t=o&&o.apply(this,arguments);t&&y.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,r,o){var i=0;function a(t,e,r,o){return function(){var u=this,s=arguments,c=function(){var n,c;if(!(t<i)){if((n=r.apply(u,s))===e.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==_typeof(n)||"function"==typeof n)&&n.then,y.isFunction(c)?o?c.call(n,a(i,e,L,o),a(i,e,H,o)):(i++,c.call(n,a(i,e,L,o),a(i,e,H,o),a(i,e,L,e.notifyWith))):(r!==L&&(u=void 0,s=[n]),(o||e.resolveWith)(u,s))}},l=o?c:function(){try{c()}catch(n){y.Deferred.exceptionHook&&y.Deferred.exceptionHook(n,l.stackTrace),t+1>=i&&(r!==H&&(u=void 0,s=[n]),e.rejectWith(u,s))}};t?l():(y.Deferred.getStackHook&&(l.stackTrace=y.Deferred.getStackHook()),n.setTimeout(l))}}return y.Deferred(function(n){e[0][3].add(a(0,n,y.isFunction(o)?o:L,n.notifyWith)),e[1][3].add(a(0,n,y.isFunction(t)?t:L)),e[2][3].add(a(0,n,y.isFunction(r)?r:H))}).promise()},promise:function(t){return null!=t?y.extend(t,o):o}},i={};return y.each(e,function(t,n){var a=n[2],u=n[5];o[n[1]]=a.add,u&&a.add(function(){r=u},e[3-t][2].disable,e[0][2].lock),a.add(n[3].fire),i[n[0]]=function(){return i[n[0]+"With"](this===i?void 0:this,arguments),this},i[n[0]+"With"]=a.fireWith}),o.promise(i),t&&t.call(i,i),i},when:function(t){var e=arguments.length,n=e,r=Array(n),o=s.call(arguments),i=y.Deferred(),a=function(t){return function(n){r[t]=this,o[t]=arguments.length>1?s.call(arguments):n,--e||i.resolveWith(r,o)}};if(e<=1&&(F(t,i.done(a(n)).resolve,i.reject),"pending"===i.state()||y.isFunction(o[n]&&o[n].then)))return i.then();for(;n--;)F(o[n],a(n),i.reject);return i.promise()}});var V=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;y.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&V.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},y.readyException=function(t){n.setTimeout(function(){throw t})};var j=y.Deferred();function U(){a.removeEventListener("DOMContentLoaded",U),n.removeEventListener("load",U),y.ready()}y.fn.ready=function(t){return j.then(t).catch(function(t){y.readyException(t)}),this},y.extend({isReady:!1,readyWait:1,holdReady:function(t){t?y.readyWait++:y.ready(!0)},ready:function(t){(!0===t?--y.readyWait:y.isReady)||(y.isReady=!0,!0!==t&&--y.readyWait>0||j.resolveWith(a,[y]))}}),y.ready.then=j.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(y.ready):(a.addEventListener("DOMContentLoaded",U),n.addEventListener("load",U));var W=function t(e,n,r,o,i,a,u){var s=0,c=e.length,l=null==r;if("object"===y.type(r))for(s in i=!0,r)t(e,n,s,r[s],!0,a,u);else if(void 0!==o&&(i=!0,y.isFunction(o)||(u=!0),l&&(u?(n.call(e,o),n=null):(l=n,n=function(t,e,n){return l.call(y(t),n)})),n))for(;s<c;s++)n(e[s],r,u?o:o.call(e[s],s,n(e[s],r)));return i?e:l?n.call(e):c?n(e[0],r):a},q=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function Y(){this.expando=y.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(t){var e=t[this.expando];return e||(e={},q(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,o=this.cache(t);if("string"==typeof e)o[y.camelCase(e)]=n;else for(r in e)o[y.camelCase(r)]=e[r];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][y.camelCase(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=y.isArray(e)?e.map(y.camelCase):(e=y.camelCase(e))in r?[e]:e.match(P)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||y.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!y.isEmptyObject(e)}};var $=new Y,G=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,X=/[A-Z]/g;function J(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(X,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:K.test(t)?JSON.parse(t):t)}(n)}catch(t){}G.set(t,e,n)}else n=void 0;return n}y.extend({hasData:function(t){return G.hasData(t)||$.hasData(t)},data:function(t,e,n){return G.access(t,e,n)},removeData:function(t,e){G.remove(t,e)},_data:function(t,e,n){return $.access(t,e,n)},_removeData:function(t,e){$.remove(t,e)}}),y.fn.extend({data:function(t,e){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===t){if(this.length&&(o=G.get(i),1===i.nodeType&&!$.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=y.camelCase(r.slice(5)),J(i,r,o[r]));$.set(i,"hasDataAttrs",!0)}return o}return"object"==_typeof(t)?this.each(function(){G.set(this,t)}):W(this,function(e){var n;if(i&&void 0===e)return void 0!==(n=G.get(i,t))?n:void 0!==(n=J(i,t))?n:void 0;this.each(function(){G.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){G.remove(this,t)})}}),y.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=$.get(t,e),n&&(!r||y.isArray(n)?r=$.access(t,e,y.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=y.queue(t,e),r=n.length,o=n.shift(),i=y._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===e&&n.unshift("inprogress"),delete i.stop,o.call(t,function(){y.dequeue(t,e)},i)),!r&&i&&i.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return $.get(t,n)||$.access(t,n,{empty:y.Callbacks("once memory").add(function(){$.remove(t,[e+"queue",n])})})}}),y.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?y.queue(this[0],t):void 0===e?this:this.each(function(){var n=y.queue(this,t,e);y._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&y.dequeue(this,t)})},dequeue:function(t){return this.each(function(){y.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,o=y.Deferred(),i=this,a=this.length,u=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=$.get(i[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(u));return u(),o.promise(e)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Z=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),tt=["Top","Right","Bottom","Left"],et=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&y.contains(t.ownerDocument,t)&&"none"===y.css(t,"display")},nt=function(t,e,n,r){var o,i,a={};for(i in e)a[i]=t.style[i],t.style[i]=e[i];for(i in o=n.apply(t,r||[]),e)t.style[i]=a[i];return o};function rt(t,e,n,r){var o,i=1,a=20,u=r?function(){return r.cur()}:function(){return y.css(t,e,"")},s=u(),c=n&&n[3]||(y.cssNumber[e]?"":"px"),l=(y.cssNumber[e]||"px"!==c&&+s)&&Z.exec(y.css(t,e));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+s||1;do{l/=i=i||".5",y.style(t,e,l+c)}while(i!==(i=u()/s)&&1!==i&&--a)}return n&&(l=+l||+s||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=o)),o}var ot={};function it(t){var e,n=t.ownerDocument,r=t.nodeName,o=ot[r];return o||(e=n.body.appendChild(n.createElement(r)),o=y.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),ot[r]=o,o)}function at(t,e){for(var n,r,o=[],i=0,a=t.length;i<a;i++)(r=t[i]).style&&(n=r.style.display,e?("none"===n&&(o[i]=$.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&et(r)&&(o[i]=it(r))):"none"!==n&&(o[i]="none",$.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(t[i].style.display=o[i]);return t}y.fn.extend({show:function(){return at(this,!0)},hide:function(){return at(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){et(this)?y(this).show():y(this).hide()})}});var ut=/^(?:checkbox|radio)$/i,st=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ct=/^$|\/(?:java|ecma)script/i,lt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ft(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&y.nodeName(t,e)?y.merge([t],n):n}function dt(t,e){for(var n=0,r=t.length;n<r;n++)$.set(t[n],"globalEval",!e||$.get(e[n],"globalEval"))}lt.optgroup=lt.option,lt.tbody=lt.tfoot=lt.colgroup=lt.caption=lt.thead,lt.th=lt.td;var ht,mt,pt=/<|&#?\w+;/;function gt(t,e,n,r,o){for(var i,a,u,s,c,l,f=e.createDocumentFragment(),d=[],h=0,m=t.length;h<m;h++)if((i=t[h])||0===i)if("object"===y.type(i))y.merge(d,i.nodeType?[i]:i);else if(pt.test(i)){for(a=a||f.appendChild(e.createElement("div")),u=(st.exec(i)||["",""])[1].toLowerCase(),s=lt[u]||lt._default,a.innerHTML=s[1]+y.htmlPrefilter(i)+s[2],l=s[0];l--;)a=a.lastChild;y.merge(d,a.childNodes),(a=f.firstChild).textContent=""}else d.push(e.createTextNode(i));for(f.textContent="",h=0;i=d[h++];)if(r&&y.inArray(i,r)>-1)o&&o.push(i);else if(c=y.contains(i.ownerDocument,i),a=ft(f.appendChild(i),"script"),c&&dt(a),n)for(l=0;i=a[l++];)ct.test(i.type||"")&&n.push(i);return f}ht=a.createDocumentFragment().appendChild(a.createElement("div")),(mt=a.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),ht.appendChild(mt),v.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue;var vt=a.documentElement,bt=/^key/,yt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xt=/^([^.]*)(?:\.(.+)|)/;function wt(){return!0}function Ct(){return!1}function _t(){try{return a.activeElement}catch(t){}}function kt(t,e,n,r,o,i){var a,u;if("object"==_typeof(e)){for(u in"string"!=typeof n&&(r=r||n,n=void 0),e)kt(t,u,n,r,e[u],i);return t}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Ct;else if(!o)return t;return 1===i&&(a=o,(o=function(t){return y().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=y.guid++)),t.each(function(){y.event.add(this,e,o,r,n)})}y.event={global:{},add:function(t,e,n,r,o){var i,a,u,s,c,l,f,d,h,m,p,g=$.get(t);if(g)for(n.handler&&(n=(i=n).handler,o=i.selector),o&&y.find.matchesSelector(vt,o),n.guid||(n.guid=y.guid++),(s=g.events)||(s=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==y&&y.event.triggered!==e.type?y.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(P)||[""]).length;c--;)h=p=(u=xt.exec(e[c])||[])[1],m=(u[2]||"").split(".").sort(),h&&(f=y.event.special[h]||{},h=(o?f.delegateType:f.bindType)||h,f=y.event.special[h]||{},l=y.extend({type:h,origType:p,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&y.expr.match.needsContext.test(o),namespace:m.join(".")},i),(d=s[h])||((d=s[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,m,a)||t.addEventListener&&t.addEventListener(h,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,l):d.push(l),y.event.global[h]=!0)},remove:function(t,e,n,r,o){var i,a,u,s,c,l,f,d,h,m,p,g=$.hasData(t)&&$.get(t);if(g&&(s=g.events)){for(c=(e=(e||"").match(P)||[""]).length;c--;)if(h=p=(u=xt.exec(e[c])||[])[1],m=(u[2]||"").split(".").sort(),h){for(f=y.event.special[h]||{},d=s[h=(r?f.delegateType:f.bindType)||h]||[],u=u[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=d.length;i--;)l=d[i],!o&&p!==l.origType||n&&n.guid!==l.guid||u&&!u.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(i,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(t,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,m,g.handle)||y.removeEvent(t,h,g.handle),delete s[h])}else for(h in s)y.event.remove(t,h+e[c],n,r,!0);y.isEmptyObject(s)&&$.remove(t,"handle events")}},dispatch:function(t){var e,n,r,o,i,a,u=y.event.fix(t),s=new Array(arguments.length),c=($.get(this,"events")||{})[u.type]||[],l=y.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=y.event.handlers.call(this,u,c),e=0;(o=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!u.rnamespace.test(i.namespace)||(u.handleObj=i,u.data=i.data,void 0!==(r=((y.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,o,i,a,u=[],s=e.delegateCount,c=t.target;if(s&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(i=[],a={},n=0;n<s;n++)void 0===a[o=(r=e[n]).selector+" "]&&(a[o]=r.needsContext?y(o,this).index(c)>-1:y.find(o,this,null,[c]).length),a[o]&&i.push(r);i.length&&u.push({elem:c,handlers:i})}return c=this,s<e.length&&u.push({elem:c,handlers:e.slice(s)}),u},addProp:function(t,e){Object.defineProperty(y.Event.prototype,t,{enumerable:!0,configurable:!0,get:y.isFunction(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[y.expando]?t:new y.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==_t()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===_t()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&y.nodeName(this,"input"))return this.click(),!1},_default:function(t){return y.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},y.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},y.Event=function(t,e){if(!(this instanceof y.Event))return new y.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?wt:Ct,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&y.extend(this,e),this.timeStamp=t&&t.timeStamp||y.now(),this[y.expando]=!0},y.Event.prototype={constructor:y.Event,isDefaultPrevented:Ct,isPropagationStopped:Ct,isImmediatePropagationStopped:Ct,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=wt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=wt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=wt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},y.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&bt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&yt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},y.event.addProp),y.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){y.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,o=t.handleObj;return r&&(r===this||y.contains(this,r))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),y.fn.extend({on:function(t,e,n,r){return kt(this,t,e,n,r)},one:function(t,e,n,r){return kt(this,t,e,n,r,1)},off:function(t,e,n){var r,o;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,y(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==_typeof(t)){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ct),this.each(function(){y.event.remove(this,t,n,e)})}});var St=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Tt=/<script|<style|<link/i,Et=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^true\/(.*)/,Dt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Nt(t,e){return y.nodeName(t,"table")&&y.nodeName(11!==e.nodeType?e:e.firstChild,"tr")&&t.getElementsByTagName("tbody")[0]||t}function At(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){var e=Ot.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function It(t,e){var n,r,o,i,a,u,s,c;if(1===e.nodeType){if($.hasData(t)&&(i=$.access(t),a=$.set(e,i),c=i.events))for(o in delete a.handle,a.events={},c)for(n=0,r=c[o].length;n<r;n++)y.event.add(e,o,c[o][n]);G.hasData(t)&&(u=G.access(t),s=y.extend({},u),G.set(e,s))}}function zt(t,e,n,r){e=c.apply([],e);var o,i,a,u,s,l,f=0,d=t.length,h=d-1,m=e[0],p=y.isFunction(m);if(p||d>1&&"string"==typeof m&&!v.checkClone&&Et.test(m))return t.each(function(o){var i=t.eq(o);p&&(e[0]=m.call(this,o,i.html())),zt(i,e,n,r)});if(d&&(i=(o=gt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(u=(a=y.map(ft(o,"script"),At)).length;f<d;f++)s=o,f!==h&&(s=y.clone(s,!0,!0),u&&y.merge(a,ft(s,"script"))),n.call(t[f],s,f);if(u)for(l=a[a.length-1].ownerDocument,y.map(a,Mt),f=0;f<u;f++)s=a[f],ct.test(s.type||"")&&!$.access(s,"globalEval")&&y.contains(l,s)&&(s.src?y._evalUrl&&y._evalUrl(s.src):b(s.textContent.replace(Dt,""),l))}return t}function Bt(t,e,n){for(var r,o=e?y.filter(e,t):t,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||y.cleanData(ft(r)),r.parentNode&&(n&&y.contains(r.ownerDocument,r)&&dt(ft(r,"script")),r.parentNode.removeChild(r));return t}y.extend({htmlPrefilter:function(t){return t.replace(St,"<$1></$2>")},clone:function(t,e,n){var r,o,i,a,u,s,c,l=t.cloneNode(!0),f=y.contains(t.ownerDocument,t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||y.isXMLDoc(t)))for(a=ft(l),r=0,o=(i=ft(t)).length;r<o;r++)u=i[r],void 0,"input"===(c=(s=a[r]).nodeName.toLowerCase())&&ut.test(u.type)?s.checked=u.checked:"input"!==c&&"textarea"!==c||(s.defaultValue=u.defaultValue);if(e)if(n)for(i=i||ft(t),a=a||ft(l),r=0,o=i.length;r<o;r++)It(i[r],a[r]);else It(t,l);return(a=ft(l,"script")).length>0&&dt(a,!f&&ft(t,"script")),l},cleanData:function(t){for(var e,n,r,o=y.event.special,i=0;void 0!==(n=t[i]);i++)if(q(n)){if(e=n[$.expando]){if(e.events)for(r in e.events)o[r]?y.event.remove(n,r):y.removeEvent(n,r,e.handle);n[$.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),y.fn.extend({detach:function(t){return Bt(this,t,!0)},remove:function(t){return Bt(this,t)},text:function(t){return W(this,function(t){return void 0===t?y.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return zt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Nt(this,t).appendChild(t)})},prepend:function(){return zt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Nt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return zt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return zt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(y.cleanData(ft(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return y.clone(this,t,e)})},html:function(t){return W(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Tt.test(t)&&!lt[(st.exec(t)||["",""])[1].toLowerCase()]){t=y.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(y.cleanData(ft(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return zt(this,arguments,function(e){var n=this.parentNode;y.inArray(this,t)<0&&(y.cleanData(ft(this)),n&&n.replaceChild(e,this))},t)}}),y.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){y.fn[t]=function(t){for(var n,r=[],o=y(t),i=o.length-1,a=0;a<=i;a++)n=a===i?this:this.clone(!0),y(o[a])[e](n),l.apply(r,n.get());return this.pushStack(r)}});var Rt=/^margin/,Pt=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),Lt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)};function Ht(t,e,n){var r,o,i,a,u=t.style;return(n=n||Lt(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||y.contains(t.ownerDocument,t)||(a=y.style(t,e)),!v.pixelMarginRight()&&Pt.test(a)&&Rt.test(e)&&(r=u.width,o=u.minWidth,i=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=o,u.maxWidth=i)),void 0!==a?a+"":a}function Ft(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",vt.appendChild(u);var t=n.getComputedStyle(s);e="1%"!==t.top,i="2px"===t.marginLeft,r="4px"===t.width,s.style.marginRight="50%",o="4px"===t.marginRight,vt.removeChild(u),s=null}}var e,r,o,i,u=a.createElement("div"),s=a.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===s.style.backgroundClip,u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.appendChild(s),y.extend(v,{pixelPosition:function(){return t(),e},boxSizingReliable:function(){return t(),r},pixelMarginRight:function(){return t(),o},reliableMarginLeft:function(){return t(),i}}))}();var Vt=/^(none|table(?!-c[ea]).+)/,jt={position:"absolute",visibility:"hidden",display:"block"},Ut={letterSpacing:"0",fontWeight:"400"},Wt=["Webkit","Moz","ms"],qt=a.createElement("div").style;function Yt(t){if(t in qt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=Wt.length;n--;)if((t=Wt[n]+e)in qt)return t}function $t(t,e,n){var r=Z.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function Gt(t,e,n,r,o){var i,a=0;for(i=n===(r?"border":"content")?4:"width"===e?1:0;i<4;i+=2)"margin"===n&&(a+=y.css(t,n+tt[i],!0,o)),r?("content"===n&&(a-=y.css(t,"padding"+tt[i],!0,o)),"margin"!==n&&(a-=y.css(t,"border"+tt[i]+"Width",!0,o))):(a+=y.css(t,"padding"+tt[i],!0,o),"padding"!==n&&(a+=y.css(t,"border"+tt[i]+"Width",!0,o)));return a}function Kt(t,e,n){var r,o=!0,i=Lt(t),a="border-box"===y.css(t,"boxSizing",!1,i);if(t.getClientRects().length&&(r=t.getBoundingClientRect()[e]),r<=0||null==r){if(((r=Ht(t,e,i))<0||null==r)&&(r=t.style[e]),Pt.test(r))return r;o=a&&(v.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+Gt(t,e,n||(a?"border":"content"),o,i)+"px"}function Xt(t,e,n,r,o){return new Xt.prototype.init(t,e,n,r,o)}y.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ht(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,i,a,u=y.camelCase(e),s=t.style;if(e=y.cssProps[u]||(y.cssProps[u]=Yt(u)||u),a=y.cssHooks[e]||y.cssHooks[u],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(t,!1,r))?o:s[e];"string"===(i=_typeof(n))&&(o=Z.exec(n))&&o[1]&&(n=rt(t,e,o),i="number"),null!=n&&n==n&&("number"===i&&(n+=o&&o[3]||(y.cssNumber[u]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(s[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(s[e]=n))}},css:function(t,e,n,r){var o,i,a,u=y.camelCase(e);return e=y.cssProps[u]||(y.cssProps[u]=Yt(u)||u),(a=y.cssHooks[e]||y.cssHooks[u])&&"get"in a&&(o=a.get(t,!0,n)),void 0===o&&(o=Ht(t,e,r)),"normal"===o&&e in Ut&&(o=Ut[e]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),y.each(["height","width"],function(t,e){y.cssHooks[e]={get:function(t,n,r){if(n)return!Vt.test(y.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Kt(t,e,r):nt(t,jt,function(){return Kt(t,e,r)})},set:function(t,n,r){var o,i=r&&Lt(t),a=r&&Gt(t,e,r,"border-box"===y.css(t,"boxSizing",!1,i),i);return a&&(o=Z.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=y.css(t,e)),$t(0,n,a)}}}),y.cssHooks.marginLeft=Ft(v.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Ht(t,"marginLeft"))||t.getBoundingClientRect().left-nt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),y.each({margin:"",padding:"",border:"Width"},function(t,e){y.cssHooks[t+e]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[t+tt[r]+e]=i[r]||i[r-2]||i[0];return o}},Rt.test(t)||(y.cssHooks[t+e].set=$t)}),y.fn.extend({css:function(t,e){return W(this,function(t,e,n){var r,o,i={},a=0;if(y.isArray(e)){for(r=Lt(t),o=e.length;a<o;a++)i[e[a]]=y.css(t,e[a],!1,r);return i}return void 0!==n?y.style(t,e,n):y.css(t,e)},t,e,arguments.length>1)}}),y.Tween=Xt,Xt.prototype={constructor:Xt,init:function(t,e,n,r,o,i){this.elem=t,this.prop=n,this.easing=o||y.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=i||(y.cssNumber[n]?"":"px")},cur:function(){var t=Xt.propHooks[this.prop];return t&&t.get?t.get(this):Xt.propHooks._default.get(this)},run:function(t){var e,n=Xt.propHooks[this.prop];return this.options.duration?this.pos=e=y.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Xt.propHooks._default.set(this),this}},Xt.prototype.init.prototype=Xt.prototype,Xt.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=y.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){y.fx.step[t.prop]?y.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[y.cssProps[t.prop]]&&!y.cssHooks[t.prop]?t.elem[t.prop]=t.now:y.style(t.elem,t.prop,t.now+t.unit)}}},Xt.propHooks.scrollTop=Xt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},y.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},y.fx=Xt.prototype.init,y.fx.step={};var Jt,Qt,Zt=/^(?:toggle|show|hide)$/,te=/queueHooks$/;function ee(){Qt&&(n.requestAnimationFrame(ee),y.fx.tick())}function ne(){return n.setTimeout(function(){Jt=void 0}),Jt=y.now()}function re(t,e){var n,r=0,o={height:t};for(e=e?1:0;r<4;r+=2-e)o["margin"+(n=tt[r])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function oe(t,e,n){for(var r,o=(ie.tweeners[e]||[]).concat(ie.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,e,t))return r}function ie(t,e,n){var r,o,i=0,a=ie.prefilters.length,u=y.Deferred().always(function(){delete s.elem}),s=function(){if(o)return!1;for(var e=Jt||ne(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),i=0,a=c.tweens.length;i<a;i++)c.tweens[i].run(r);return u.notifyWith(t,[c,r,n]),r<1&&a?n:(u.resolveWith(t,[c]),!1)},c=u.promise({elem:t,props:y.extend({},e),opts:y.extend(!0,{specialEasing:{},easing:y.easing._default},n),originalProperties:e,originalOptions:n,startTime:Jt||ne(),duration:n.duration,tweens:[],createTween:function(e,n){var r=y.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)c.tweens[n].run(1);return e?(u.notifyWith(t,[c,1,0]),u.resolveWith(t,[c,e])):u.rejectWith(t,[c,e]),this}}),l=c.props;for(function(t,e){var n,r,o,i,a;for(n in t)if(o=e[r=y.camelCase(n)],i=t[n],y.isArray(i)&&(o=i[1],i=t[n]=i[0]),n!==r&&(t[r]=i,delete t[n]),(a=y.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete t[r],i)n in t||(t[n]=i[n],e[n]=o);else e[r]=o}(l,c.opts.specialEasing);i<a;i++)if(r=ie.prefilters[i].call(c,t,l,c.opts))return y.isFunction(r.stop)&&(y._queueHooks(c.elem,c.opts.queue).stop=y.proxy(r.stop,r)),r;return y.map(l,oe,c),y.isFunction(c.opts.start)&&c.opts.start.call(t,c),y.fx.timer(y.extend(s,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}y.Animation=y.extend(ie,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return rt(n.elem,t,Z.exec(e),n),n}]},tweener:function(t,e){y.isFunction(t)?(e=t,t=["*"]):t=t.match(P);for(var n,r=0,o=t.length;r<o;r++)n=t[r],ie.tweeners[n]=ie.tweeners[n]||[],ie.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,o,i,a,u,s,c,l,f="width"in e||"height"in e,d=this,h={},m=t.style,p=t.nodeType&&et(t),g=$.get(t,"fxshow");for(r in n.queue||(null==(a=y._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,y.queue(t,"fx").length||a.empty.fire()})})),e)if(o=e[r],Zt.test(o)){if(delete e[r],i=i||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!g||void 0===g[r])continue;p=!0}h[r]=g&&g[r]||y.style(t,r)}if((s=!y.isEmptyObject(e))||!y.isEmptyObject(h))for(r in f&&1===t.nodeType&&(n.overflow=[m.overflow,m.overflowX,m.overflowY],null==(c=g&&g.display)&&(c=$.get(t,"display")),"none"===(l=y.css(t,"display"))&&(c?l=c:(at([t],!0),c=t.style.display||c,l=y.css(t,"display"),at([t]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===y.css(t,"float")&&(s||(d.done(function(){m.display=c}),null==c&&(l=m.display,c="none"===l?"":l)),m.display="inline-block")),n.overflow&&(m.overflow="hidden",d.always(function(){m.overflow=n.overflow[0],m.overflowX=n.overflow[1],m.overflowY=n.overflow[2]})),s=!1,h)s||(g?"hidden"in g&&(p=g.hidden):g=$.access(t,"fxshow",{display:c}),i&&(g.hidden=!p),p&&at([t],!0),d.done(function(){for(r in p||at([t]),$.remove(t,"fxshow"),h)y.style(t,r,h[r])})),s=oe(p?g[r]:0,r,d),r in g||(g[r]=s.start,p&&(s.end=s.start,s.start=0))}],prefilter:function(t,e){e?ie.prefilters.unshift(t):ie.prefilters.push(t)}}),y.speed=function(t,e,n){var r=t&&"object"==_typeof(t)?y.extend({},t):{complete:n||!n&&e||y.isFunction(t)&&t,duration:t,easing:n&&e||e&&!y.isFunction(e)&&e};return y.fx.off||a.hidden?r.duration=0:"number"!=typeof r.duration&&(r.duration in y.fx.speeds?r.duration=y.fx.speeds[r.duration]:r.duration=y.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y.isFunction(r.old)&&r.old.call(this),r.queue&&y.dequeue(this,r.queue)},r},y.fn.extend({fadeTo:function(t,e,n,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var o=y.isEmptyObject(t),i=y.speed(e,n,r),a=function(){var e=ie(this,y.extend({},t),i);(o||$.get(this,"finish"))&&e.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",i=y.timers,a=$.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&te.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=t&&i[o].queue!==t||(i[o].anim.stop(n),e=!1,i.splice(o,1));!e&&n||y.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=$.get(this),r=n[t+"queue"],o=n[t+"queueHooks"],i=y.timers,a=r?r.length:0;for(n.finish=!0,y.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===t&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),y.each(["toggle","show","hide"],function(t,e){var n=y.fn[e];y.fn[e]=function(t,r,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(re(e,!0),t,r,o)}}),y.each({slideDown:re("show"),slideUp:re("hide"),slideToggle:re("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){y.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),y.timers=[],y.fx.tick=function(){var t,e=0,n=y.timers;for(Jt=y.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||y.fx.stop(),Jt=void 0},y.fx.timer=function(t){y.timers.push(t),t()?y.fx.start():y.timers.pop()},y.fx.interval=13,y.fx.start=function(){Qt||(Qt=n.requestAnimationFrame?n.requestAnimationFrame(ee):n.setInterval(y.fx.tick,y.fx.interval))},y.fx.stop=function(){n.cancelAnimationFrame?n.cancelAnimationFrame(Qt):n.clearInterval(Qt),Qt=null},y.fx.speeds={slow:600,fast:200,_default:400},y.fn.delay=function(t,e){return t=y.fx&&y.fx.speeds[t]||t,e=e||"fx",this.queue(e,function(e,r){var o=n.setTimeout(e,t);r.stop=function(){n.clearTimeout(o)}})},function(){var t=a.createElement("input"),e=a.createElement("select").appendChild(a.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=a.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var ae,ue=y.expr.attrHandle;y.fn.extend({attr:function(t,e){return W(this,y.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){y.removeAttr(this,t)})}}),y.extend({attr:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===t.getAttribute?y.prop(t,e,n):(1===i&&y.isXMLDoc(t)||(o=y.attrHooks[e.toLowerCase()]||(y.expr.match.bool.test(e)?ae:void 0)),void 0!==n?null===n?void y.removeAttr(t,e):o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(r=o.get(t,e))?r:null==(r=y.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&y.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,o=e&&e.match(P);if(o&&1===t.nodeType)for(;n=o[r++];)t.removeAttribute(n)}}),ae={set:function(t,e,n){return!1===e?y.removeAttr(t,n):t.setAttribute(n,n),n}},y.each(y.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ue[e]||y.find.attr;ue[e]=function(t,e,r){var o,i,a=e.toLowerCase();return r||(i=ue[a],ue[a]=o,o=null!=n(t,e,r)?a:null,ue[a]=i),o}});var se=/^(?:input|select|textarea|button)$/i,ce=/^(?:a|area)$/i;function le(t){return(t.match(P)||[]).join(" ")}function fe(t){return t.getAttribute&&t.getAttribute("class")||""}y.fn.extend({prop:function(t,e){return W(this,y.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[y.propFix[t]||t]})}}),y.extend({prop:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&y.isXMLDoc(t)||(e=y.propFix[e]||e,o=y.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:t[e]=n:o&&"get"in o&&null!==(r=o.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=y.find.attr(t,"tabindex");return e?parseInt(e,10):se.test(t.nodeName)||ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(y.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),y.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){y.propFix[this.toLowerCase()]=this}),y.fn.extend({addClass:function(t){var e,n,r,o,i,a,u,s=0;if(y.isFunction(t))return this.each(function(e){y(this).addClass(t.call(this,e,fe(this)))});if("string"==typeof t&&t)for(e=t.match(P)||[];n=this[s++];)if(o=fe(n),r=1===n.nodeType&&" "+le(o)+" "){for(a=0;i=e[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");o!==(u=le(r))&&n.setAttribute("class",u)}return this},removeClass:function(t){var e,n,r,o,i,a,u,s=0;if(y.isFunction(t))return this.each(function(e){y(this).removeClass(t.call(this,e,fe(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(P)||[];n=this[s++];)if(o=fe(n),r=1===n.nodeType&&" "+le(o)+" "){for(a=0;i=e[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");o!==(u=le(r))&&n.setAttribute("class",u)}return this},toggleClass:function(t,e){var n=_typeof(t);return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):y.isFunction(t)?this.each(function(n){y(this).toggleClass(t.call(this,n,fe(this),e),e)}):this.each(function(){var e,r,o,i;if("string"===n)for(r=0,o=y(this),i=t.match(P)||[];e=i[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=fe(this))&&$.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":$.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+le(fe(n))+" ").indexOf(e)>-1)return!0;return!1}});var de=/\r/g;y.fn.extend({val:function(t){var e,n,r,o=this[0];return arguments.length?(r=y.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=r?t.call(this,n,y(this).val()):t)?o="":"number"==typeof o?o+="":y.isArray(o)&&(o=y.map(o,function(t){return null==t?"":t+""})),(e=y.valHooks[this.type]||y.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=y.valHooks[o.type]||y.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(de,""):null==n?"":n:void 0}}),y.extend({valHooks:{option:{get:function(t){var e=y.find.attr(t,"value");return null!=e?e:le(y.text(t))}},select:{get:function(t){var e,n,r,o=t.options,i=t.selectedIndex,a="select-one"===t.type,u=a?null:[],s=a?i+1:o.length;for(r=i<0?s:a?i:0;r<s;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!y.nodeName(n.parentNode,"optgroup"))){if(e=y(n).val(),a)return e;u.push(e)}return u},set:function(t,e){for(var n,r,o=t.options,i=y.makeArray(e),a=o.length;a--;)((r=o[a]).selected=y.inArray(y.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(t.selectedIndex=-1),i}}}}),y.each(["radio","checkbox"],function(){y.valHooks[this]={set:function(t,e){if(y.isArray(e))return t.checked=y.inArray(y(t).val(),e)>-1}},v.checkOn||(y.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var he=/^(?:focusinfocus|focusoutblur)$/;y.extend(y.event,{trigger:function(t,e,r,o){var i,u,s,c,l,f,d,h=[r||a],p=m.call(t,"type")?t.type:t,g=m.call(t,"namespace")?t.namespace.split("."):[];if(u=s=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!he.test(p+y.event.triggered)&&(p.indexOf(".")>-1&&(g=p.split("."),p=g.shift(),g.sort()),l=p.indexOf(":")<0&&"on"+p,(t=t[y.expando]?t:new y.Event(p,"object"==_typeof(t)&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:y.makeArray(e,[t]),d=y.event.special[p]||{},o||!d.trigger||!1!==d.trigger.apply(r,e))){if(!o&&!d.noBubble&&!y.isWindow(r)){for(c=d.delegateType||p,he.test(c+p)||(u=u.parentNode);u;u=u.parentNode)h.push(u),s=u;s===(r.ownerDocument||a)&&h.push(s.defaultView||s.parentWindow||n)}for(i=0;(u=h[i++])&&!t.isPropagationStopped();)t.type=i>1?c:d.bindType||p,(f=($.get(u,"events")||{})[t.type]&&$.get(u,"handle"))&&f.apply(u,e),(f=l&&u[l])&&f.apply&&q(u)&&(t.result=f.apply(u,e),!1===t.result&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),e)||!q(r)||l&&y.isFunction(r[p])&&!y.isWindow(r)&&((s=r[l])&&(r[l]=null),y.event.triggered=p,r[p](),y.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,e,n){var r=y.extend(new y.Event,n,{type:t,isSimulated:!0});y.event.trigger(r,null,e)}}),y.fn.extend({trigger:function(t,e){return this.each(function(){y.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return y.event.trigger(t,e,n,!0)}}),y.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){y.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),y.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),v.focusin="onfocusin"in n,v.focusin||y.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){y.event.simulate(e,t.target,y.event.fix(t))};y.event.special[e]={setup:function(){var r=this.ownerDocument||this,o=$.access(r,e);o||r.addEventListener(t,n,!0),$.access(r,e,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=$.access(r,e)-1;o?$.access(r,e,o):(r.removeEventListener(t,n,!0),$.remove(r,e))}}});var me=n.location,pe=y.now(),ge=/\?/;y.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||y.error("Invalid XML: "+t),e};var ve=/\[\]$/,be=/\r?\n/g,ye=/^(?:submit|button|image|reset|file)$/i,xe=/^(?:input|select|textarea|keygen)/i;function we(t,e,n,r){var o;if(y.isArray(e))y.each(e,function(e,o){n||ve.test(t)?r(t,o):we(t+"["+("object"==_typeof(o)&&null!=o?e:"")+"]",o,n,r)});else if(n||"object"!==y.type(e))r(t,e);else for(o in e)we(t+"["+o+"]",e[o],n,r)}y.param=function(t,e){var n,r=[],o=function(t,e){var n=y.isFunction(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(y.isArray(t)||t.jquery&&!y.isPlainObject(t))y.each(t,function(){o(this.name,this.value)});else for(n in t)we(n,t[n],e,o);return r.join("&")},y.fn.extend({serialize:function(){return y.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=y.prop(this,"elements");return t?y.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!y(this).is(":disabled")&&xe.test(this.nodeName)&&!ye.test(t)&&(this.checked||!ut.test(t))}).map(function(t,e){var n=y(this).val();return null==n?null:y.isArray(n)?y.map(n,function(t){return{name:e.name,value:t.replace(be,"\r\n")}}):{name:e.name,value:n.replace(be,"\r\n")}}).get()}});var Ce=/%20/g,_e=/#.*$/,ke=/([?&])_=[^&]*/,Se=/^(.*?):[ \t]*([^\r\n]*)$/gm,Te=/^(?:GET|HEAD)$/,Ee=/^\/\//,Oe={},De={},Ne="*/".concat("*"),Ae=a.createElement("a");function Me(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,o=0,i=e.toLowerCase().match(P)||[];if(y.isFunction(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ie(t,e,n,r){var o={},i=t===De;function a(u){var s;return o[u]=!0,y.each(t[u]||[],function(t,u){var c=u(e,n,r);return"string"!=typeof c||i||o[c]?i?!(s=c):void 0:(e.dataTypes.unshift(c),a(c),!1)}),s}return a(e.dataTypes[0])||!o["*"]&&a("*")}function ze(t,e){var n,r,o=y.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:r||(r={}))[n]=e[n]);return r&&y.extend(!0,t,r),t}Ae.href=me.href,y.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:me.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ne,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":y.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,y.ajaxSettings),e):ze(y.ajaxSettings,t)},ajaxPrefilter:Me(Oe),ajaxTransport:Me(De),ajax:function(t,e){"object"==_typeof(t)&&(e=t,t=void 0),e=e||{};var r,o,i,u,s,c,l,f,d,h,m=y.ajaxSetup({},e),p=m.context||m,g=m.context&&(p.nodeType||p.jquery)?y(p):y.event,v=y.Deferred(),b=y.Callbacks("once memory"),x=m.statusCode||{},w={},C={},_="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(l){if(!u)for(u={};e=Se.exec(i);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return l?i:null},setRequestHeader:function(t,e){return null==l&&(t=C[t.toLowerCase()]=C[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(m.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)k.always(t[k.status]);else for(e in t)x[e]=[x[e],t[e]];return this},abort:function(t){var e=t||_;return r&&r.abort(e),S(0,e),this}};if(v.promise(k),m.url=((t||m.url||me.href)+"").replace(Ee,me.protocol+"//"),m.type=e.method||e.type||m.method||m.type,m.dataTypes=(m.dataType||"*").toLowerCase().match(P)||[""],null==m.crossDomain){c=a.createElement("a");try{c.href=m.url,c.href=c.href,m.crossDomain=Ae.protocol+"//"+Ae.host!=c.protocol+"//"+c.host}catch(t){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=y.param(m.data,m.traditional)),Ie(Oe,m,e,k),l)return k;for(d in(f=y.event&&m.global)&&0==y.active++&&y.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Te.test(m.type),o=m.url.replace(_e,""),m.hasContent?m.data&&m.processData&&0===(m.contentType||"").indexOf("application/x-www-form-urlencoded")&&(m.data=m.data.replace(Ce,"+")):(h=m.url.slice(o.length),m.data&&(o+=(ge.test(o)?"&":"?")+m.data,delete m.data),!1===m.cache&&(o=o.replace(ke,"$1"),h=(ge.test(o)?"&":"?")+"_="+pe+++h),m.url=o+h),m.ifModified&&(y.lastModified[o]&&k.setRequestHeader("If-Modified-Since",y.lastModified[o]),y.etag[o]&&k.setRequestHeader("If-None-Match",y.etag[o])),(m.data&&m.hasContent&&!1!==m.contentType||e.contentType)&&k.setRequestHeader("Content-Type",m.contentType),k.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Ne+"; q=0.01":""):m.accepts["*"]),m.headers)k.setRequestHeader(d,m.headers[d]);if(m.beforeSend&&(!1===m.beforeSend.call(p,k,m)||l))return k.abort();if(_="abort",b.add(m.complete),k.done(m.success),k.fail(m.error),r=Ie(De,m,e,k)){if(k.readyState=1,f&&g.trigger("ajaxSend",[k,m]),l)return k;m.async&&m.timeout>0&&(s=n.setTimeout(function(){k.abort("timeout")},m.timeout));try{l=!1,r.send(w,S)}catch(t){if(l)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,e,a,u){var c,d,h,w,C,_=e;l||(l=!0,s&&n.clearTimeout(s),r=void 0,i=u||"",k.readyState=t>0?4:0,c=t>=200&&t<300||304===t,a&&(w=function(t,e,n){for(var r,o,i,a,u=t.contents,s=t.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(o in u)if(u[o]&&u[o].test(r)){s.unshift(o);break}if(s[0]in n)i=s[0];else{for(o in n){if(!s[0]||t.converters[o+" "+s[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==s[0]&&s.unshift(i),n[i]}(m,k,a)),w=function(t,e,n,r){var o,i,a,u,s,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(i=l.shift();i;)if(t.responseFields[i]&&(n[t.responseFields[i]]=e),!s&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),s=i,i=l.shift())if("*"===i)i=s;else if("*"!==s&&s!==i){if(!(a=c[s+" "+i]||c["* "+i]))for(o in c)if((u=o.split(" "))[1]===i&&(a=c[s+" "+u[0]]||c["* "+u[0]])){!0===a?a=c[o]:!0!==c[o]&&(i=u[0],l.unshift(u[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+s+" to "+i}}}return{state:"success",data:e}}(m,w,k,c),c?(m.ifModified&&((C=k.getResponseHeader("Last-Modified"))&&(y.lastModified[o]=C),(C=k.getResponseHeader("etag"))&&(y.etag[o]=C)),204===t||"HEAD"===m.type?_="nocontent":304===t?_="notmodified":(_=w.state,d=w.data,c=!(h=w.error))):(h=_,!t&&_||(_="error",t<0&&(t=0))),k.status=t,k.statusText=(e||_)+"",c?v.resolveWith(p,[d,_,k]):v.rejectWith(p,[k,_,h]),k.statusCode(x),x=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[k,m,c?d:h]),b.fireWith(p,[k,_]),f&&(g.trigger("ajaxComplete",[k,m]),--y.active||y.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,n){return y.get(t,e,n,"json")},getScript:function(t,e){return y.get(t,void 0,e,"script")}}),y.each(["get","post"],function(t,e){y[e]=function(t,n,r,o){return y.isFunction(n)&&(o=o||r,r=n,n=void 0),y.ajax(y.extend({url:t,type:e,dataType:o,data:n,success:r},y.isPlainObject(t)&&t))}}),y._evalUrl=function(t){return y.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},y.fn.extend({wrapAll:function(t){var e;return this[0]&&(y.isFunction(t)&&(t=t.call(this[0])),e=y(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return y.isFunction(t)?this.each(function(e){y(this).wrapInner(t.call(this,e))}):this.each(function(){var e=y(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=y.isFunction(t);return this.each(function(n){y(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){y(this).replaceWith(this.childNodes)}),this}}),y.expr.pseudos.hidden=function(t){return!y.expr.pseudos.visible(t)},y.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},y.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Be={0:200,1223:204},Re=y.ajaxSettings.xhr();v.cors=!!Re&&"withCredentials"in Re,v.ajax=Re=!!Re,y.ajaxTransport(function(t){var e,r;if(v.cors||Re&&!t.crossDomain)return{send:function(o,i){var a,u=t.xhr();if(u.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)u[a]=t.xhrFields[a];for(a in t.mimeType&&u.overrideMimeType&&u.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)u.setRequestHeader(a,o[a]);e=function(t){return function(){e&&(e=r=u.onload=u.onerror=u.onabort=u.onreadystatechange=null,"abort"===t?u.abort():"error"===t?"number"!=typeof u.status?i(0,"error"):i(u.status,u.statusText):i(Be[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=e(),r=u.onerror=e("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{u.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),y.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),y.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return y.globalEval(t),t}}}),y.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),y.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(r,o){e=y("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),a.head.appendChild(e[0])},abort:function(){n&&n()}}});var Pe,Le=[],He=/(=)\?(?=&|$)|\?\?/;function Fe(t){return y.isWindow(t)?t:9===t.nodeType&&t.defaultView}y.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Le.pop()||y.expando+"_"+pe++;return this[t]=!0,t}}),y.ajaxPrefilter("json jsonp",function(t,e,r){var o,i,a,u=!1!==t.jsonp&&(He.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&He.test(t.data)&&"data");if(u||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=y.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,u?t[u]=t[u].replace(He,"$1"+o):!1!==t.jsonp&&(t.url+=(ge.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return a||y.error(o+" was not called"),a[0]},t.dataTypes[0]="json",i=n[o],n[o]=function(){a=arguments},r.always(function(){void 0===i?y(n).removeProp(o):n[o]=i,t[o]&&(t.jsonpCallback=e.jsonpCallback,Le.push(o)),a&&y.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),v.createHTMLDocument=((Pe=a.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Pe.childNodes.length),y.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((r=(e=a.implementation.createHTMLDocument("")).createElement("base")).href=a.location.href,e.head.appendChild(r)):e=a),i=!n&&[],(o=D.exec(t))?[e.createElement(o[1])]:(o=gt([t],e,i),i&&i.length&&y(i).remove(),y.merge([],o.childNodes)));var r,o,i},y.fn.load=function(t,e,n){var r,o,i,a=this,u=t.indexOf(" ");return u>-1&&(r=le(t.slice(u)),t=t.slice(0,u)),y.isFunction(e)?(n=e,e=void 0):e&&"object"==_typeof(e)&&(o="POST"),a.length>0&&y.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){i=arguments,a.html(r?y("<div>").append(y.parseHTML(t)).find(r):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,i||[t.responseText,e,t])})}),this},y.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){y.fn[e]=function(t){return this.on(e,t)}}),y.expr.pseudos.animated=function(t){return y.grep(y.timers,function(e){return t===e.elem}).length},y.offset={setOffset:function(t,e,n){var r,o,i,a,u,s,c=y.css(t,"position"),l=y(t),f={};"static"===c&&(t.style.position="relative"),u=l.offset(),i=y.css(t,"top"),s=y.css(t,"left"),("absolute"===c||"fixed"===c)&&(i+s).indexOf("auto")>-1?(a=(r=l.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(s)||0),y.isFunction(e)&&(e=e.call(t,n,y.extend({},u))),null!=e.top&&(f.top=e.top-u.top+a),null!=e.left&&(f.left=e.left-u.left+o),"using"in e?e.using.call(t,f):l.css(f)}},y.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){y.offset.setOffset(this,t,e)});var e,n,r,o,i=this[0];return i?i.getClientRects().length?(r=i.getBoundingClientRect()).width||r.height?(n=Fe(o=i.ownerDocument),e=o.documentElement,{top:r.top+n.pageYOffset-e.clientTop,left:r.left+n.pageXOffset-e.clientLeft}):r:{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===y.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),y.nodeName(t[0],"html")||(r=t.offset()),r={top:r.top+y.css(t[0],"borderTopWidth",!0),left:r.left+y.css(t[0],"borderLeftWidth",!0)}),{top:e.top-r.top-y.css(n,"marginTop",!0),left:e.left-r.left-y.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===y.css(t,"position");)t=t.offsetParent;return t||vt})}}),y.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;y.fn[t]=function(r){return W(this,function(t,r,o){var i=Fe(t);if(void 0===o)return i?i[e]:t[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):t[r]=o},t,r,arguments.length)}}),y.each(["top","left"],function(t,e){y.cssHooks[e]=Ft(v.pixelPosition,function(t,n){if(n)return n=Ht(t,e),Pt.test(n)?y(t).position()[e]+"px":n})}),y.each({Height:"height",Width:"width"},function(t,e){y.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){y.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),u=n||(!0===o||!0===i?"margin":"border");return W(this,function(e,n,o){var i;return y.isWindow(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===o?y.css(e,n,u):y.style(e,n,o,u)},e,a?o:void 0,a)}})}),y.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),y.parseJSON=JSON.parse,void 0===(r=function(){return y}.apply(e,[]))||(t.exports=r);var Ve=n.jQuery,je=n.$;return y.noConflict=function(t){return n.$===y&&(n.$=je),t&&n.jQuery===y&&(n.jQuery=Ve),y},o||(n.jQuery=n.$=y),y})},"GC/X":function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.ui.escapeSelector=(e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")});var e})?r.apply(e,o):r)||(t.exports=i)},HSsa:function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},JAFY:function(t,e){!function(t){"use strict";var e,n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=function(){},o=function(t){return function(){return t}},i=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},a=o(!1),u=o(!0),s=function(){return c},c=function(){var t=function(t){return t.isNone()},e=function(t){return t()},n=function(t){return t},i={fold:function(t,e){return t()},is:a,isSome:a,isNone:u,getOr:n,getOrThunk:e,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:n,orThunk:e,map:s,each:r,bind:s,exists:a,forall:u,filter:s,equals:t,equals_:t,toArray:function(){return[]},toString:o("none()")};return Object.freeze&&Object.freeze(i),i}(),l=function t(e){var n=o(e),r=function(){return s},i=function(t){return t(e)},s={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:u,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return t(n(e))},each:function(t){t(e)},bind:i,exists:i,forall:i,filter:function(t){return t(e)?s:c},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(a,function(t){return n(e,t)})}};return s},f=l,d=s,h=function(t){return null==t?c:l(t)},m=function(t){return function(e){return function(t){if(null===t)return"null";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}(e)===t}},p=m("string"),g=m("array"),v=m("boolean"),b=m("function"),y=m("number"),x=Array.prototype.slice,w=Array.prototype.push,C=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},_=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},k=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},S=function(t,e,n){return _(t,function(t){n=e(n,t)}),n},T=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return f(o)}return d()},E=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!g(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);w.apply(e,t[n])}return e}(C(t,e))},O=function(t){return 0===t.length?d():f(t[0])},D=function(t){return 0===t.length?d():f(t[t.length-1])},N=(b(Array.from)&&Array.from,function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}),A=function(e,n){return N(e,n,t.Node.DOCUMENT_POSITION_CONTAINED_BY)},M=function(){return(M=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},I=function t(e){var n=e,r=function(){return n};return{get:r,set:function(t){n=t},clone:function(){return t(r())}}},z=function(){return B(0,0)},B=function(t,e){return{major:t,minor:e}},R=function(t,e){var n=String(e).toLowerCase();return 0===t.length?z():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return B(r(1),r(2))}(t,n)},P=z,L=function(t,e){return function(){return e===t}},H=function(t){var e=t.current;return{current:e,version:t.version,isEdge:L("Edge",e),isChrome:L("Chrome",e),isIE:L("IE",e),isOpera:L("Opera",e),isFirefox:L("Firefox",e),isSafari:L("Safari",e)}},F=function(){return H({current:void 0,version:P()})},V=H,j=(o("Edge"),o("Chrome"),o("IE"),o("Opera"),o("Firefox"),o("Safari"),function(t,e){return function(){return e===t}}),U=function(t){var e=t.current;return{current:e,version:t.version,isWindows:j("Windows",e),isiOS:j("iOS",e),isAndroid:j("Android",e),isOSX:j("OSX",e),isLinux:j("Linux",e),isSolaris:j("Solaris",e),isFreeBSD:j("FreeBSD",e),isChromeOS:j("ChromeOS",e)}},W=function(){return U({current:void 0,version:P()})},q=U,Y=(o("Windows"),o("iOS"),o("Android"),o("Linux"),o("OSX"),o("Solaris"),o("FreeBSD"),o("ChromeOS"),function(t,e){var n=String(e).toLowerCase();return T(t,function(t){return t.search(n)})}),$=function(t,e){return-1!==t.indexOf(e)},G=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,K=function(t){return function(e){return $(e,t)}},X=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return $(t,"edge/")&&$(t,"chrome")&&$(t,"safari")&&$(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,G],search:function(t){return $(t,"chrome")&&!$(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return $(t,"msie")||$(t,"trident")}},{name:"Opera",versionRegexes:[G,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:K("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:K("firefox")},{name:"Safari",versionRegexes:[G,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return($(t,"safari")||$(t,"mobile/"))&&$(t,"applewebkit")}}],J=[{name:"Windows",search:K("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return $(t,"iphone")||$(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:K("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:K("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:K("linux"),versionRegexes:[]},{name:"Solaris",search:K("sunos"),versionRegexes:[]},{name:"FreeBSD",search:K("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:K("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Q={browsers:o(X),oses:o(J)},Z=I(function(t,e){var n=Q.browsers(),r=Q.oses(),i=function(t,e){return Y(t,e).map(function(t){var n=R(t.versionRegexes,e);return{current:t.name,version:n}})}(n,t).fold(F,V),a=function(t,e){return Y(t,e).map(function(t){var n=R(t.versionRegexes,e);return{current:t.name,version:n}})}(r,t).fold(W,q);return{browser:i,os:a,deviceType:function(t,e,n,r){var i=t.isiOS()&&!0===/ipad/i.test(n),a=t.isiOS()&&!i,u=t.isiOS()||t.isAndroid(),s=u||r("(pointer:coarse)"),c=i||!a&&u&&r("(min-device-width:768px)"),l=a||u&&!c,f=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!l&&!c&&!f;return{isiPad:o(i),isiPhone:o(a),isTablet:o(c),isPhone:o(l),isTouch:o(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:o(f),isDesktop:o(d)}}(a,i,t,e)}}(t.navigator.userAgent,function(e){return t.window.matchMedia(e).matches})),tt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:o(t)}},et={fromHtml:function(e,n){var r=(n||t.document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw t.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return tt(r.childNodes[0])},fromTag:function(e,n){var r=(n||t.document).createElement(e);return tt(r)},fromText:function(e,n){var r=(n||t.document).createTextNode(e);return tt(r)},fromDom:tt,fromPoint:function(t,e,n){var r=t.dom();return h(r.elementFromPoint(e,n)).map(tt)}},nt=(t.Node.ATTRIBUTE_NODE,t.Node.CDATA_SECTION_NODE,t.Node.COMMENT_NODE,t.Node.DOCUMENT_NODE,t.Node.DOCUMENT_TYPE_NODE,t.Node.DOCUMENT_FRAGMENT_NODE,t.Node.ELEMENT_NODE),rt=(t.Node.TEXT_NODE,t.Node.PROCESSING_INSTRUCTION_NODE,t.Node.ENTITY_REFERENCE_NODE,t.Node.ENTITY_NODE,t.Node.NOTATION_NODE,nt),ot=function(t,e){return t.dom()===e.dom()},it=Z.get().browser.isIE()?function(t,e){return A(t.dom(),e.dom())}:function(t,e){var n=t.dom(),r=e.dom();return n!==r&&n.contains(r)},at=function(t,e){var n=t.dom();if(n.nodeType!==rt)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")},ut=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),st=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),ct=tinymce.util.Tools.resolve("tinymce.util.VK"),lt=function(t,e,n){return t.isSome()&&e.isSome()?f(n(t.getOrDie(),e.getOrDie())):d()},ft=Object.keys,dt=function(t){return h(t.dom().parentNode).map(et.fromDom)},ht=function(t){return C(t.dom().childNodes,et.fromDom)},mt=function(t,e){var n=t.dom().childNodes;return h(n[e]).map(et.fromDom)},pt=function(t){return mt(t,0)},gt=function(t){return mt(t,t.dom().childNodes.length-1)},vt=(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}("element","offset"),function(t,e){dt(t).each(function(n){n.dom().insertBefore(e.dom(),t.dom())})}),bt=function(t,e){t.dom().appendChild(e.dom())},yt=function(t,e){_(e,function(e){bt(t,e)})},xt=function(t){var e=t.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},wt=function(t,e,n){return t.fire("ListMutation",{action:e,element:n})},Ct=void 0!==t.window?t.window:Function("return this;")(),_t=function(t,e){return function(t,e){for(var n=null!=e?e:Ct,r=0;r<t.length&&null!=n;++r)n=n[t[r]];return n}(t.split("."),e)},kt=function(t){return function(t){return function(t,e){var n=function(t,e){return _t(t,e)}(t,e);if(null==n)throw new Error(t+" not available on this browser");return n}("HTMLElement",t)}(_t("ownerDocument.defaultView",t)).prototype.isPrototypeOf(t)},St=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),Tt=tinymce.util.Tools.resolve("tinymce.util.Tools"),Et=function(t){return t&&"BR"===t.nodeName},Ot=function(t){return t&&3===t.nodeType},Dt=function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)},Nt=function(t){return t&&/^(OL|UL)$/.test(t.nodeName)},At=function(t){return t&&/^(DT|DD)$/.test(t.nodeName)},Mt=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},It=Et,zt=function(t,e){return e&&!!t.schema.getTextBlockElements()[e.nodeName]},Bt=function(t,e){return t&&t.nodeName in e},Rt=function(t,e,n){var r=t.isEmpty(e);return!(n&&t.select("span[data-mce-type=bookmark]",e).length>0)&&r},Pt=function(t,e){return t.isChildOf(e,t.getRoot())},Lt=function(t){var e=t.selection.getStart(!0);return t.dom.getParent(e,"OL,UL,DL",Ft(t,e))},Ht=function(t){var e=t.selection.getSelectedBlocks();return Tt.grep(function(t,e){var n=Tt.map(e,function(e){return t.dom.getParent(e,"li,dd,dt",Ft(t,e))||e});return St.unique(n)}(t,e),function(t){return function(t){return t&&/^(LI|DT|DD)$/.test(t.nodeName)}(t)})},Ft=function(t,e){var n=t.dom.getParents(e,"TD,TH");return n.length>0?n[0]:t.getBody()},Vt=function(t,e){var n=t.dom.getParents(e,"ol,ul",Ft(t,e));return D(n)},jt={isList:function(t){var e=Lt(t);return kt(e)},getParentList:Lt,getSelectedSubLists:function(t){var e=Lt(t),n=t.selection.getSelectedBlocks();return function(t,e){return t&&1===e.length&&e[0]===t}(e,n)?function(t){return Tt.grep(t.querySelectorAll("ol,ul,dl"),function(t){return Dt(t)})}(e):Tt.grep(n,function(t){return Dt(t)&&e!==t})},getSelectedListItems:Ht,getClosestListRootElm:Ft,getSelectedDlItems:function(t){return k(Ht(t),At)},getSelectedListRoots:function(t){var e=function(t){var e=Vt(t,t.selection.getStart()),n=k(t.selection.getSelectedBlocks(),Nt);return e.toArray().concat(n)}(t);return function(t,e){var n=C(e,function(e){return Vt(t,e).getOr(e)});return St.unique(n)}(t,e)}},Ut=function(t,e){var n,r,o,i=t.dom,a=t.schema.getBlockElements(),u=i.createFragment(),s=function(t){var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e}(t);if(s&&((r=i.create(s)).tagName===s.toUpperCase()&&i.setAttribs(r,function(t){return t.getParam("forced_root_block_attrs",{})}(t)),Bt(e.firstChild,a)||u.appendChild(r)),e)for(;n=e.firstChild;){var c=n.nodeName;o||"SPAN"===c&&"bookmark"===n.getAttribute("data-mce-type")||(o=!0),Bt(n,a)?(u.appendChild(n),r=null):s?(r||(r=i.create(s),u.appendChild(r)),r.appendChild(n)):u.appendChild(n)}return s?o||r.appendChild(i.create("br",{"data-mce-bogus":"1"})):u.appendChild(i.create("br")),u},Wt=function(t){return t.dom().nodeName.toLowerCase()},qt=(e=nt,function(t){return function(t){return t.dom().nodeType}(t)===e}),Yt=function(e,n){var r=e.dom();!function(t,e){for(var n=ft(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}}(n,function(e,n){!function(e,n,r){if(!(p(r)||v(r)||y(r)))throw t.console.error("Invalid call to Attr.set. Key ",n,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,r+"")}(r,n,e)})},$t=function(t){return S(t.dom().attributes,function(t,e){return t[e.name]=e.value,t},{})},Gt=function(e,n,r){if(!p(r))throw t.console.error("Invalid call to CSS.set. Property ",n,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);(function(t){return void 0!==t.style&&b(t.style.getPropertyValue)})(e)&&e.style.setProperty(n,r)},Kt=function(t){return function(t,e){return et.fromDom(t.dom().cloneNode(!0))}(t)},Xt=function(t,e){var n=function(t,e){var n=et.fromTag(e),r=$t(t);return Yt(n,r),n}(t,e);vt(t,n);var r=ht(t);return yt(n,r),xt(t),n},Jt=function(t,e){bt(t.item,e.list)},Qt=function(t,e){var n={list:et.fromTag(e,t),item:et.fromTag("li",t)};return bt(n.list,n.item),n},Zt=function(t){return at(t,"OL,UL")},te=function(t){return pt(t).map(Zt).getOr(!1)},ee=function(t){return t.depth>0},ne=function(t){return t.isSelected},re=function(t){var e=ht(t),n=gt(t).map(Zt).getOr(!1)?e.slice(0,-1):e;return C(n,Kt)},oe=function(t,e,n,r){return pt(r).filter(Zt).fold(function(){e.each(function(t){ot(t.start,r)&&n.set(!0)});var o=function(t,e,n){return dt(t).filter(qt).map(function(r){return{depth:e,isSelected:n,content:re(t),itemAttributes:$t(t),listAttributes:$t(r),listType:Wt(r)}})}(r,t,n.get());e.each(function(t){ot(t.end,r)&&n.set(!1)});var i=gt(r).filter(Zt).map(function(r){return ie(t,e,n,r)}).getOr([]);return o.toArray().concat(i)},function(r){return ie(t,e,n,r)})},ie=function t(e,n,r,o){return E(ht(o),function(o){return(Zt(o)?t:oe)(e+1,n,r,o)})},ae=function(e,n){return C(n,function(n){var r,o,i=(r=n.content,o=t.document.createDocumentFragment(),_(r,function(t){o.appendChild(t.dom())}),et.fromDom(o));return et.fromDom(Ut(e,i.dom()))})},ue=function(t,e){return function(t){_(t,function(e,n){(function(t,e){for(var n=t[e].depth,r=e-1;r>=0;r--){if(t[r].depth===n)return f(t[r]);if(t[r].depth<n)break}return d()})(t,n).each(function(t){var n,r;r=t,(n=e).listType=r.listType,n.listAttributes=M({},r.listAttributes)})})}(e),function(t,e){var n=S(e,function(e,n){return n.depth>e.length?function(t,e,n){var r,o=function(t,e,n){for(var r=[],o=0;o<n;o++)r.push(Qt(t,e.listType));return r}(t,n,n.depth-e.length);return function(t){for(var e=1;e<t.length;e++)Jt(t[e-1],t[e])}(o),function(t,e){for(var n=0;n<t.length-1;n++)r=t[n].item.dom(),Gt(r,"list-style-type","none");var r;D(t).each(function(t){Yt(t.list,e.listAttributes),Yt(t.item,e.itemAttributes),yt(t.item,e.content)})}(o,n),r=o,lt(D(e),O(r),Jt),e.concat(o)}(t,e,n):function(t,e,n){var r=e.slice(0,n.depth);return D(r).each(function(e){!function(t,e){bt(t.list,e),t.item=e}(e,function(t,e,n){var r=et.fromTag("li",t);return Yt(r,e),yt(r,n),r}(t,n.itemAttributes,n.content)),function(t,e){Wt(t.list)!==e.listType&&(t.list=Xt(t.list,e.listType)),Yt(t.list,e.listAttributes)}(e,n)}),r}(t,e,n)},[]);return O(n).map(function(t){return t.list})}(t.contentDocument,e).toArray()},se=function(t,e,n){var r=function(t,e){var n=I(!1);return C(t,function(t){return{sourceList:t,entries:ie(0,e,n,t)}})}(e,function(t){var e,n,r=C(jt.getSelectedListItems(t),et.fromDom);return lt(T(r,i(te)),T((e=r,(n=x.call(e,0)).reverse(),n),i(te)),function(t,e){return{start:t,end:e}})}(t));_(r,function(e){!function(t,e){_(k(t,ne),function(t){return function(t,e){switch(t){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}}(e,t)})}(e.entries,n);var r,o=function(t,e){return E(function(t,e){if(0===t.length)return[];for(var n=e(t[0]),r=[],o=[],i=0,a=t.length;i<a;i++){var u=t[i],s=e(u);s!==n&&(r.push(o),o=[]),n=s,o.push(u)}return 0!==o.length&&r.push(o),r}(e,ee),function(e){return O(e).map(ee).getOr(!1)?ue(t,e):ae(t,e)})}(t,e.entries);_(o,function(e){wt(t,"Indent"===n?"IndentList":"OutdentList",e.dom())}),r=e.sourceList,_(o,function(t){vt(r,t)}),xt(e.sourceList)})},ce=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),le=ce.DOM,fe=function(t){at(t,"dt")&&Xt(t,"dd")},de=function(t,e,n){_(n,"Indent"===e?fe:function(e){return function(t,e){at(e,"dd")?Xt(e,"dt"):at(e,"dt")&&dt(e).each(function(n){return function(t,e,n){var r,o,i,a,u,s;for(i=le.select('span[data-mce-type="bookmark"]',e),u=Ut(t,n),(r=le.createRng()).setStartAfter(n),r.setEndAfter(e),a=(o=r.extractContents()).firstChild;a;a=a.firstChild)if("LI"===a.nodeName&&t.dom.isEmpty(a)){le.remove(a);break}t.dom.isEmpty(o)||le.insertAfter(o,e),le.insertAfter(u,e),Rt(t.dom,n.parentNode)&&(s=n.parentNode,Tt.each(i,function(t){s.parentNode.insertBefore(t,n.parentNode)}),le.remove(s)),le.remove(n),Rt(t.dom,e)&&le.remove(e)}(t,n.dom(),e.dom())})}(t,e)})},he=function(t,e){if(Ot(t))return{container:t,offset:e};var n=ut.getNode(t,e);return Ot(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&Ot(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Ot(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},me=function(t){var e=t.cloneRange(),n=he(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);var r=he(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},pe=function(t,e){var n=C(jt.getSelectedListRoots(t),et.fromDom),r=C(jt.getSelectedDlItems(t),et.fromDom),o=!1;if(n.length||r.length){var i=t.selection.getBookmark();se(t,n,e),de(t,e,r),t.selection.moveToBookmark(i),t.selection.setRng(me(t.selection.getRng())),t.nodeChanged(),o=!0}return o},ge=function(t){return pe(t,"Indent")},ve=function(t){return pe(t,"Outdent")},be=function(t){return pe(t,"Flatten")},ye=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),xe=ce.DOM,we=function(t){var e={},n=function(n){var r,o,i;o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1===o.nodeType&&(r=xe.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),n?o.insertBefore(r,o.childNodes[i]):xe.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),e[n?"startContainer":"endContainer"]=o,e[n?"startOffset":"endOffset"]=i};return n(!0),t.collapsed||n(),e},Ce=function(t){function e(e){var n,r,o;n=o=t[e?"startContainer":"endContainer"],r=t[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(r=function(t){for(var e=t.parentNode.firstChild,n=0;e;){if(e===t)return n;1===e.nodeType&&"bookmark"===e.getAttribute("data-mce-type")||n++,e=e.nextSibling}return-1}(n),n=n.parentNode,xe.remove(o),!n.hasChildNodes()&&xe.isBlock(n)&&n.appendChild(xe.create("br"))),t[e?"startContainer":"endContainer"]=n,t[e?"startOffset":"endOffset"]=r)}e(!0),e();var n=xe.createRng();return n.setStart(t.startContainer,t.startOffset),t.endContainer&&n.setEnd(t.endContainer,t.endOffset),me(n)},_e=function(t){return/\btox\-/.test(t.className)},ke=function(t){switch(t){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Se=function(t,e){Tt.each(e,function(e,n){t.setAttribute(n,e)})},Te=function(t,e,n){!function(t,e,n){var r=n["list-style-type"]?n["list-style-type"]:null;t.setStyle(e,"list-style-type",r)}(t,e,n),function(t,e,n){Se(e,n["list-attributes"]),Tt.each(t.select("li",e),function(t){Se(t,n["list-item-attributes"])})}(t,e,n)},Ee=function(t,e,n,r){var o,i;for(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&&It(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(zt(t,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Oe=function(t,e,n){return function(t,e){return t&&e&&Dt(t)&&t.nodeName===e.nodeName}(e,n)&&function(t,e,n){return t.getStyle(e,"list-style-type",!0)===t.getStyle(n,"list-style-type",!0)}(t,e,n)&&(r=n,e.className===r.className);var r},De=function(t,e){var n,r;if(n=e.nextSibling,Oe(t,e,n)){for(;r=n.firstChild;)e.appendChild(r);t.remove(n)}if(n=e.previousSibling,Oe(t,e,n)){for(;r=n.lastChild;)e.insertBefore(r,e.firstChild);t.remove(n)}},Ne=function(t){return"list-style-type"in t},Ae={toggleList:function(t,e,n){var r=jt.getParentList(t),o=jt.getSelectedSubLists(t);n=n||{},r&&o.length>0?function(t,e,n,r,o){if(e.nodeName!==r||Ne(o)){var i=we(t.selection.getRng(!0));Tt.each([e].concat(n),function(e){!function(t,e,n,r){if(e.nodeName!==n){var o=t.dom.rename(e,n);Te(t.dom,o,r),wt(t,ke(n),o)}else Te(t.dom,e,r),wt(t,ke(n),e)}(t,e,r,o)}),t.selection.setRng(Ce(i))}else be(t)}(t,r,o,e,n):function(t,e,n,r){if(e!==t.getBody())if(e)if(e.nodeName!==n||Ne(r)||_e(e)){var o=we(t.selection.getRng(!0));Te(t.dom,e,r);var i=t.dom.rename(e,n);De(t.dom,i),t.selection.setRng(Ce(o)),wt(t,ke(n),i)}else be(t);else(function(t,e,n){void 0===n&&(n={});var r,o=t.selection.getRng(!0),i="LI",a=jt.getClosestListRootElm(t,t.selection.getStart(!0)),u=t.dom;"false"!==u.getContentEditable(t.selection.getNode())&&("DL"===(e=e.toUpperCase())&&(i="DT"),r=we(o),Tt.each(function(t,e,n){for(var r,o=[],i=t.dom,a=Ee(t,e,!0,n),u=Ee(t,e,!1,n),s=[],c=a;c&&(s.push(c),c!==u);c=c.nextSibling);return Tt.each(s,function(e){if(zt(t,e))return o.push(e),void(r=null);if(i.isBlock(e)||It(e))return It(e)&&i.remove(e),void(r=null);var a=e.nextSibling;ye.isBookmarkNode(e)&&(zt(t,a)||!a&&e.parentNode===n)?r=null:(r||(r=i.create("p"),e.parentNode.insertBefore(r,e),o.push(r)),r.appendChild(e))}),o}(t,o,a),function(r){var o,a;(a=r.previousSibling)&&Dt(a)&&a.nodeName===e&&function(t,e,n){var r=u.getStyle(e,"list-style-type"),o=n?n["list-style-type"]:"";return r===(null===o?"":o)}(0,a,n)?(o=a,r=u.rename(r,i),a.appendChild(r)):(o=u.create(e),r.parentNode.insertBefore(o,r),o.appendChild(r),r=u.rename(r,i)),function(t,e,n){Tt.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],function(n){var r;return t.setStyle(e,((r={})[n]="",r))})}(u,r),Te(u,o,n),De(t.dom,o)}),t.selection.setRng(Ce(r)))})(t,n,r),wt(t,ke(n),e)}(t,r,e,n)},mergeWithAdjacentLists:De},Me=ce.DOM,Ie=function(t,e){Tt.each(Tt.grep(t.select("ol,ul",e)),function(e){!function(t,e){var n,r=e.parentNode;"LI"===r.nodeName&&r.firstChild===e&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(e),Rt(t,r)&&Me.remove(r)):Me.setStyle(r,"listStyleType","none")),Dt(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(e)}(t,e)})},ze=function(t,e,n,r){var o=e.startContainer,i=e.startOffset;if(Ot(o)&&(n?i<o.data.length:i>0))return o;var a=t.schema.getNonEmptyElements();1===o.nodeType&&(o=ut.getNode(o,i));var u=new st(o,r);for(n&&function(t,e){return!!Et(e)&&!(!t.isBlock(e.nextSibling)||Et(e.previousSibling))}(t.dom,o)&&u.next();o=u[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(a[o.nodeName])return o;if(Ot(o)&&o.data.length>0)return o}},Be=function(t,e){var n=e.childNodes;return 1===n.length&&!Dt(n[0])&&t.isBlock(n[0])},Re=function(t,e,n){var r,o,i=e.parentNode;if(Pt(t,e)&&Pt(t,n)){Dt(n.lastChild)&&(o=n.lastChild),i===n.lastChild&&It(i.previousSibling)&&t.remove(i.previousSibling),(r=n.lastChild)&&It(r)&&e.hasChildNodes()&&t.remove(r),Rt(t,n,!0)&&t.$(n).empty(),function(t,e,n){var r,o;if(o=Be(t,n)?n.firstChild:n,function(t,e){Be(t,e)&&t.remove(e.firstChild,!0)}(t,e),!Rt(t,e,!0))for(;r=e.firstChild;)o.appendChild(r)}(t,e,n),o&&n.appendChild(o);var a=it(et.fromDom(n),et.fromDom(e))?t.getParents(e,Dt,n):[];t.remove(e),_(a,function(e){Rt(t,e)&&e!==t.getRoot()&&t.remove(e)})}},Pe=function(t,e){var n=t.dom,r=t.selection,o=r.getStart(),i=jt.getClosestListRootElm(t,o),a=n.getParent(r.getStart(),"LI",i);if(a){var u=a.parentNode;if(u===t.getBody()&&Rt(n,u))return!0;var s=me(r.getRng()),c=n.getParent(ze(t,s,e,i),"LI",i);if(c&&c!==a)return t.undoManager.transact(function(){e?function(t,e,n,r){var o=t.dom;if(o.isEmpty(r))!function(t,e,n){t.dom.$(n).empty(),Re(t.dom,e,n),t.selection.setCursorLocation(n)}(t,n,r);else{var i=we(e);Re(o,n,r),t.selection.setRng(Ce(i))}}(t,s,c,a):function(t){return t.parentNode.firstChild===t}(a)?ve(t):function(t,e,n,r){var o=we(s);Re(t.dom,n,r);var i=Ce(o);t.selection.setRng(i)}(t,0,a,c)}),!0;if(!c&&!e&&0===s.startOffset&&0===s.endOffset)return t.undoManager.transact(function(){be(t)}),!0}return!1},Le=function(t,e){return t.selection.isCollapsed()?function(t,e){return Pe(t,e)||function(t,e){var n=t.dom,r=t.selection.getStart(),o=jt.getClosestListRootElm(t,r),i=n.getParent(r,n.isBlock,o);if(i&&n.isEmpty(i)){var a=me(t.selection.getRng()),u=n.getParent(ze(t,a,e,o),"LI",o);if(u)return t.undoManager.transact(function(){!function(t,e,n){var r=t.getParent(e.parentNode,t.isBlock,n);t.remove(e),r&&t.isEmpty(r)&&t.remove(r)}(n,i,o),Ae.mergeWithAdjacentLists(n,u.parentNode),t.selection.select(u,!0),t.selection.collapse(e)}),!0}return!1}(t,e)}(t,e):function(t){var e=t.selection.getStart(),n=jt.getClosestListRootElm(t,e);return!!(t.dom.getParent(e,"LI,DT,DD",n)||jt.getSelectedListItems(t).length>0)&&(t.undoManager.transact(function(){t.execCommand("Delete"),Ie(t.dom,t.getBody())}),!0)}(t)},He=Le,Fe=function(t){return{backspaceDelete:function(e){He(t,e)}}},Ve=function(t,e){return function(){var n=t.dom.getParent(t.selection.getStart(),"UL,OL,DL");return n&&n.nodeName===e}},je=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?ge(t):"outdent"===n&&ve(t)}),t.addCommand("InsertUnorderedList",function(e,n){Ae.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){Ae.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){Ae.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){be(t)}),t.addQueryStateHandler("InsertUnorderedList",Ve(t,"UL")),t.addQueryStateHandler("InsertOrderedList",Ve(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",Ve(t,"DL"))},Ue=function(t){(function(t){return t.getParam("lists_indent_on_tab",!0)})(t)&&function(t){t.on("keydown",function(e){e.keyCode!==ct.TAB||ct.metaKeyPressed(e)||t.undoManager.transact(function(){(e.shiftKey?ve(t):ge(t))&&e.preventDefault()})})}(t),function(t){t.on("keydown",function(e){e.keyCode===ct.BACKSPACE?Le(t,!1)&&e.preventDefault():e.keyCode===ct.DELETE&&Le(t,!0)&&e.preventDefault()})}(t)},We=function(t,e){return function(n){var r=function(t){var r=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}(t.parents,Mt),o=-1!==r?t.parents.slice(0,r):t.parents,i=Tt.grep(o,Dt);n.setActive(i.length>0&&i[0].nodeName===e&&!_e(i[0]))};return t.on("NodeChange",r),function(){return t.off("NodeChange",r)}}},qe=function(t){var e=function(e){return function(){return t.execCommand(e)}};(function(t,e){var n=t.settings.plugins?t.settings.plugins:"";return-1!==Tt.inArray(n.split(/[ ,]/),"advlist")})(t)||(t.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:e("InsertOrderedList"),onSetup:We(t,"OL")}),t.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:e("InsertUnorderedList"),onSetup:We(t,"UL")}))};n.add("lists",function(t){return Ue(t),qe(t),je(t),Fe(t)})}(window)},JEQr:function(t,e,n){"use strict";(function(e){var r=n("xTJ+"),o=n("yK9s"),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,s={adapter:("undefined"!=typeof XMLHttpRequest?u=n("tQ2B"):void 0!==e&&"[object process]"===Object.prototype.toString.call(e)&&(u=n("tQ2B")),u),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(t){s.headers[t]={}}),r.forEach(["post","put","patch"],function(t){s.headers[t]=r.merge(i)}),t.exports=s}).call(this,n("8oxB"))},Jchv:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return function(){var e,n=Math.max,r=Math.abs,o=/left|center|right/,i=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,u=/^\w+/,s=/%$/,c=t.fn.position;function l(t,e,n){return[parseFloat(t[0])*(s.test(t[0])?e/100:1),parseFloat(t[1])*(s.test(t[1])?n/100:1)]}function f(e,n){return parseInt(t.css(e,n),10)||0}t.position={scrollbarWidth:function(){if(void 0!==e)return e;var n,r,o=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=o.children()[0];return t("body").append(o),n=i.offsetWidth,o.css("overflow","scroll"),n===(r=i.offsetWidth)&&(r=o[0].clientWidth),o.remove(),e=n-r},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),r=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth;return{width:"scroll"===r||"auto"===r&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),r=t.isWindow(n[0]),o=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:r,isDocument:o,offset:r||o?{left:0,top:0}:t(e).offset(),scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return c.apply(this,arguments);e=t.extend({},e);var s,d,h,m,p,g,v=t(e.of),b=t.position.getWithinInfo(e.within),y=t.position.getScrollInfo(b),x=(e.collision||"flip").split(" "),w={};return g=function(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}(v),v[0].preventDefault&&(e.at="left top"),d=g.width,h=g.height,m=g.offset,p=t.extend({},m),t.each(["my","at"],function(){var t,n,r=(e[this]||"").split(" ");1===r.length&&(r=o.test(r[0])?r.concat(["center"]):i.test(r[0])?["center"].concat(r):["center","center"]),r[0]=o.test(r[0])?r[0]:"center",r[1]=i.test(r[1])?r[1]:"center",t=a.exec(r[0]),n=a.exec(r[1]),w[this]=[t?t[0]:0,n?n[0]:0],e[this]=[u.exec(r[0])[0],u.exec(r[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?p.left+=d:"center"===e.at[0]&&(p.left+=d/2),"bottom"===e.at[1]?p.top+=h:"center"===e.at[1]&&(p.top+=h/2),s=l(w.at,d,h),p.left+=s[0],p.top+=s[1],this.each(function(){var o,i,a=t(this),u=a.outerWidth(),c=a.outerHeight(),g=f(this,"marginLeft"),C=f(this,"marginTop"),_=u+g+f(this,"marginRight")+y.width,k=c+C+f(this,"marginBottom")+y.height,S=t.extend({},p),T=l(w.my,a.outerWidth(),a.outerHeight());"right"===e.my[0]?S.left-=u:"center"===e.my[0]&&(S.left-=u/2),"bottom"===e.my[1]?S.top-=c:"center"===e.my[1]&&(S.top-=c/2),S.left+=T[0],S.top+=T[1],o={marginLeft:g,marginTop:C},t.each(["left","top"],function(n,r){t.ui.position[x[n]]&&t.ui.position[x[n]][r](S,{targetWidth:d,targetHeight:h,elemWidth:u,elemHeight:c,collisionPosition:o,collisionWidth:_,collisionHeight:k,offset:[s[0]+T[0],s[1]+T[1]],my:e.my,at:e.at,within:b,elem:a})}),e.using&&(i=function(t){var o=m.left-S.left,i=o+d-u,s=m.top-S.top,l=s+h-c,f={target:{element:v,left:m.left,top:m.top,width:d,height:h},element:{element:a,left:S.left,top:S.top,width:u,height:c},horizontal:i<0?"left":o>0?"right":"center",vertical:l<0?"top":s>0?"bottom":"middle"};d<u&&r(o+i)<d&&(f.horizontal="center"),h<c&&r(s+l)<h&&(f.vertical="middle"),n(r(o),r(i))>n(r(s),r(l))?f.important="horizontal":f.important="vertical",e.using.call(this,t,f)}),a.offset(t.extend(S,{using:i}))})},t.ui.position={fit:{left:function(t,e){var r,o=e.within,i=o.isWindow?o.scrollLeft:o.offset.left,a=o.width,u=t.left-e.collisionPosition.marginLeft,s=i-u,c=u+e.collisionWidth-a-i;e.collisionWidth>a?s>0&&c<=0?(r=t.left+s+e.collisionWidth-a-i,t.left+=s-r):t.left=c>0&&s<=0?i:s>c?i+a-e.collisionWidth:i:s>0?t.left+=s:c>0?t.left-=c:t.left=n(t.left-u,t.left)},top:function(t,e){var r,o=e.within,i=o.isWindow?o.scrollTop:o.offset.top,a=e.within.height,u=t.top-e.collisionPosition.marginTop,s=i-u,c=u+e.collisionHeight-a-i;e.collisionHeight>a?s>0&&c<=0?(r=t.top+s+e.collisionHeight-a-i,t.top+=s-r):t.top=c>0&&s<=0?i:s>c?i+a-e.collisionHeight:i:s>0?t.top+=s:c>0?t.top-=c:t.top=n(t.top-u,t.top)}},flip:{left:function(t,e){var n,o,i=e.within,a=i.offset.left+i.scrollLeft,u=i.width,s=i.isWindow?i.scrollLeft:i.offset.left,c=t.left-e.collisionPosition.marginLeft,l=c-s,f=c+e.collisionWidth-u-s,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,h="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,m=-2*e.offset[0];l<0?((n=t.left+d+h+m+e.collisionWidth-u-a)<0||n<r(l))&&(t.left+=d+h+m):f>0&&((o=t.left-e.collisionPosition.marginLeft+d+h+m-s)>0||r(o)<f)&&(t.left+=d+h+m)},top:function(t,e){var n,o,i=e.within,a=i.offset.top+i.scrollTop,u=i.height,s=i.isWindow?i.scrollTop:i.offset.top,c=t.top-e.collisionPosition.marginTop,l=c-s,f=c+e.collisionHeight-u-s,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,h="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];l<0?((o=t.top+d+h+m+e.collisionHeight-u-a)<0||o<r(l))&&(t.top+=d+h+m):f>0&&((n=t.top-e.collisionPosition.marginTop+d+h+m-s)>0||r(n)<f)&&(t.top+=d+h+m)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position})?r.apply(e,o):r)||(t.exports=i)},LYNF:function(t,e,n){"use strict";var r=n("OH9c");t.exports=function(t,e,n,o,i){var a=new Error(t);return r(a,e,n,o,i)}},Lmem:function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},MIQu:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){var e,n=0,r=Array.prototype.slice;return t.cleanData=(e=t.cleanData,function(n){var r,o,i;for(i=0;null!=(o=n[i]);i++)try{(r=t._data(o,"events"))&&r.remove&&t(o).triggerHandler("remove")}catch(t){}e(n)}),t.widget=function(e,n,r){var o,i,a,u={},s=e.split(".")[0],c=s+"-"+(e=e.split(".")[1]);return r||(r=n,n=t.Widget),t.isArray(r)&&(r=t.extend.apply(null,[{}].concat(r))),t.expr[":"][c.toLowerCase()]=function(e){return!!t.data(e,c)},t[s]=t[s]||{},o=t[s][e],i=t[s][e]=function(t,e){if(!this._createWidget)return new i(t,e);arguments.length&&this._createWidget(t,e)},t.extend(i,o,{version:r.version,_proto:t.extend({},r),_childConstructors:[]}),(a=new n).options=t.widget.extend({},a.options),t.each(r,function(e,r){t.isFunction(r)?u[e]=function(){function t(){return n.prototype[e].apply(this,arguments)}function o(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,i=this._superApply;return this._super=t,this._superApply=o,e=r.apply(this,arguments),this._super=n,this._superApply=i,e}}():u[e]=r}),i.prototype=t.widget.extend(a,{widgetEventPrefix:o&&a.widgetEventPrefix||e},u,{constructor:i,namespace:s,widgetName:e,widgetFullName:c}),o?(t.each(o._childConstructors,function(e,n){var r=n.prototype;t.widget(r.namespace+"."+r.widgetName,i,n._proto)}),delete o._childConstructors):n._childConstructors.push(i),t.widget.bridge(e,i),i},t.widget.extend=function(e){for(var n,o,i=r.call(arguments,1),a=0,u=i.length;a<u;a++)for(n in i[a])o=i[a][n],i[a].hasOwnProperty(n)&&void 0!==o&&(t.isPlainObject(o)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],o):t.widget.extend({},o):e[n]=o);return e},t.widget.bridge=function(e,n){var o=n.prototype.widgetFullName||e;t.fn[e]=function(i){var a="string"==typeof i,u=r.call(arguments,1),s=this;return a?this.length||"instance"!==i?this.each(function(){var n,r=t.data(this,o);return"instance"===i?(s=r,!1):r?t.isFunction(r[i])&&"_"!==i.charAt(0)?(n=r[i].apply(r,u))!==r&&void 0!==n?(s=n&&n.jquery?s.pushStack(n.get()):n,!1):void 0:t.error("no such method '"+i+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+i+"'")}):s=void 0:(u.length&&(i=t.widget.extend.apply(null,[i].concat(u))),this.each(function(){var e=t.data(this,o);e?(e.option(i||{}),e._init&&e._init()):t.data(this,o,new n(i,this))})),s}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,r){r=t(r||this.defaultElement||this)[0],this.element=t(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},r!==this&&(t.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===r&&this.destroy()}}),this.document=t(r.style?r.ownerDocument:r.document||r),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,n){e._removeClass(n,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var r,o,i,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},r=e.split("."),e=r.shift(),r.length){for(o=a[e]=t.widget.extend({},this.options[e]),i=0;i<r.length-1;i++)o[r[i]]=o[r[i]]||{},o=o[r[i]];if(e=r.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,r,o;for(n in e)o=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&o&&o.length&&(r=t(o.get()),this._removeClass(o,n),r.addClass(this._classes({element:r,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var n=[],r=this;function o(o,i){var a,u;for(u=0;u<o.length;u++)a=r.classesElementLookup[o[u]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),r.classesElementLookup[o[u]]=a,n.push(o[u]),i&&e.classes[o[u]]&&n.push(e.classes[o[u]])}return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&o(e.keys.match(/\S+/g)||[],!0),e.extra&&o(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,function(r,o){-1!==t.inArray(e.target,o)&&(n.classesElementLookup[r]=t(o.not(e.target).get()))})},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,r){r="boolean"==typeof r?r:n;var o="string"==typeof t||null===t,i={extra:o?e:n,keys:o?t:e,element:o?this.element:t,add:r};return i.element.toggleClass(this._classes(i),r),this},_on:function(e,n,r){var o,i=this;"boolean"!=typeof e&&(r=n,n=e,e=!1),r?(n=o=t(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,o=this.widget()),t.each(r,function(r,a){function u(){if(e||!0!==i.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?i[a]:a).apply(i,arguments)}"string"!=typeof a&&(u.guid=a.guid=a.guid||u.guid||t.guid++);var s=r.match(/^([\w:-]*)\s*(.*)$/),c=s[1]+i.eventNamespace,l=s[2];l?o.on(c,l,u):n.on(c,u)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n).off(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var n=this;return setTimeout(function(){return("string"==typeof t?n[t]:t).apply(n,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,r){var o,i,a=this.options[e];if(r=r||{},(n=t.Event(n)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],i=n.originalEvent)for(o in i)o in n||(n[o]=i[o]);return this.element.trigger(n,r),!(t.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(r,o,i){var a;"string"==typeof o&&(o={effect:o});var u=o?!0===o||"number"==typeof o?n:o.effect||n:e;"number"==typeof(o=o||{})&&(o={duration:o}),a=!t.isEmptyObject(o),o.complete=i,o.delay&&r.delay(o.delay),a&&t.effects&&t.effects.effect[u]?r[e](o):u!==e&&r[u]?r[u](o.duration,o.easing,i):r.queue(function(n){t(this)[e](),i&&i.call(r[0]),n()})}}),t.widget})?r.apply(e,o):r)||(t.exports=i)},MLWZ:function(t,e,n){"use strict";var r=n("xTJ+");function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var a=[];r.forEach(e,function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))}))}),i=a.join("&")}if(i){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},N6cA:function(t,e,n){var r,o,i;o=[n("EVdn"),n("121P"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var n=e.data("ui-form-reset-instances");t.each(n,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}}})?r.apply(e,o):r)||(t.exports=i)},NHgk:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?r.apply(e,o):r)||(t.exports=i)},NvoQ:function(t,e,n){var r,o,i;o=[n("EVdn"),n("iGnl"),n("CumE"),n("NHgk"),n("8Iik"),n("Qwlt"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){return t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return t>=e&&t<e+n},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,n){var r=null,o=!1,i=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,i.widgetName+"-item")===i)return r=t(this),!1}),t.data(e.target,i.widgetName+"-item")===i&&(r=t(e.target)),!r||this.options.handle&&!n&&(t(this.options.handle,r).find("*").addBack().each(function(){this===e.target&&(o=!0)}),!o)||(this.currentItem=r,this._removeCurrentsFromItems(),0)))},_mouseStart:function(e,n,r){var o,i,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(i=this.document.find("body"),this.storedCursor=i.css("cursor"),i.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(i)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,r,o,i,a=this.options,u=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=u=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=u=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=u=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=u=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?u=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(u=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?u=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(u=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==u&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(o=(r=this.items[n]).item[0],(i=this._intersectsWithPointer(r))&&r.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===i?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===i?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(e,r),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var r=this,o=this.placeholder.offset(),i=this.options.axis,a={};i&&"x"!==i||(a.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),i&&"y"!==i||(a.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){r._clear(e)})}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),r=[];return e=e||{},t(n).each(function(){var n=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);n&&r.push((e.key||n[1]+"[]")+"="+(e.key&&e.expression?n[1]:n[2]))}),!r.length&&e.key&&r.push(e.key+"="),r.join("&")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),r=[];return e=e||{},n.each(function(){r.push(t(e.item||this).attr(e.attribute||"id")||"")}),r},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,r=this.positionAbs.top,o=r+this.helperProportions.height,i=t.left,a=i+t.width,u=t.top,s=u+t.height,c=this.offset.click.top,l=this.offset.click.left,f="x"===this.options.axis||r+c>u&&r+c<s,d="y"===this.options.axis||e+l>i&&e+l<a,h=f&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h:i<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&u<r+this.helperProportions.height/2&&o-this.helperProportions.height/2<s},_intersectsWithPointer:function(t){var e,n,r="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!r||!o)&&(e=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&n||"left"===o&&!n:r&&("down"===r&&e||"up"===r&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var n,r,o,i,a=[],u=[],s=this._connectWith();if(s&&e)for(n=s.length-1;n>=0;n--)for(r=(o=t(s[n],this.document[0])).length-1;r>=0;r--)(i=t.data(o[r],this.widgetFullName))&&i!==this&&!i.options.disabled&&u.push([t.isFunction(i.options.items)?i.options.items.call(i.element):t(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);function c(){a.push(this)}for(u.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=u.length-1;n>=0;n--)u[n][0].each(c);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,r,o,i,a,u,s,c,l=this.items,f=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(r=(o=t(d[n],this.document[0])).length-1;r>=0;r--)(i=t.data(o[r],this.widgetFullName))&&i!==this&&!i.options.disabled&&(f.push([t.isFunction(i.options.items)?i.options.items.call(i.element[0],e,{item:this.currentItem}):t(i.options.items,i.element),i]),this.containers.push(i));for(n=f.length-1;n>=0;n--)for(a=f[n][1],r=0,c=(u=f[n][0]).length;r<c;r++)(s=t(u[r])).data(this.widgetName+"-item",a),l.push({item:s,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var n,r,o,i;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),n=this.items.length-1;n>=0;n--)(r=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,r.item):r.item,e||(r.width=o.outerWidth(),r.height=o.outerHeight()),i=o.offset(),r.left=i.left,r.top=i.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)i=this.containers[n].element.offset(),this.containers[n].containerCache.left=i.left,this.containers[n].containerCache.top=i.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(e){var n,r=(e=e||this).options;r.placeholder&&r.placeholder.constructor!==String||(n=r.placeholder,r.placeholder={element:function(){var r=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+r+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",n||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===r?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===r?e._createTrPlaceholder(e.currentItem,o):"img"===r&&o.attr("src",e.currentItem.attr("src")),n||o.css("visibility","hidden"),o},update:function(t,o){n&&!r.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(r.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),r.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,n){var r=this;e.children().each(function(){t("<td>&#160;</td>",r.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(e){var n,r,o,i,a,u,s,c,l,f,d=null,h=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(d&&t.contains(this.containers[n].element[0],d.element[0]))continue;d=this.containers[n],h=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[h].containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1);else{for(o=1e4,i=null,a=(l=d.floating||this._isFloating(this.currentItem))?"left":"top",u=l?"width":"height",f=l?"pageX":"pageY",r=this.items.length-1;r>=0;r--)t.contains(this.containers[h].element[0],this.items[r].item[0])&&this.items[r].item[0]!==this.currentItem[0]&&(s=this.items[r].item.offset()[a],c=!1,e[f]-s>this.items[r][u]/2&&(c=!0),Math.abs(e[f]-s)<o&&(o=Math.abs(e[f]-s),i=this.items[r],this.direction=c?"up":"down"));if(!i&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[h])return void(this.currentContainer.containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));i?this._rearrange(e,i,null,!0):this._rearrange(e,null,this.containers[h].element,!0),this._trigger("change",e,this._uiHash()),this.containers[h]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[h],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1}},_createHelper:function(e){var n=this.options,r=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return r.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),r[0].style.width&&!n.forceHelperSize||r.width(this.currentItem.width()),r[0].style.height&&!n.forceHelperSize||r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,r,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],n=t(o.containment).offset(),r="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var r="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(o[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:o.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:o.scrollLeft())*r}},_generatePosition:function(e){var n,r,o=this.options,i=e.pageX,a=e.pageY,u="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(u[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),o.grid&&(n=this.originalPageY+Math.round((a-this.originalPageY)/o.grid[1])*o.grid[1],a=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-o.grid[1]:n+o.grid[1]:n,r=this.originalPageX+Math.round((i-this.originalPageX)/o.grid[0])*o.grid[0],i=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-o.grid[0]:r+o.grid[0]:r)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:u.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:u.scrollLeft())}},_rearrange:function(t,e,n,r){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!r)})},_clear:function(t,e){this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(t,e,n){return function(r){n._trigger(t,r,e._uiHash(e))}}for(this.fromOutside&&!e&&r.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||r.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(r.push(function(t){this._trigger("remove",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||r.push(o("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(o("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n<r.length;n++)r[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}})})?r.apply(e,o):r)||(t.exports=i)},OH9c:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},OTTw:function(t,e,n){"use strict";var r=n("xTJ+");t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},Qjfq:function(t,e,n){n("vn/0")},Qwlt:function(t,e,n){var r,o,i;o=[n("EVdn")],void 0===(i="function"==typeof(r=function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"})?r.apply(e,o):r)||(t.exports=i)},"Rn+g":function(t,e,n){"use strict";var r=n("LYNF");t.exports=function(t,e,n){var o=n.config.validateStatus;!o||o(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},SntB:function(t,e,n){"use strict";var r=n("xTJ+");t.exports=function(t,e){e=e||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,function(t){void 0!==e[t]&&(n[t]=e[t])}),r.forEach(i,function(o){r.isObject(e[o])?n[o]=r.deepMerge(t[o],e[o]):void 0!==e[o]?n[o]=e[o]:r.isObject(t[o])?n[o]=r.deepMerge(t[o]):void 0!==t[o]&&(n[o]=t[o])}),r.forEach(a,function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])});var u=o.concat(i).concat(a),s=Object.keys(e).filter(function(t){return-1===u.indexOf(t)});return r.forEach(s,function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])}),n}},UTCq:function(t,e,n){var r,o,i;o=[n("EVdn"),n("GC/X"),n("N6cA"),n("r15H"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){return t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,n,r=this,o=this._super()||{};return this._readType(),n=this.element.labels(),this.label=t(n[n.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){r.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(o.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(o.disabled=e),o},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,n="input[name='"+t.ui.escapeSelector(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(n):t(n).filter(function(){return 0===t(this).form().length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(e){var n="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(n+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):n+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",n),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio})?r.apply(e,o):r)||(t.exports=i)},UnBK:function(t,e,n){"use strict";var r=n("xTJ+"),o=n("xAGQ"),i=n("Lmem"),a=n("JEQr");function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},"Vn+K":function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt"),n("vBzC")],void 0===(i="function"==typeof(r=function(t){var e;function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=r(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function r(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",n,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",n,o)}function o(){t.datepicker._isDisabledDatepicker(e.inline?e.dpDiv.parent()[0]:e.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function i(e,n){for(var r in t.extend(e,n),n)null==n[r]&&(e[r]=n[r]);return e}return t.extend(t.ui,{datepicker:{version:"1.12.1"}}),t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return i(this._defaults,t||{}),this},_attachDatepicker:function(e,n){var r,o,i;o="div"===(r=e.nodeName.toLowerCase())||"span"===r,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(t(e),o)).settings=t.extend({},n||{}),"input"===r?this._connectDatepicker(e,i):o&&this._inlineDatepicker(e,i)},_newInst:function(e,n){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?r(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,n){var r=t(e);n.append=t([]),n.trigger=t([]),r.hasClass(this.markerClassName)||(this._attachments(r,n),r.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(n),t.data(e,"datepicker",n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var r,o,i,a=this._get(n,"appendText"),u=this._get(n,"isRTL");n.append&&n.append.remove(),a&&(n.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[u?"before":"after"](n.append)),e.off("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),"focus"!==(r=this._get(n,"showOn"))&&"both"!==r||e.on("focus",this._showDatepicker),"button"!==r&&"both"!==r||(o=this._get(n,"buttonText"),i=this._get(n,"buttonImage"),n.trigger=t(this._get(n,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:i,alt:o,title:o}):t("<button type='button'></button>").addClass(this._triggerClass).html(i?t("<img/>").attr({src:i,alt:o,title:o}):o)),e[u?"before":"after"](n.trigger),n.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,n,r,o,i=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(n=0,r=0,o=0;o<t.length;o++)t[o].length>n&&(n=t[o].length,r=o);return r},i.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay())),t.input.attr("size",this._formatDate(t,i).length)}},_inlineDatepicker:function(e,n){var r=t(e);r.hasClass(this.markerClassName)||(r.addClass(this.markerClassName).append(n.dpDiv),t.data(e,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(e),n.dpDiv.css("display","block"))},_dialogDatepicker:function(e,n,r,o,a){var u,s,c,l,f,d=this._dialogInst;return d||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+u+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),(d=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",d)),i(d.settings,o||{}),n=n&&n.constructor===Date?this._formatDate(d,n):n,this._dialogInput.val(n),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(s=document.documentElement.clientWidth,c=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,f=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[s/2-100+l,c/2-150+f]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=r,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(n){var r,o=t(n),i=t.data(n,"datepicker");o.hasClass(this.markerClassName)&&(r=n.nodeName.toLowerCase(),t.removeData(n,"datepicker"),"input"===r?(i.append.remove(),i.trigger.remove(),o.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==r&&"span"!==r||o.removeClass(this.markerClassName).empty(),e===i&&(e=null))},_enableDatepicker:function(e){var n,r,o=t(e),i=t.data(e,"datepicker");o.hasClass(this.markerClassName)&&("input"===(n=e.nodeName.toLowerCase())?(e.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==n&&"span"!==n||((r=o.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var n,r,o=t(e),i=t.data(e,"datepicker");o.hasClass(this.markerClassName)&&("input"===(n=e.nodeName.toLowerCase())?(e.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==n&&"span"!==n||((r=o.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,n,r){var o,a,u,s,c=this._getInst(e);if(2===arguments.length&&"string"==typeof n)return"defaults"===n?t.extend({},t.datepicker._defaults):c?"all"===n?t.extend({},c.settings):this._get(c,n):null;o=n||{},"string"==typeof n&&((o={})[n]=r),c&&(this._curInst===c&&this._hideDatepicker(),a=this._getDateDatepicker(e,!0),u=this._getMinMaxDate(c,"min"),s=this._getMinMaxDate(c,"max"),i(c.settings,o),null!==u&&void 0!==o.dateFormat&&void 0===o.minDate&&(c.settings.minDate=this._formatDate(c,u)),null!==s&&void 0!==o.dateFormat&&void 0===o.maxDate&&(c.settings.maxDate=this._formatDate(c,s)),"disabled"in o&&(o.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),c),this._autoSize(c),this._setDate(c,a),this._updateAlternate(c),this._updateDatepicker(c))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(e){var n,r,o,i=t.datepicker._getInst(e.target),a=!0,u=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return(o=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",i.dpDiv))[0]&&t.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,o[0]),(n=t.datepicker._get(i,"onSelect"))?(r=t.datepicker._formatDate(i),n.apply(i.input?i.input[0]:null,[r,i])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(i,"stepBigMonths"):-t.datepicker._get(i,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(i,"stepBigMonths"):+t.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,u?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(i,"stepBigMonths"):-t.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,u?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(i,"stepBigMonths"):+t.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,r,o=t.datepicker._getInst(e.target);if(t.datepicker._get(o,"constrainInput"))return n=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),r=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||r<" "||!n||n.indexOf(r)>-1},_doKeyUp:function(e){var n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n))&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(t){}return!0},_showDatepicker:function(e){var n,r,o,a,u,s,c;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e||(n=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==n&&(t.datepicker._curInst.dpDiv.stop(!0,!0),n&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(o=(r=t.datepicker._get(n,"beforeShow"))?r.apply(e,[e,n]):{})&&(i(n.settings,o),n.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(n),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return!(a|="fixed"===t(this).css("position"))}),u={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(n),u=t.datepicker._checkOffset(n,u,a),n.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:u.left+"px",top:u.top+"px"}),n.inline||(s=t.datepicker._get(n,"showAnim"),c=t.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e,n;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[s]?n.dpDiv.show(s,t.datepicker._get(n,"showOptions"),c):n.dpDiv[s||"show"](s?c:null),t.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),t.datepicker._curInst=n)))},_updateDatepicker:function(n){this.maxRows=4,e=n,n.dpDiv.empty().append(this._generateHTML(n)),this._attachHandlers(n);var r,i=this._getNumberOfMonths(n),a=i[1],u=n.dpDiv.find("."+this._dayOverClass+" a");u.length>0&&o.apply(u.get(0)),n.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),a>1&&n.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),n.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),n.dpDiv[(this._get(n,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),n===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),n.yearshtml&&(r=n.yearshtml,setTimeout(function(){r===n.yearshtml&&n.yearshtml&&n.dpDiv.find("select.ui-datepicker-year:first").replaceWith(n.yearshtml),r=n.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,n,r){var o=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,u=e.input?e.input.outerHeight():0,s=document.documentElement.clientWidth+(r?0:t(document).scrollLeft()),c=document.documentElement.clientHeight+(r?0:t(document).scrollTop());return n.left-=this._get(e,"isRTL")?o-a:0,n.left-=r&&n.left===e.input.offset().left?t(document).scrollLeft():0,n.top-=r&&n.top===e.input.offset().top+u?t(document).scrollTop():0,n.left-=Math.min(n.left,n.left+o>s&&s>o?Math.abs(n.left+o-s):0),n.top-=Math.min(n.top,n.top+i>c&&c>i?Math.abs(i+u):0),n},_findPos:function(e){for(var n,r=this._getInst(e),o=this._get(r,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[o?"previousSibling":"nextSibling"];return[(n=t(e).offset()).left,n.top]},_hideDatepicker:function(e){var n,r,o,i,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(n=this._get(a,"showAnim"),r=this._get(a,"duration"),o=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[n]||t.effects[n])?a.dpDiv.hide(n,t.datepicker._get(a,"showOptions"),r,o):a.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?r:null,o),n||o(),this._datepickerShowing=!1,(i=this._get(a,"onClose"))&&i.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var n=t(e.target),r=t.datepicker._getInst(n[0]);(n[0].id===t.datepicker._mainDivId||0!==n.parents("#"+t.datepicker._mainDivId).length||n.hasClass(t.datepicker.markerClassName)||n.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!n.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===r)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,n,r){var o=t(e),i=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(i,n+("M"===r?this._get(i,"showCurrentAtPos"):0),r),this._updateDatepicker(i))},_gotoToday:function(e){var n,r=t(e),o=this._getInst(r[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(n=new Date,o.selectedDay=n.getDate(),o.drawMonth=o.selectedMonth=n.getMonth(),o.drawYear=o.selectedYear=n.getFullYear()),this._notifyChange(o),this._adjustDate(r)},_selectMonthYear:function(e,n,r){var o=t(e),i=this._getInst(o[0]);i["selected"+("M"===r?"Month":"Year")]=i["draw"+("M"===r?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(o)},_selectDay:function(e,n,r,o){var i,a=t(e);t(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((i=this._getInst(a[0])).selectedDay=i.currentDay=t("a",o).html(),i.selectedMonth=i.currentMonth=n,i.selectedYear=i.currentYear=r,this._selectDate(e,this._formatDate(i,i.currentDay,i.currentMonth,i.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,"")},_selectDate:function(e,n){var r,o=t(e),i=this._getInst(o[0]);n=null!=n?n:this._formatDate(i),i.input&&i.input.val(n),this._updateAlternate(i),(r=this._get(i,"onSelect"))?r.apply(i.input?i.input[0]:null,[n,i]):i.input&&i.input.trigger("change"),i.inline?this._updateDatepicker(i):(this._hideDatepicker(),this._lastInput=i.input[0],"object"!=_typeof(i.input[0])&&i.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var n,r,o,i=this._get(e,"altField");i&&(n=this._get(e,"altFormat")||this._get(e,"dateFormat"),r=this._getDate(e),o=this.formatDate(n,r,this._getFormatConfig(e)),t(i).val(o))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(e,n,r){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==_typeof(n)?n.toString():n+""))return null;var o,i,a,u,s=0,c=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),f=(r?r.dayNamesShort:null)||this._defaults.dayNamesShort,d=(r?r.dayNames:null)||this._defaults.dayNames,h=(r?r.monthNamesShort:null)||this._defaults.monthNamesShort,m=(r?r.monthNames:null)||this._defaults.monthNames,p=-1,g=-1,v=-1,b=-1,y=!1,x=function(t){var n=o+1<e.length&&e.charAt(o+1)===t;return n&&o++,n},w=function(t){var e=x(t),r="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,o=new RegExp("^\\d{"+("y"===t?r:1)+","+r+"}"),i=n.substring(s).match(o);if(!i)throw"Missing number at position "+s;return s+=i[0].length,parseInt(i[0],10)},C=function(e,r,o){var i=-1,a=t.map(x(e)?o:r,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var r=e[1];if(n.substr(s,r.length).toLowerCase()===r.toLowerCase())return i=e[0],s+=r.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+s},_=function(){if(n.charAt(s)!==e.charAt(o))throw"Unexpected literal at position "+s;s++};for(o=0;o<e.length;o++)if(y)"'"!==e.charAt(o)||x("'")?_():y=!1;else switch(e.charAt(o)){case"d":v=w("d");break;case"D":C("D",f,d);break;case"o":b=w("o");break;case"m":g=w("m");break;case"M":g=C("M",h,m);break;case"y":p=w("y");break;case"@":p=(u=new Date(w("@"))).getFullYear(),g=u.getMonth()+1,v=u.getDate();break;case"!":p=(u=new Date((w("!")-this._ticksTo1970)/1e4)).getFullYear(),g=u.getMonth()+1,v=u.getDate();break;case"'":x("'")?_():y=!0;break;default:_()}if(s<n.length&&(a=n.substr(s),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===p?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=l?0:-100)),b>-1)for(g=1,v=b;!(v<=(i=this._getDaysInMonth(p,g-1)));)g++,v-=i;if((u=this._daylightSavingAdjust(new Date(p,g-1,v))).getFullYear()!==p||u.getMonth()+1!==g||u.getDate()!==v)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,n){if(!e)return"";var r,o=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,i=(n?n.dayNames:null)||this._defaults.dayNames,a=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,u=(n?n.monthNames:null)||this._defaults.monthNames,s=function(e){var n=r+1<t.length&&t.charAt(r+1)===e;return n&&r++,n},c=function(t,e,n){var r=""+e;if(s(t))for(;r.length<n;)r="0"+r;return r},l=function(t,e,n,r){return s(t)?r[e]:n[e]},f="",d=!1;if(e)for(r=0;r<t.length;r++)if(d)"'"!==t.charAt(r)||s("'")?f+=t.charAt(r):d=!1;else switch(t.charAt(r)){case"d":f+=c("d",e.getDate(),2);break;case"D":f+=l("D",e.getDay(),o,i);break;case"o":f+=c("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":f+=c("m",e.getMonth()+1,2);break;case"M":f+=l("M",e.getMonth(),a,u);break;case"y":f+=s("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":f+=e.getTime();break;case"!":f+=1e4*e.getTime()+this._ticksTo1970;break;case"'":s("'")?f+="'":d=!0;break;default:f+=t.charAt(r)}return f},_possibleChars:function(t){var e,n="",r=!1,o=function(n){var r=e+1<t.length&&t.charAt(e+1)===n;return r&&e++,r};for(e=0;e<t.length;e++)if(r)"'"!==t.charAt(e)||o("'")?n+=t.charAt(e):r=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":o("'")?n+="'":r=!0;break;default:n+=t.charAt(e)}return n},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,"dateFormat"),r=t.lastVal=t.input?t.input.val():null,o=this._getDefaultDate(t),i=o,a=this._getFormatConfig(t);try{i=this.parseDate(n,r,a)||o}catch(t){r=e?"":r}t.selectedDay=i.getDate(),t.drawMonth=t.selectedMonth=i.getMonth(),t.drawYear=t.selectedYear=i.getFullYear(),t.currentDay=r?i.getDate():0,t.currentMonth=r?i.getMonth():0,t.currentYear=r?i.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,n,r){var o=null==n||""===n?r:"string"==typeof n?function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),n,t.datepicker._getFormatConfig(e))}catch(t){}for(var r=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),i=r.getMonth(),a=r.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,s=u.exec(n);s;){switch(s[2]||"d"){case"d":case"D":a+=parseInt(s[1],10);break;case"w":case"W":a+=7*parseInt(s[1],10);break;case"m":case"M":i+=parseInt(s[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,i));break;case"y":case"Y":o+=parseInt(s[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,i))}s=u.exec(n)}return new Date(o,i,a)}(n):"number"==typeof n?isNaN(n)?r:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(n):new Date(n.getTime());return(o=o&&"Invalid Date"===o.toString()?r:o)&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var r=!e,o=t.selectedMonth,i=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),o===t.selectedMonth&&i===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(r?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var n=this._get(e,"stepMonths"),r="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(r,-n,"M")},next:function(){t.datepicker._adjustDate(r,+n,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(r)},selectDay:function(){return t.datepicker._selectDay(r,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(r,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(r,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,r,o,i,a,u,s,c,l,f,d,h,m,p,g,v,b,y,x,w,C,_,k,S,T,E,O,D,N,A,M,I,z,B,R,P,L,H,F=new Date,V=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),j=this._get(t,"isRTL"),U=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),$=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),K=1!==Y[0]||1!==Y[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-$,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-Y[0]*Y[1]+1,Q.getDate())),e=J&&e<J?J:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,n=this._get(t,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z-G,1)),this._getFormatConfig(t)):n,r=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+n+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"e":"w")+"'>"+n+"</span></a>",o=this._get(t,"nextText"),o=q?this.formatDate(o,this._daylightSavingAdjust(new Date(tt,Z+G,1)),this._getFormatConfig(t)):o,i=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+o+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(j?"w":"e")+"'>"+o+"</span></a>",a=this._get(t,"currentText"),u=this._get(t,"gotoCurrent")&&t.currentDay?X:V,a=q?this.formatDate(a,u,this._getFormatConfig(t)):a,s=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(j?s:"")+(this._isInRange(t,u)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(j?"":s)+"</div>":"",l=parseInt(this._get(t,"firstDay"),10),l=isNaN(l)?0:l,f=this._get(t,"showWeek"),d=this._get(t,"dayNames"),h=this._get(t,"dayNamesMin"),m=this._get(t,"monthNames"),p=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),y=this._getDefaultDate(t),x="",C=0;C<Y[0];C++){for(_="",this.maxRows=4,k=0;k<Y[1];k++){if(S=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),T=" ui-corner-all",E="",K){if(E+="<div class='ui-datepicker-group",Y[1]>1)switch(k){case 0:E+=" ui-datepicker-group-first",T=" ui-corner-"+(j?"right":"left");break;case Y[1]-1:E+=" ui-datepicker-group-last",T=" ui-corner-"+(j?"left":"right");break;default:E+=" ui-datepicker-group-middle",T=""}E+="'>"}for(E+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===C?j?i:r:"")+(/all|right/.test(T)&&0===C?j?r:i:"")+this._generateMonthYearHeader(t,Z,tt,J,Q,C>0||k>0,m,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",O=f?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)O+="<th scope='col'"+((w+l+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[D=(w+l)%7]+"'>"+h[D]+"</span></th>";for(E+=O+"</tr></thead><tbody>",N=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,N)),A=(this._getFirstDayOfMonth(tt,Z)-l+7)%7,M=Math.ceil((A+N)/7),I=K&&this.maxRows>M?this.maxRows:M,this.maxRows=I,z=this._daylightSavingAdjust(new Date(tt,Z,1-A)),B=0;B<I;B++){for(E+="<tr>",R=f?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(z)+"</td>":"",w=0;w<7;w++)P=g?g.apply(t.input?t.input[0]:null,[z]):[!0,""],H=(L=z.getMonth()!==Z)&&!b||!P[0]||J&&z<J||Q&&z>Q,R+="<td class='"+((w+l+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+(z.getTime()===S.getTime()&&Z===t.selectedMonth&&t._keyEvent||y.getTime()===z.getTime()&&y.getTime()===S.getTime()?" "+this._dayOverClass:"")+(H?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+P[1]+(z.getTime()===X.getTime()?" "+this._currentClass:"")+(z.getTime()===V.getTime()?" ui-datepicker-today":""))+"'"+(L&&!v||!P[2]?"":" title='"+P[2].replace(/'/g,"&#39;")+"'")+(H?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(L&&!v?"&#xa0;":H?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===V.getTime()?" ui-state-highlight":"")+(z.getTime()===X.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);E+=R+"</tr>"}++Z>11&&(Z=0,tt++),_+=E+="</tbody></table>"+(K?"</div>"+(Y[0]>0&&k===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}x+=_}return x+=c,t._keyEvent=!1,x},_generateMonthYearHeader:function(t,e,n,r,o,i,a,u){var s,c,l,f,d,h,m,p,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),b=this._get(t,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",x="";if(i||!g)x+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(s=r&&r.getFullYear()===n,c=o&&o.getFullYear()===n,x+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!s||l>=r.getMonth())&&(!c||l<=o.getMonth())&&(x+="<option value='"+l+"'"+(l===e?" selected='selected'":"")+">"+u[l]+"</option>");x+="</select>"}if(b||(y+=x+(!i&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",i||!v)y+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(f=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),m=(h=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(f[0]),p=Math.max(m,h(f[1]||"")),m=r?Math.max(m,r.getFullYear()):m,p=o?Math.min(p,o.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m<=p;m++)t.yearshtml+="<option value='"+m+"'"+(m===n?" selected='selected'":"")+">"+m+"</option>";t.yearshtml+="</select>",y+=t.yearshtml,t.yearshtml=null}return y+=this._get(t,"yearSuffix"),b&&(y+=(!i&&g&&v?"":"&#xa0;")+x),y+"</div>"},_adjustInstDate:function(t,e,n){var r=t.selectedYear+("Y"===n?e:0),o=t.selectedMonth+("M"===n?e:0),i=Math.min(t.selectedDay,this._getDaysInMonth(r,o))+("D"===n?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(r,o,i)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),r=this._getMinMaxDate(t,"max"),o=n&&e<n?n:e;return r&&o>r?r:o},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,n,r){var o=this._getNumberOfMonths(t),i=this._daylightSavingAdjust(new Date(n,r+(e<0?e:o[0]*o[1]),1));return e<0&&i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth())),this._isInRange(t,i)},_isInRange:function(t,e){var n,r,o=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),a=null,u=null,s=this._get(t,"yearRange");return s&&(n=s.split(":"),r=(new Date).getFullYear(),a=parseInt(n[0],10),u=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(a+=r),n[1].match(/[+\-].*/)&&(u+=r)),(!o||e.getTime()>=o.getTime())&&(!i||e.getTime()<=i.getTime())&&(!a||e.getFullYear()>=a)&&(!u||e.getFullYear()<=u)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,n,r){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var o=e?"object"==_typeof(e)?e:this._daylightSavingAdjust(new Date(r,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),o,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(n)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker})?r.apply(e,o):r)||(t.exports=i)},Y7JG:function(t,e,n){var r,o,i;o=[n("EVdn"),n("b1uY"),n("Qwlt"),n("vBzC"),n("yw1R"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}return t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),n=this.element;return t.each(["min","max","step"],function(t,r){var o=n.attr(r);null!=o&&o.length&&(e[r]=o)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){var n;function r(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n}))}n=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),r.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,r.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var n=this.options,r=t.ui.keyCode;switch(e.keyCode){case r.UP:return this._repeat(null,1,e),!0;case r.DOWN:return this._repeat(null,-1,e),!0;case r.PAGE_UP:return this._repeat(null,n.page,e),!0;case r.PAGE_DOWN:return this._repeat(null,-n.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t)||(this.counter||(this.counter=1),this.spinning=!0,0))},_repeat:function(t,e,n){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,n)},t),this._spin(e*this.options.step,n)},_spin:function(t,e){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:n})||(this._value(n),this.counter++)},_increment:function(e){var n=this.options.incremental;return n?t.isFunction(n)?n(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_adjustValue:function(t){var e,n,r=this.options;return n=t-(e=null!==r.min?r.min:0),t=e+(n=Math.round(n/r.step)*r.step),t=parseFloat(t.toFixed(this._precision())),null!==r.max&&t>r.max?r.max:null!==r.min&&t<r.min?r.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var n,r,o;if("culture"===t||"numberFormat"===t)return n=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(n));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(r=this.buttons.first().find(".ui-icon"),this._removeClass(r,null,this.options.icons.up),this._addClass(r,null,e.up),o=this.buttons.last().find(".ui-icon"),this._removeClass(o,null,this.options.icons.down),this._addClass(o,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:e(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var n;""!==t&&null!==(n=this._parse(t))&&(e||(n=this._adjustValue(n)),t=this._format(n)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());e(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner})?r.apply(e,o):r)||(t.exports=i)},ZNhe:function(t,e,n){n("7x9u")},b1uY:function(t,e,n){var r,o,i;o=[n("EVdn"),n("u1Bl"),n("UTCq"),n("vBzC"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){var e;return t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,n){var r="iconPosition"!==e,o=r?this.options.iconPosition:n,i="top"===o||"bottom"===o;this.icon?r&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),r&&this._addClass(this.icon,null,n),this._attachIcon(o),i?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,n=void 0===t.icon?this.options.icon:t.icon;e||n||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),t.fn.button=(e=t.fn.button,function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==_typeof(arguments[0])&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button})?r.apply(e,o):r)||(t.exports=i)},endd:function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},eqyj:function(t,e,n){"use strict";var r=n("xTJ+");t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"fE+E":function(t,e,n){(function(t){!function(e){"use strict";var n,r,o,i,a=function t(e){var n=e,r=function(){return n};return{get:r,set:function(t){n=t},clone:function(){return t(r())}}},u=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!u.get("powerpaste")||(void 0!==e.window.console&&e.window.console.log&&e.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},c=function(t,e){return{clipboard:t,quirks:e}},l=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},f=function(t,e){t.addCommand("mceTogglePlainTextPaste",function(){!function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),l(t,!1)):(e.pasteFormat.set("text"),l(t,!0)),t.focus()}(t,e)}),t.addCommand("mceInsertClipboardContent",function(t,n){n.content&&e.pasteHtml(n.content,n.internal),n.text&&e.pasteText(n.text)})},d=function(t){return function(){return t}},h=d(!1),m=d(!0),p=function(){return g},g=(n=function(t){return t.isNone()},i={fold:function(t,e){return t()},is:h,isSome:h,isNone:m,getOr:o=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(void 0),or:o,orThunk:r,map:p,each:function(){},bind:p,exists:h,forall:m,filter:p,equals:n,equals_:n,toArray:function(){return[]},toString:d("none()")},Object.freeze&&Object.freeze(i),i),v=function t(e){var n=d(e),r=function(){return i},o=function(t){return t(e)},i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:m,isNone:h,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return t(n(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?i:g},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(h,function(t){return n(e,t)})}};return i},b=v,y=p,x=("function",function(t){return"function"===function(t){if(null===t)return"null";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}(t)}),w=Array.prototype.slice,C=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},_=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},k=x(Array.from)?Array.from:function(t){return w.call(t)},S={},T={exports:S};!function(e,n,r,o){!function(e){"object"==_typeof(n)&&void 0!==r?r.exports=e():("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof o&&o;if(!s&&c)return c(u,!0);if(a)return a(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[u]={exports:{}};e[u][0].call(f.exports,function(t){return i(e[u][1][t]||t)},f,f.exports,t,e,n,r)}return n[u].exports}for(var a="function"==typeof o&&o,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var t=s(h);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new p(t,e)),1!==l.length||f||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,e,n){(function(t){!function(n){var r=setTimeout;function o(){}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 a(t,e){for(;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(t){return void s(e.promise,t)}u(e.promise,r)}else(1===t._state?u:s)(e.promise,t._value)})):t._deferreds.push(e)}function u(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 c(t);if("function"==typeof n)return void f((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){s(t,e)}var r,o}function s(t,e){t._state=2,t._value=e,c(t)}function c(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++)a(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,u(e,t))},function(t){n||(n=!0,s(e,t))})}catch(t){if(n)return;n=!0,s(e,t)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(o);return a(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,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){o(i,t)},n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}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 t?function(e){t(e)}:function(t){r(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},void 0!==e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(t,e,n){(function(e,r){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},s=0;function c(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n.setImmediate="function"==typeof e?e:function(t){var e=s++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o(function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))}),e},n.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)})}(0,S,T,void 0);var E=T.exports.boltExport,O=function t(n){var r=y(),o=[],i=function(t){a()?u(t):o.push(t)},a=function(){return r.isSome()},u=function(t){r.each(function(n){e.setTimeout(function(){t(n)},0)})};return n(function(t){r=b(t),function(t){_(t,u)}(o),o=[]}),{get:i,map:function(e){return t(function(t){i(function(n){t(e(n))})})},isReady:a}},D=O,N=function(t){e.setTimeout(function(){throw t},0)},A=function(t){return function t(e){var n=function(t){e().then(t,N)};return{map:function(n){return t(function(){return e().then(n)})},bind:function(n){return t(function(){return e().then(function(t){return n(t).toPromise()})})},anonBind:function(n){return t(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return D(n)},toCached:function(){var n=null;return t(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}}(function(){return new E(t)})},M=function(t,e){return function(t,e){return e(function(e){var n=[],r=0;0===t.length?e([]):_(t,function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=t.length&&e(n)}}(i))})})}(C(t,e),A)},I=tinymce.util.Tools.resolve("tinymce.Env"),z=tinymce.util.Tools.resolve("tinymce.util.Delay"),B=tinymce.util.Tools.resolve("tinymce.util.Tools"),R=tinymce.util.Tools.resolve("tinymce.util.VK"),P="\x3c!-- x-tinymce/html --\x3e",L={mark:function(t){return P+t},unmark:function(t){return t.replace(P,"")},isMarked:function(t){return-1!==t.indexOf(P)},internalHtmlMime:function(){return"x-tinymce/html"}},H=tinymce.util.Tools.resolve("tinymce.html.Entities"),F=function(t){return t.replace(/\r?\n/g,"<br>")},V=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==_typeof(e)){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+H.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="</"+e+">",a=B.map(r,function(t){return t.split(/\n/).join("<br />")});return 1===a.length?a[0]:B.map(a,function(t){return o+t+i}).join("")},j={isPlainText:function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},convert:function(t,e,n){return e?V(t,!0===e?"p":e,n):F(t)},toBRs:F,toBlockElements:V},U=tinymce.util.Tools.resolve("tinymce.html.DomParser"),W=tinymce.util.Tools.resolve("tinymce.html.Serializer"),q=tinymce.util.Tools.resolve("tinymce.html.Node"),Y=tinymce.util.Tools.resolve("tinymce.html.Schema"),$={shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}};function G(t,e){return B.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}var K={filter:G,innerText:function(t){var e=Y(),n=U({},e),r="",o=e.getShortEndedElements(),i=B.makeMap("script noscript style textarea video audio iframe object"," "),a=e.getBlockElements();return t=G(t,[/<!\[[^\]]+\]>/g]),function t(e){var n=e.name,u=e;if("br"!==n){if("wbr"!==n)if(o[n]&&(r+=" "),i[n])r+=" ";else{if(3===e.type&&(r+=e.value),!e.shortEnded&&(e=e.firstChild))do{t(e)}while(e=e.next);a[n]&&u.next&&(r+="\n","p"===n&&(r+="\n"))}}else r+="\n"}(n.parse(t)),r},trimHtml:function(t){return G(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?" ":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==e.navigator.userAgent.indexOf(" Edge/")}};function X(t){var e,n;return n=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),B.each(n,function(n){if(n.test(t))return e=!0,!1}),e}function J(t,e,n,r){var o,i={},a=t.dom.parseStyle(r);return B.each(a,function(a,u){switch(u){case"mso-list":(o=/\w+ \w+([0-9]+)/i.exec(r))&&(n._listLevel=parseInt(o[1],10)),/Ignore/i.test(a)&&n.firstChild&&(n._listIgnore=!0,n.firstChild._listIgnore=!0);break;case"horiz-align":u="text-align";break;case"vert-align":u="vertical-align";break;case"font-color":case"mso-foreground":u="color";break;case"mso-background":case"mso-highlight":u="background";break;case"font-weight":case"font-style":return void("normal"!==a&&(i[u]=a));case"mso-element":if(/^(comment|comment-list)$/i.test(a))return void n.remove()}0!==u.indexOf("mso-comment")?0!==u.indexOf("mso-")&&("all"===$.getRetainStyleProps(t)||e&&e[u])&&(i[u]=a):n.remove()}),/(bold)/i.test(i["font-weight"])&&(delete i["font-weight"],n.wrap(new q("b",1))),/(italic)/i.test(i["font-style"])&&(delete i["font-style"],n.wrap(new q("i",1))),(i=t.dom.serializeStyle(i,n.name))||null}var Q={preProcess:function(t,e){return $.shouldUseDefaultFilters(t)?function(t,e){var n,r;(n=$.getRetainStyleProps(t))&&(r=B.makeMap(n.split(/[, ]/))),e=K.filter(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return e.length>0?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join(" "):""}]]);var o=$.getWordValidElements(t),i=Y({valid_elements:o,valid_children:"-li[p]"});B.each(i.elements,function(t){t.attributes.class||(t.attributes.class={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var a=U({},i);a.addAttributeFilter("style",function(e){for(var n,o=e.length;o--;)(n=e[o]).attr("style",J(t,r,n,n.attr("style"))),"span"===n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),a.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),a.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),a.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var u=a.parse(e);return $.shouldConvertWordFakeLists(t)&&function(t){var e,n,r=1;function o(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)do{e+=o(t)}while(t=t.next);return e}function i(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!i(t,e))return!1}while(t=t.next);return!0}function a(t,o,a){var u=t._listLevel||r;u!==r&&(u<r?e&&(e=e.parent.parent):(n=e,e=null)),e&&e.name===o?e.append(t):(n=n||e,e=new q(o,1),a>1&&e.attr("start",""+a),t.wrap(e)),t.name="li",u>r&&n&&n.lastChild.append(e),r=u,function t(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)do{t(e)}while(e=e.next)}(t),i(t,/^\u00a0+/),i(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),i(t,/^\u00a0+/)}for(var u=[],s=t.firstChild;null!=s;)if(u.push(s),null!==(s=s.walk()))for(;void 0!==s&&s.parent!==t;)s=s.walk();for(var c=0;c<u.length;c++)if("p"===(t=u[c]).name&&t.firstChild){var l=o(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){a(t,"ul");continue}if(X(l)){var f=/([0-9]+)\./.exec(l),d=1;f&&(d=parseInt(f[1],10)),a(t,"ol",d);continue}if(t._listLevel){a(t,"ul",1);continue}e=null}else n=e,e=null}(u),W({validate:t.settings.validate},i).serialize(u)}(t,e):e},isWordContent:function(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}},Z=function(t,e){return{content:t,cancelled:e}},tt=function(t,e,n){var r=Q.isWordContent(e);return function(t,e,n,r){var o=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})}(t,e,n,r),i=function(t,e){var n=U({},t.schema);n.addNodeFilter("meta",function(t){B.each(t,function(t){return t.remove()})});var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return W({validate:t.settings.validate},t.schema).serialize(r)}(t,o.content);return t.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?function(t,e,n,r){var o=t.dom.create("div",{style:"display:none"},e),i=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})}(t,o,n,r);return Z(i.node.innerHTML,i.isDefaultPrevented())}(t,i,n,r):Z(i,o.isDefaultPrevented())}(t,r?Q.preProcess(t,e):e,n,r)},et=function(t,e){return t.insertContent(e,{merge:$.shouldMergeFormats(t),paste:!0}),!0},nt=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},rt=function(t){return nt(t)&&/.(gif|jpe?g|png)$/.test(t)},ot=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!nt(e))&&function(t,e,n){return t.undoManager.extra(function(){n(t,e)},function(){t.execCommand("mceInsertLink",!1,e)}),!0}(t,e,n)},it=function(t,e,n){return!!rt(e)&&function(t,e,n){return t.undoManager.extra(function(){n(t,e)},function(){t.insertContent('<img src="'+e+'">')}),!0}(t,e,n)},at={isImageUrl:rt,isAbsoluteUrl:nt,insertContent:function(t,e,n){n||!1===$.isSmartPasteEnabled(t)?et(t,e):function(t,e){B.each([ot,it,et],function(n){return!0!==n(t,e,et)})}(t,e)}},ut=function(t){return"\n"===t||"\r"===t},st=function(t,e,n,r){var o=tt(t,e,n);!1===o.cancelled&&at.insertContent(t,o.content,r)},ct=function(t,e,n){var r=n||L.isMarked(e);st(t,L.unmark(e),r,!1)},lt=function(t,e){var n=function(t){return function(t,e,n){return _(t,function(t){n=e(n,t)}),n}(t,function(e,n){return-1!==" \f\t\v".indexOf(n)||" "===n?e.pcIsSpace||""===e.str||e.str.length===t.length-1||function(t,e){return e<t.length&&e>=0&&ut(t[e])}(t,e.str.length+1)?{pcIsSpace:!1,str:e.str+" "}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:ut(n),str:e.str+n}},{pcIsSpace:!1,str:""}).str}(t.dom.encode(e).replace(/\r\n/g,"\n")),r=j.convert(n,t.settings.forced_root_block,t.settings.forced_root_block_attrs);st(t,r,!1,!0)},ft=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&n.length>0&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(t){e[o]=""}}}return e},dt=function(t,e){return e in t&&t[e].length>0},ht=function(t){return dt(t,"text/html")||dt(t,"text/plain")},mt=K.createIdGenerator("mceclip"),pt=function(t,n,r){var o,i="paste"===n.type?n.clipboardData:n.dataTransfer;if(t.settings.paste_data_images&&i){var a=function(t){var e=t.items?C(k(t.items),function(t){return t.getAsFile()}):[],n=t.files?k(t.files):[];return function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i)&&n.push(i)}return n}(e.length>0?e:n,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)})}(i);if(a.length>0)return n.preventDefault(),(o=a,M(o,function(t){return A(function(e){var n=t.getAsFile?t.getAsFile():t,r=new window.FileReader;r.onload=function(){e({blob:n,uri:r.result})},r.readAsDataURL(n)})})).get(function(n){r&&t.selection.setRng(r),_(n,function(n){!function(t,n){var r,o,i,a,u=-1!==(o=(r=n.uri).indexOf(","))?r.substr(o+1):null,s=mt(),c=t.settings.images_reuse_filename&&n.blob.name?function(t,e){var n=e.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);return n?t.dom.encode(n[1]):null}(t,n.blob.name):s,l=new e.Image;if(l.src=n.uri,a=l,!(i=t.settings).images_dataimg_filter||i.images_dataimg_filter(a)){var f,d=t.editorUpload.blobCache,h=void 0;(f=d.findFirst(function(t){return t.base64()===u}))?h=f:(h=d.create(s,n.blob,u,c),d.add(h)),ct(t,'<img src="'+h.blobUri()+'">',!1)}else ct(t,'<img src="'+n.uri+'">',!1)}(t,n)})}),!0}return!1},gt=function(t){return R.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},vt=function(t,n,r){var o,i,u=(o=a(y()),{clear:function(){o.set(y())},set:function(t){o.set(b(t))},isSet:function(){return o.get().isSome()},on:function(t){o.get().each(t)}});function s(e,r,o,i){var a,u,s;dt(e,"text/html")?a=e["text/html"]:(a=n.getHtml(),i=i||L.isMarked(a),n.isDefaultContent(a)&&(o=!0)),a=K.trimHtml(a),n.remove(),u=!1===i&&j.isPlainText(a),s=at.isImageUrl(a),(!a.length||u&&!s)&&(o=!0),(o||s)&&(a=dt(e,"text/plain")&&u?e["text/plain"]:K.innerText(a)),n.isDefaultContent(a)?r||t.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):o?lt(t,a):ct(t,a,i)}t.on("keydown",function(r){function o(t){gt(t)&&!t.isDefaultPrevented()&&n.remove()}if(gt(r)&&!r.isDefaultPrevented()){if((i=r.shiftKey&&86===r.keyCode)&&I.webkit&&-1!==e.navigator.userAgent.indexOf("Version/"))return;if(r.stopImmediatePropagation(),u.set(r),window.setTimeout(function(){u.clear()},100),I.ie&&i)return r.preventDefault(),void function(t,e){t.fire("paste",{ieFake:e})}(t,!0);n.remove(),n.create(),t.once("keyup",o),t.once("paste",function(){t.off("keyup",o)})}}),t.on("paste",function(o){var a=u.isSet(),c=function(t,e){var n=ft(o.clipboardData||t.getDoc().dataTransfer);return K.isMsEdge()?B.extend(n,{"text/html":""}):n}(t),l="text"===r.get()||i,f=dt(c,L.internalHtmlMime());i=!1,o.isDefaultPrevented()||function(t){var n=o.clipboardData;return-1!==e.navigator.userAgent.indexOf("Android")&&n&&n.items&&0===n.items.length}()?n.remove():ht(c)||!pt(t,o,n.getLastRng()||t.selection.getRng())?(a||o.preventDefault(),!I.ie||a&&!o.ieFake||dt(c,"text/html")||(n.create(),t.dom.bind(n.getEl(),"paste",function(t){t.stopPropagation()}),t.getDoc().execCommand("Paste",!1,null),c["text/html"]=n.getHtml()),dt(c,"text/html")?(o.preventDefault(),f||(f=L.isMarked(c["text/html"])),s(c,a,l,f)):z.setEditorTimeout(t,function(){s(c,a,l,f)},0)):n.remove()})},bt=function(t){return I.ie&&t.inline?e.document.body:t.getBody()},yt=function(t){return t.dom.get("mcepastebin")},xt=function(t,e){return e===t},wt=function(t,e){var n,r=yt(t);return(n=r)&&"mcepastebin"===n.id&&xt(e,r.innerHTML)},Ct=function(t){var e=a(null);return{create:function(){return function(t,e,n){var r,o=t.dom,i=t.getBody();e.set(t.selection.getRng()),r=t.dom.add(bt(t),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(I.ie||I.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),function(t,e,n){(function(t){return bt(t)!==t.getBody()})(t)&&t.dom.bind(e,"paste keyup",function(e){wt(t,n)||t.fire("paste")})}(t,r,n),r.focus(),t.selection.select(r,!0)}(t,e,"%MCEPASTEBIN%")},remove:function(){return function(t,e){if(yt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(t,e)},getEl:function(){return yt(t)},getHtml:function(){return function(t){var e,n,r,o,i,a=function(e,n){e.appendChild(n),t.dom.remove(n,!0)};for(n=B.grep(bt(t).childNodes,function(t){return"mcepastebin"===t.id}),e=n.shift(),B.each(n,function(t){a(e,t)}),r=(o=t.dom.select("div[id=mcepastebin]",e)).length-1;r>=0;r--)i=t.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(t)},getLastRng:function(){return e.get()},isDefault:function(){return wt(t,"%MCEPASTEBIN%")},isDefaultContent:function(t){return xt("%MCEPASTEBIN%",t)}}},_t=function(t,e,n,r){!function(t,e,n){if(!function(t){return!1===I.iOS&&void 0!==t&&"function"==typeof t.setData&&!0!==K.isMsEdge()}(t))return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(L.internalHtmlMime(),e),!0}catch(t){return!1}}(t.clipboardData,e.html,e.text)?n(e.html,r):(t.preventDefault(),r())},kt=function(t){return function(e,n){var r=L.mark(e),o=t.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=t.dom.create("div",{contenteditable:"true"},r);t.dom.setStyles(o,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),o.appendChild(i),t.dom.add(t.getBody(),o);var a=t.selection.getRng();i.focus();var u=t.dom.createRng();u.selectNodeContents(i),t.selection.setRng(u),z.setTimeout(function(){t.selection.setRng(a),o.parentNode.removeChild(o),n()},0)}},St=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Tt=function(t){return!t.selection.isCollapsed()||function(t){return!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody())}(t)},Et=function(t){t.on("cut",function(t){return function(e){Tt(t)&&_t(e,St(t),kt(t),function(){if(I.browser.isChrome()){var e=t.selection.getRng();z.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)}else t.execCommand("Delete")})}}(t)),t.on("copy",function(t){return function(e){Tt(t)&&_t(e,St(t),kt(t),function(){})}}(t))},Ot=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Dt=function(t,e){return Ot.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Nt=function(t,e){t.focus(),t.selection.setRng(e)},At=function(t,e,n){$.shouldBlockDrop(t)&&t.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),$.shouldPasteDataImages(t)||t.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&e.files.length>0&&t.preventDefault()}),t.on("drop",function(r){var o,i;if(i=Dt(t,r),!r.isDefaultPrevented()&&!n.get()){o=e.getDataTransferItems(r.dataTransfer);var a,u=e.hasContentType(o,L.internalHtmlMime());if((e.hasHtmlOrText(o)&&(!(a=o["text/plain"])||0!==a.indexOf("file://"))||!e.pasteImageData(r,i))&&i&&$.shouldFilterDrop(t)){var s=o["mce-internal"]||o["text/html"]||o["text/plain"];s&&(r.preventDefault(),z.setEditorTimeout(t,function(){t.undoManager.transact(function(){o["mce-internal"]&&t.execCommand("Delete"),Nt(t,i),s=K.trimHtml(s),o["text/html"]?e.pasteHtml(s,u):e.pasteText(s)})}))}}}),t.on("dragstart",function(t){n.set(!0)}),t.on("dragover dragend",function(e){$.shouldPasteDataImages(t)&&!1===n.get()&&(e.preventDefault(),Nt(t,Dt(t,e))),"dragend"===e.type&&n.set(!1)})},Mt=function(t){var e=t.plugins.paste,n=$.getPreProcess(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=$.getPostProcess(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})};function It(t,e){t.on("PastePreProcess",function(n){n.content=e(t,n.content,n.internal,n.wordContent)})}function zt(t,e){if(!Q.isWordContent(e))return e;var n=[];B.each(t.schema.getBlockElements(),function(t,e){n.push(e)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=K.filter(e,[[r,"$1"]]),K.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function Bt(t,e,n,r){if(r||n)return e;var o,i=$.getWebkitStyles(t);if(!1===$.shouldRemoveWebKitStyles(t)||"all"===i)return e;if(i&&(o=i.split(/[, ]/)),o){var a=t.dom,u=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var i=a.parseStyle(a.decode(n)),s={};if("none"===o)return e+r;for(var c=0;c<o.length;c++){var l=i[o[c]],f=a.getStyle(u,o[c],!0);/color/.test(o[c])&&(l=a.toHex(l),f=a.toHex(f)),f!==l&&(s[o[c]]=l)}return(s=a.serializeStyle(s,"span"))?e+' style="'+s+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function Rt(t,e){t.$("a",e).find("font,u").each(function(e,n){t.dom.remove(n,!0)})}var Pt=function(t){I.webkit&&It(t,Bt),I.ie&&(It(t,zt),function(t,e){t.on("PastePostProcess",function(n){e(t,n.node)})}(t,Rt))},Lt=function(t,e){return function(n){n.setActive("text"===e.pasteFormat.get());var r=function(t){return n.setActive(t.state)};return t.on("PastePlainTextToggle",r),function(){return t.off("PastePlainTextToggle",r)}}},Ht=function(t,e){t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Lt(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Lt(t,e)})};u.add("paste",function(t){if(!1===s(t)){var e=a(!1),n=function(t,e){var n=Ct(t);return t.on("PreInit",function(){return function(t,e,n){var r;vt(t,e,n),t.parser.addNodeFilter("img",function(e,n,o){var i=function(t){t.attr("data-mce-object")||r===I.transparentSrc||t.remove()},a=function(t){return 0===t.indexOf("webkit-fake-url")},u=function(t){return 0===t.indexOf("data:")};if(!t.settings.paste_data_images&&function(t){return t.data&&!0===t.data.paste}(o))for(var s=e.length;s--;)(r=e[s].attr("src"))&&(a(r)?i(e[s]):!t.settings.allow_html_data_urls&&u(r)&&i(e[s]))})}(t,n,e)}),{pasteFormat:e,pasteHtml:function(e,n){return ct(t,e,n)},pasteText:function(e){return lt(t,e)},pasteImageData:function(e,n){return pt(t,e,n)},getDataTransferItems:ft,hasHtmlOrText:ht,hasContentType:dt}}(t,a($.isPasteAsTextEnabled(t)?"text":"html")),r=Pt(t);return Ht(t,n),f(t,n),Mt(t),Et(t),At(t,n,e),c(n,r)}})}(window)}).call(this,n("yLpj"))},g7np:function(t,e,n){"use strict";var r=n("2SVd"),o=n("5oMp");t.exports=function(t,e){return t&&!r(e)?o(t,e):e}},hOyB:function(t,e,n){n("JAFY")},hVuo:function(t,e,n){n("4tak")},iGnl:function(t,e,n){var r,o,i;o=[n("EVdn"),n("NHgk"),n("Qwlt"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){var e=!1;return t(document).on("mouseup",function(){e=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(n){if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,o=1===n.which,i=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&t(n.target).closest(this.options.cancel).length;return!(o&&!i&&this._mouseCapture(n)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return r._mouseMove(t)},this._mouseUpDelegate=function(t){return r._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,0)))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,e=!1,n.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?r.apply(e,o):r)||(t.exports=i)},"jfS+":function(t,e,n){"use strict";var r=n("endd");function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},r15H:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt"),n("GC/X")],void 0===(i="function"==typeof(r=function(t){return t.fn.labels=function(){var e,n,r,o,i;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(o=this.eq(0).parents("label"),(r=this.attr("id"))&&(i=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),n="label[for='"+t.ui.escapeSelector(r)+"']",o=o.add(i.find(n).addBack(n))),this.pushStack(o))}})?r.apply(e,o):r)||(t.exports=i)},tQ2B:function(t,e,n){"use strict";var r=n("xTJ+"),o=n("Rn+g"),i=n("MLWZ"),a=n("g7np"),u=n("w0Vi"),s=n("OTTw"),c=n("LYNF");t.exports=function(t){return new Promise(function(e,l){var f=t.data,d=t.headers;r.isFormData(f)&&delete d["Content-Type"];var h=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",p=t.auth.password||"";d.Authorization="Basic "+btoa(m+":"+p)}var g=a(t.baseURL,t.url);if(h.open(t.method.toUpperCase(),i(g,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:t,request:h};o(e,l,r),h=null}},h.onabort=function(){h&&(l(c("Request aborted",t,"ECONNABORTED",h)),h=null)},h.onerror=function(){l(c("Network Error",t,null,h)),h=null},h.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),l(c(e,t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var v=n("eqyj"),b=(t.withCredentials||s(g))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;b&&(d[t.xsrfHeaderName]=b)}if("setRequestHeader"in h&&r.forEach(d,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete d[e]:h.setRequestHeader(e,t)}),r.isUndefined(t.withCredentials)||(h.withCredentials=!!t.withCredentials),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),l(t),h=null)}),void 0===f&&(f=null),h.send(f)})}},u1Bl:function(t,e,n){var r,o,i;o=[n("EVdn"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){var e=/ui-corner-([a-z]){2,6}/g;return t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,n=[];t.each(this.options.items,function(r,o){var i,a={};if(o)return"controlgroupLabel"===r?((i=e.element.find(o)).each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(i,null,"ui-widget ui-widget-content ui-state-default"),void(n=n.concat(i.get()))):void(t.fn[r]&&(a=e["_"+r+"Options"]?e["_"+r+"Options"]("middle"):{classes:{}},e.element.find(o).each(function(){var o=t(this),i=o[r]("instance"),u=t.widget.extend({},a);if("button"!==r||!o.parent(".ui-spinner").length){i||(i=o[r]()[r]("instance")),i&&(u.classes=e._resolveClassesValues(u.classes,i)),o[r](u);var s=o[r]("widget");t.data(s[0],"ui-controlgroup-data",i||o[r]("instance")),n.push(s[0])}})))}),this.childWidgets=t(t.unique(n)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var n=t(this).data("ui-controlgroup-data");n&&n[e]&&n[e]()})},_updateCornerClass:function(t,e){var n=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,n)},_buildSimpleOptions:function(t,e){var n="vertical"===this.options.direction,r={classes:{}};return r.classes[e]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[t],r},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(n,r){var o={};return t.each(n,function(i){var a=r.options.classes[i]||"";a=t.trim(a.replace(e,"")),o[i]=(a+" "+n[i]).replace(/\s+/g," ")}),o},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var e,n=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,r){var o=e[r]().data("ui-controlgroup-data");if(o&&n["_"+o.widgetName+"Options"]){var i=n["_"+o.widgetName+"Options"](1===e.length?"only":r);i.classes=n._resolveClassesValues(i.classes,o),o.element[o.widgetName](i)}else n._updateCornerClass(e[r](),r)}),this._callChildMethod("refresh"))}})})?r.apply(e,o):r)||(t.exports=i)},vBzC:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?r.apply(e,o):r)||(t.exports=i)},vDqi:function(t,e,n){t.exports=n("zuR4")},vFQT:function(t,e,n){n("fE+E")},"vn/0":function(t,e,n){(function(t){!function(e){"use strict";var n,r,o,i,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),s=function(t){return function(e){return function(t){if(null===t)return"null";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}(e)===t}},c=s("string"),l=s("array"),f=s("boolean"),d=s("function"),h=function(t){var e=t.getParam("link_assume_external_targets",!1);return f(e)&&e?1:!c(e)||"http"!==e&&"https"!==e?0:e},m=function(t){return t.getParam("link_context_toolbar",!1,"boolean")},p=function(t){return t.getParam("default_link_target")},g=function(t){return t.getParam("target_list",!0)},v=function(t){return t.getParam("rel_list",[],"array")},b=function(t){return t.getParam("link_title",!0,"boolean")},y=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},x=function(t){return t.getParam("link_default_protocol","http","string")},w=function(t){var n=e.document.createElement("a");n.target="_blank",n.href=t,n.rel="noreferrer noopener";var r=e.document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,e.window,0,0,0,0,0,!1,!1,!1,!1,0,null),function(t,n){e.document.body.appendChild(t),t.dispatchEvent(n),e.document.body.removeChild(t)}(n,r)},C=function(){return(C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},_=function(){},k=function(t){return function(){return t}},S=k(!1),T=k(!0),E=function(){return O},O=(n=function(t){return t.isNone()},i={fold:function(t,e){return t()},is:S,isSome:S,isNone:T,getOr:o=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:k(null),getOrUndefined:k(void 0),or:o,orThunk:r,map:E,each:_,bind:E,exists:S,forall:T,filter:E,equals:n,equals_:n,toArray:function(){return[]},toString:k("none()")},Object.freeze&&Object.freeze(i),i),D=function t(e){var n=k(e),r=function(){return i},o=function(t){return t(e)},i={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:T,isNone:S,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:r,orThunk:r,map:function(n){return t(n(e))},each:function(t){t(e)},bind:o,exists:o,forall:o,filter:function(t){return t(e)?i:O},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(S,function(t){return n(e,t)})}};return i},N=D,A=E,M=function(t){return null==t?O:D(t)},I=(Array.prototype.slice,Array.prototype.indexOf),z=Array.prototype.push,B=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)},R=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!l(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);z.apply(e,t[n])}return e},P=(d(Array.from)&&Array.from,function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return A()}),L=tinymce.util.Tools.resolve("tinymce.util.Tools"),H=function(t){return/^\w+:/i.test(t)},F=function(t,e){var n=["noopener"],r=t?t.split(/\s+/):[],o=function(t){return t.filter(function(t){return-1===L.inArray(n,t)})},i=e?function(t){return(t=o(t)).length>0?t.concat(n):n}(r):o(r);return i.length>0?function(t){return L.trim(t.sort().join(" "))}(i):""},V=function(t,e){return e=e||t.selection.getNode(),U(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},j=function(t){return t&&"A"===t.nodeName&&!!t.href},U=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},W=function(t,e,n){var r=t.selection.getNode(),o=V(t,r),i=function(t,e){var n=C({},e);if(!(v(t).length>0)&&!1===y(t)){var r=F(n.rel,"_blank"===n.target);n.rel=r||null}return M(n.target).isNone()&&!1===g(t)&&(n.target=p(t)),n.href=function(t,e){return"http"!==e&&"https"!==e||H(t)?t:e+"://"+t}(n.href,h(t)),n}(t,function(t){return e=function(e,n){return t[n].each(function(t){e[n]=t.length>0?t:null}),e},n={href:t.href},B(["title","rel","class","target"],function(t){n=e(n,t)}),n;var e,n}(n));t.undoManager.transact(function(){n.href===e.href&&e.attach(),o?(t.focus(),function(t,e,n,r){n.each(function(t){e.hasOwnProperty("innerText")?e.innerText=t:e.textContent=t}),t.dom.setAttribs(e,r),t.selection.select(e)}(t,o,n.text,i)):function(t,e,n,r){U(e)?function(t,e,n){var r=t.dom.select("img",e)[0];if(r){var o=t.dom.create("a",n);r.parentNode.insertBefore(o,r),o.appendChild(r)}}(t,e,r):n.fold(function(){t.execCommand("mceInsertLink",!1,r)},function(e){t.insertContent(t.dom.createHTML("a",r,t.dom.encode(e)))})}(t,r,n.text,i)})},q=function(t){t.undoManager.transact(function(){var e=t.selection.getNode();if(U(e))!function(t,e){var n=t.dom.select("img",e)[0];if(n){var r=t.dom.getParents(n,"a[href]",e)[0];r&&(r.parentNode.insertBefore(n,r),t.dom.remove(r))}}(t,e);else{var n=t.dom.getParent(e,"a[href]",t.getBody());n&&t.dom.remove(n,!0)}t.focus()})},Y=function(t){return L.grep(t,j).length>0},$=function(t){return t.getAttribute("data-mce-href")||t.getAttribute("href")},G=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},K=V,X=function(t,e){return function(t){return t.replace(/\uFEFF/g,"")}(e?e.innerText||e.textContent:t.getContent({format:"text"}))},J=F,Q=H,Z=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},tt=function(t){return c(t.value)?t.value:""},et=function(t){return void 0===t&&(t=tt),function(e){return M(e).map(function(e){return function(t,e){var n=[];return L.each(t,function(t){var r=c(t.text)?t.text:c(t.title)?t.title:"";if(void 0!==t.menu);else{var o=e(t);n.push({text:r,value:o})}}),n}(e,t)})}},nt=function(t){return et(tt)(t)},rt=et,ot=function(t,e){return function(n){return{name:t,type:"selectbox",label:e,items:n}}},it=tt,at=function(t,e){var n=function t(e){var n=e,r=function(){return n};return{get:r,set:function(t){n=t},clone:function(){return t(r())}}}(t.text),r=function(t,r){var o,i,a=(o=e,i=r.name,"link"===i?o.catalogs.link:"anchor"===i?o.catalogs.anchor:A()).getOr([]);return function(t,e,n,r){var o=r[e],i=t.length>0;return void 0!==o?function(t,e){return P(n,function(e){return N(e).filter(function(e){return e.value===t})})}(o).map(function(e){return{url:{value:e.value,meta:{text:i?t:e.text,attach:_}},text:i?t:e.text}}):A()}(n.get(),r.name,a,t)};return{onChange:function(t,e){return"url"===e.name?function(t){if(n.get().length<=0){var e=void 0!==t.url.meta.text?t.url.meta.text:t.url.value,r=void 0!==t.url.meta.title?t.url.meta.title:"";return N({text:e,title:r})}return A()}(t()):function(t,e){return n=t,r=e,I.call(n,r)>-1;var n,r}(["anchor","link"],e.name)?r(t(),e):"text"===e.name?(n.set(t().text),A()):A()}}},ut={},st={exports:ut};!function(e,n,r,o){!function(e){"object"==_typeof(n)&&void 0!==r?r.exports=e():("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof o&&o;if(!s&&c)return c(u,!0);if(a)return a(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[u]={exports:{}};e[u][0].call(f.exports,function(t){return i(e[u][1][t]||t)},f,f.exports,t,e,n,r)}return n[u].exports}for(var a="function"==typeof o&&o,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e,n){var r,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(t){o=u}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&m())}function m(){if(!f){var t=s(h);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new p(t,e)),1!==l.length||f||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,e,n){(function(t){!function(n){var r=setTimeout;function o(){}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 a(t,e){for(;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(t){return void s(e.promise,t)}u(e.promise,r)}else(1===t._state?u:s)(e.promise,t._value)})):t._deferreds.push(e)}function u(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 c(t);if("function"==typeof n)return void f((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){s(t,e)}var r,o}function s(t,e){t._state=2,t._value=e,c(t)}function c(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++)a(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,u(e,t))},function(t){n||(n=!0,s(e,t))})}catch(t){if(n)return;n=!0,s(e,t)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(o);return a(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,a){try{if(a&&("object"==_typeof(a)||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){o(i,t)},n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}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 t?function(e){t(e)}:function(t){r(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},void 0!==e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(t,e,n){(function(e,r){var o=t("process/browser.js").nextTick,i=Function.prototype.apply,a=Array.prototype.slice,u={},s=0;function c(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new c(i.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(i.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n.setImmediate="function"==typeof e?e:function(t){var e=s++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o(function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))}),e},n.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)})}(0,ut,st,void 0);var ct=st.exports.boltExport,lt=function t(n){var r=A(),o=[],i=function(t){a()?u(t):o.push(t)},a=function(){return r.isSome()},u=function(t){r.each(function(n){e.setTimeout(function(){t(n)},0)})};return n(function(t){r=N(t),function(t){B(t,u)}(o),o=[]}),{get:i,map:function(e){return t(function(t){i(function(n){t(e(n))})})},isReady:a}},ft=lt,dt=function(t){e.setTimeout(function(){throw t},0)},ht=function t(e){var n=function(t){e().then(t,dt)};return{map:function(n){return t(function(){return e().then(n)})},bind:function(n){return t(function(){return e().then(function(t){return n(t).toPromise()})})},anonBind:function(n){return t(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return ft(n)},toCached:function(){var n=null;return t(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}},mt=function(t){return ht(function(){return new ct(t)})},pt=tinymce.util.Tools.resolve("tinymce.util.Delay"),gt=function(t){var e=t.href;return e.indexOf("@")>0&&-1===e.indexOf("//")&&-1===e.indexOf("mailto:")?N({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return C(C({},t),{href:"mailto:"+e})}}):A()},vt=function(t,e){return function(n){var r=n.href;return 1===t&&!Q(r)||0===t&&/^\s*www[\.|\d\.]/i.test(r)?N({message:"The URL you entered seems to be an external link. Do you want to add the required "+e+":// prefix?",preprocess:function(t){return C(C({},t),{href:e+"://"+r})}}):A()}},bt=function(t,e){return P([gt,vt(h(t),x(t))],function(t){return t(e)}).fold(function(){return t=e,ht(function(){return ct.resolve(t)});var t},function(n){return mt(function(r){!function(t,e,n){var r=t.selection.getRng();pt.setEditorTimeout(t,function(){t.windowManager.confirm(e,function(e){t.selection.setRng(r),n(e)})})}(t,n.message,function(t){r(t?n.preprocess(e):e)})})})},yt=function(t){var e=function(t,e){return R(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,e))}(t.dom.select("a:not([href])"),function(t){var e=t.name||t.id;return e?[{text:e,value:"#"+e}]:[]});return e.length>0?N([{text:"None",value:""}].concat(e)):A()},xt=function(t){var e=function(t){return t.getParam("link_class_list",[],"array")}(t);return e.length>0?nt(e):A()},wt=tinymce.util.Tools.resolve("tinymce.util.XHR"),Ct=function(t,e){var n=v(t);if(n.length>0){var r=e.is("_blank");return(!1===y(t)?rt(function(t){return J(it(t),r)}):nt)(n)}return A()},_t=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],kt=function(t){var e=g(t);return l(e)?nt(e).orThunk(function(){return N(_t)}):!1===e?A():N(_t)},St=function(t,e,n){var r=t.getAttrib(e,n);return null!==r&&r.length>0?N(r):A()},Tt=function(t,e){return function(t){var e=function(e){return t.convertURL(e.value||e.url,"href")},n=function(t){return t.getParam("link_list")}(t);return mt(function(t){c(n)?wt.send({url:n,success:function(e){return t(function(t){try{return N(JSON.parse(t))}catch(t){return A()}}(e))},error:function(e){return t(A())}}):d(n)?n(function(e){return t(N(e))}):t(M(n))}).map(function(t){return t.bind(rt(e)).map(function(t){return t.length>0?[{text:"None",value:""}].concat(t):t})})}(t).map(function(n){var r=function(t,e){var n=t.dom,r=G(t.selection.getContent())?N(X(t.selection,e)):A(),o=e?N(n.getAttrib(e,"href")):A(),i=e?M(n.getAttrib(e,"target")):A(),a=St(n,e,"rel"),u=St(n,e,"class");return{url:o,text:r,title:St(n,e,"title"),target:i,rel:a,linkClass:u}}(t,e);return{anchor:r,catalogs:{targets:kt(t),rels:Ct(t,r.target),classes:xt(t),anchor:yt(t),link:n},optNode:M(e),flags:{titleEnabled:b(t)}}})},Et=function(t,e){return t.dom.getParent(e,"a[href]")},Ot=function(t){return Et(t,t.selection.getStart())},Dt=function(t,e){if(e){var n=$(e);if(/^#/.test(n)){var r=t.$(n);r.length&&t.selection.scrollIntoView(r[0],!0)}else w(e.href)}},Nt=function(t){return function(){!function(t){(function(t){var e=K(t);return Tt(t,e)})(t).map(function(e){var n=function(t,e){return function(n){var r=n.getData();if(!r.url.value)return q(t),void n.close();var o=function(t){return M(r[t]).filter(function(n){return!e.anchor[t].is(n)})},i={href:r.url.value,text:o("text"),target:o("target"),rel:o("rel"),class:o("linkClass"),title:o("title")},a={href:r.url.value,attach:void 0!==r.url.meta&&r.url.meta.attach?r.url.meta.attach:function(){}};bt(t,i).get(function(e){W(t,a,e)}),n.close()}}(t,e);return function(t,e,n){var r=t.anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),o=t.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],i=function(t,e){return{url:{value:t.anchor.url.getOr(""),meta:{attach:function(){},text:t.anchor.url.fold(function(){return""},function(){return t.anchor.text.getOr("")}),original:{value:t.anchor.url.getOr("")}}},text:t.anchor.text.getOr(""),title:t.anchor.title.getOr(""),anchor:t.anchor.url.getOr(""),link:t.anchor.url.getOr(""),rel:t.anchor.rel.getOr(""),target:t.anchor.target.or(e).getOr(""),linkClass:t.anchor.linkClass.getOr("")}}(t,M(p(n))),a=at(i,t),u=t.catalogs;return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:R([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],r,o,Z([u.anchor.map(ot("anchor","Anchors")),u.rels.map(ot("rel","Rel")),u.targets.map(ot("target","Open link in...")),u.link.map(ot("link","Link list")),u.classes.map(ot("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:i,onChange:function(t,e){var n=e.name;a.onChange(t.getData,{name:n}).each(function(e){t.setData(e)})},onSubmit:e}}(e,n,t)}).get(function(e){t.windowManager.open(e)})}(t)}},At=function(t){return function(){Dt(t,Ot(t))}},Mt=function(t){t.on("click",function(e){var n=Et(t,e.target);n&&u.metaKeyPressed(e)&&(e.preventDefault(),Dt(t,n))}),t.on("keydown",function(e){var n=Ot(t);n&&13===e.keyCode&&function(t){return!0===t.altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey}(e)&&(e.preventDefault(),Dt(t,n))})},It=function(t){return function(e){var n=function(n){return e.setActive(!t.readonly&&!!K(t,n.element))};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}},zt=function(t){return function(e){e.setDisabled(!Y(t.dom.getParents(t.selection.getStart())));var n=function(t){return e.setDisabled(!Y(t.parents))};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}},Bt=function(t){t.addCommand("mceLink",function(){!function(t){return t.getParam("link_quicklink",!1,"boolean")}(t)?Nt(t)():t.fire("contexttoolbar-show",{toolbarKey:"quicklink"})})},Rt=function(t){t.addShortcut("Meta+K","",function(){t.execCommand("mceLink")})},Pt=function(t){t.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Nt(t),onSetup:It(t)}),t.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:At(t),onSetup:zt(t)}),t.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return q(t)},onSetup:zt(t)})},Lt=function(t){t.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:At(t),onSetup:zt(t)}),t.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Nt(t)}),t.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return q(t)},onSetup:zt(t)})},Ht=function(t){t.ui.registry.addContextMenu("link",{update:function(e){return Y(t.dom.getParents(e,"a"))?"link unlink openlink":"link"}})},Ft=function(t){var e=function(e){var n=t.selection.getNode();return e.setDisabled(!K(t,n)),function(){}};t.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:It(t)},label:"Link",predicate:function(e){return!!K(t,e)&&m(t)},initValue:function(){var e=K(t);return e?$(e):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(e){var n=t.selection.getNode();return e.setActive(!!K(t,n)),It(t)(e)},onAction:function(e){var n=K(t),r=e.getValue();if(n)t.dom.setAttrib(n,"href",r),function(t){t.selection.collapse(!1)}(t),e.hide();else{var o={href:r,attach:function(){}},i=G(t.selection.getContent())?N(X(t.selection,n)).filter(function(t){return t.length>0}).or(M(r)):A();W(t,o,{href:r,text:i,title:A(),rel:A(),target:A(),class:A()}),e.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:e,onAction:function(e){q(t),e.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:e,onAction:function(e){At(t)(),e.hide()}}]})};a.add("link",function(t){Pt(t),Lt(t),Ht(t),Ft(t),Mt(t),Bt(t),Rt(t)})}(window)}).call(this,n("yLpj"))},w0Vi:function(t,e,n){"use strict";var r=n("xTJ+"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},wCe6:function(t,e,n){var r,o,i;o=[n("EVdn"),n("vBzC"),n("Jchv"),n("yw1R"),n("y6ec"),n("Qwlt"),n("MIQu")],void 0===(i="function"==typeof(r=function(t){return t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target),r=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&r.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.target).closest(".ui-menu-item"),r=t(e.currentTarget);n[0]===r[0]&&(this._removeClass(r.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,r))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var n,r,o,i,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,r=this.previousFilter||"",i=!1,o=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),o===r?i=!0:o=r+o,n=this._filterMenuItems(o),(n=i&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n).length||(o=String.fromCharCode(e.keyCode),n=this._filterMenuItems(o)),n.length?(this.focus(e,n),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,n,r,o,i=this,a=this.options.icons.submenu,u=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),n=u.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.prev(),r=t("<span>").data("ui-menu-submenu-caret",!0);i._addClass(r,"ui-menu-icon","ui-icon "+a),n.attr("aria-haspopup","true").prepend(r),e.attr("aria-labelledby",n.attr("id"))}),this._addClass(n,"ui-menu","ui-widget ui-widget-content ui-front"),(e=u.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&i._addClass(e,"ui-menu-divider","ui-widget-content")}),o=(r=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(r,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var n,r,o;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),r=this.active.children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,r,o,i,a,u;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-n-r,i=this.activeMenu.scrollTop(),a=this.activeMenu.height(),u=e.outerHeight(),o<0?this.activeMenu.scrollTop(i+o):o+u>a&&this.activeMenu.scrollTop(i+o-a+u))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(e),this._removeClass(r.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=r},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var r;this.active&&(r="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),r&&r.length&&this.active||(r=this.activeMenu.find(this.options.items)[e]()),this.focus(n,r)},nextPage:function(e){var n,r,o;this.active?this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(n=t(this)).offset().top-r-o<0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var n,r,o;this.active?this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(n=t(this)).offset().top-r+o>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,n)},_filterMenuItems:function(e){var n=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),r=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return r.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}})})?r.apply(e,o):r)||(t.exports=i)},xAGQ:function(t,e,n){"use strict";var r=n("xTJ+");t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},"xTJ+":function(t,e,n){"use strict";var r=n("HSsa"),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function a(t){return void 0===t}function u(t){return null!==t&&"object"==_typeof(t)}function s(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!=t)if("object"!=_typeof(t)&&(t=[t]),i(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:s,isStream:function(t){return u(t)&&s(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function n(n,r){"object"==_typeof(e[r])&&"object"==_typeof(n)?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return e},deepMerge:function t(){var e={};function n(n,r){"object"==_typeof(e[r])&&"object"==_typeof(n)?e[r]=t(e[r],n):e[r]="object"==_typeof(n)?t({},n):n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return e},extend:function(t,e,n){return c(e,function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},y6ec:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.fn.extend({uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}});var e})?r.apply(e,o):r)||(t.exports=i)},yK9s:function(t,e,n){"use strict";var r=n("xTJ+");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==("undefined"==typeof window?"undefined":_typeof(window))&&(n=window)}t.exports=n},yw1R:function(t,e,n){var r,o,i;o=[n("EVdn"),n("Qwlt")],void 0===(i="function"==typeof(r=function(t){return t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(n){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e}})?r.apply(e,o):r)||(t.exports=i)},zuR4:function(t,e,n){"use strict";var r=n("xTJ+"),o=n("HSsa"),i=n("CgaS"),a=n("SntB");function u(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var s=u(n("JEQr"));s.Axios=i,s.create=function(t){return u(a(s.defaults,t))},s.Cancel=n("endd"),s.CancelToken=n("jfS+"),s.isCancel=n("Lmem"),s.all=function(t){return Promise.all(t)},s.spread=n("DfZB"),t.exports=s,t.exports.default=s}}]);