tinymce
Version:
Web based JavaScript HTML WYSIWYG editor control.
9 lines • 387 kB
JavaScript
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.3.1 (2020-05-27)
*/
!function(V){"use strict";var r=function(e){if(null===e)return"null";if(e===undefined)return"undefined";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},s=t(function(e,t){return e===t}),i=function(o){return t(function(e,t){if(e.length!==t.length)return!1;for(var n=e.length,r=0;r<n;r++)if(!o.eq(e[r],t[r]))return!1;return!0})},c=function(e,r){return n=i(e),o=function(e){return t=e,n=r,Array.prototype.slice.call(t).sort(n);var t,n},t(function(e,t){return n.eq(o(e),o(t))});var n,o},u=function(u){return t(function(e,t){var n=Object.keys(e),r=Object.keys(t);if(!c(s).eq(n,r))return!1;for(var o=n.length,i=0;i<o;i++){var a=n[i];if(!u.eq(e[a],t[a]))return!1}return!0})},l=t(function(e,t){if(e===t)return!0;var n=r(e);return n===r(t)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(n)?e===t:"array"===n?i(l).eq(e,t):"object"===n&&u(l).eq(e,t))}),f=function(){},a=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},x=function(e){return function(){return e}},d=function(e){return e};function N(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var e,n,o,m=function(t){return function(e){return!t(e)}},p=function(e){return function(){throw new Error(e)}},g=x(!1),h=x(!0),v=function(){return y},y=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:g,isSome:g,isNone:h,getOr:o=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:x(null),getOrUndefined:x(undefined),or:o,orThunk:n,map:v,each:f,bind:v,exists:g,forall:h,filter:v,equals:e,equals_:e,toArray:function(){return[]},toString:x("none()")}),b=function(n){var e=x(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:h,isNone:g,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return b(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(g,function(e){return t(n,e)})}};return o},R={some:b,none:v,from:function(e){return null===e||e===undefined?y:b(e)}},C=function(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}},w=function(t){return function(e){return typeof e===t}},S=function(t){return function(e){return t===e}},q=C("string"),E=C("object"),k=C("array"),_=S(null),T=w("boolean"),A=S(undefined),D=w("function"),O=w("number"),B=Array.prototype.slice,P=Array.prototype.indexOf,L=Array.prototype.push,I=function(e,t){return P.call(e,t)},M=function(e,t){return-1<I(e,t)},F=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1},U=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},z=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},j=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},H=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},$=function(e,t,n){return function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}}(e,function(e){n=t(n,e)}),n},W=function(e,t,n){return z(e,function(e){n=t(n,e)}),n},K=function(e,t){return function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return R.some(i);if(n(i,r))break}return R.none()}(e,t,g)},X=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return R.some(n)}return R.none()},Y=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!k(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);L.apply(t,e[n])}return t}(U(e,t))},G=function(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0},J=function(e){var t=B.call(e,0);return t.reverse(),t},Q=function(e,t){return H(e,function(e){return!M(t,e)})},Z=function(e){return 0===e.length?R.none():R.some(e[0])},ee=function(e){return 0===e.length?R.none():R.some(e[e.length-1])},te=D(Array.from)?Array.from:function(e){return B.call(e)},ne=Object.keys,re=Object.hasOwnProperty,oe=function(e,t){for(var n=ne(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},ie=function(e,n){return ae(e,function(e,t){return{k:t,v:n(e,t)}})},ae=function(e,r){var o={};return oe(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},ue=function(n){return function(e,t){n[t]=e}},se=function(e,n,r,o){return oe(e,function(e,t){(n(e,t)?r:o)(e,t)}),{}},ce=function(e,t){var n={},r={};return se(e,t,ue(n),ue(r)),{t:n,f:r}},le=function(e,t){var n={};return se(e,t,ue(n),f),n},fe=function(e){return n=function(e){return e},r=[],oe(e,function(e,t){r.push(n(e,t))}),r;var n,r},de=function(e,t){return me(e,t)?R.from(e[t]):R.none()},me=function(e,t){return re.call(e,t)},pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ge(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}var he,ve,ye,be,Ce,we,xe,Se=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:x(e)}},Ne={fromHtml:function(e,t){var n=(t||V.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw V.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Se(n.childNodes[0])},fromTag:function(e,t){var n=(t||V.document).createElement(e);return Se(n)},fromText:function(e,t){var n=(t||V.document).createTextNode(e);return Se(n)},fromDom:Se,fromPoint:function(e,t,n){var r=e.dom();return R.from(r.elementFromPoint(t,n)).map(Se)}},Ee=function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}return undefined}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return _e(r(1),r(2))},ke=function(){return _e(0,0)},_e=function(e,t){return{major:e,minor:t}},Re={nu:_e,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?ke():Ee(e,n)},unknown:ke},Te="Firefox",Ae=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(Te),isSafari:r("Safari")}},De={unknown:function(){return Ae({current:undefined,version:Re.unknown()})},nu:Ae,edge:x("Edge"),chrome:x("Chrome"),ie:x("IE"),opera:x("Opera"),firefox:x(Te),safari:x("Safari")},Oe="Windows",Be="Android",Pe="Solaris",Le="FreeBSD",Ie="ChromeOS",Me=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(Oe),isiOS:r("iOS"),isAndroid:r(Be),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(Pe),isFreeBSD:r(Le),isChromeOS:r(Ie)}},Fe={unknown:function(){return Me({current:undefined,version:Re.unknown()})},nu:Me,windows:x(Oe),ios:x("iOS"),android:x(Be),linux:x("Linux"),osx:x("OSX"),solaris:x(Pe),freebsd:x(Le),chromeos:x(Ie)},Ue=function(e,t){var n=String(t).toLowerCase();return K(e,function(e){return e.search(n)})},ze=function(e,n){return Ue(e,n).map(function(e){var t=Re.detect(e.versionRegexes,n);return{current:e.name,version:t}})},je=function(e,n){return Ue(e,n).map(function(e){var t=Re.detect(e.versionRegexes,n);return{current:e.name,version:t}})},He=function(e,t){return-1!==e.indexOf(t)},Ve=function(e,t){return n=e,o=0,""===(r=t)||n.length>=r.length&&n.substr(o,o+r.length)===r;var n,r,o},qe=function(t){return function(e){return e.replace(t,"")}},$e=qe(/^\s+|\s+$/g),We=qe(/^\s+/g),Ke=qe(/\s+$/g),Xe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ye=function(t){return function(e){return He(e,t)}},Ge=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return He(e,"edge/")&&He(e,"chrome")&&He(e,"safari")&&He(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Xe],search:function(e){return He(e,"chrome")&&!He(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return He(e,"msie")||He(e,"trident")}},{name:"Opera",versionRegexes:[Xe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ye("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ye("firefox")},{name:"Safari",versionRegexes:[Xe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(He(e,"safari")||He(e,"mobile/"))&&He(e,"applewebkit")}}],Je=[{name:"Windows",search:Ye("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return He(e,"iphone")||He(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ye("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ye("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ye("linux"),versionRegexes:[]},{name:"Solaris",search:Ye("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ye("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ye("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Qe={browsers:x(Ge),oses:x(Je)},Ze=function(e,t){var n,r,o,i,a,u,s,c,l,f,d,m,p=Qe.browsers(),g=Qe.oses(),h=ze(p,e).fold(De.unknown,De.nu),v=je(g,e).fold(Fe.unknown,Fe.nu);return{browser:h,os:v,deviceType:(r=h,o=e,i=t,a=(n=v).isiOS()&&!0===/ipad/i.test(o),u=n.isiOS()&&!a,s=n.isiOS()||n.isAndroid(),c=s||i("(pointer:coarse)"),l=a||!u&&s&&i("(min-device-width:768px)"),f=u||s&&!l,d=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),m=!f&&!l&&!d,{isiPad:x(a),isiPhone:x(u),isTablet:x(l),isPhone:x(f),isTouch:x(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:x(d),isDesktop:x(m)})}},et=function(e){return V.window.matchMedia(e).matches},tt=(ye=!(he=function(){return Ze(V.navigator.userAgent,et)}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ye||(ye=!0,ve=he.apply(null,e)),ve}),nt=function(){return tt()},rt=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},ot=function(e,t){var n=e.dom();if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},it=function(e){return 1!==e.nodeType&&9!==e.nodeType||0===e.childElementCount},at=function(e,t){return e.dom()===t.dom()},ut=function(e,t){return n=e.dom(),r=t.dom(),o=n,i=r,a=V.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&a);var n,r,o,i,a},st=function(e,t){return nt().browser.isIE()?ut(e,t):(n=t,r=e.dom(),o=n.dom(),r!==o&&r.contains(o));var n,r,o},ct=function(e){return Ne.fromDom(e.dom().ownerDocument)},lt=function(e){return Ne.fromDom(e.dom().ownerDocument.defaultView)},ft=function(e){return R.from(e.dom().parentNode).map(Ne.fromDom)},dt=function(e){return R.from(e.dom().previousSibling).map(Ne.fromDom)},mt=function(e){return R.from(e.dom().nextSibling).map(Ne.fromDom)},pt=function(e){return J(rt(e,dt))},gt=function(e){return rt(e,mt)},ht=function(e){return U(e.dom().childNodes,Ne.fromDom)},vt=function(e,t){var n=e.dom().childNodes;return R.from(n[t]).map(Ne.fromDom)},yt=function(e){return vt(e,0)},bt=function(e){return vt(e,e.dom().childNodes.length-1)},Ct=function(t,n){ft(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},wt=function(e,t){mt(e).fold(function(){ft(e).each(function(e){St(e,t)})},function(e){Ct(e,t)})},xt=function(t,n){yt(t).fold(function(){St(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},St=function(e,t){e.dom().appendChild(t.dom())},Nt=function(t,e){z(e,function(e){St(t,e)})},Et=function(e){e.dom().textContent="",z(ht(e),function(e){kt(e)})},kt=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},_t=function(e){var t,n=ht(e);0<n.length&&(t=e,z(n,function(e){Ct(t,e)})),kt(e)},Rt=("undefined"!=typeof V.window?V.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),Tt=function(e){return e.dom().nodeType},At=function(t){return function(e){return Tt(e)===t}},Dt=At(1),Ot=At(3),Bt=function(e){var t=Ot(e)?e.dom().parentNode:e.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)},Pt=function(n,r){return{left:x(n),top:x(r),translate:function(e,t){return Pt(n+e,r+t)}}},Lt=Pt,It=function(e,t){return e!==undefined?e:t!==undefined?t:0},Mt=function(e){var t,n=e.dom(),r=n.ownerDocument.body;return r===n?Lt(r.offsetLeft,r.offsetTop):Bt(e)?(t=n.getBoundingClientRect(),Lt(t.left,t.top)):Lt(0,0)},Ft=function(e){var t=e!==undefined?e.dom():V.document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return Lt(n,r)},Ut=function(e,t,n){(n!==undefined?n.dom():V.document).defaultView.scrollTo(e,t)},zt=function(e,t){nt().browser.isSafari()&&D(e.dom().scrollIntoViewIfNeeded)?e.dom().scrollIntoViewIfNeeded(!1):e.dom().scrollIntoView(t)},jt=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Ht=function(e){var t,n,r=e===undefined?V.window:e,o=r.document,i=Ft(Ne.fromDom(o));return n=(t=r)===undefined?V.window:t,R.from(n.visualViewport).fold(function(){var e=r.document.documentElement,t=e.clientWidth,n=e.clientHeight;return jt(i.left(),i.top(),t,n)},function(e){return jt(Math.max(e.pageLeft,i.left()),Math.max(e.pageTop,i.top()),e.width,e.height)})},Vt=function(t){return function(e){return!!e&&e.nodeType===t}},qt=function(e){return!!e&&!Object.getPrototypeOf(e)},$t=Vt(1),Wt=function(e){var n=e.map(function(e){return e.toLowerCase()});return function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();return M(n,t)}return!1}},Kt=function(r,e){var o=e.toLowerCase().split(" ");return function(e){var t;if($t(e))for(t=0;t<o.length;t++){var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if((n?n.getPropertyValue(r):null)===o[t])return!0}return!1}},Xt=function(t){return function(e){return $t(e)&&e.hasAttribute(t)}},Yt=function(e){return $t(e)&&e.hasAttribute("data-mce-bogus")},Gt=function(e){return $t(e)&&"TABLE"===e.tagName},Jt=function(t){return function(e){if($t(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Qt=Wt(["textarea","input"]),Zt=Vt(3),en=Vt(8),tn=Vt(9),nn=Vt(11),rn=Wt(["br"]),on=Jt("true"),an=Jt("false"),un=function(e){return e.style!==undefined&&D(e.style.getPropertyValue)},sn=function(e,t,n){if(!(q(n)||T(n)||O(n)))throw V.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},cn=function(e,t,n){sn(e.dom(),t,n)},ln=function(e,t){var n=e.dom();oe(t,function(e,t){sn(n,t,e)})},fn=function(e,t){var n=e.dom().getAttribute(t);return null===n?undefined:n},dn=function(e,t){e.dom().removeAttribute(t)},mn=function(e,t){var n=e.dom(),r=V.window.getComputedStyle(n).getPropertyValue(t);return""!==r||Bt(e)?r:pn(n,t)},pn=function(e,t){return un(e)?e.style.getPropertyValue(t):""},gn=function(e,t){var n=e.dom(),r=pn(n,t);return R.from(r).filter(function(e){return 0<e.length})},hn=nt().browser,vn=function(e){return K(e,Dt)},yn=function(e,t){return e.children&&M(e.children,t)},bn=function(e,t,n){var r,o,i,a=0,u=0,s=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&"static"===mn(Ne.fromDom(e),"position"))return{x:a=(o=t.getBoundingClientRect()).left+(s.documentElement.scrollLeft||e.scrollLeft)-s.documentElement.clientLeft,y:u=o.top+(s.documentElement.scrollTop||e.scrollTop)-s.documentElement.clientTop};for(r=t;r&&r!==n&&r.nodeType&&!yn(r,n);)a+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!==n&&r.nodeType&&!yn(r,n);)a-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;u+=(i=Ne.fromDom(t),hn.isFirefox()&&"table"===Rt(i)?vn(ht(i)).filter(function(e){return"caption"===Rt(e)}).bind(function(o){return vn(gt(o)).map(function(e){var t=e.dom().offsetTop,n=o.dom().offsetTop,r=o.dom().offsetHeight;return t<=n?-r:0})}).getOr(0):0)}return{x:a,y:u}},Cn={},wn={exports:Cn};be=undefined,Ce=Cn,we=wn,xe=undefined,function(e){if("object"==typeof Ce&&void 0!==we)we.exports=e();else if("function"==typeof be&&be.amd)be([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}}(function(){return function l(i,a,u){function s(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof xe&&xe;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[t]={exports:{}};i[t][0].call(o.exports,function(e){return s(i[t][1][e]||e)},o,o.exports,l,i,a,u)}return a[t].exports}for(var c="function"==typeof xe&&xe,e=0;e<u.length;e++)s(u[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=s(m);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function n(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{return o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||s(p)},g.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=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(t){function r(){}function i(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=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var e=1===r._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(n){return void u(o.promise,n)}a(o.promise,t)}else(1===r._state?a:u)(o.promise,r._value)})):r._deferreds.push(o)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void s(e);if("function"==typeof n)return void l(function r(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,s(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}var e,n;e=this,n=setTimeout,i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new c(e,t,n)),n},i.all=function(e){var s=Array.prototype.slice.call(e);return new i(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof t?function(e){t(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(s,e,c){(function(e,t){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var xn,Sn,Nn,En,kn=wn.exports.boltExport,_n=function(e){var n=R.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){z(e,a)},a=function(t){n.each(function(e){V.setTimeout(function(){t(e)},0)})};return e(function(e){n=R.some(e),i(t),t=[]}),{get:r,map:function(n){return _n(function(t){r(function(e){t(n(e))})})},isReady:o}},Rn={nu:_n,pure:function(t){return _n(function(e){e(t)})}},Tn=function(e){V.setTimeout(function(){throw e},0)},An=function(n){var e=function(e){n().then(e,Tn)};return{map:function(e){return An(function(){return n().then(e)})},bind:function(t){return An(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return An(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return Rn.nu(e)},toCached:function(){var e=null;return An(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Dn={nu:function(e){return An(function(){return new kn(e)})},pure:function(e){return An(function(){return kn.resolve(e)})}},On=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):z(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},Bn=function(e){return On(e,Dn.nu)},Pn=function(n){return{is:function(e){return n===e},isValue:h,isError:g,getOr:x(n),getOrThunk:x(n),getOrDie:x(n),or:function(e){return Pn(n)},orThunk:function(e){return Pn(n)},fold:function(e,t){return t(n)},map:function(e){return Pn(e(n))},mapError:function(e){return Pn(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return R.some(n)}}},Ln=function(n){return{is:g,isValue:g,isError:h,getOr:d,getOrThunk:function(e){return e()},getOrDie:function(){return p(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Ln(n)},mapError:function(e){return Ln(e(n))},each:f,bind:function(e){return Ln(n)},exists:g,forall:h,toOption:R.none}},In={value:Pn,error:Ln,fromOption:function(e,t){return e.fold(function(){return Ln(t)},Pn)}},Mn=window.Promise?window.Promise:(xn=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Nn=(Sn=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=[],qn(e,Fn(zn,this),Fn(jn,this))}).immediateFn||"function"==typeof V.setImmediate&&V.setImmediate||function(e){V.setTimeout(e,1)},Sn.prototype["catch"]=function(e){return this.then(null,e)},Sn.prototype.then=function(n,r){var o=this;return new Sn(function(e,t){Un.call(o,new Vn(n,r,e,t))})},Sn.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&xn(arguments[0])?arguments[0]:arguments);return new Sn(function(o,i){if(0===s.length)return o([]);var a=s.length;function u(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){u(t,e)},i)}s[t]=e,0==--a&&o(s)}catch(r){i(r)}}for(var e=0;e<s.length;e++)u(e,s[e])})},Sn.resolve=function(t){return t&&"object"==typeof t&&t.constructor===Sn?t:new Sn(function(e){e(t)})},Sn.reject=function(n){return new Sn(function(e,t){t(n)})},Sn.race=function(o){return new Sn(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},Sn);function Fn(e,t){return function(){e.apply(t,arguments)}}function Un(r){var o=this;null!==this._state?Nn(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(o._value)}catch(n){return void r.reject(n)}r.resolve(t)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function zn(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void qn(Fn(t,e),Fn(zn,this),Fn(jn,this))}this._state=!0,this._value=e,Hn.call(this)}catch(n){jn.call(this,n)}}function jn(e){this._state=!1,this._value=e,Hn.call(this)}function Hn(){for(var e=0,t=this._deferreds.length;e<t;e++)Un.call(this,this._deferreds[e]);this._deferreds=null}function Vn(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function qn(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(o){if(r)return;r=!0,n(o)}}var $n=function(e,t){return"number"!=typeof t&&(t=0),V.setTimeout(e,t)},Wn=function(e,t){return"number"!=typeof t&&(t=1),V.setInterval(e,t)},Kn=function(n,r){var o,e;return(e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];V.clearTimeout(o),o=$n(function(){n.apply(this,e)},r)}).stop=function(){V.clearTimeout(o)},e},Xn={requestAnimationFrame:function(e,t){En?En.then(e):En=new Mn(function(e){!function(e,t){var n,r=V.window.requestAnimationFrame,o=["ms","moz","webkit"];for(n=0;n<o.length&&!r;n++)r=V.window[o[n]+"RequestAnimationFrame"];(r=r||function(e){V.window.setTimeout(e,0)})(e,t)}(e,t=t||V.document.body)}).then(e)},setTimeout:$n,setInterval:Wn,setEditorTimeout:function(e,t,n){return $n(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=Wn(function(){e.removed?V.clearInterval(r):t()},n)},debounce:Kn,throttle:Kn,clearInterval:function(e){return V.clearInterval(e)},clearTimeout:function(e){return V.clearTimeout(e)}},Yn=V.navigator.userAgent,Gn=nt(),Jn=Gn.browser,Qn=Gn.os,Zn=Gn.deviceType,er=/WebKit/.test(Yn)&&!Jn.isEdge(),tr="FormData"in V.window&&"FileReader"in V.window&&"URL"in V.window&&!!V.URL.createObjectURL,nr=-1!==Yn.indexOf("Windows Phone"),rr={opera:Jn.isOpera(),webkit:er,ie:!(!Jn.isIE()&&!Jn.isEdge())&&Jn.version.major,gecko:Jn.isFirefox(),mac:Qn.isOSX()||Qn.isiOS(),iOS:Zn.isiPad()||Zn.isiPhone(),android:Qn.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:V.window.getSelection&&"Range"in V.window,documentMode:Jn.isIE()?V.document.documentMode||7:10,fileApi:tr,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Jn.isIE(),desktop:Zn.isDesktop(),windowsPhone:nr,browser:{current:Jn.current,version:Jn.version,isChrome:Jn.isChrome,isEdge:Jn.isEdge,isFirefox:Jn.isFirefox,isIE:Jn.isIE,isOpera:Jn.isOpera,isSafari:Jn.isSafari},os:{current:Qn.current,version:Qn.version,isAndroid:Qn.isAndroid,isChromeOS:Qn.isChromeOS,isFreeBSD:Qn.isFreeBSD,isiOS:Qn.isiOS,isLinux:Qn.isLinux,isOSX:Qn.isOSX,isSolaris:Qn.isSolaris,isWindows:Qn.isWindows},deviceType:{isDesktop:Zn.isDesktop,isiPad:Zn.isiPad,isiPhone:Zn.isiPhone,isPhone:Zn.isPhone,isTablet:Zn.isTablet,isTouch:Zn.isTouch,isWebView:Zn.isWebView}},or=Array.isArray,ir=function(e,t,n){var r,o;if(!e)return 0;if(n=n||e,e.length!==undefined){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1},ar=function(n,r){var o=[];return ir(n,function(e,t){o.push(r(e,t,n))}),o},ur=function(n,r){var o=[];return ir(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o},sr=function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},cr=function(e,t,n,r){var o=0;for(arguments.length<3&&(n=e[0]);o<e.length;o++)n=t.call(r,n,e[o],o);return n},lr=function(e,t,n){var r,o;for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return r;return-1},fr=function(e){return e[e.length-1]},dr=/^\s*|\s*$/g,mr=function(e){return null===e||e===undefined?"":(""+e).replace(dr,"")},pr=function(e,t){return t?!("array"!==t||!or(e))||typeof e===t:e!==undefined},gr=function(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),ir(e,function(e,t){if(!1===n.call(o,e,t,r))return!1;gr(e,n,r,o)}))},hr={trim:mr,isArray:or,is:pr,toArray:function(e){var t,n,r=e;if(!or(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:ir,map:ar,grep:ur,inArray:sr,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];a!==undefined&&(e[i]=a)}}return e},create:function(e,t,n){var r,o,i,a,u,s=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],!(o=s.createNS(e[3].replace(/\.\w+$/,""),n))[i]){if("static"===e[2])return o[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[i]));t[i]||(t[i]=function(){},c=1),o[i]=t[i],s.extend(o[i].prototype,t),e[5]&&(r=s.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],u=o[i],o[i]=c?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],u.apply(this,arguments)},o[i].prototype[i]=o[i],s.each(r,function(e,t){o[i].prototype[t]=r[t]}),s.each(t,function(e,t){r[t]?o[i].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!==i&&(o[i].prototype[t]=e)})),s.each(t["static"],function(e,t){o[i][t]=e})}},walk:gr,createNS:function(e,t){var n,r;for(t=t||V.window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||V.window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||pr(e,"array")?e:ar(e.split(t||","),mr)},_addCacheSuffix:function(e){var t=rr.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}};function vr(p,g){void 0===g&&(g={});var h,v=0,y={};h=g.maxLoadTime||5e3;var b=function(e){p.getElementsByTagName("head")[0].appendChild(e)},n=function(e,t,n){var o,r,i,a,u=function(e){a.status=e,a.passed=[],a.failed=[],o&&(o.onload=null,o.onerror=null,o=null)},s=function(){for(var e=a.passed,t=e.length;t--;)e[t]();u(2)},c=function(){for(var e=a.failed,t=e.length;t--;)e[t]();u(3)},l=function(e,t){e()||((new Date).getTime()-i<h?Xn.setTimeout(t):c())},f=function(){l(function(){for(var e,t,n=p.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===o.id)return s(),1},f)},d=function(){l(function(){try{var e=r.sheet.cssRules;return s(),e}catch(t){}},d)};if(e=hr._addCacheSuffix(e),y[e]?a=y[e]:(a={passed:[],failed:[]},y[e]=a),t&&a.passed.push(t),n&&a.failed.push(n),1!==a.status)if(2!==a.status)if(3!==a.status){if(a.status=1,(o=p.createElement("link")).rel="stylesheet",o.type="text/css",o.id="u"+v++,o.async=!1,o.defer=!1,i=(new Date).getTime(),g.contentCssCors&&(o.crossOrigin="anonymous"),g.referrerPolicy&&cn(Ne.fromDom(o),"referrerpolicy",g.referrerPolicy),"onload"in o&&!((m=V.navigator.userAgent.match(/WebKit\/(\d*)/))&&parseInt(m[1],10)<536))o.onload=f,o.onerror=c;else{if(0<V.navigator.userAgent.indexOf("Firefox"))return(r=p.createElement("style")).textContent='@import "'+e+'"',d(),void b(r);f()}var m;b(o),o.href=e}else c();else s()},t=function(t){return Dn.nu(function(e){n(t,a(e,x(In.value(t))),a(e,x(In.error(t))))})},o=function(e){return e.fold(d,d)};return{load:n,loadAll:function(e,n,r){Bn(U(e,t)).get(function(e){var t=j(e,function(e){return e.isValue()});0<t.fail.length?r(t.fail.map(o)):n(t.pass.map(o))})},_setReferrerPolicy:function(e){g.referrerPolicy=e}}}var yr,br,Cr,wr=function(t){var n;return function(e){return(n=n||function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}(t,x(!0))).hasOwnProperty(Rt(e))}},xr=wr(["h1","h2","h3","h4","h5","h6"]),Sr=wr(["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"]),Nr=function(e){return Dt(e)&&!Sr(e)},Er=function(e){return Dt(e)&&"br"===Rt(e)},kr=wr(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),_r=wr(["ul","ol","dl"]),Rr=wr(["li","dd","dt"]),Tr=wr(["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param","embed","source","wbr","track"]),Ar=wr(["thead","tbody","tfoot"]),Dr=wr(["td","th"]),Or=wr(["pre","script","textarea","style"]),Br=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},Pr=function(e,t){var n,r=t.childNodes;if(!$t(t)||!Br(t)){for(n=r.length-1;0<=n;n--)Pr(e,r[n]);if(!1===tn(t)){if(Zt(t)&&0<t.nodeValue.length){var o=hr.trim(t.nodeValue).length;if(e.isBlock(t.parentNode)||0<o)return;if(0===o&&(a=(i=t).previousSibling&&"SPAN"===i.previousSibling.nodeName,u=i.nextSibling&&"SPAN"===i.nextSibling.nodeName,a&&u))return}else if($t(t)&&(1===(r=t.childNodes).length&&Br(r[0])&&t.parentNode.insertBefore(r[0],t),r.length||Tr(Ne.fromDom(t))))return;e.remove(t)}var i,a,u;return t}},Lr=hr.makeMap,Ir=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mr=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fr=/[<>&\"\']/g,Ur=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,zr={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};br={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},Cr={"<":"<",">":">","&":"&",""":'"',"'":"'"};var jr=function(e,t){var n,r,o,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),br[r]||(o="&"+e[n+1]+";",i[r]=o,i[o]=r);return i}};yr=jr("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 Hr=function(e,t){return e.replace(t?Ir:Mr,function(e){return br[e]||e})},Vr=function(e,t){return e.replace(t?Ir:Mr,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":br[e]||"&#"+e.charCodeAt(0)+";"})},qr=function(e,t,n){return n=n||yr,e.replace(t?Ir:Mr,function(e){return br[e]||n[e]||e})},$r={encodeRaw:Hr,encodeAllRaw:function(e){return(""+e).replace(Fr,function(e){return br[e]||e})},encodeNumeric:Vr,encodeNamed:qr,getEncodeFunc:function(e,t){var n=jr(t)||yr,r=Lr(e.replace(/\+/g,","));return r.named&&r.numeric?function(e,t){return e.replace(t?Ir:Mr,function(e){return br[e]!==undefined?br[e]:n[e]!==undefined?n[e]:1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";"})}:r.named?t?function(e,t){return qr(e,t,n)}:qr:r.numeric?Vr:Hr},decode:function(e){return e.replace(Ur,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):zr[t]||String.fromCharCode(t):Cr[e]||yr[e]||(n=e,(r=Ne.fromTag("div").dom()).innerHTML=n,r.textContent||r.innerText||n);var n,r})}},Wr={},Kr={},Xr=hr.makeMap,Yr=hr.each,Gr=hr.extend,Jr=hr.explode,Qr=hr.inArray,Zr=function(e,t){return(e=hr.trim(e))?e.split(t||" "):[]},eo=function(e){var u,t,n,r,o,i,s={},a=function(e,t,n){var r,o,i,a=function(e,t){var n,r,o={};for(n=0,r=e.length;n<r;n++)o[e[n]]=t||{};return o};for(t=t||"","string"==typeof(n=n||[])&&(n=Zr(n)),r=(e=Zr(e)).length;r--;)i={attributes:a(o=Zr([u,t].join(" "))),attributesOrder:o,children:a(n,Kr)},s[e[r]]=i},c=function(e,t){var n,r,o,i;for(n=(e=Zr(e)).length,t=Zr(t);n--;)for(r=s[e[n]],o=0,i=t.length;o<i;o++)r.attributes[t[o]]={},r.attributesOrder.push(t[o])};return Wr[e]?Wr[e]:(u="id accesskey class dir lang style tabindex title role",t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",n="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"!==e&&(u+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",t+=" article aside details dialog figure main header footer hgroup section nav",n+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e&&(u+=" xml:lang",n=[n,i="acronym applet basefont big font strike tt"].join(" "),Yr(Zr(i),function(e){a(e,"",n)}),t=[t,o="center dir isindex noframes"].join(" "),r=[t,n].join(" "),Yr(Zr(o),function(e){a(e,"",r)})),r=r||[t,n].join(" "),a("html","manifest","head body"),a("head","","base command link meta noscript script style title"),a("title hr noscript br"),a("base","href target"),a("link","href rel media hreflang type sizes hreflang"),a("meta","name http-equiv content charset"),a("style","media type scoped"),a("script","src async defer type charset"),a("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),a("address dt dd div caption","",r),a("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","",n),a("blockquote","cite",r),a("ol","reversed start type","li"),a("ul","","li"),a("li","value",r),a("dl","","dt dd"),a("a","href target rel media hreflang type",n),a("q","cite",n),a("ins del","cite datetime",r),a("img","src sizes srcset alt usemap ismap width height"),a("iframe","src name width height",r),a("embed","src type width height"),a("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),a("param","name value"),a("map","name",[r,"area"].join(" ")),a("area","alt coords shape href target rel media hreflang type"),a("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),a("colgroup","span","col"),a("col","span"),a("tbody thead tfoot","","tr"),a("tr","","td th"),a("td","colspan rowspan headers",r),a("th","colspan rowspan headers scope abbr",r),a("form","accept-charset action autocomplete enctype method name novalidate target",r),a("fieldset","disabled form name",[r,"legend"].join(" ")),a("label","form for",n),a("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"),a("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?r:n),a("select","disabled form multiple name required size","option optgroup"),a("optgroup","disabled label","option"),a("option","disabled label selected value"),a("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),a("menu","type label",[r,"li"].join(" ")),a("noscript","",r),"html4"!==e&&(a("wbr"),a("ruby","",[n,"rt rp"].join(" ")),a("figcaption","",r),a("mark rt rp summary bdi","",n),a("canvas","width height",r),a("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),a("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),a("picture","","img source"),a("source","src srcset type media sizes"),a("track","kind src srclang label default"),a("datalist","",[n,"option"].join(" ")),a("article section nav aside main header footer","",r),a("hgroup","","h1 h2 h3 h4 h5 h6"),a("figure","",[r,"figcaption"].join(" ")),a("time","datetime",n),a("dialog","open",r),a("command","type label icon disabled checked radiogroup command"),a("output","for form name",n),a("progress","value max",n),a("meter","value min max low high optimum",n),a("details","open",[r,"summary"].join(" ")),a("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(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"!==e&&(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")),Yr(Zr("a form meter progress dfn"),function(e){s[e]&&delete s[e].children[e]}),delete s.caption.children.table,delete s.script,Wr[e]=s)},to=function(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),Yr(e,function(e,t){r[t]=r[t.toUpperCase()]=("map"===n?Xr:Jr)(e,/[, ]/)})),r};function no(i){var e,t,n,r,o,a,u,s,c,l,f,d,m,x={},p={},S=[],g={},h={},v=function(e,t,n){var r=i[e];return r?r=Xr(r,/[, ]/,Xr(r.toUpperCase(),/[, ]/)):(r=Wr[e])||(r=Xr(t," ",Xr(t.toUpperCase()," ")),r=Gr(r,n),Wr[e]=r),r};n=eo((i=i||{}).schema),!1===i.verify_html&&(i.valid_elements="*[*]"),e=to(i.valid_styles),t=to(i.invalid_styles,"map"),s=to(i.valid_classes,"map"),r=v("whitespace_elements","pre script noscript style textarea video audio iframe object code"),o=v("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),a=v("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),u=v("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),l=v("non_empty_elements","td th iframe video audio object script pre code",a),f=v("move_caret_before_on_enter_elements","table",l),d=v("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=v("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),m=v("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),Yr((i.special||"script noscript noframes noembed title style textarea xmp").split(" "),function(e){h[e]=new RegExp("</"+e+"[^>]*>","gi")});var N=function(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")},y=function(e){var t,n,r,o,i,a,u,s,c,l,f,d,m,p,g,h,v,y,b=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,C=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=Zr(e,","),x["@"]&&(h=x["@"].attributes,v=x["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(i=b.exec(e[t])){if(p=i[1],c=i[2],g=i[3],s=i[5],a={attributes:d={},attributesOrder:m=[]},"#"===p&&(a.paddEmpty=!0),"-"===p&&(a.removeEmpty=!0),"!"===i[4]&&(a.removeEmptyAttrs=!0),h&&(oe(h,function(e,t){d[t]=e}),m.push.apply(m,v)),s)for(r=0,o=(s=Zr(s,"|")).length;r<o;r++)if(i=C.exec(s[r])){if(u={},f=i[1],l=i[2].replace(/[\\:]:/g,":"),p=i[3],y=i[4],"!"===f&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(l),u.required=!0),"-"===f