dootask/public/js/build/TEditor.14e57189.js
2023-07-21 18:11:29 +08:00

28 lines
424 KiB
JavaScript
Vendored

import{c as PC,m as a2,l as IC,n as i2}from"./app.a7927215.js";import{I as o2}from"./ImgUpload.9a8d4a5d.js";var FC={exports:{}};(function(R){(function(){var ye=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var t=typeof e;return t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":t},le=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},ce=function(e,t){var n=Array.prototype.slice.call(e);return n.sort(t)},ze=function(e,t){return gt(function(n,r){return e.eq(t(n),t(r))})},gt=function(e){return{eq:e}},yr=gt(function(e,t){return e===t}),Hi=yr,ja=function(e){return gt(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,a=0;a<r;a++)if(!e.eq(t[a],n[a]))return!1;return!0})},Vi=function(e,t){return ze(ja(e),function(n){return ce(n,t)})},Wc=function(e){return gt(function(t,n){var r=Object.keys(t),a=Object.keys(n);if(!Vi(Hi).eq(r,a))return!1;for(var i=r.length,o=0;o<i;o++){var u=r[o];if(!e.eq(t[u],n[u]))return!1}return!0})},Qu=gt(function(e,t){if(e===t)return!0;var n=ye(e),r=ye(t);return n!==r?!1:le(n)?e===t:n==="array"?ja(Qu).eq(e,t):n==="object"?Wc(Qu).eq(e,t):!1}),MC=function(e){var t=typeof e;return e===null?"null":t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":t},Zu=function(e){return function(t){return MC(t)===e}},Ju=function(e){return function(t){return typeof t===e}},qc=function(e){return function(t){return e===t}},He=Zu("string"),Qr=Zu("object"),Vt=Zu("array"),Ka=qc(null),jc=Ju("boolean"),Nt=qc(void 0),vn=function(e){return e==null},Ne=function(e){return!vn(e)},Oe=Ju("function"),Zr=Ju("number"),ve=function(){},Cr=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},Kc=function(e,t){return function(n){return e(t(n))}},X=function(e){return function(){return e}},Tt=function(e){return e},UC=function(e,t){return e===t};function G(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var i=t.concat(r);return e.apply(null,i)}}var es=function(e){return function(t){return!e(t)}},zC=function(e){return function(){throw new Error(e)}},HC=function(e){return e()},VC=function(e){e()},Re=X(!1),qe=X(!0),Wi=function(){return ts},ts=function(){var e=function(r){return r()},t=Tt,n={fold:function(r,a){return r()},isSome:Re,isNone:qe,getOr:t,getOrThunk:e,getOrDie:function(r){throw new Error(r||"error: getOrDie called on none.")},getOrNull:X(null),getOrUndefined:X(void 0),or:t,orThunk:e,map:Wi,each:ve,bind:Wi,exists:Re,forall:qe,filter:function(){return Wi()},toArray:function(){return[]},toString:X("none()")};return n}(),ns=function(e){var t=X(e),n=function(){return a},r=function(i){return i(e)},a={fold:function(i,o){return o(e)},isSome:qe,isNone:Re,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(i){return ns(i(e))},each:function(i){i(e)},bind:r,exists:r,forall:r,filter:function(i){return i(e)?a:ts},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return a},WC=function(e){return e==null?ts:ns(e)},b={some:ns,none:Wi,from:WC},rs=Array.prototype.slice,qC=Array.prototype.indexOf,jC=Array.prototype.push,Gc=function(e,t){return qC.call(e,t)},KC=function(e,t){var n=Gc(e,t);return n===-1?b.none():b.some(n)},Je=function(e,t){return Gc(e,t)>-1},bt=function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n];if(t(a,n))return!0}return!1},De=function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var i=e[a];r[a]=t(i,a)}return r},Y=function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n];t(a,n)}},Xc=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];t(r,n)}},Yc=function(e,t){for(var n=[],r=[],a=0,i=e.length;a<i;a++){var o=e[a],u=t(o,a)?n:r;u.push(o)}return{pass:n,fail:r}},me=function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var i=e[r];t(i,r)&&n.push(i)}return n},Qc=function(e,t,n){return Xc(e,function(r,a){n=t(n,r,a)}),n},Qt=function(e,t,n){return Y(e,function(r,a){n=t(n,r,a)}),n},Zc=function(e,t,n){for(var r=0,a=e.length;r<a;r++){var i=e[r];if(t(i,r))return b.some(i);if(n(i,r))break}return b.none()},et=function(e,t){return Zc(e,t,Re)},qi=function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n];if(t(a,n))return b.some(n)}return b.none()},GC=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!Vt(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);jC.apply(t,e[n])}return t},Jr=function(e,t){return GC(De(e,t))},Ga=function(e,t){for(var n=0,r=e.length;n<r;++n){var a=e[n];if(t(a,n)!==!0)return!1}return!0},ji=function(e){var t=rs.call(e,0);return t.reverse(),t},Jc=function(e,t){return me(e,function(n){return!Je(t,n)})},XC=function(e,t){for(var n={},r=0,a=e.length;r<a;r++){var i=e[r];n[String(i)]=t(i,r)}return n},as=function(e,t){var n=rs.call(e,0);return n.sort(t),n},is=function(e,t){return t>=0&&t<e.length?b.some(e[t]):b.none()},Pt=function(e){return is(e,0)},wr=function(e){return is(e,e.length-1)},dn=Oe(Array.from)?Array.from:function(e){return rs.call(e)},ev=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return b.none()},ea=Object.keys,YC=Object.hasOwnProperty,Pe=function(e,t){for(var n=ea(e),r=0,a=n.length;r<a;r++){var i=n[r],o=e[i];t(o,i)}},tv=function(e,t){return QC(e,function(n,r){return{k:r,v:t(n,r)}})},QC=function(e,t){var n={};return Pe(e,function(r,a){var i=t(r,a);n[i.k]=i.v}),n},os=function(e){return function(t,n){e[n]=t}},nv=function(e,t,n,r){var a={};return Pe(e,function(i,o){(t(i,o)?n:r)(i,o)}),a},ZC=function(e,t){var n={},r={};return nv(e,t,os(n),os(r)),{t:n,f:r}},Xa=function(e,t){var n={};return nv(e,t,os(n),ve),n},JC=function(e,t){var n=[];return Pe(e,function(r,a){n.push(t(r,a))}),n},e0=function(e){return JC(e,Tt)},je=function(e,t){return pe(e,t)?b.from(e[t]):b.none()},pe=function(e,t){return YC.call(e,t)},ta=function(e,t){return pe(e,t)&&e[t]!==void 0&&e[t]!==null},t0=function(e,t,n){return n===void 0&&(n=Qu),Wc(n).eq(e,t)},us=Array.isArray,n0=function(e){if(us(e))return e;for(var t=[],n=0,r=e.length;n<r;n++)t[n]=e[n];return t},Ya=function(e,t,n){var r,a;if(!e)return!1;if(n=n||e,e.length!==void 0){for(r=0,a=e.length;r<a;r++)if(t.call(n,e[r],r,e)===!1)return!1}else for(r in e)if(pe(e,r)&&t.call(n,e[r],r,e)===!1)return!1;return!0},ss=function(e,t){var n=[];return Ya(e,function(r,a){n.push(t(r,a,e))}),n},na=function(e,t){var n=[];return Ya(e,function(r,a){(!t||t(r,a,e))&&n.push(r)}),n},rv=function(e,t){if(e){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1},Ki=function(e,t,n,r){for(var a=Nt(n)?e[0]:n,i=0;i<e.length;i++)a=t.call(r,a,e[i],i);return a},av=function(e,t,n){var r,a;for(r=0,a=e.length;r<a;r++)if(t.call(n,e[r],r,e))return r;return-1},Vn=function(e){return e[e.length-1]},ie=function(){return ie=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ie.apply(this,arguments)};function r0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Dn(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var fs=function(e){var t=!1,n;return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return t||(t=!0,n=e.apply(null,r)),n}},a0=function(e,t,n,r){var a=e.isiOS()&&/ipad/i.test(n)===!0,i=e.isiOS()&&!a,o=e.isiOS()||e.isAndroid(),u=o||r("(pointer:coarse)"),s=a||!i&&o&&r("(min-device-width:768px)"),f=i||o&&!s,l=t.isSafari()&&e.isiOS()&&/safari/i.test(n)===!1,c=!f&&!s&&!l;return{isiPad:X(a),isiPhone:X(i),isTablet:X(s),isPhone:X(f),isTouch:X(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:X(l),isDesktop:X(c)}},i0=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},o0=function(e,t){var n=i0(e,t);if(!n)return{major:0,minor:0};var r=function(a){return Number(t.replace(n,"$"+a))};return ls(r(1),r(2))},u0=function(e,t){var n=String(t).toLowerCase();return e.length===0?iv():o0(e,n)},iv=function(){return ls(0,0)},ls=function(e,t){return{major:e,minor:t}},Qa={nu:ls,detect:u0,unknown:iv},s0=function(e,t){return ev(t.brands,function(n){var r=n.brand.toLowerCase();return et(e,function(a){var i;return r===((i=a.brand)===null||i===void 0?void 0:i.toLowerCase())}).map(function(a){return{current:a.name,version:Qa.nu(parseInt(n.version,10),0)}})})},ov=function(e,t){var n=String(t).toLowerCase();return et(e,function(r){return r.search(n)})},f0=function(e,t){return ov(e,t).map(function(n){var r=Qa.detect(n.versionRegexes,t);return{current:n.name,version:r}})},l0=function(e,t){return ov(e,t).map(function(n){var r=Qa.detect(n.versionRegexes,t);return{current:n.name,version:r}})},c0=function(e,t){return e.substring(t)},v0=function(e,t,n){return t===""||e.length>=t.length&&e.substr(n,n+t.length)===t},d0=function(e,t){return Sr(e,t)?c0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return v0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),m0=cs(/^\s+/g),uv=cs(/\s+$/g),Gi=function(e){return e.length>0},sv=function(e){return!Gi(e)},ds=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,On=function(e){return function(t){return yt(t,e)}},p0=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return yt(e,"edge/")&&yt(e,"chrome")&&yt(e,"safari")&&yt(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ds],search:function(e){return yt(e,"chrome")&&!yt(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return yt(e,"msie")||yt(e,"trident")}},{name:"Opera",versionRegexes:[ds,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:On("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:On("firefox")},{name:"Safari",versionRegexes:[ds,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(yt(e,"safari")||yt(e,"mobile/"))&&yt(e,"applewebkit")}}],h0=[{name:"Windows",search:On("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return yt(e,"iphone")||yt(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:On("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:On("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:On("linux"),versionRegexes:[]},{name:"Solaris",search:On("sunos"),versionRegexes:[]},{name:"FreeBSD",search:On("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:On("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fv={browsers:X(p0),oses:X(h0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",g0=function(){return hv({current:void 0,version:Qa.unknown()})},hv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isEdge:r(lv),isChrome:r(cv),isIE:r(vv),isOpera:r(dv),isFirefox:r(mv),isSafari:r(pv)}},gv={unknown:g0,nu:hv,edge:X(lv),chrome:X(cv),ie:X(vv),opera:X(dv),firefox:X(mv),safari:X(pv)},bv="Windows",yv="iOS",Cv="Android",wv="Linux",Sv="OSX",Ev="Solaris",kv="FreeBSD",xv="ChromeOS",b0=function(){return Nv({current:void 0,version:Qa.unknown()})},Nv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isWindows:r(bv),isiOS:r(yv),isAndroid:r(Cv),isOSX:r(Sv),isLinux:r(wv),isSolaris:r(Ev),isFreeBSD:r(kv),isChromeOS:r(xv)}},Tv={unknown:b0,nu:Nv,windows:X(bv),ios:X(yv),android:X(Cv),linux:X(wv),osx:X(Sv),solaris:X(Ev),freebsd:X(kv),chromeos:X(xv)},y0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return s0(r,s)}).orThunk(function(){return f0(r,e)}).fold(gv.unknown,gv.nu),o=l0(a,e).fold(Tv.unknown,Tv.nu),u=a0(o,i,e,n);return{browser:i,os:o,deviceType:u}},C0={detect:y0},w0=function(e){return window.matchMedia(e).matches},S0=fs(function(){return C0.detect(navigator.userAgent,b.from(navigator.userAgentData),w0)}),Wt=function(){return S0()},Av=navigator.userAgent,ms=Wt(),Ct=ms.browser,It=ms.os,mn=ms.deviceType,E0=/WebKit/.test(Av)&&!Ct.isEdge(),k0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,x0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:E0,ie:Ct.isIE()||Ct.isEdge()?Ct.version.major:!1,gecko:Ct.isFirefox(),mac:It.isOSX()||It.isiOS(),iOS:mn.isiPad()||mn.isiPhone(),android:It.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ct.isIE()?document.documentMode||7:10,fileApi:k0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:mn.isDesktop(),windowsPhone:x0,browser:{current:Ct.current,version:Ct.version,isChrome:Ct.isChrome,isEdge:Ct.isEdge,isFirefox:Ct.isFirefox,isIE:Ct.isIE,isOpera:Ct.isOpera,isSafari:Ct.isSafari},os:{current:It.current,version:It.version,isAndroid:It.isAndroid,isChromeOS:It.isChromeOS,isFreeBSD:It.isFreeBSD,isiOS:It.isiOS,isLinux:It.isLinux,isOSX:It.isOSX,isSolaris:It.isSolaris,isWindows:It.isWindows},deviceType:{isDesktop:mn.isDesktop,isiPad:mn.isiPad,isiPhone:mn.isiPhone,isPhone:mn.isPhone,isTablet:mn.isTablet,isTouch:mn.isTouch,isWebView:mn.isWebView}},N0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(N0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},T0=function(e,t,n){var r;for(e=e||[],t=t||",",typeof e=="string"&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},A0=pe,R0=function(e,t,n){var r=this,a,i,o,u=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var s=e[3].match(/(^|\.)(\w+)$/i)[2],f=r.createNS(e[3].replace(/\.\w+$/,""),n);if(!f[s]){if(e[2]==="static"){f[s]=t,this.onCreate&&this.onCreate(e[2],e[3],f[s]);return}t[s]||(t[s]=function(){},u=1),f[s]=t[s],r.extend(f[s].prototype,t),e[5]&&(a=r.resolve(e[5]).prototype,i=e[5].match(/\.(\w+)$/i)[1],o=f[s],u?f[s]=function(){return a[i].apply(this,arguments)}:f[s]=function(){return this.parent=a[i],o.apply(this,arguments)},f[s].prototype[s]=f[s],r.each(a,function(l,c){f[s].prototype[c]=a[c]}),r.each(t,function(l,c){a[c]?f[s].prototype[c]=function(){return this.parent=a[c],l.apply(this,arguments)}:c!==s&&(f[s].prototype[c]=l)})),r.each(t.static,function(l,c){f[s][c]=l})}},B0=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 a=t[r];for(var i in a)if(pe(a,i)){var o=a[i];o!==void 0&&(e[i]=o)}}return e},_v=function(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),Ya(e,function(a,i){if(t.call(r,a,i,n)===!1)return!1;_v(a,t,n,r)}))},_0=function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)r=e[n],t[r]||(t[r]={}),t=t[r];return t},D0=function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0,r=e.length;n<r&&(t=t[e[n]],!!t);n++);return t},O0=function(e,t){return!e||Bv(e,"array")?e:ss(e.split(t||","),Rv)},P0=function(e){var t=se.cacheSuffix;return t&&(e+=(e.indexOf("?")===-1?"?":"&")+t),e},_={trim:Rv,isArray:us,is:Bv,toArray:n0,makeMap:T0,each:Ya,map:ss,grep:na,inArray:rv,hasOwn:A0,extend:B0,create:R0,walk:_v,createNS:_0,resolve:D0,explode:O0,_addCacheSuffix:P0},I0=function(e,t){var n=t||document,r=n.createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Za(r.childNodes[0])},L0=function(e,t){var n=t||document,r=n.createElement(e);return Za(r)},$0=function(e,t){var n=t||document,r=n.createTextNode(e);return Za(r)},Za=function(e){if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},F0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Za)},k={fromHtml:I0,fromTag:L0,fromText:$0,fromDom:Za,fromPoint:F0},Dv=function(e,t){var n=[],r=function(i){return n.push(i),t(i)},a=t(e);do a=a.bind(r);while(a.isSome());return n},M0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},U0=function(e,t){return M0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},z0=8,Ov=9,Pv=11,ps=1,H0=3,ra=function(e,t){var n=e.dom;if(n.nodeType!==ps)return!1;var r=n;if(r.matches!==void 0)return r.matches(t);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Iv=function(e){return e.nodeType!==ps&&e.nodeType!==Ov&&e.nodeType!==Pv||e.childElementCount===0},V0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?[]:De(n.querySelectorAll(e),k.fromDom)},W0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?b.none():b.from(n.querySelector(e)).map(k.fromDom)},Te=function(e,t){return e.dom===t.dom},q0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},j0=function(e,t){return U0(e.dom,t.dom)},Wn=function(e,t){return Wt().browser.isIE()?j0(e,t):q0(e,t)};typeof window!="undefined"||Function("return this;")();var Ke=function(e){var t=e.dom.nodeName;return t.toLowerCase()},Lv=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return Lv(t)===e}},K0=function(e){return Lv(e)===z0||Ke(e)==="#comment"},Zt=Xi(ps),qt=Xi(H0),G0=Xi(Ov),X0=Xi(Pv),Y0=function(e){return function(t){return Zt(t)&&Ke(t)===e}},$v=function(e){return k.fromDom(e.dom.ownerDocument)},aa=function(e){return G0(e)?e:$v(e)},Q0=function(e){return k.fromDom(aa(e).dom.documentElement)},Fv=function(e){return k.fromDom(aa(e).dom.defaultView)},Jt=function(e){return b.from(e.dom.parentNode).map(k.fromDom)},Z0=function(e,t){for(var n=Oe(t)?t:Re,r=e.dom,a=[];r.parentNode!==null&&r.parentNode!==void 0;){var i=r.parentNode,o=k.fromDom(i);if(a.push(o),n(o)===!0)break;r=i}return a},J0=function(e){var t=function(n){return me(n,function(r){return!Te(e,r)})};return Jt(e).map(jt).map(t).getOr([])},Er=function(e){return b.from(e.dom.previousSibling).map(k.fromDom)},Ja=function(e){return b.from(e.dom.nextSibling).map(k.fromDom)},Mv=function(e){return ji(Dv(e,Er))},Uv=function(e){return Dv(e,Ja)},jt=function(e){return De(e.dom.childNodes,k.fromDom)},Yi=function(e,t){var n=e.dom.childNodes;return b.from(n[t]).map(k.fromDom)},zv=function(e){return Yi(e,0)},hs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},ew=function(e){var t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return k.fromDom(t)},Vv=function(e){return X0(e)&&Ne(e.dom.host)},Wv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),tw=X(Wv),kr=Wv?function(e){return k.fromDom(e.dom.getRootNode())}:aa,gs=function(e){return Vv(e)?e:ew(aa(e))},nw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},rw=function(e){return k.fromDom(e.dom.host)},aw=function(e){if(tw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Zt(t)&&iw(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},iw=function(e){return Ne(e.dom.shadowRoot)},en=function(e,t){var n=Jt(e);n.each(function(r){r.dom.insertBefore(t.dom,e.dom)})},ei=function(e,t){var n=Ja(e);n.fold(function(){var r=Jt(e);r.each(function(a){at(a,t)})},function(r){en(r,t)})},qv=function(e,t){var n=zv(e);n.fold(function(){at(e,t)},function(r){e.dom.insertBefore(t.dom,r.dom)})},at=function(e,t){e.dom.appendChild(t.dom)},ow=function(e,t){en(e,t),at(t,e)},uw=function(e,t){Y(t,function(n){en(e,n)})},Qi=function(e,t){Y(t,function(n){at(e,n)})},bs=function(e){e.dom.textContent="",Y(jt(e),function(t){tt(t)})},tt=function(e){var t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},jv=function(e){var t=jt(e);t.length>0&&uw(e,t),tt(e)},ti=function(e){var t=qt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return nw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ti,rw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},ia=Kv,sw=function(e){var t=e.getBoundingClientRect();return ia(t.left,t.top)},Zi=function(e,t){return e!==void 0?e:t!==void 0?t:0},fw=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,a=t.documentElement;if(n===e.dom)return ia(n.offsetLeft,n.offsetTop);var i=Zi(r==null?void 0:r.pageYOffset,a.scrollTop),o=Zi(r==null?void 0:r.pageXOffset,a.scrollLeft),u=Zi(a.clientTop,n.clientTop),s=Zi(a.clientLeft,n.clientLeft);return ys(e).translate(o-s,i-u)},ys=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?ia(r.offsetLeft,r.offsetTop):ti(e)?sw(t):ia(0,0)},Cs=function(e){var t=e!==void 0?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return ia(n,r)},Gv=function(e,t,n){var r=n!==void 0?n.dom:document,a=r.defaultView;a&&a.scrollTo(e,t)},Xv=function(e,t){var n=Wt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},lw=function(e){var t=e===void 0?window:e;return Wt().browser.isFirefox()?b.none():b.from(t.visualViewport)},Yv=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qv=function(e){var t=e===void 0?window:e,n=t.document,r=Cs(k.fromDom(n));return lw(t).fold(function(){var a=t.document.documentElement,i=a.clientWidth,o=a.clientHeight;return Yv(r.left,r.top,i,o)},function(a){return Yv(Math.max(a.pageLeft,r.left),Math.max(a.pageTop,r.top),a.width,a.height)})},ni=function(e){return function(t){return!!t&&t.nodeType===e}},Ji=function(e){return!!e&&!Object.getPrototypeOf(e)},ae=ni(1),Kt=function(e){var t=e.map(function(n){return n.toLowerCase()});return function(n){if(n&&n.nodeName){var r=n.nodeName.toLowerCase();return Je(t,r)}return!1}},eo=function(e,t){var n=t.toLowerCase().split(" ");return function(r){if(ae(r))for(var a=0;a<n.length;a++){var i=r.ownerDocument.defaultView.getComputedStyle(r,null),o=i?i.getPropertyValue(e):null;if(o===n[a])return!0}return!1}},Zv=function(e){return function(t){return ae(t)&&t.hasAttribute(e)}},cw=function(e,t){return function(n){return ae(n)&&n.getAttribute(e)===t}},xr=function(e){return ae(e)&&e.hasAttribute("data-mce-bogus")},vw=function(e){return ae(e)&&e.getAttribute("data-mce-bogus")==="all"},oa=function(e){return ae(e)&&e.tagName==="TABLE"},Jv=function(e){return function(t){return!!(ae(t)&&(t.contentEditable===e||t.getAttribute("data-mce-contenteditable")===e))}},ws=Kt(["textarea","input"]),Q=ni(3),dw=ni(8),Ss=ni(9),Es=ni(11),$e=Kt(["br"]),mw=Kt(["img"]),pn=Jv("true"),_e=Jv("false"),to=Kt(["td","th"]),Gt=Kt(["video","audio","object","embed"]),no=function(e,t,n){return n===void 0&&(n=UC),e.exists(function(r){return n(r,t)})},pw=function(e){for(var t=[],n=function(a){t.push(a)},r=0;r<e.length;r++)e[r].each(n);return t},Et=function(e,t,n){return e.isSome()&&t.isSome()?b.some(n(e.getOrDie(),t.getOrDie())):b.none()},hw=function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?b.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):b.none()},gw=function(e,t){return e?b.some(t):b.none()},ro=function(e){return e.style!==void 0&&Oe(e.style.getPropertyValue)},ed=function(e,t,n){if(He(n)||jc(n)||Zr(n))e.setAttribute(t,n+"");else throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple")},hn=function(e,t,n){ed(e.dom,t,n)},qn=function(e,t){var n=e.dom;Pe(t,function(r,a){ed(n,a,r)})},ri=function(e,t){var n=e.dom.getAttribute(t);return n===null?void 0:n},td=function(e,t){return b.from(ri(e,t))},bw=function(e,t){var n=e.dom;return n&&n.hasAttribute?n.hasAttribute(t):!1},jn=function(e,t){e.dom.removeAttribute(t)},yw=function(e){return Qt(e.dom.attributes,function(t,n){return t[n.name]=n.value,t},{})},Cw=function(e,t,n){if(!He(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);ro(e)&&e.style.setProperty(t,n)},ww=function(e,t){var n=e.dom;Pe(t,function(r,a){Cw(n,a,r)})},Pn=function(e,t){var n=e.dom,r=window.getComputedStyle(n),a=r.getPropertyValue(t);return a===""&&!ti(e)?nd(n,t):a},nd=function(e,t){return ro(e)?e.style.getPropertyValue(t):""},ks=function(e,t){var n=e.dom,r=nd(n,t);return b.from(r).filter(function(a){return a.length>0})},rd=function(e){var t={},n=e.dom;if(ro(n))for(var r=0;r<n.style.length;r++){var a=n.style.item(r);t[a]=n.style[a]}return t},Sw=function(e){return e.dom.offsetWidth},Ew=Wt().browser,ad=function(e){return et(e,Zt)},kw=function(e){return Ew.isFirefox()&&Ke(e)==="table"?ad(jt(e)).filter(function(t){return Ke(t)==="caption"}).bind(function(t){return ad(Uv(t)).map(function(n){var r=n.dom.offsetTop,a=t.dom.offsetTop,i=t.dom.offsetHeight;return r<=a?-i:0})}).getOr(0):0},id=function(e,t){return e.children&&Je(e.children,t)},xw=function(e,t,n){var r=0,a=0,i=e.ownerDocument;if(n=n||e,t){if(n===e&&t.getBoundingClientRect&&Pn(k.fromDom(e),"position")==="static"){var o=t.getBoundingClientRect();return r=o.left+(i.documentElement.scrollLeft||e.scrollLeft)-i.documentElement.clientLeft,a=o.top+(i.documentElement.scrollTop||e.scrollTop)-i.documentElement.clientTop,{x:r,y:a}}for(var u=t;u&&u!==n&&u.nodeType&&!id(u,n);){var s=u;r+=s.offsetLeft||0,a+=s.offsetTop||0,u=s.offsetParent}for(u=t.parentNode;u&&u!==n&&u.nodeType&&!id(u,n);)r-=u.scrollLeft||0,a-=u.scrollTop||0,u=u.parentNode;a+=kw(k.fromDom(t))}return{x:r,y:a}},od={},ud={exports:od};(function(e,t,n,r){(function(a,i){typeof t=="object"&&typeof n!="undefined"?n.exports=i():typeof e=="function"&&e.amd?e(i):(a=typeof globalThis!="undefined"?globalThis:a||self,a.EphoxContactWrapper=i())})(this,function(){var a=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof PC!="undefined"?PC:typeof self!="undefined"?self:{},i={exports:{}};(function(f){(function(l){var c=setTimeout;function v(){}function d(C,x){return function(){C.apply(x,arguments)}}function m(C){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof C!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],S(C,this)}function p(C,x){for(;C._state===3;)C=C._value;if(C._state===0){C._deferreds.push(x);return}C._handled=!0,m._immediateFn(function(){var B=C._state===1?x.onFulfilled:x.onRejected;if(B===null){(C._state===1?h:y)(x.promise,C._value);return}var L;try{L=B(C._value)}catch(ne){y(x.promise,ne);return}h(x.promise,L)})}function h(C,x){try{if(x===C)throw new TypeError("A promise cannot be resolved with itself.");if(x&&(typeof x=="object"||typeof x=="function")){var B=x.then;if(x instanceof m){C._state=3,C._value=x,g(C);return}else if(typeof B=="function"){S(d(B,x),C);return}}C._state=1,C._value=x,g(C)}catch(L){y(C,L)}}function y(C,x){C._state=2,C._value=x,g(C)}function g(C){C._state===2&&C._deferreds.length===0&&m._immediateFn(function(){C._handled||m._unhandledRejectionFn(C._value)});for(var x=0,B=C._deferreds.length;x<B;x++)p(C,C._deferreds[x]);C._deferreds=null}function E(C,x,B){this.onFulfilled=typeof C=="function"?C:null,this.onRejected=typeof x=="function"?x:null,this.promise=B}function S(C,x){var B=!1;try{C(function(L){B||(B=!0,h(x,L))},function(L){B||(B=!0,y(x,L))})}catch(L){if(B)return;B=!0,y(x,L)}}m.prototype.catch=function(C){return this.then(null,C)},m.prototype.then=function(C,x){var B=new this.constructor(v);return p(this,new E(C,x,B)),B},m.all=function(C){var x=Array.prototype.slice.call(C);return new m(function(B,L){if(x.length===0)return B([]);var ne=x.length;function q(ee,U){try{if(U&&(typeof U=="object"||typeof U=="function")){var W=U.then;if(typeof W=="function"){W.call(U,function(F){q(ee,F)},L);return}}x[ee]=U,--ne===0&&B(x)}catch(F){L(F)}}for(var D=0;D<x.length;D++)q(D,x[D])})},m.resolve=function(C){return C&&typeof C=="object"&&C.constructor===m?C:new m(function(x){x(C)})},m.reject=function(C){return new m(function(x,B){B(C)})},m.race=function(C){return new m(function(x,B){for(var L=0,ne=C.length;L<ne;L++)C[L].then(x,B)})},m._immediateFn=typeof setImmediate=="function"?function(C){setImmediate(C)}:function(C){c(C,0)},m._unhandledRejectionFn=function(x){typeof console!="undefined"&&console&&console.warn("Possible Unhandled Promise Rejection:",x)},m._setImmediateFn=function(x){m._immediateFn=x},m._setUnhandledRejectionFn=function(x){m._unhandledRejectionFn=x},f.exports?f.exports=m:l.Promise||(l.Promise=m)})(a)})(i);var o=i.exports,u=function(){return typeof window!="undefined"?window:Function("return this;")()}(),s={boltExport:u.Promise||o};return s})})(void 0,od,ud);var xs=ud.exports.boltExport,Ns=function(e){var t=b.none(),n=[],r=function(f){return Ns(function(l){a(function(c){l(f(c))})})},a=function(f){o()?s(f):n.push(f)},i=function(f){o()||(t=b.some(f),u(n),n=[])},o=function(){return t.isSome()},u=function(f){Y(f,s)},s=function(f){t.each(function(l){setTimeout(function(){f(l)},0)})};return e(i),{get:a,map:r,isReady:o}},Nw=function(e){return Ns(function(t){t(e)})},Tw={nu:Ns,pure:Nw},Aw=function(e){setTimeout(function(){throw e},0)},ua=function(e){var t=function(s){e().then(s,Aw)},n=function(s){return ua(function(){return e().then(s)})},r=function(s){return ua(function(){return e().then(function(f){return s(f).toPromise()})})},a=function(s){return ua(function(){return e().then(function(){return s.toPromise()})})},i=function(){return Tw.nu(t)},o=function(){var s=null;return ua(function(){return s===null&&(s=e()),s})},u=e;return{map:n,bind:r,anonBind:a,toLazy:i,toCached:o,toPromise:u,get:t}},Rw=function(e){return ua(function(){return new xs(e)})},Bw=function(e){return ua(function(){return xs.resolve(e)})},sd={nu:Rw,pure:Bw},_w=function(e,t){return t(function(n){var r=[],a=0,i=function(o){return function(u){r[o]=u,a++,a>=e.length&&n(r)}};e.length===0?n([]):Y(e,function(o,u){o.get(i(u))})})},Dw=function(e){return _w(e,sd.nu)},sa=function(e){var t=function(c){return sa(e)},n=function(c){return sa(e)},r=function(c){return sa(c(e))},a=function(c){return sa(e)},i=function(c){c(e)},o=function(c){return c(e)},u=function(c,v){return v(e)},s=function(c){return c(e)},f=function(c){return c(e)},l=function(){return b.some(e)};return{isValue:qe,isError:Re,getOr:X(e),getOrThunk:X(e),getOrDie:X(e),or:t,orThunk:n,fold:u,map:r,mapError:a,each:i,bind:o,exists:s,forall:f,toOptional:l}},ai=function(e){var t=function(f){return f()},n=function(){return zC(String(e))()},r=Tt,a=function(f){return f()},i=function(f){return ai(e)},o=function(f){return ai(f(e))},u=function(f){return ai(e)},s=function(f,l){return f(e)};return{isValue:Re,isError:qe,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:ve,bind:u,exists:Re,forall:qe,toOptional:b.none}},Ow=function(e,t){return e.fold(function(){return ai(t)},sa)},fd={value:sa,error:ai,fromOption:Ow},Pw=function(e){if(!Vt(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");var t=[],n={};return Y(e,function(r,a){var i=ea(r);if(i.length!==1)throw new Error("one and only one name per case");var o=i[0],u=r[o];if(n[o]!==void 0)throw new Error("duplicate key detected:"+o);if(o==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Vt(u))throw new Error("case arguments must be an array");t.push(o),n[o]=function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];var l=s.length;if(l!==u.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+u.length+" ("+u+"), got "+l);var c=function(v){var d=ea(v);if(t.length!==d.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+`
Actual: `+d.join(","));var m=Ga(t,function(p){return Je(d,p)});if(!m)throw new Error("Not all branches were specified when using match. Specified: "+d.join(", ")+`
Required: `+t.join(", "));return v[o].apply(null,s)};return{fold:function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];if(v.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+v.length);var m=v[a];return m.apply(null,s)},match:c,log:function(v){console.log(v,{constructors:t,constructor:o,params:s})}}}}),n},Kn={generate:Pw};Kn.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ld=function(e){return e.fold(Tt,Tt)};function cd(e,t,n,r,a){return e(n,r)?b.some(n):Oe(a)&&a(n)?b.none():t(n,r,a)}var ii=function(e,t,n){for(var r=e.dom,a=Oe(n)?n:Re;r.parentNode;){r=r.parentNode;var i=k.fromDom(r);if(t(i))return b.some(i);if(a(i))break}return b.none()},ao=function(e,t,n){var r=function(a,i){return i(a)};return cd(r,ii,e,t,n)},Iw=function(e,t){var n=e.dom;return n.parentNode?Lw(k.fromDom(n.parentNode),function(r){return!Te(e,r)&&t(r)}):b.none()},Lw=function(e,t){var n=function(a){return t(k.fromDom(a))},r=et(e.dom.childNodes,n);return r.map(k.fromDom)},io=function(e,t,n){return ii(e,function(r){return ra(r,t)},n)},oo=function(e,t){return W0(t,e)},Ts=function(e,t,n){var r=function(a,i){return ra(a,i)};return cd(r,io,e,t,n)},it=window.Promise?window.Promise:xs,As,$w=function(e,t){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],a=function(o){window.setTimeout(o,0)},i=0;i<r.length&&!n;i++)n=window[r[i]+"RequestAnimationFrame"];n||(n=a),n(e,t)},Rs=function(e,t){return typeof t!="number"&&(t=0),setTimeout(e,t)},vd=function(e,t){return typeof t!="number"&&(t=1),setInterval(e,t)},Fw=function(e){return clearTimeout(e)},Mw=function(e){return clearInterval(e)},dd=function(e,t){var n,r=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];clearTimeout(n),n=Rs(function(){e.apply(this,a)},t)};return r.stop=function(){clearTimeout(n)},r},ot={requestAnimationFrame:function(e,t){if(As){As.then(e);return}As=new it(function(n){t||(t=document.body),$w(n,t)}).then(e)},setTimeout:Rs,setInterval:vd,setEditorTimeout:function(e,t,n){return Rs(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r=vd(function(){e.removed?clearInterval(r):t()},n);return r},debounce:dd,throttle:dd,clearInterval:Mw,clearTimeout:Fw},md=function(e,t){t===void 0&&(t={});var n=0,r={},a=k.fromDom(e),i=aa(a),o=t.maxLoadTime||5e3,u=function(h){t.referrerPolicy=h},s=function(h){at(gs(a),h)},f=function(h){var y=gs(a);oo(y,"#"+h).each(tt)},l=function(h){return je(r,h).getOrThunk(function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}})},c=function(h,y,g){var E,S=_._addCacheSuffix(h),C=l(S);r[S]=C,C.count++;var x=function(U,W){for(var F=U.length;F--;)U[F]();C.status=W,C.passed=[],C.failed=[],E&&(E.onload=null,E.onerror=null,E=null)},B=function(){return x(C.passed,2)},L=function(){return x(C.failed,3)},ne=function(U,W){U()||(Date.now()-ee<o?ot.setTimeout(W):L())},q=function(){ne(function(){for(var U=e.styleSheets,W=U.length;W--;){var F=U[W],V=F.ownerNode;if(V&&V.id===E.id)return B(),!0}return!1},q)};if(y&&C.passed.push(y),g&&C.failed.push(g),C.status!==1){if(C.status===2){B();return}if(C.status===3){L();return}C.status=1;var D=k.fromTag("link",i.dom);qn(D,{rel:"stylesheet",type:"text/css",id:C.id});var ee=Date.now();t.contentCssCors&&hn(D,"crossOrigin","anonymous"),t.referrerPolicy&&hn(D,"referrerpolicy",t.referrerPolicy),E=D.dom,E.onload=q,E.onerror=L,s(D),hn(D,"href",S)}},v=function(h){return sd.nu(function(y){c(h,Cr(y,X(fd.value(h))),Cr(y,X(fd.error(h))))})},d=function(h,y,g){Dw(De(h,v)).get(function(E){var S=Yc(E,function(C){return C.isValue()});S.fail.length>0?g(S.fail.map(ld)):y(S.pass.map(ld))})},m=function(h){var y=_._addCacheSuffix(h);je(r,y).each(function(g){var E=--g.count;E===0&&(delete r[y],f(g.id))})},p=function(h){Y(h,function(y){m(y)})};return{load:c,loadAll:d,unload:m,unloadAll:p,_setReferrerPolicy:u}},Uw=function(){var e=new WeakMap,t=function(n,r){var a=kr(n),i=a.dom;return b.from(e.get(i)).getOrThunk(function(){var o=md(i,r);return e.set(i,o),o})};return{forElement:t}},pd=Uw(),Ge=function(){function e(t,n){this.node=t,this.rootNode=n,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 e.prototype.current=function(){return this.node},e.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},e.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},e.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},e.prototype.findSibling=function(t,n,r,a){var i,o;if(t){if(!a&&t[n])return t[n];if(t!==this.rootNode){if(i=t[r],i)return i;for(o=t.parentNode;o&&o!==this.rootNode;o=o.parentNode)if(i=o[r],i)return i}}},e.prototype.findPreviousNode=function(t,n,r,a){var i,o,u;if(t){if(i=t[r],this.rootNode&&i===this.rootNode)return;if(i){if(!a){for(u=i[n];u;u=u[n])if(!u[n])return u}return i}if(o=t.parentNode,o&&o!==this.rootNode)return o}},e}(),zw=["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"],Hw=["td","th"],Vw=["thead","tbody","tfoot"],Ww=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],qw=["h1","h2","h3","h4","h5","h6"],jw=["li","dd","dt"],Kw=["ul","ol","dl"],Gw=["pre","script","textarea","style"],Gn=function(e){var t;return function(n){return t=t||XC(e,qe),pe(t,Ke(n))}},Xw=Gn(qw),gn=Gn(zw),Yw=function(e){return Ke(e)==="table"},Bs=function(e){return Zt(e)&&!gn(e)},fa=function(e){return Zt(e)&&Ke(e)==="br"},hd=Gn(Ww),_s=Gn(Kw),oi=Gn(jw),Qw=Gn(Vw),uo=Gn(Hw),so=Gn(Gw),Zw=function(e,t,n){return io(e,t,n).isSome()},Ds="\uFEFF",At="\xA0",Jw=function(e){return e===Ds},eS=function(e){return e.replace(/\uFEFF/g,"")},nt=Ds,fo=Jw,Xn=eS,tS=ae,la=Q,ca=function(e){return la(e)&&(e=e.parentNode),tS(e)&&e.hasAttribute("data-mce-caret")},va=function(e){return la(e)&&fo(e.data)},Lt=function(e){return ca(e)||va(e)},gd=function(e){return e.firstChild!==e.lastChild||!$e(e.firstChild)},nS=function(e,t){var n=e.ownerDocument,r=n.createTextNode(nt),a=e.parentNode;if(t){var i=e.previousSibling;if(la(i)){if(Lt(i))return i;if(co(i))return i.splitText(i.data.length-1)}a.insertBefore(r,e)}else{var i=e.nextSibling;if(la(i)){if(Lt(i))return i;if(lo(i))return i.splitText(1),i}e.nextSibling?a.insertBefore(r,e.nextSibling):a.appendChild(r)}return r},Os=function(e){var t=e.container();return Q(t)?t.data.charAt(e.offset())===nt||e.isAtStart()&&va(t.previousSibling):!1},Ps=function(e){var t=e.container();return Q(t)?t.data.charAt(e.offset()-1)===nt||e.isAtEnd()&&va(t.nextSibling):!1},rS=function(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e},aS=function(e,t,n){var r=t.ownerDocument,a=r.createElement(e);a.setAttribute("data-mce-caret",n?"before":"after"),a.setAttribute("data-mce-bogus","all"),a.appendChild(rS());var i=t.parentNode;return n?i.insertBefore(a,t):t.nextSibling?i.insertBefore(a,t.nextSibling):i.appendChild(a),a},lo=function(e){return la(e)&&e.data[0]===nt},co=function(e){return la(e)&&e.data[e.data.length-1]===nt},iS=function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];xr(n)&&n.parentNode.removeChild(n)},Is=function(e){return e&&e.hasAttribute("data-mce-caret")?(iS(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},bd=function(e){return ca(e.startContainer)},yd=pn,oS=_e,uS=$e,sS=Q,fS=Kt(["script","style","textarea"]),Cd=Kt(["img","input","textarea","hr","iframe","video","audio","object","embed"]),lS=Kt(["table"]),cS=Lt,bn=function(e){return cS(e)?!1:sS(e)?!fS(e.parentNode):Cd(e)||uS(e)||lS(e)||Ls(e)},vS=function(e){return ae(e)&&e.getAttribute("unselectable")==="true"},Ls=function(e){return vS(e)===!1&&oS(e)},dS=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(Ls(e))return!1;if(yd(e))return!0}return!0},mS=function(e){return Ls(e)?Qt(dn(e.getElementsByTagName("*")),function(t,n){return t||yd(n)},!1)!==!0:!1},pS=function(e){return Cd(e)||mS(e)},vo=function(e,t){return bn(e)&&dS(e,t)},hS=/^[ \t\r\n]*$/,Nr=function(e){return hS.test(e)},gS=function(e,t){var n=k.fromDom(t),r=k.fromDom(e);return Zw(r,"pre,code",G(Te,n))},bS=function(e,t){return Q(e)&&Nr(e.data)&&gS(e,t)===!1},yS=function(e){return ae(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"))},mo=function(e,t){return bn(e)&&bS(e,t)===!1||yS(e)||CS(e)},CS=Zv("data-mce-bookmark"),wS=Zv("data-mce-bogus"),SS=cw("data-mce-bogus","all"),ES=function(e,t){var n=0;if(mo(e,e))return!1;var r=e.firstChild;if(!r)return!0;var a=new Ge(r,e);do{if(t){if(SS(r)){r=a.next(!0);continue}if(wS(r)){r=a.next();continue}}if($e(r)){n++,r=a.next();continue}if(mo(r,e))return!1;r=a.next()}while(r);return n<=1},Xe=function(e,t){return t===void 0&&(t=!0),ES(e.dom,t)},kS=function(e){return e.nodeName.toLowerCase()==="span"},wd=function(e,t){return Ne(e)&&(mo(e,t)||Bs(k.fromDom(e)))},xS=function(e,t){var n=new Ge(e,t).prev(!1),r=new Ge(e,t).next(!1),a=Nt(n)||wd(n,t),i=Nt(r)||wd(r,t);return a&&i},Sd=function(e){return kS(e)&&e.getAttribute("data-mce-type")==="bookmark"},NS=function(e,t){return Q(e)&&e.data.length>0&&xS(e,t)},TS=function(e){return ae(e)?e.childNodes.length>0:!1},AS=function(e){return Es(e)||Ss(e)},$s=function(e,t,n){var r=n||t;if(ae(t)&&Sd(t))return t;for(var a=t.childNodes,i=a.length-1;i>=0;i--)$s(e,a[i],r);if(ae(t)){var o=t.childNodes;o.length===1&&Sd(o[0])&&t.parentNode.insertBefore(o[0],t)}return!AS(t)&&!mo(t,r)&&!TS(t)&&!NS(t,r)&&e.remove(t),t},RS=_.makeMap,po=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ho=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BS=/[<>&\"\']/g,_S=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,DS={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"},Tr={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},OS={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},PS=function(e){var t=k.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e},Ed=function(e,t){var n,r,a,i={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),Tr[r]||(a="&"+e[n+1]+";",i[r]=a,i[a]=r);return i}},Fs=Ed("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),kd=function(e,t){return e.replace(t?po:ho,function(n){return Tr[n]||n})},IS=function(e){return(""+e).replace(BS,function(t){return Tr[t]||t})},xd=function(e,t){return e.replace(t?po:ho,function(n){return n.length>1?"&#"+((n.charCodeAt(0)-55296)*1024+(n.charCodeAt(1)-56320)+65536)+";":Tr[n]||"&#"+n.charCodeAt(0)+";"})},Ms=function(e,t,n){return n=n||Fs,e.replace(t?po:ho,function(r){return Tr[r]||n[r]||r})},LS=function(e,t){var n=Ed(t)||Fs,r=function(o,u){return o.replace(u?po:ho,function(s){return Tr[s]!==void 0?Tr[s]:n[s]!==void 0?n[s]:s.length>1?"&#"+((s.charCodeAt(0)-55296)*1024+(s.charCodeAt(1)-56320)+65536)+";":"&#"+s.charCodeAt(0)+";"})},a=function(o,u){return Ms(o,u,n)},i=RS(e.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?t?a:Ms:i.numeric?xd:kd},$S=function(e){return e.replace(_S,function(t,n){return n?(n.charAt(0).toLowerCase()==="x"?n=parseInt(n.substr(1),16):n=parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(n&1023))):DS[n]||String.fromCharCode(n)):OS[t]||Fs[t]||PS(t)})},Yn={encodeRaw:kd,encodeAllRaw:IS,encodeNumeric:xd,encodeNamed:Ms,getEncodeFunc:LS,decode:$S},Qn={},FS={},da=_.makeMap,ut=_.each,Us=_.extend,Nd=_.explode,MS=_.inArray,rt=function(e,t){return e=_.trim(e),e?e.split(t||" "):[]},Td=function(e,t){var n=da(e," ",da(e.toUpperCase()," "));return Us(n,t)},Ad=function(e){return Td("td th li dt dd figcaption caption details summary",e.getTextBlockElements())},US=function(e){var t={},n,r,a,i,o,u,s=function(l,c,v){var d,m,p,h=function(g,E){var S={},C,x;for(C=0,x=g.length;C<x;C++)S[g[C]]=E||{};return S};v=v||[],c=c||"",typeof v=="string"&&(v=rt(v));var y=rt(l);for(d=y.length;d--;)m=rt([n,c].join(" ")),p={attributes:h(m),attributesOrder:m,children:h(v,FS)},t[y[d]]=p},f=function(l,c){var v,d,m,p,h=rt(l);v=h.length;for(var y=rt(c);v--;)for(d=t[h[v]],m=0,p=y.length;m<p;m++)d.attributes[y[m]]={},d.attributesOrder.push(y[m])};return Qn[e]?Qn[e]:(n="id accesskey class dir lang style tabindex title role",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",a="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",e!=="html4"&&(n+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure main header footer hgroup section nav",a+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),e!=="html5-strict"&&(n+=" xml:lang",u="acronym applet basefont big font strike tt",a=[a,u].join(" "),ut(rt(u),function(l){s(l,"",a)}),o="center dir isindex noframes",r=[r,o].join(" "),i=[r,a].join(" "),ut(rt(o),function(l){s(l,"",i)})),i=i||[r,a].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",i),s("address dt dd div caption","",i),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","",a),s("blockquote","cite",i),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",i),s("dl","","dt dd"),s("a","href target rel media hreflang type",a),s("q","cite",a),s("ins del","cite datetime",i),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",i),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[i,"param"].join(" ")),s("param","name value"),s("map","name",[i,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+(e==="html4"?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",i),s("th","colspan rowspan headers scope abbr",i),s("form","accept-charset action autocomplete enctype method name novalidate target",i),s("fieldset","disabled form name",[i,"legend"].join(" ")),s("label","form for",a),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",e==="html4"?i:a),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",[i,"li"].join(" ")),s("noscript","",i),e!=="html4"&&(s("wbr"),s("ruby","",[a,"rt rp"].join(" ")),s("figcaption","",i),s("mark rt rp summary bdi","",a),s("canvas","width height",i),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[i,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[i,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[a,"option"].join(" ")),s("article section nav aside main header footer","",i),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[i,"figcaption"].join(" ")),s("time","datetime",a),s("dialog","open",i),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",a),s("progress","value max",a),s("meter","value min max low high optimum",a),s("details","open",[i,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name")),e!=="html5-strict"&&(f("script","language xml:space"),f("style","xml:space"),f("object","declare classid code codebase codetype archive standby align border hspace vspace"),f("embed","align name hspace vspace"),f("param","valuetype type"),f("a","charset name rev shape coords"),f("br","clear"),f("applet","codebase archive code object alt name width height align hspace vspace"),f("img","name longdesc align border hspace vspace"),f("iframe","longdesc frameborder marginwidth marginheight scrolling align"),f("font basefont","size color face"),f("input","usemap align"),f("select"),f("textarea"),f("h1 h2 h3 h4 h5 h6 div p legend caption","align"),f("ul","type compact"),f("li","type"),f("ol dl menu dir","compact"),f("pre","width xml:space"),f("hr","align noshade size width"),f("isindex","prompt"),f("table","summary width frame rules cellspacing cellpadding align bgcolor"),f("col","width align char charoff valign"),f("colgroup","width align char charoff valign"),f("thead","align char charoff valign"),f("tr","align char charoff valign bgcolor"),f("th","axis align char charoff valign nowrap bgcolor width height"),f("form","accept"),f("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),f("tfoot","align char charoff valign"),f("tbody","align char charoff valign"),f("area","nohref"),f("body","background bgcolor text link vlink alink")),e!=="html4"&&(f("input button select textarea","autofocus"),f("input textarea","placeholder"),f("a","download"),f("link script img","crossorigin"),f("img","loading"),f("iframe","sandbox seamless allowfullscreen loading")),ut(rt("a form meter progress dfn"),function(l){t[l]&&delete t[l].children[l]}),delete t.caption.children.table,delete t.script,Qn[e]=t,t)},zs=function(e,t){var n;return e&&(n={},typeof e=="string"&&(e={"*":e}),ut(e,function(r,a){n[a]=n[a.toUpperCase()]=t==="map"?da(r,/[, ]/):Nd(r,/[, ]/)})),n},Zn=function(e){var t={},n={},r=[],a={},i={},o=function(P,z,Z){var N=e[P];return N?N=da(N,/[, ]/,da(N.toUpperCase(),/[, ]/)):(N=Qn[P],N||(N=Td(z,Z),Qn[P]=N)),N};e=e||{};var u=US(e.schema);e.verify_html===!1&&(e.valid_elements="*[*]");var s=zs(e.valid_styles),f=zs(e.invalid_styles,"map"),l=zs(e.valid_classes,"map"),c=o("whitespace_elements","pre script noscript style textarea video audio iframe object code"),v=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),d=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),m=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),p="td th iframe video audio object script code",h=o("non_empty_elements",p+" pre",d),y=o("move_caret_before_on_enter_elements",p+" table",d),g=o("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"),E=o("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",g),S=o("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp");ut((e.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),function(P){i[P]=new RegExp("</"+P+"[^>]*>","gi")});var C=function(P){return new RegExp("^"+P.replace(/([?+*])/g,".$1")+"$")},x=function(P){var z,Z,N,$,I,J,te,Ce,Fe,Le,Hn,ct,pt,Me,Ot,ht,_n,Se,Ee=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,Ue=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,fn=/[*?+]/;if(P){var ln=rt(P,",");for(t["@"]&&(ht=t["@"].attributes,_n=t["@"].attributesOrder),z=0,Z=ln.length;z<Z;z++)if(I=Ee.exec(ln[z]),I){if(Me=I[1],Fe=I[2],Ot=I[3],Ce=I[5],ct={},pt=[],J={attributes:ct,attributesOrder:pt},Me==="#"&&(J.paddEmpty=!0),Me==="-"&&(J.removeEmpty=!0),I[4]==="!"&&(J.removeEmptyAttrs=!0),ht&&(Pe(ht,function(cn,gr){ct[gr]=cn}),pt.push.apply(pt,_n)),Ce){for(Ce=rt(Ce,"|"),N=0,$=Ce.length;N<$;N++)if(I=Ue.exec(Ce[N]),I){if(te={},Hn=I[1],Le=I[2].replace(/[\\:]:/g,":"),Me=I[3],Se=I[4],Hn==="!"&&(J.attributesRequired=J.attributesRequired||[],J.attributesRequired.push(Le),te.required=!0),Hn==="-"){delete ct[Le],pt.splice(MS(pt,Le),1);continue}Me&&(Me==="="&&(J.attributesDefault=J.attributesDefault||[],J.attributesDefault.push({name:Le,value:Se}),te.defaultValue=Se),Me===":"&&(J.attributesForced=J.attributesForced||[],J.attributesForced.push({name:Le,value:Se}),te.forcedValue=Se),Me==="<"&&(te.validValues=da(Se,"?"))),fn.test(Le)?(J.attributePatterns=J.attributePatterns||[],te.pattern=C(Le),J.attributePatterns.push(te)):(ct[Le]||pt.push(Le),ct[Le]=te)}}!ht&&Fe==="@"&&(ht=ct,_n=pt),Ot&&(J.outputName=Fe,t[Ot]=J),fn.test(Fe)?(J.pattern=C(Fe),r.push(J)):t[Fe]=J}}},B=function(P){t={},r=[],x(P),ut(u,function(z,Z){n[Z]=z.children})},L=function(P){var z=/^(~)?(.+)$/;P&&(Qn.text_block_elements=Qn.block_elements=null,ut(rt(P,","),function(Z){var N=z.exec(Z),$=N[1]==="~",I=$?"span":"div",J=N[2];if(n[J]=n[I],a[J]=I,$||(E[J.toUpperCase()]={},E[J]={}),!t[J]){var te=t[I];te=Us({},te),delete te.removeEmptyAttrs,delete te.removeEmpty,t[J]=te}ut(n,function(Ce,Fe){Ce[I]&&(n[Fe]=Ce=Us({},n[Fe]),Ce[J]=Ce[I])})}))},ne=function(P){var z=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;Qn[e.schema]=null,P&&ut(rt(P,","),function(Z){var N=z.exec(Z),$,I;N&&(I=N[1],I?$=n[N[2]]:$=n[N[2]]={"#comment":{}},$=n[N[2]],ut(rt(N[3],"|"),function(J){I==="-"?delete $[J]:$[J]={}}))})},q=function(P){var z=t[P],Z;if(z)return z;for(Z=r.length;Z--;)if(z=r[Z],z.pattern.test(P))return z};e.valid_elements?B(e.valid_elements):(ut(u,function(P,z){t[z]={attributes:P.attributes,attributesOrder:P.attributesOrder},n[z]=P.children}),e.schema!=="html5"&&ut(rt("strong/b em/i"),function(P){var z=rt(P,"/");t[z[1]].outputName=z[0]}),ut(S,function(P,z){t[z]&&(e.padd_empty_block_inline_children&&(t[z].paddInEmptyBlock=!0),t[z].removeEmpty=!0)}),ut(rt("ol ul blockquote a table tbody"),function(P){t[P]&&(t[P].removeEmpty=!0)}),ut(rt("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),function(P){t[P].paddEmpty=!0}),ut(rt("span"),function(P){t[P].removeEmptyAttrs=!0})),L(e.custom_elements),ne(e.valid_children),x(e.extended_valid_elements),ne("+ol[ul|ol],+ul[ul|ol]"),ut({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(P,z){t[z]&&(t[z].parentsRequired=rt(P))}),e.invalid_elements&&ut(Nd(e.invalid_elements),function(P){t[P]&&delete t[P]}),q("span")||x("span[!data-mce-type|*]");var D=X(s),ee=X(f),U=X(l),W=X(m),F=X(E),V=X(g),K=X(S),O=X(d),j=X(v),fe=X(h),ge=X(y),he=X(c),We=X(i),Be=function(P,z){var Z=n[P.toLowerCase()];return!!(Z&&Z[z.toLowerCase()])},lt=function(P,z){var Z,N,$=q(P);if($)if(z){if($.attributes[z])return!0;if(Z=$.attributePatterns,Z){for(N=Z.length;N--;)if(Z[N].pattern.test(P))return!0}}else return!0;return!1},xt=X(a);return{children:n,elements:t,getValidStyles:D,getValidClasses:U,getBlockElements:F,getInvalidStyles:ee,getShortEndedElements:O,getTextBlockElements:V,getTextInlineElements:K,getBoolAttrs:W,getElementRule:q,getSelfClosingElements:j,getNonEmptyElements:fe,getMoveCaretBeforeOnEnterElements:ge,getWhiteSpaceElements:he,getSpecialElements:We,isValidChild:Be,isValid:lt,getCustomElements:xt,addValidElements:x,setValidElements:B,addCustomElements:L,addValidChildren:ne}},Rd=function(e,t,n,r){var a=function(i){return i=parseInt(i,10).toString(16),i.length>1?i:"0"+i};return"#"+a(t)+a(n)+a(r)},Hs=function(e,t){var n=this,r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,i=/\s*([^:]+):\s*([^;]+);?/g,o=/\s+$/,u,s={},f,l,c=Ds;e=e||{},t&&(f=t.getValidStyles(),l=t.getInvalidStyles());var v=(`\\" \\' \\; \\: ; : `+c).split(" ");for(u=0;u<v.length;u++)s[v[u]]=c+u,s[c+u]=v[u];return{toHex:function(d){return d.replace(r,Rd)},parse:function(d){var m={},p,h,y,g,E=e.url_converter,S=e.url_converter_scope||n,C=function(U,W,F){var V=m[U+"-top"+W];if(!!V){var K=m[U+"-right"+W];if(!!K){var O=m[U+"-bottom"+W];if(!!O){var j=m[U+"-left"+W];if(!!j){var fe=[V,K,O,j];for(u=fe.length-1;u--&&fe[u]===fe[u+1];);u>-1&&F||(m[U+W]=u===-1?fe[0]:fe.join(" "),delete m[U+"-top"+W],delete m[U+"-right"+W],delete m[U+"-bottom"+W],delete m[U+"-left"+W])}}}}},x=function(U){var W=m[U],F;if(!!W){for(W=W.split(" "),F=W.length;F--;)if(W[F]!==W[0])return!1;return m[U]=W[0],!0}},B=function(U,W,F,V){!x(W)||!x(F)||!x(V)||(m[U]=m[W]+" "+m[F]+" "+m[V],delete m[W],delete m[F],delete m[V])},L=function(U){return g=!0,s[U]},ne=function(U,W){return g&&(U=U.replace(/\uFEFF[0-9]/g,function(F){return s[F]})),W||(U=U.replace(/\\([\'\";:])/g,"$1")),U},q=function(U){return String.fromCharCode(parseInt(U.slice(1),16))},D=function(U){return U.replace(/\\[0-9a-f]+/gi,q)},ee=function(U,W,F,V,K,O){if(K=K||O,K)return K=ne(K),"'"+K.replace(/\'/g,"\\'")+"'";if(W=ne(W||F||V),!e.allow_script_urls){var j=W.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(j)||!e.allow_svg_data_urls&&/^data:image\/svg/i.test(j))return""}return E&&(W=E.call(S,W,"style")),"url('"+W.replace(/\'/g,"\\'")+"')"};if(d){for(d=d.replace(/[\u0000-\u001F]/g,""),d=d.replace(/\\[\"\';:\uFEFF]/g,L).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(U){return U.replace(/[;:]/g,L)});p=i.exec(d);)if(i.lastIndex=p.index+p[0].length,h=p[1].replace(o,"").toLowerCase(),y=p[2].replace(o,""),h&&y){if(h=D(h),y=D(y),h.indexOf(c)!==-1||h.indexOf('"')!==-1||!e.allow_script_urls&&(h==="behavior"||/expression\s*\(|\/\*|\*\//.test(y)))continue;h==="font-weight"&&y==="700"?y="bold":(h==="color"||h==="background-color")&&(y=y.toLowerCase()),y=y.replace(r,Rd),y=y.replace(a,ee),m[h]=g?ne(y,!0):y}C("border","",!0),C("border","-width"),C("border","-color"),C("border","-style"),C("padding",""),C("margin",""),B("border","border-width","border-style","border-color"),m.border==="medium none"&&delete m.border,m["border-image"]==="none"&&delete m["border-image"]}return m},serialize:function(d,m){var p="",h=function(g){var E,S=f[g];if(S)for(var C=0,x=S.length;C<x;C++)g=S[C],E=d[g],E&&(p+=(p.length>0?" ":"")+g+": "+E+";")},y=function(g,E){var S=l["*"];return S&&S[g]?!1:(S=l[E],!(S&&S[g]))};return m&&f?(h("*"),h(m)):Pe(d,function(g,E){g&&(!l||y(E,m))&&(p+=(p.length>0?" ":"")+E+": "+g+";")}),p}}},zS={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Vs=function(e){return e instanceof Event||Oe(e.initEvent)},HS=function(e){return e.isDefaultPrevented===qe||e.isDefaultPrevented===Re},VS=function(e){return vn(e.preventDefault)||Vs(e)},WS=function(e,t){var n=t!=null?t:{};for(var r in e)pe(zS,r)||(n[r]=e[r]);return Ne(n.composedPath)&&(n.composedPath=function(){return e.composedPath()}),n},Bd=function(e,t,n,r){var a,i=WS(t,r);return i.type=e,vn(i.target)&&(i.target=(a=i.srcElement)!==null&&a!==void 0?a:n),VS(t)&&(i.preventDefault=function(){i.defaultPrevented=!0,i.isDefaultPrevented=qe,Oe(t.preventDefault)?t.preventDefault():Vs(t)&&(t.returnValue=!1)},i.stopPropagation=function(){i.cancelBubble=!0,i.isPropagationStopped=qe,Oe(t.stopPropagation)?t.stopPropagation():Vs(t)&&(t.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=qe,i.stopPropagation()},HS(i)||(i.isDefaultPrevented=i.defaultPrevented===!0?qe:Re,i.isPropagationStopped=i.cancelBubble===!0?qe:Re,i.isImmediatePropagationStopped=Re)),i},qS="mce-data-",jS=/^(?:mouse|contextmenu)|click/,Ws=function(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)},go=function(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)},KS=function(e){return Ne(e)&&jS.test(e.type)},ma=function(e,t){var n=Bd(e.type,e,document,t);if(KS(e)&&Nt(e.pageX)&&!Nt(e.clientX)){var r=n.target.ownerDocument||document,a=r.documentElement,i=r.body,o=n;o.pageX=e.clientX+(a&&a.scrollLeft||i&&i.scrollLeft||0)-(a&&a.clientLeft||i&&i.clientLeft||0),o.pageY=e.clientY+(a&&a.scrollTop||i&&i.scrollTop||0)-(a&&a.clientTop||i&&i.clientTop||0)}return Nt(n.metaKey)&&(n.metaKey=!1),n},GS=function(e,t,n){var r=e.document,a={type:"ready"};if(n.domLoaded){t(a);return}var i=function(){return r.readyState==="complete"||r.readyState==="interactive"&&r.body},o=function(){go(e,"DOMContentLoaded",o),go(e,"load",o),n.domLoaded||(n.domLoaded=!0,t(a)),e=null};i()?o():Ws(e,"DOMContentLoaded",o),n.domLoaded||Ws(e,"load",o)},pa=function(){function e(){this.domLoaded=!1,this.events={},this.count=1,this.expando=qS+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return e.prototype.bind=function(t,n,r,a){var i=this,o,u,s,f,l,c,v,d=window,m=function(h){i.executeHandlers(ma(h||d.event),o)};if(!(!t||t.nodeType===3||t.nodeType===8)){t[i.expando]?o=t[i.expando]:(o=i.count++,t[i.expando]=o,i.events[o]={}),a=a||t;var p=n.split(" ");for(s=p.length;s--;){if(f=p[s],c=m,l=v=!1,f==="DOMContentLoaded"&&(f="ready"),i.domLoaded&&f==="ready"&&t.readyState==="complete"){r.call(a,ma({type:f}));continue}i.hasMouseEnterLeave||(l=i.mouseEnterLeave[f],l&&(c=function(h){var y=h.currentTarget,g=h.relatedTarget;if(g&&y.contains)g=y.contains(g);else for(;g&&g!==y;)g=g.parentNode;g||(h=ma(h||d.event),h.type=h.type==="mouseout"?"mouseleave":"mouseenter",h.target=y,i.executeHandlers(h,o))})),!i.hasFocusIn&&(f==="focusin"||f==="focusout")&&(v=!0,l=f==="focusin"?"focus":"blur",c=function(h){h=ma(h||d.event),h.type=h.type==="focus"?"focusin":"focusout",i.executeHandlers(h,o)}),u=i.events[o][f],u?f==="ready"&&i.domLoaded?r(ma({type:f})):u.push({func:r,scope:a}):(i.events[o][f]=u=[{func:r,scope:a}],u.fakeName=l,u.capture=v,u.nativeHandler=c,f==="ready"?GS(t,c,i):Ws(t,l||f,c,v))}return t=u=null,r}},e.prototype.unbind=function(t,n,r){var a,i,o,u,s;if(!t||t.nodeType===3||t.nodeType===8)return this;var f=t[this.expando];if(f){if(s=this.events[f],n){var l=n.split(" ");for(i=l.length;i--;)if(u=l[i],a=s[u],a){if(r){for(o=a.length;o--;)if(a[o].func===r){var c=a.nativeHandler,v=a.fakeName,d=a.capture;a=a.slice(0,o).concat(a.slice(o+1)),a.nativeHandler=c,a.fakeName=v,a.capture=d,s[u]=a}}(!r||a.length===0)&&(delete s[u],go(t,a.fakeName||u,a.nativeHandler,a.capture))}}else Pe(s,function(m,p){go(t,m.fakeName||p,m.nativeHandler,m.capture)}),s={};for(u in s)if(pe(s,u))return this;delete this.events[f];try{delete t[this.expando]}catch{t[this.expando]=null}}return this},e.prototype.fire=function(t,n,r){var a;if(!t||t.nodeType===3||t.nodeType===8)return this;var i=ma({type:n,target:t},r);do a=t[this.expando],a&&this.executeHandlers(i,a),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow;while(t&&!i.isPropagationStopped());return this},e.prototype.clean=function(t){var n,r;if(!t||t.nodeType===3||t.nodeType===8)return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName)for(this.unbind(t),r=t.getElementsByTagName("*"),n=r.length;n--;)t=r[n],t[this.expando]&&this.unbind(t);return this},e.prototype.destroy=function(){this.events={}},e.prototype.cancel=function(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1},e.prototype.executeHandlers=function(t,n){var r=this.events[n],a=r&&r[t.type];if(a)for(var i=0,o=a.length;i<o;i++){var u=a[i];if(u&&u.func.call(u.scope,t)===!1&&t.preventDefault(),t.isImmediatePropagationStopped())return}},e.Event=new e,e}(),Ye,ke,bo,_d,ui,qs,Dd,yo,Jn,ha,er,$t,Co,yn,tr,ga,XS,si,st="sizzle"+-new Date,tn=window.document,Cn=0,YS=0,Od=Xs(),Pd=Xs(),Id=Xs(),js=function(e,t){return e===t&&(ha=!0),0},wo="undefined",Ld=1<<31,QS={}.hasOwnProperty,nr=[],ZS=nr.pop,JS=nr.push,rr=nr.push,$d=nr.slice,Ar=nr.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},eE="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Ie="[\\x20\\t\\r\\n\\f]",Rr="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Fd="\\["+Ie+"*("+Rr+")(?:"+Ie+"*([*^$|!~]?=)"+Ie+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Rr+"))|)"+Ie+"*\\]",Md=":("+Rr+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Fd+")*)|.*)\\)|)",So=new RegExp("^"+Ie+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Ie+"+$","g"),tE=new RegExp("^"+Ie+"*,"+Ie+"*"),nE=new RegExp("^"+Ie+"*([>+~]|"+Ie+")"+Ie+"*"),rE=new RegExp("="+Ie+`*([^\\]'"]*?)`+Ie+"*\\]","g"),aE=new RegExp(Md),iE=new RegExp("^"+Rr+"$"),Eo={ID:new RegExp("^#("+Rr+")"),CLASS:new RegExp("^\\.("+Rr+")"),TAG:new RegExp("^("+Rr+"|[*])"),ATTR:new RegExp("^"+Fd),PSEUDO:new RegExp("^"+Md),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Ie+"*(even|odd|(([+-]|)(\\d*)n|)"+Ie+"*(?:([+-]|)"+Ie+"*(\\d+)|))"+Ie+"*\\)|)","i"),bool:new RegExp("^(?:"+eE+")$","i"),needsContext:new RegExp("^"+Ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Ie+"*((?:-\\d)?\\d*)"+Ie+"*\\)|)(?=[^-]|$)","i")},oE=/^(?:input|select|textarea|button)$/i,uE=/^h\d$/i,Ks=/^[^{]+\{\s*\[native \w/,sE=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Gs=/[+~]/,fE=/'|\\/g,ar=new RegExp("\\\\([\\da-f]{1,6}"+Ie+"?|("+Ie+")|.)","ig"),ir=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)};try{rr.apply(nr=$d.call(tn.childNodes),tn.childNodes),nr[tn.childNodes.length].nodeType}catch{rr={apply:nr.length?function(t,n){JS.apply(t,$d.call(n))}:function(t,n){for(var r=t.length,a=0;t[r++]=n[a++];);t.length=r-1}}}var we=function(e,t,n,r){var a,i,o,u,s,f,l,c,v,d;if((t?t.ownerDocument||t:tn)!==$t&&er(t),t=t||$t,n=n||[],!e||typeof e!="string")return n;if((u=t.nodeType)!==1&&u!==9)return[];if(yn&&!r){if(a=sE.exec(e))if(o=a[1]){if(u===9)if(i=t.getElementById(o),i&&i.parentNode){if(i.id===o)return n.push(i),n}else return n;else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(o))&&si(t,i)&&i.id===o)return n.push(i),n}else{if(a[2])return rr.apply(n,t.getElementsByTagName(e)),n;if((o=a[3])&&Ye.getElementsByClassName)return rr.apply(n,t.getElementsByClassName(o)),n}if(Ye.qsa&&(!tr||!tr.test(e))){if(c=l=st,v=t,d=u===9&&e,u===1&&t.nodeName.toLowerCase()!=="object"){for(f=ui(e),(l=t.getAttribute("id"))?c=l.replace(fE,"\\$&"):t.setAttribute("id",c),c="[id='"+c+"'] ",s=f.length;s--;)f[s]=c+ko(f[s]);v=Gs.test(e)&&Ys(t.parentNode)||t,d=f.join(",")}if(d)try{return rr.apply(n,v.querySelectorAll(d)),n}catch{}finally{l||t.removeAttribute("id")}}}return Dd(e.replace(So,"$1"),t,n,r)};function Xs(){var e=[];function t(n,r){return e.push(n+" ")>ke.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function nn(e){return e[st]=!0,e}function Ud(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||Ld)-(~e.sourceIndex||Ld);if(r)return r;if(n){for(;n=n.nextSibling;)if(n===t)return-1}return e?1:-1}function lE(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function cE(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function Br(e){return nn(function(t){return t=+t,nn(function(n,r){for(var a,i=e([],n.length,t),o=i.length;o--;)n[a=i[o]]&&(n[a]=!(r[a]=n[a]))})})}function Ys(e){return e&&typeof e.getElementsByTagName!==wo&&e}Ye=we.support={},_d=we.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},er=we.setDocument=function(e){var t,n=e?e.ownerDocument||e:tn,r=n.defaultView;function a(i){try{return i.top}catch{}return null}return n===$t||n.nodeType!==9||!n.documentElement?$t:($t=n,Co=n.documentElement,yn=!_d(n),r&&r!==a(r)&&(r.addEventListener?r.addEventListener("unload",function(){er()},!1):r.attachEvent&&r.attachEvent("onunload",function(){er()})),Ye.attributes=!0,Ye.getElementsByTagName=!0,Ye.getElementsByClassName=Ks.test(n.getElementsByClassName),Ye.getById=!0,ke.find.ID=function(i,o){if(typeof o.getElementById!==wo&&yn){var u=o.getElementById(i);return u&&u.parentNode?[u]:[]}},ke.filter.ID=function(i){var o=i.replace(ar,ir);return function(u){return u.getAttribute("id")===o}},ke.find.TAG=Ye.getElementsByTagName?function(i,o){if(typeof o.getElementsByTagName!==wo)return o.getElementsByTagName(i)}:function(i,o){var u,s=[],f=0,l=o.getElementsByTagName(i);if(i==="*"){for(;u=l[f++];)u.nodeType===1&&s.push(u);return s}return l},ke.find.CLASS=Ye.getElementsByClassName&&function(i,o){if(yn)return o.getElementsByClassName(i)},ga=[],tr=[],Ye.disconnectedMatch=!0,tr=tr.length&&new RegExp(tr.join("|")),ga=ga.length&&new RegExp(ga.join("|")),t=Ks.test(Co.compareDocumentPosition),si=t||Ks.test(Co.contains)?function(i,o){var u=i.nodeType===9?i.documentElement:i,s=o&&o.parentNode;return i===s||!!(s&&s.nodeType===1&&(u.contains?u.contains(s):i.compareDocumentPosition&&i.compareDocumentPosition(s)&16))}:function(i,o){if(o){for(;o=o.parentNode;)if(o===i)return!0}return!1},js=t?function(i,o){if(i===o)return ha=!0,0;var u=!i.compareDocumentPosition-!o.compareDocumentPosition;return u||(u=(i.ownerDocument||i)===(o.ownerDocument||o)?i.compareDocumentPosition(o):1,u&1||!Ye.sortDetached&&o.compareDocumentPosition(i)===u?i===n||i.ownerDocument===tn&&si(tn,i)?-1:o===n||o.ownerDocument===tn&&si(tn,o)?1:Jn?Ar.call(Jn,i)-Ar.call(Jn,o):0:u&4?-1:1)}:function(i,o){if(i===o)return ha=!0,0;var u,s=0,f=i.parentNode,l=o.parentNode,c=[i],v=[o];if(!f||!l)return i===n?-1:o===n?1:f?-1:l?1:Jn?Ar.call(Jn,i)-Ar.call(Jn,o):0;if(f===l)return Ud(i,o);for(u=i;u=u.parentNode;)c.unshift(u);for(u=o;u=u.parentNode;)v.unshift(u);for(;c[s]===v[s];)s++;return s?Ud(c[s],v[s]):c[s]===tn?-1:v[s]===tn?1:0},n)},we.matches=function(e,t){return we(e,null,null,t)},we.matchesSelector=function(e,t){if((e.ownerDocument||e)!==$t&&er(e),t=t.replace(rE,"='$1']"),Ye.matchesSelector&&yn&&(!ga||!ga.test(t))&&(!tr||!tr.test(t)))try{var n=XS.call(e,t);if(n||Ye.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch{}return we(t,$t,null,[e]).length>0},we.contains=function(e,t){return(e.ownerDocument||e)!==$t&&er(e),si(e,t)},we.attr=function(e,t){(e.ownerDocument||e)!==$t&&er(e);var n=ke.attrHandle[t.toLowerCase()],r=n&&QS.call(ke.attrHandle,t.toLowerCase())?n(e,t,!yn):void 0;return r!==void 0?r:Ye.attributes||!yn?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},we.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},we.uniqueSort=function(e){var t,n=[],r=0,a=0;if(ha=!Ye.detectDuplicates,Jn=!Ye.sortStable&&e.slice(0),e.sort(js),ha){for(;t=e[a++];)t===e[a]&&(r=n.push(a));for(;r--;)e.splice(n[r],1)}return Jn=null,e},bo=we.getText=function(e){var t,n="",r=0,a=e.nodeType;if(a){if(a===1||a===9||a===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=bo(e)}else if(a===3||a===4)return e.nodeValue}else for(;t=e[r++];)n+=bo(t);return n},ke=we.selectors={cacheLength:50,createPseudo:nn,match:Eo,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ar,ir),e[3]=(e[3]||e[4]||e[5]||"").replace(ar,ir),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||we.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&we.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Eo.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&aE.test(n)&&(t=ui(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ar,ir).toLowerCase();return e==="*"?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(e){var t=Od[e+" "];return t||(t=new RegExp("(^|"+Ie+")"+e+"("+Ie+"|$)"))&&Od(e,function(n){return t.test(typeof n.className=="string"&&n.className||typeof n.getAttribute!==wo&&n.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var a=we.attr(r,e);return a==null?t==="!=":t?(a+="",t==="="?a===n:t==="!="?a!==n:t==="^="?n&&a.indexOf(n)===0:t==="*="?n&&a.indexOf(n)>-1:t==="$="?n&&a.slice(-n.length)===n:t==="~="?(" "+a+" ").indexOf(n)>-1:t==="|="?a===n||a.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,a){var i=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&a===0?function(s){return!!s.parentNode}:function(s,f,l){var c,v,d,m,p,h,y=i!==o?"nextSibling":"previousSibling",g=s.parentNode,E=u&&s.nodeName.toLowerCase(),S=!l&&!u;if(g){if(i){for(;y;){for(d=s;d=d[y];)if(u?d.nodeName.toLowerCase()===E:d.nodeType===1)return!1;h=y=e==="only"&&!h&&"nextSibling"}return!0}if(h=[o?g.firstChild:g.lastChild],o&&S){for(v=g[st]||(g[st]={}),c=v[e]||[],p=c[0]===Cn&&c[1],m=c[0]===Cn&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[y]||(m=p=0)||h.pop();)if(d.nodeType===1&&++m&&d===s){v[e]=[Cn,p,m];break}}else if(S&&(c=(s[st]||(s[st]={}))[e])&&c[0]===Cn)m=c[1];else for(;(d=++p&&d&&d[y]||(m=p=0)||h.pop())&&!((u?d.nodeName.toLowerCase()===E:d.nodeType===1)&&++m&&(S&&((d[st]||(d[st]={}))[e]=[Cn,m]),d===s)););return m-=a,m===r||m%r===0&&m/r>=0}}},PSEUDO:function(e,t){var n,r=ke.pseudos[e]||ke.setFilters[e.toLowerCase()]||we.error("unsupported pseudo: "+e);return r[st]?r(t):r.length>1?(n=[e,e,"",t],ke.setFilters.hasOwnProperty(e.toLowerCase())?nn(function(a,i){for(var o,u=r(a,t),s=u.length;s--;)o=Ar.call(a,u[s]),a[o]=!(i[o]=u[s])}):function(a){return r(a,0,n)}):r}},pseudos:{not:nn(function(e){var t=[],n=[],r=qs(e.replace(So,"$1"));return r[st]?nn(function(a,i,o,u){for(var s,f=r(a,null,u,[]),l=a.length;l--;)(s=f[l])&&(a[l]=!(i[l]=s))}):function(a,i,o){return t[0]=a,r(t,null,o,n),t[0]=null,!n.pop()}}),has:nn(function(e){return function(t){return we(e,t).length>0}}),contains:nn(function(e){return e=e.replace(ar,ir),function(t){return(t.textContent||t.innerText||bo(t)).indexOf(e)>-1}}),lang:nn(function(e){return iE.test(e||"")||we.error("unsupported lang: "+e),e=e.replace(ar,ir).toLowerCase(),function(t){var n;do if(n=yn?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===Co},focus:function(e){return e===$t.activeElement&&(!$t.hasFocus||$t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!ke.pseudos.empty(e)},header:function(e){return uE.test(e.nodeName)},input:function(e){return oE.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()==="text")},first:Br(function(){return[0]}),last:Br(function(e,t){return[t-1]}),eq:Br(function(e,t,n){return[n<0?n+t:n]}),even:Br(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Br(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Br(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:Br(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},ke.pseudos.nth=ke.pseudos.eq,Y(["radio","checkbox","file","password","image"],function(e){ke.pseudos[e]=lE(e)}),Y(["submit","reset"],function(e){ke.pseudos[e]=cE(e)});function zd(){}zd.prototype=ke.filters=ke.pseudos,ke.setFilters=new zd,ui=we.tokenize=function(e,t){var n,r,a,i,o,u,s,f=Pd[e+" "];if(f)return t?0:f.slice(0);for(o=e,u=[],s=ke.preFilter;o;){(!n||(r=tE.exec(o)))&&(r&&(o=o.slice(r[0].length)||o),u.push(a=[])),n=!1,(r=nE.exec(o))&&(n=r.shift(),a.push({value:n,type:r[0].replace(So," ")}),o=o.slice(n.length));for(i in ke.filter)!ke.filter.hasOwnProperty(i)||(r=Eo[i].exec(o))&&(!s[i]||(r=s[i](r)))&&(n=r.shift(),a.push({value:n,type:i,matches:r}),o=o.slice(n.length));if(!n)break}return t?o.length:o?we.error(e):Pd(e,u).slice(0)};function ko(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Qs(e,t,n){var r=t.dir,a=n&&r==="parentNode",i=YS++;return t.first?function(o,u,s){for(;o=o[r];)if(o.nodeType===1||a)return e(o,u,s)}:function(o,u,s){var f,l,c=[Cn,i];if(s){for(;o=o[r];)if((o.nodeType===1||a)&&e(o,u,s))return!0}else for(;o=o[r];)if(o.nodeType===1||a){if(l=o[st]||(o[st]={}),(f=l[r])&&f[0]===Cn&&f[1]===i)return c[2]=f[2];if(l[r]=c,c[2]=e(o,u,s))return!0}}}function Zs(e){return e.length>1?function(t,n,r){for(var a=e.length;a--;)if(!e[a](t,n,r))return!1;return!0}:e[0]}function vE(e,t,n){for(var r=0,a=t.length;r<a;r++)we(e,t[r],n);return n}function xo(e,t,n,r,a){for(var i,o=[],u=0,s=e.length,f=t!=null;u<s;u++)(i=e[u])&&(!n||n(i,r,a))&&(o.push(i),f&&t.push(u));return o}function Js(e,t,n,r,a,i){return r&&!r[st]&&(r=Js(r)),a&&!a[st]&&(a=Js(a,i)),nn(function(o,u,s,f){var l,c,v,d=[],m=[],p=u.length,h=o||vE(t||"*",s.nodeType?[s]:s,[]),y=e&&(o||!t)?xo(h,d,e,s,f):h,g=n?a||(o?e:p||r)?[]:u:y;if(n&&n(y,g,s,f),r)for(l=xo(g,m),r(l,[],s,f),c=l.length;c--;)(v=l[c])&&(g[m[c]]=!(y[m[c]]=v));if(o){if(a||e){if(a){for(l=[],c=g.length;c--;)(v=g[c])&&l.push(y[c]=v);a(null,g=[],l,f)}for(c=g.length;c--;)(v=g[c])&&(l=a?Ar.call(o,v):d[c])>-1&&(o[l]=!(u[l]=v))}}else g=xo(g===u?g.splice(p,g.length):g),a?a(null,u,g,f):rr.apply(u,g)})}function ef(e){for(var t,n,r,a=e.length,i=ke.relative[e[0].type],o=i||ke.relative[" "],u=i?1:0,s=Qs(function(c){return c===t},o,!0),f=Qs(function(c){return Ar.call(t,c)>-1},o,!0),l=[function(c,v,d){var m=!i&&(d||v!==yo)||((t=v).nodeType?s(c,v,d):f(c,v,d));return t=null,m}];u<a;u++)if(n=ke.relative[e[u].type])l=[Qs(Zs(l),n)];else{if(n=ke.filter[e[u].type].apply(null,e[u].matches),n[st]){for(r=++u;r<a&&!ke.relative[e[r].type];r++);return Js(u>1&&Zs(l),u>1&&ko(e.slice(0,u-1).concat({value:e[u-2].type===" "?"*":""})).replace(So,"$1"),n,u<r&&ef(e.slice(u,r)),r<a&&ef(e=e.slice(r)),r<a&&ko(e))}l.push(n)}return Zs(l)}function dE(e,t){var n=t.length>0,r=e.length>0,a=function(i,o,u,s,f){var l,c,v,d=0,m="0",p=i&&[],h=[],y=yo,g=i||r&&ke.find.TAG("*",f),E=Cn+=y==null?1:Math.random()||.1,S=g.length;for(f&&(yo=o!==$t&&o);m!==S&&(l=g[m])!=null;m++){if(r&&l){for(c=0;v=e[c++];)if(v(l,o,u)){s.push(l);break}f&&(Cn=E)}n&&((l=!v&&l)&&d--,i&&p.push(l))}if(d+=m,n&&m!==d){for(c=0;v=t[c++];)v(p,h,o,u);if(i){if(d>0)for(;m--;)p[m]||h[m]||(h[m]=ZS.call(s));h=xo(h)}rr.apply(s,h),f&&!i&&h.length>0&&d+t.length>1&&we.uniqueSort(s)}return f&&(Cn=E,yo=y),p};return n?nn(a):a}qs=we.compile=function(e,t){var n,r=[],a=[],i=Id[e+" "];if(!i){for(t||(t=ui(e)),n=t.length;n--;)i=ef(t[n]),i[st]?r.push(i):a.push(i);i=Id(e,dE(a,r)),i.selector=e}return i},Dd=we.select=function(e,t,n,r){var a,i,o,u,s,f=typeof e=="function"&&e,l=!r&&ui(e=f.selector||e);if(n=n||[],l.length===1){if(i=l[0]=l[0].slice(0),i.length>2&&(o=i[0]).type==="ID"&&Ye.getById&&t.nodeType===9&&yn&&ke.relative[i[1].type]){if(t=(ke.find.ID(o.matches[0].replace(ar,ir),t)||[])[0],t)f&&(t=t.parentNode);else return n;e=e.slice(i.shift().value.length)}for(a=Eo.needsContext.test(e)?0:i.length;a--&&(o=i[a],!ke.relative[u=o.type]);)if((s=ke.find[u])&&(r=s(o.matches[0].replace(ar,ir),Gs.test(i[0].type)&&Ys(t.parentNode)||t))){if(i.splice(a,1),e=r.length&&ko(i),!e)return rr.apply(n,r),n;break}}return(f||qs(e,l))(r,t,!yn,n,Gs.test(e)&&Ys(t.parentNode)||t),n},Ye.sortStable=st.split("").sort(js).join("")===st,Ye.detectDuplicates=!!ha,er(),Ye.sortDetached=!0;var Hd=document,tf=Array.prototype.push,mE=Array.prototype.slice,pE=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,fi=pa.Event,hE=_.makeMap("children,contents,next,prev"),li=function(e){return typeof e!="undefined"},nf=function(e){return typeof e=="string"},gE=function(e){return e&&e===e.window},Vd=function(e,t){t=t||Hd;var n=t.createElement("div"),r=t.createDocumentFragment();n.innerHTML=e;for(var a;a=n.firstChild;)r.appendChild(a);return r},ba=function(e,t,n,r){var a;if(nf(t))t=Vd(t,of(e[0]));else if(t.length&&!t.nodeType){if(t=oe.makeArray(t),r)for(a=t.length-1;a>=0;a--)ba(e,t[a],n,r);else for(a=0;a<t.length;a++)ba(e,t[a],n,r);return e}if(t.nodeType)for(a=e.length;a--;)n.call(e[a],t);return e},Wd=function(e,t){return e&&t&&(" "+e.className+" ").indexOf(" "+t+" ")!==-1},qd=function(e,t,n){var r,a;return t=oe(t)[0],e.each(function(){var i=this;(!n||r!==i.parentNode)&&(r=i.parentNode,a=t.cloneNode(!1),i.parentNode.insertBefore(a,i)),a.appendChild(i)}),e},bE=_.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),yE=_.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),CE={for:"htmlFor",class:"className",readonly:"readOnly"},wE={float:"cssFloat"},rf={},af={},Ft=function(e,t){return new oe.fn.init(e,t)},SE=function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},EE=/^\s*|\s*$/g,jd=function(e){return e==null?"":(""+e).replace(EE,"")},In=function(e,t){var n,r,a,i;if(e)if(n=e.length,n===void 0){for(r in e)if(e.hasOwnProperty(r)&&(i=e[r],t.call(i,r,i)===!1))break}else for(a=0;a<n&&(i=e[a],t.call(i,a,i)!==!1);a++);return e},Kd=function(e,t){var n=[];return In(e,function(r,a){t(a,r)&&n.push(a)}),n},of=function(e){return e?e.nodeType===9?e:e.ownerDocument:Hd};Ft.fn=Ft.prototype={constructor:Ft,selector:"",context:null,length:0,init:function(e,t){var n=this,r,a;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return oe(e).attr(t);n.context=t=document}if(nf(e))if(n.selector=e,e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?r=[null,e,null]:r=pE.exec(e),r)if(r[1])for(a=Vd(e,of(t)).firstChild;a;)tf.call(n,a),a=a.nextSibling;else{if(a=of(t).getElementById(r[2]),!a)return n;if(a.id!==r[2])return n.find(e);n.length=1,n[0]=a}else return oe(t).find(e);else this.add(e,!1);return n},toArray:function(){return _.toArray(this)},add:function(e,t){var n=this,r,a;if(nf(e))return n.add(oe(e));if(t!==!1)for(r=oe.unique(n.toArray().concat(oe.makeArray(e))),n.length=r.length,a=0;a<r.length;a++)n[a]=r[a];else tf.apply(n,oe.makeArray(e));return n},attr:function(e,t){var n=this,r;if(typeof e=="object")In(e,function(a,i){n.attr(a,i)});else if(li(t))this.each(function(){var a;if(this.nodeType===1){if(a=rf[e],a&&a.set){a.set(this,t);return}t===null?this.removeAttribute(e,2):this.setAttribute(e,t,2)}});else{if(n[0]&&n[0].nodeType===1){if(r=rf[e],r&&r.get)return r.get(n[0],e);if(yE[e])return n.prop(e)?e:void 0;t=n[0].getAttribute(e,2),t===null&&(t=void 0)}return t}return n},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if(e=CE[e]||e,typeof e=="object")In(e,function(r,a){n.prop(r,a)});else if(li(t))this.each(function(){this.nodeType===1&&(this[e]=t)});else return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;return n},css:function(e,t){var n=this,r,a,i=function(u){return u.replace(/-(\D)/g,function(s,f){return f.toUpperCase()})},o=function(u){return u.replace(/[A-Z]/g,function(s){return"-"+s})};if(typeof e=="object")In(e,function(u,s){n.css(u,s)});else if(li(t))e=i(e),typeof t=="number"&&!bE[e]&&(t=t.toString()+"px"),n.each(function(){var u=this.style;if(a=af[e],a&&a.set){a.set(this,t);return}try{this.style[wE[e]||e]=t}catch{}(t===null||t==="")&&(u.removeProperty?u.removeProperty(o(e)):u.removeAttribute(e))});else{if(r=n[0],a=af[e],a&&a.get)return a.get(r);if(r.ownerDocument.defaultView)try{return r.ownerDocument.defaultView.getComputedStyle(r,null).getPropertyValue(o(e))}catch{return}else return r.currentStyle?r.currentStyle[i(e)]:""}return n},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],fi.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(li(e)){n=t.length;try{for(;n--;)t[n].innerHTML=e}catch{oe(t[n]).empty().append(e)}return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(li(e)){for(n=t.length;n--;)"innerText"in t[n]?t[n].innerText=e:t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return ba(this,arguments,function(e){(this.nodeType===1||this.host&&this.host.nodeType===1)&&this.appendChild(e)})},prepend:function(){return ba(this,arguments,function(e){(this.nodeType===1||this.host&&this.host.nodeType===1)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){var e=this;return e[0]&&e[0].parentNode?ba(e,arguments,function(t){this.parentNode.insertBefore(t,this)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?ba(e,arguments,function(t){this.parentNode.insertBefore(t,this.nextSibling)},!0):e},appendTo:function(e){return oe(e).append(this),this},prependTo:function(e){return oe(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return qd(this,e)},wrapAll:function(e){return qd(this,e,!0)},wrapInner:function(e){return this.each(function(){oe(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){oe(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),oe(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return typeof e!="string"||(e.indexOf(" ")!==-1?In(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(r,a){var i=Wd(a,e);if(i!==t){var o=a.className;i?a.className=jd((" "+o+" ").replace(" "+e+" "," ")):a.className+=o?" "+e:e}})),n},hasClass:function(e){return Wd(this[0],e)},each:function(e){return In(this,e)},on:function(e,t){return this.each(function(){fi.bind(this,e,t)})},off:function(e,t){return this.each(function(){fi.unbind(this,e,t)})},trigger:function(e){return this.each(function(){typeof e=="object"?fi.fire(this,e.type,e):fi.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return oe(mE.apply(this,arguments))},eq:function(e){return e===-1?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)oe.find(e,this[t],r);return oe(r)},filter:function(e){return oe(typeof e=="function"?Kd(this.toArray(),function(t,n){return e(n,t)}):oe.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof oe&&(e=e[0]),this.each(function(n,r){for(;r;){if(typeof e=="string"&&oe(r).is(e)){t.push(r);break}else if(r===e){t.push(r);break}r=r.parentNode}}),oe(t)},offset:function(e){var t,n,r,a=0,i=0,o;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(o=t.getBoundingClientRect(),a=o.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,i=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:a,top:i})},push:tf,sort:Array.prototype.sort,splice:Array.prototype.splice},_.extend(Ft,{extend:_.extend,makeArray:function(e){return gE(e)||e.nodeType?[e]:_.toArray(e)},inArray:SE,isArray:_.isArray,each:In,trim:jd,grep:Kd,find:we,expr:we.selectors,unique:we.uniqueSort,text:we.getText,contains:we.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)t[r].nodeType!==1&&t.splice(r,1);return t.length===1?t=oe.find.matchesSelector(t[0],e)?[t[0]]:[]:t=oe.find.matches(e,t),t}});var Gd=function(e,t,n){var r=[],a=e[t];for(typeof n!="string"&&n instanceof oe&&(n=n[0]);a&&a.nodeType!==9&&!(n!==void 0&&(a===n||typeof n=="string"&&oe(a).is(n)));)a.nodeType===1&&r.push(a),a=a[t];return r},uf=function(e,t,n,r){var a=[];for(r instanceof oe&&(r=r[0]);e;e=e[t])if(!(n&&e.nodeType!==n)){if(r!==void 0&&(e===r||typeof r=="string"&&oe(e).is(r)))break;a.push(e)}return a},Xd=function(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType===n)return e;return null};In({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return Gd(e,"parentNode")},next:function(e){return Xd(e,"nextSibling",1)},prev:function(e){return Xd(e,"previousSibling",1)},children:function(e){return uf(e.firstChild,"nextSibling",1)},contents:function(e){return _.toArray((e.nodeName==="iframe"?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){Ft.fn[e]=function(n){var r=this,a=[];r.each(function(){var o=t.call(a,this,n,a);o&&(oe.isArray(o)?a.push.apply(a,o):a.push(o))}),this.length>1&&(hE[e]||(a=oe.unique(a)),e.indexOf("parents")===0&&(a=a.reverse()));var i=oe(a);return n?i.filter(n):i}}),In({parentsUntil:function(e,t){return Gd(e,"parentNode",t)},nextUntil:function(e,t){return uf(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return uf(e,"previousSibling",1,t).slice(1)}},function(e,t){Ft.fn[e]=function(n,r){var a=this,i=[];a.each(function(){var u=t.call(i,this,n,i);u&&(oe.isArray(u)?i.push.apply(i,u):i.push(u))}),this.length>1&&(i=oe.unique(i),(e.indexOf("parents")===0||e==="prevUntil")&&(i=i.reverse()));var o=oe(i);return r?o.filter(r):o}}),Ft.fn.is=function(e){return!!e&&this.filter(e).length>0},Ft.fn.init.prototype=Ft.fn,Ft.overrideDefaults=function(e){var t,n=function(r,a){return t=t||e(),arguments.length===0&&(r=t.element),a||(a=t.context),new n.fn.init(r,a)};return oe.extend(n,this),n},Ft.attrHooks=rf,Ft.cssHooks=af;var oe=Ft,ci=_.each,kE=_.grep,sf=se.ie,xE=/^([a-z0-9],?)+$/i,NE=function(e,t,n){var r=t.keep_values,a={set:function(o,u,s){t.url_converter&&u!==null&&(u=t.url_converter.call(t.url_converter_scope||n(),u,s,o[0])),o.attr("data-mce-"+s,u).attr(s,u)},get:function(o,u){return o.attr("data-mce-"+u)||o.attr(u)}},i={style:{set:function(o,u){if(u!==null&&typeof u=="object"){o.css(u);return}r&&o.attr("data-mce-style",u),u!==null&&typeof u=="string"?(o.removeAttr("style"),o.css(e.parse(u))):o.attr("style",u)},get:function(o){var u=o.attr("data-mce-style")||o.attr("style");return u=e.serialize(e.parse(u),o[0].nodeName),u}}};return r&&(i.href=i.src=a),i},Yd=function(e,t){var n=t.attr("style"),r=e.serialize(e.parse(n),t[0].nodeName);r||(r=null),t.attr("data-mce-style",r)},ya=function(e,t){var n=0,r,a;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)a=e.nodeType,!(t&&a===3&&(a===r||!e.nodeValue.length))&&(n++,r=a);return n},xe=function(e,t){t===void 0&&(t={});var n={},r=window,a={},i=0,o=!0,u=!0,s=pd.forElement(k.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),f=[],l=t.schema?t.schema:Zn({}),c=Hs({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),v=t.ownEvents?new pa:pa.Event,d=l.getBlockElements(),m=oe.overrideDefaults(function(){return{context:e,element:Yr.getRoot()}}),p=function(w){if(typeof w=="string")return!!d[w];if(w){var T=w.nodeType;if(T)return!!(T===1&&d[w.nodeName])}return!1},h=function(w){return w&&e&&He(w)?e.getElementById(w):w},y=function(w){return m(typeof w=="string"?h(w):w)},g=function(w,T,M){var H,ue,be=y(w);return be.length&&(H=OC[T],H&&H.get?ue=H.get(be,T):ue=be.attr(T)),typeof ue=="undefined"&&(ue=M||""),ue},E=function(w){var T=h(w);return T?T.attributes:[]},S=function(w,T,M){M===""&&(M=null);var H=y(w),ue=H.attr(T);if(!!H.length){var be=OC[T];be&&be.set?be.set(H,M,T):H.attr(T,M),ue!==M&&t.onSetAttrib&&t.onSetAttrib({attrElm:H,attrName:T,attrValue:M})}},C=function(w,T){if(!sf||w.nodeType!==1||T)return w.cloneNode(T);var M=e.createElement(w.nodeName);return ci(E(w),function(H){S(M,H.nodeName,g(w,H.nodeName))}),M},x=function(){return t.root_element||e.body},B=function(w){var T=Qv(w);return{x:T.x,y:T.y,w:T.width,h:T.height}},L=function(w,T){return xw(e.body,h(w),T)},ne=function(w,T,M){var H=He(T)?y(w).css(T,M):y(w).css(T);t.update_styles&&Yd(c,H)},q=function(w,T){var M=y(w).css(T);t.update_styles&&Yd(c,M)},D=function(w,T,M){var H=y(w);return M?H.css(T):(T=T.replace(/-(\D)/g,function(ue,be){return be.toUpperCase()}),T==="float"&&(T=se.browser.isIE()?"styleFloat":"cssFloat"),H[0]&&H[0].style?H[0].style[T]:void 0)},ee=function(w){var T,M;return w=h(w),T=D(w,"width"),M=D(w,"height"),T.indexOf("px")===-1&&(T=0),M.indexOf("px")===-1&&(M=0),{w:parseInt(T,10)||w.offsetWidth||w.clientWidth,h:parseInt(M,10)||w.offsetHeight||w.clientHeight}},U=function(w){w=h(w);var T=L(w),M=ee(w);return{x:T.x,y:T.y,w:M.w,h:M.h}},W=function(w,T){var M;if(!w)return!1;if(!Array.isArray(w)){if(T==="*")return w.nodeType===1;if(xE.test(T)){var H=T.toLowerCase().split(/,/),ue=w.nodeName.toLowerCase();for(M=H.length-1;M>=0;M--)if(H[M]===ue)return!0;return!1}if(w.nodeType&&w.nodeType!==1)return!1}var be=Array.isArray(w)?w:[w];return we(T,be[0].ownerDocument||be[0],null,be).length>0},F=function(w,T,M,H){var ue=[],be,Ae=h(w);for(H=H===void 0,M=M||(x().nodeName!=="BODY"?x().parentNode:null),_.is(T,"string")&&(be=T,T==="*"?T=function(br){return br.nodeType===1}:T=function(br){return W(br,be)});Ae&&!(Ae===M||vn(Ae.nodeType)||Ss(Ae)||Es(Ae));){if(!T||typeof T=="function"&&T(Ae))if(H)ue.push(Ae);else return[Ae];Ae=Ae.parentNode}return H?ue:null},V=function(w,T,M){var H=F(w,T,M,!1);return H&&H.length>0?H[0]:null},K=function(w,T,M){var H=T;if(w){for(typeof T=="string"&&(H=function(ue){return W(ue,T)}),w=w[M];w;w=w[M])if(typeof H=="function"&&H(w))return w}return null},O=function(w,T){return K(w,T,"nextSibling")},j=function(w,T){return K(w,T,"previousSibling")},fe=function(w,T){return we(w,h(T)||t.root_element||e,[])},ge=function(w,T,M){var H,ue=typeof w=="string"?h(w):w;if(!ue)return!1;if(_.isArray(ue)&&(ue.length||ue.length===0))return H=[],ci(ue,function(Ae,br){Ae&&H.push(T.call(M,typeof Ae=="string"?h(Ae):Ae,br))}),H;var be=M||this;return T.call(be,ue)},he=function(w,T){y(w).each(function(M,H){ci(T,function(ue,be){S(H,be,ue)})})},We=function(w,T){var M=y(w);sf?M.each(function(H,ue){if(ue.canHaveHTML!==!1){for(;ue.firstChild;)ue.removeChild(ue.firstChild);try{ue.innerHTML="<br>"+T,ue.removeChild(ue.firstChild)}catch{oe("<div></div>").html("<br>"+T).contents().slice(1).appendTo(ue)}return T}}):M.html(T)},Be=function(w,T,M,H,ue){return ge(w,function(be){var Ae=typeof T=="string"?e.createElement(T):T;return he(Ae,M),H&&(typeof H!="string"&&H.nodeType?Ae.appendChild(H):typeof H=="string"&&We(Ae,H)),ue?Ae:be.appendChild(Ae)})},lt=function(w,T,M){return Be(e.createElement(w),w,T,M,!0)},xt=Yn.decode,P=Yn.encodeAllRaw,z=function(w,T,M){var H="",ue;H+="<"+w;for(ue in T)ta(T,ue)&&(H+=" "+ue+'="'+P(T[ue])+'"');return typeof M!="undefined"?H+">"+M+"</"+w+">":H+" />"},Z=function(w){var T,M=e.createElement("div"),H=e.createDocumentFragment();for(H.appendChild(M),w&&(M.innerHTML=w);T=M.firstChild;)H.appendChild(T);return H.removeChild(M),H},N=function(w,T){var M=y(w);return T?M.each(function(){for(var H;H=this.firstChild;)H.nodeType===3&&H.data.length===0?this.removeChild(H):this.parentNode.insertBefore(H,this)}).remove():M.remove(),M.length>1?M.toArray():M[0]},$=function(w){return ge(w,function(T){var M,H=T.attributes;for(M=H.length-1;M>=0;M--)T.removeAttributeNode(H.item(M))})},I=function(w){return c.parse(w)},J=function(w,T){return c.serialize(w,T)},te=function(w){var T,M;if(Yr!==xe.DOM&&e===document){if(n[w])return;n[w]=!0}M=e.getElementById("mceDefaultStyles"),M||(M=e.createElement("style"),M.id="mceDefaultStyles",M.type="text/css",T=e.getElementsByTagName("head")[0],T.firstChild?T.insertBefore(M,T.firstChild):T.appendChild(M)),M.styleSheet?M.styleSheet.cssText+=w:M.appendChild(e.createTextNode(w))},Ce=function(w){w||(w=""),Y(w.split(","),function(T){a[T]=!0,s.load(T,ve)})},Fe=function(w,T,M){y(w).toggleClass(T,M).each(function(){this.className===""&&oe(this).attr("class",null)})},Le=function(w,T){y(w).addClass(T)},Hn=function(w,T){Fe(w,T,!1)},ct=function(w,T){return y(w).hasClass(T)},pt=function(w){y(w).show()},Me=function(w){y(w).hide()},Ot=function(w){return y(w).css("display")==="none"},ht=function(w){return(w||"mce_")+i++},_n=function(w){var T=typeof w=="string"?h(w):w;return ae(T)?T.outerHTML:oe("<div></div>").append(oe(T).clone()).html()},Se=function(w,T){y(w).each(function(){try{if("outerHTML"in this){this.outerHTML=T;return}}catch{}N(oe(this).html(T),!0)})},Ee=function(w,T){var M=h(T);return ge(w,function(H){var ue=M.parentNode,be=M.nextSibling;return be?ue.insertBefore(H,be):ue.appendChild(H),H})},Ue=function(w,T,M){return ge(T,function(H){return _.is(H,"array")&&(w=w.cloneNode(!0)),M&&ci(kE(H.childNodes),function(ue){w.appendChild(ue)}),H.parentNode.replaceChild(w,H)})},fn=function(w,T){var M;return w.nodeName!==T.toUpperCase()&&(M=lt(T),ci(E(w),function(H){S(M,H.nodeName,g(w,H.nodeName))}),Ue(M,w,!0)),M||w},ln=function(w,T){for(var M=w,H;M;){for(H=T;H&&M!==H;)H=H.parentNode;if(M===H)break;M=M.parentNode}return!M&&w.ownerDocument?w.ownerDocument.documentElement:M},cn=function(w){return c.toHex(_.trim(w))},gr=function(w){if(ae(w)){var T=w.nodeName.toLowerCase()==="a"&&!g(w,"href")&&g(w,"id");if(g(w,"name")||g(w,"data-mce-bookmark")||T)return!0}return!1},Hc=function(w,T){var M,H,ue=0;if(gr(w))return!1;if(w=w.firstChild,w){var be=new Ge(w,w.parentNode),Ae=l?l.getWhiteSpaceElements():{};T=T||(l?l.getNonEmptyElements():null);do{if(M=w.nodeType,ae(w)){var br=w.getAttribute("data-mce-bogus");if(br){w=be.next(br==="all");continue}if(H=w.nodeName.toLowerCase(),T&&T[H]){if(H==="br"){ue++,w=be.next();continue}return!1}if(gr(w))return!1}if(M===8||M===3&&!Nr(w.nodeValue)||M===3&&w.parentNode&&Ae[w.parentNode.nodeName]&&Nr(w.nodeValue))return!1;w=be.next()}while(w)}return ue<=1},Vc=function(){return e.createRange()},ZU=function(w,T,M){var H=Vc(),ue,be,Ae;if(w&&T)return H.setStart(w.parentNode,ya(w)),H.setEnd(T.parentNode,ya(T)),ue=H.extractContents(),H=Vc(),H.setStart(T.parentNode,ya(T)+1),H.setEnd(w.parentNode,ya(w)+1),be=H.extractContents(),Ae=w.parentNode,Ae.insertBefore($s(Yr,ue),w),M?Ae.insertBefore(M,w):Ae.insertBefore(T,w),Ae.insertBefore($s(Yr,be),w),N(w),M||T},BC=function(w,T,M,H){if(_.isArray(w)){for(var ue=w.length,be=[];ue--;)be[ue]=BC(w[ue],T,M,H);return be}t.collect&&(w===e||w===r)&&f.push([w,T,M,H]);var Ae=v.bind(w,T,M,H||Yr);return Ae},_C=function(w,T,M){if(_.isArray(w)){for(var H=w.length,ue=[];H--;)ue[H]=_C(w[H],T,M);return ue}else{if(f.length>0&&(w===e||w===r))for(var H=f.length;H--;){var be=f[H];w===be[0]&&(!T||T===be[1])&&(!M||M===be[2])&&v.unbind(be[0],be[1],be[2])}return v.unbind(w,T,M)}},JU=function(w,T,M){return v.fire(w,T,M)},DC=function(w){if(w&&ae(w)){var T=w.getAttribute("data-mce-contenteditable");return T&&T!=="inherit"?T:w.contentEditable!=="inherit"?w.contentEditable:null}else return null},e2=function(w){for(var T=x(),M=null;w&&w!==T&&(M=DC(w),M===null);w=w.parentNode);return M},t2=function(){if(f.length>0)for(var w=f.length;w--;){var T=f[w];v.unbind(T[0],T[1],T[2])}Pe(a,function(M,H){s.unload(H),delete a[H]}),we.setDocument&&we.setDocument()},n2=function(w,T){if(sf){for(;w;){if(T===w)return!0;w=w.parentNode}return!1}else return w===T||T.contains(w)},r2=function(w){return"startContainer: "+w.startContainer.nodeName+", startOffset: "+w.startOffset+", endContainer: "+w.endContainer.nodeName+", endOffset: "+w.endOffset},Yr={doc:e,settings:t,win:r,files:a,stdMode:o,boxModel:u,styleSheetLoader:s,boundEvents:f,styles:c,schema:l,events:v,isBlock:p,$:m,$$:y,root:null,clone:C,getRoot:x,getViewPort:B,getRect:U,getSize:ee,getParent:V,getParents:F,get:h,getNext:O,getPrev:j,select:fe,is:W,add:Be,create:lt,createHTML:z,createFragment:Z,remove:N,setStyle:ne,getStyle:D,setStyles:q,removeAllAttribs:$,setAttrib:S,setAttribs:he,getAttrib:g,getPos:L,parseStyle:I,serializeStyle:J,addStyle:te,loadCSS:Ce,addClass:Le,removeClass:Hn,hasClass:ct,toggleClass:Fe,show:pt,hide:Me,isHidden:Ot,uniqueId:ht,setHTML:We,getOuterHTML:_n,setOuterHTML:Se,decode:xt,encode:P,insertAfter:Ee,replace:Ue,rename:fn,findCommonAncestor:ln,toHex:cn,run:ge,getAttribs:E,isEmpty:Hc,createRng:Vc,nodeIndex:ya,split:ZU,bind:BC,unbind:_C,fire:JU,getContentEditable:DC,getContentEditableParent:e2,destroy:t2,isChildOf:n2,dumpRng:r2},OC=NE(c,t,X(Yr));return Yr};xe.DOM=xe(document),xe.nodeIndex=ya;var TE=xe.DOM,ff=_.each,AE=_.grep,RE=0,Qd=1,No=2,Zd=3,Ln=function(){function e(t){t===void 0&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return e.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},e.prototype.loadScript=function(t,n,r){var a=TE,i,o=function(){a.remove(f),i&&(i.onerror=i.onload=i=null)},u=function(){o(),n()},s=function(){o(),Oe(r)?r():typeof console!="undefined"&&console.log&&console.log("Failed to load script: "+t)},f=a.uniqueId();i=document.createElement("script"),i.id=f,i.type="text/javascript",i.src=_._addCacheSuffix(t),this.settings.referrerPolicy&&a.setAttrib(i,"referrerpolicy",this.settings.referrerPolicy),i.onload=u,i.onerror=s,(document.getElementsByTagName("head")[0]||document.body).appendChild(i)},e.prototype.isDone=function(t){return this.states[t]===No},e.prototype.markDone=function(t){this.states[t]=No},e.prototype.add=function(t,n,r,a){var i=this.states[t];this.queue.push(t),i===void 0&&(this.states[t]=RE),n&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:n,failure:a,scope:r||this}))},e.prototype.load=function(t,n,r,a){return this.add(t,n,r,a)},e.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},e.prototype.loadQueue=function(t,n,r){this.loadScripts(this.queue,t,n,r)},e.prototype.loadScripts=function(t,n,r,a){var i=this,o=[],u=function(f,l){ff(i.scriptLoadedCallbacks[l],function(c){Oe(c[f])&&c[f].call(c.scope)}),i.scriptLoadedCallbacks[l]=void 0};i.queueLoadedCallbacks.push({success:n,failure:a,scope:r||this});var s=function(){var f=AE(t);if(t.length=0,ff(f,function(c){if(i.states[c]===No){u("success",c);return}if(i.states[c]===Zd){u("failure",c);return}i.states[c]!==Qd&&(i.states[c]=Qd,i.loading++,i.loadScript(c,function(){i.states[c]=No,i.loading--,u("success",c),s()},function(){i.states[c]=Zd,i.loading--,o.push(c),u("failure",c),s()}))}),!i.loading){var l=i.queueLoadedCallbacks.slice(0);i.queueLoadedCallbacks.length=0,ff(l,function(c){o.length===0?Oe(c.success)&&c.success.call(c.scope):Oe(c.failure)&&c.failure.call(c.scope,o)})}};s()},e.ScriptLoader=new e,e}(),vt=function(e){var t=e,n=function(){return t},r=function(a){t=a};return{get:n,set:r}},BE=function(e){return Qr(e)&&pe(e,"raw")},_E=function(e){return Vt(e)&&e.length>1},vi={},lf=vt("en"),Jd=function(){return je(vi,lf.get())},DE=function(){return tv(vi,function(e){return ie({},e)})},OE=function(e){e&&lf.set(e)},PE=function(){return lf.get()},IE=function(e,t){var n=vi[e];n||(vi[e]=n={}),Pe(t,function(r,a){n[a.toLowerCase()]=r})},LE=function(e){var t=Jd().getOr({}),n=function(s){return Oe(s)?Object.prototype.toString.call(s):r(s)?"":""+s},r=function(s){return s===""||s===null||s===void 0},a=function(s){var f=n(s);return je(t,f.toLowerCase()).map(n).getOr(f)},i=function(s){return s.replace(/{context:\w+}$/,"")};if(r(e))return"";if(BE(e))return n(e.raw);if(_E(e)){var o=e.slice(1),u=a(e[0]).replace(/\{([0-9]+)\}/g,function(s,f){return pe(o,f)?n(o[f]):s});return i(u)}return i(a(e))},$E=function(){return Jd().bind(function(e){return je(e,"_dir")}).exists(function(e){return e==="rtl"})},FE=function(e){return pe(vi,e)},rn={getData:DE,setCode:OE,getCode:PE,add:IE,translate:LE,isRtl:$E,hasCode:FE},Rt=function(){var e=[],t={},n={},r=[],a=function(p,h){var y=me(r,function(g){return g.name===p&&g.state===h});Y(y,function(g){return g.callback()})},i=function(p){if(n[p])return n[p].instance},o=function(p){var h;return n[p]&&(h=n[p].dependencies),h||[]},u=function(p,h){Rt.languageLoad!==!1&&m(p,function(){var y=rn.getCode(),g=","+(h||"")+",";!y||h&&g.indexOf(","+y+",")===-1||Ln.ScriptLoader.add(t[p]+"/langs/"+y+".js")},"loaded")},s=function(p,h,y){var g=h;return e.push(g),n[p]={instance:g,dependencies:y},a(p,"added"),g},f=function(p){delete t[p],delete n[p]},l=function(p,h){return typeof h=="object"?h:typeof p=="string"?{prefix:"",resource:h,suffix:""}:{prefix:p.prefix,resource:h,suffix:p.suffix}},c=function(p,h){var y=t[p];Y(h,function(g){Ln.ScriptLoader.add(y+"/"+g)})},v=function(p,h,y,g){var E=o(p);Y(E,function(S){var C=l(h,S);d(C.resource,C,void 0,void 0)}),y&&(g?y.call(g):y.call(Ln))},d=function(p,h,y,g,E){if(!t[p]){var S=typeof h=="string"?h:h.prefix+h.resource+h.suffix;S.indexOf("/")!==0&&S.indexOf("://")===-1&&(S=Rt.baseURL+"/"+S),t[p]=S.substring(0,S.lastIndexOf("/"));var C=function(){a(p,"loaded"),v(p,h,y,g)};n[p]?C():Ln.ScriptLoader.add(S,C,g,E)}},m=function(p,h,y){y===void 0&&(y="added"),pe(n,p)&&y==="added"||pe(t,p)&&y==="loaded"?h():r.push({name:p,state:y,callback:h})};return{items:e,urls:t,lookup:n,_listeners:r,get:i,dependencies:o,requireLangPack:u,add:s,remove:f,createUrl:l,addComponents:c,load:d,waitFor:m}};Rt.languageLoad=!0,Rt.baseURL="",Rt.PluginManager=Rt(),Rt.ThemeManager=Rt();var ME=function(e){var t=vt(b.none()),n=function(){return t.get().each(e)},r=function(){n(),t.set(b.none())},a=function(){return t.get().isSome()},i=function(){return t.get()},o=function(u){n(),t.set(b.some(u))};return{clear:r,isSet:a,get:i,set:o}},Ca=function(){var e=ME(ve),t=function(n){return e.get().each(n)};return ie(ie({},e),{on:t})},cf=function(e,t){var n=null,r=function(){Ka(n)||(clearTimeout(n),n=null)},a=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];Ka(n)&&(n=setTimeout(function(){n=null,e.apply(null,i)},t))};return{cancel:r,throttle:a}},em=function(e,t){var n=null,r=function(){Ka(n)||(clearTimeout(n),n=null)},a=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];r(),n=setTimeout(function(){n=null,e.apply(null,i)},t)};return{cancel:r,throttle:a}},vf=function(e,t){var n=ri(e,t);return n===void 0||n===""?[]:n.split(" ")},UE=function(e,t,n){var r=vf(e,t),a=r.concat([n]);return hn(e,t,a.join(" ")),!0},zE=function(e,t,n){var r=me(vf(e,t),function(a){return a!==n});return r.length>0?hn(e,t,r.join(" ")):jn(e,t),!1},To=function(e){return e.dom.classList!==void 0},HE=function(e){return vf(e,"class")},VE=function(e,t){return UE(e,"class",t)},WE=function(e,t){return zE(e,"class",t)},Ao=function(e,t){To(e)?e.dom.classList.add(t):VE(e,t)},qE=function(e){var t=To(e)?e.dom.classList:HE(e);t.length===0&&jn(e,"class")},jE=function(e,t){if(To(e)){var n=e.dom.classList;n.remove(t)}else WE(e,t);qE(e)},tm=function(e,t){return To(e)&&e.dom.classList.contains(t)},nm=function(e,t){var n=[];return Y(jt(e),function(r){t(r)&&(n=n.concat([r])),n=n.concat(nm(r,t))}),n},kt=function(e,t){return V0(t,e)},df=X("mce-annotation"),di=X("data-mce-annotation"),Ro=X("data-mce-annotation-uid"),rm=function(e,t){var n=e.selection.getRng(),r=k.fromDom(n.startContainer),a=k.fromDom(e.getBody()),i=t.fold(function(){return"."+df()},function(f){return"["+di()+'="'+f+'"]'}),o=Yi(r,n.startOffset).getOr(r),u=Ts(o,i,function(f){return Te(f,a)}),s=function(f,l){return bw(f,l)?b.some(ri(f,l)):b.none()};return u.bind(function(f){return s(f,""+Ro()).bind(function(l){return s(f,""+di()).map(function(c){var v=GE(e,l);return{uid:l,name:c,elements:v}})})})},KE=function(e){return Zt(e)&&tm(e,df())},GE=function(e,t){var n=k.fromDom(e.getBody());return kt(n,"["+Ro()+'="'+t+'"]')},XE=function(e,t){var n=k.fromDom(e.getBody()),r=kt(n,"["+di()+'="'+t+'"]'),a={};return Y(r,function(i){var o=ri(i,Ro()),u=je(a,o).getOr([]);a[o]=u.concat([i])}),a},YE=function(e,t){var n=vt({}),r=function(){return{listeners:[],previous:Ca()}},a=function(l,c){i(l,function(v){return c(v),v})},i=function(l,c){var v=n.get(),d=je(v,l).getOrThunk(r),m=c(d);v[l]=m,n.set(v)},o=function(l,c,v){a(l,function(d){Y(d.listeners,function(m){return m(!0,l,{uid:c,nodes:De(v,function(p){return p.dom})})})})},u=function(l){a(l,function(c){Y(c.listeners,function(v){return v(!1,l)})})},s=em(function(){var l=n.get(),c=as(ea(l));Y(c,function(v){i(v,function(d){var m=d.previous.get();return rm(e,b.some(v)).fold(function(){m.isSome()&&(u(v),d.previous.clear())},function(p){var h=p.uid,y=p.name,g=p.elements;no(m,h)||(o(y,h,g),d.previous.set(h))}),{previous:d.previous,listeners:d.listeners}})})},30);e.on("remove",function(){s.cancel()}),e.on("NodeChange",function(){s.throttle()});var f=function(l,c){i(l,function(v){return{previous:v.previous,listeners:v.listeners.concat([c])}})};return{addListener:f}},QE=function(e,t){var n=function(r){return b.from(r.attr(di())).bind(t.lookup)};e.on("init",function(){e.serializer.addNodeFilter("span",function(r){Y(r,function(a){n(a).each(function(i){i.persistent===!1&&a.unwrap()})})})})},ZE=function(){var e={},t=function(r,a){e[r]={name:r,settings:a}},n=function(r){return je(e,r).map(function(a){return a.settings})};return{register:t,lookup:n}},am=0,im=function(e){var t=new Date,n=t.getTime(),r=Math.floor(Math.random()*1e9);return am++,e+"_"+r+am+String(n)},JE=function(e,t){Y(t,function(n){Ao(e,n)})},ek=function(e,t){var n=t||document,r=n.createElement("div");return r.innerHTML=e,jt(k.fromDom(r))},tk=function(e){return De(e,k.fromDom)},nk=function(e){return e.dom.innerHTML},om=function(e,t){var n=$v(e),r=n.dom,a=k.fromDom(r.createDocumentFragment()),i=ek(t,r);Qi(a,i),bs(e),at(e,a)},um=function(e,t){return k.fromDom(e.dom.cloneNode(t))},wa=function(e){return um(e,!1)},sm=function(e){return um(e,!0)},fm=function(e,t,n){n===void 0&&(n=Re);var r=new Ge(e,t),a=function(i){var o;do o=r[i]();while(o&&!Q(o)&&!n(o));return b.from(o).filter(Q)};return{current:function(){return b.from(r.current()).filter(Q)},next:function(){return a("next")},prev:function(){return a("prev")},prev2:function(){return a("prev2")}}},lm=function(e,t){var n=t||function(o){return e.isBlock(o)||$e(o)||_e(o)},r=function(o,u,s,f){if(Q(o)){var l=f(o,u,o.data);if(l!==-1)return b.some({container:o,offset:l})}return s().bind(function(c){return r(c.container,c.offset,s,f)})},a=function(o,u,s,f){var l=fm(o,f,n);return r(o,u,function(){return l.prev().map(function(c){return{container:c,offset:c.length}})},s).getOrNull()},i=function(o,u,s,f){var l=fm(o,f,n);return r(o,u,function(){return l.next().map(function(c){return{container:c,offset:0}})},s).getOrNull()};return{backwards:a,forwards:i}},Sa=Math.round,_r=function(e){return e?{left:Sa(e.left),top:Sa(e.top),bottom:Sa(e.bottom),right:Sa(e.right),width:Sa(e.width),height:Sa(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},cm=function(e,t){return e=_r(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},rk=function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},vm=function(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2},Ea=function(e,t){var n=Math.min(t.height/2,e.height/2);return e.bottom-n<t.top?!0:e.top>t.bottom?!1:vm(t.top-e.bottom,e,t)},ka=function(e,t){return e.top>t.bottom?!0:e.bottom<t.top?!1:vm(t.bottom-e.top,e,t)},dm=function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},ak=function(e,t,n){return Math.min(Math.max(e,t),n)},Bo=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset===n+1?t.childNodes[n]:null},or=function(e,t){if(ae(e)&&e.hasChildNodes()){var n=e.childNodes,r=ak(t,0,n.length-1);return n[r]}else return e},ik=function(e,t){if(!(t<0&&ae(e)&&e.hasChildNodes()))return or(e,t)},ok=new RegExp("[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2-\u09E3\u0A01-\u0A02\u0A3C\u0A41-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7-\u0AC8\u0ACD\u0AE2-\u0AE3\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B57\u0B62-\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0D01\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62-\u0D63\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C-\u200D\u20D0-\u20DC\u20DD-\u20E0\u20E1\u20E2-\u20E4\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u302E-\u302F\u3099-\u309A\uA66F\uA670-\uA672\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E-\uFF9F]"),mm=function(e){return typeof e=="string"&&e.charCodeAt(0)>=768&&ok.test(e)},uk=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){for(var r=0;r<e.length;r++)if(e[r](n))return!0;return!1}},sk=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){for(var r=0;r<e.length;r++)if(!e[r](n))return!1;return!0}},pm=ae,fk=bn,hm=eo("display","block table"),lk=eo("float","left right"),mi=sk(pm,fk,es(lk)),ck=es(eo("white-space","pre pre-line pre-wrap")),pi=Q,mf=$e,gm=xe.nodeIndex,_o=ik,pf=function(e){return"createRange"in e?e.createRange():xe.DOM.createRng()},hf=function(e){return e&&/[\r\n\t ]/.test(e)},bm=function(e){return!!e.setStart&&!!e.setEnd},gf=function(e){var t=e.startContainer,n=e.startOffset;if(hf(e.toString())&&ck(t.parentNode)&&Q(t)){var r=t.data;if(hf(r[n-1])||hf(r[n+1]))return!0}return!1},vk=function(e){var t=e.ownerDocument,n=pf(t),r=t.createTextNode(At),a=e.parentNode;a.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1);var i=_r(n.getBoundingClientRect());return a.removeChild(r),i},dk=function(e){var t=e.startContainer,n=e.endContainer,r=e.startOffset,a=e.endOffset;if(t===n&&Q(n)&&r===0&&a===1){var i=e.cloneRange();return i.setEndAfter(n),ur(i)}else return null},ym=function(e){return e.left===0&&e.right===0&&e.top===0&&e.bottom===0},ur=function(e){var t,n=e.getClientRects();return n.length>0?t=_r(n[0]):t=_r(e.getBoundingClientRect()),!bm(e)&&mf(e)&&ym(t)?vk(e):ym(t)&&bm(e)?dk(e):t},Dr=function(e,t){var n=cm(e,t);return n.width=1,n.right=n.left+1,n},mk=function(e){var t=[],n=function(s){s.height!==0&&(t.length>0&&rk(s,t[t.length-1])||t.push(s))},r=function(s,f){var l=pf(s.ownerDocument);if(f<s.data.length){if(mm(s.data[f]))return t;if(mm(s.data[f-1])&&(l.setStart(s,f),l.setEnd(s,f+1),!gf(l)))return n(Dr(ur(l),!1)),t}f>0&&(l.setStart(s,f-1),l.setEnd(s,f),gf(l)||n(Dr(ur(l),!1))),f<s.data.length&&(l.setStart(s,f),l.setEnd(s,f+1),gf(l)||n(Dr(ur(l),!0)))},a=e.container(),i=e.offset();if(pi(a))return r(a,i),t;if(pm(a))if(e.isAtEnd()){var o=_o(a,i);pi(o)&&r(o,o.data.length),mi(o)&&!mf(o)&&n(Dr(ur(o),!1))}else{var o=_o(a,i);if(pi(o)&&r(o,0),mi(o)&&e.isAtEnd())return n(Dr(ur(o),!1)),t;var u=_o(e.container(),e.offset()-1);mi(u)&&!mf(u)&&(hm(u)||hm(o)||!mi(o))&&n(Dr(ur(u),!1)),mi(o)&&n(Dr(ur(o),!0))}return t},A=function(e,t,n){var r=function(){return pi(e),t===0},a=function(){return pi(e)?t>=e.data.length:t>=e.childNodes.length},i=function(){var l=pf(e.ownerDocument);return l.setStart(e,t),l.setEnd(e,t),l},o=function(){return n||(n=mk(A(e,t))),n},u=function(){return o().length>0},s=function(l){return l&&e===l.container()&&t===l.offset()},f=function(l){return _o(e,l?t-1:t)};return{container:X(e),offset:X(t),toRange:i,getClientRects:o,isVisible:u,isAtStart:r,isAtEnd:a,isEqual:s,getNode:f}};A.fromRangeStart=function(e){return A(e.startContainer,e.startOffset)},A.fromRangeEnd=function(e){return A(e.endContainer,e.endOffset)},A.after=function(e){return A(e.parentNode,gm(e)+1)},A.before=function(e){return A(e.parentNode,gm(e))},A.isAbove=function(e,t){return Et(Pt(t.getClientRects()),wr(e.getClientRects()),Ea).getOr(!1)},A.isBelow=function(e,t){return Et(wr(t.getClientRects()),Pt(e.getClientRects()),ka).getOr(!1)},A.isAtStart=function(e){return e?e.isAtStart():!1},A.isAtEnd=function(e){return e?e.isAtEnd():!1},A.isTextPosition=function(e){return e?Q(e.container()):!1},A.isElementPosition=function(e){return A.isTextPosition(e)===!1};var Do=function(e,t){Q(t)&&t.data.length===0&&e.remove(t)},pk=function(e,t,n){t.insertNode(n),Do(e,n.previousSibling),Do(e,n.nextSibling)},hk=function(e,t,n){var r=b.from(n.firstChild),a=b.from(n.lastChild);t.insertNode(n),r.each(function(i){return Do(e,i.previousSibling)}),a.each(function(i){return Do(e,i.nextSibling)})},bf=function(e,t,n){Es(n)?hk(e,t,n):pk(e,t,n)},an=Q,Cm=xr,wm=xe.nodeIndex,Sm=function(e){var t=e.parentNode;return Cm(t)?Sm(t):t},yf=function(e){return e?Ki(e.childNodes,function(t,n){return Cm(n)&&n.nodeName!=="BR"?t=t.concat(yf(n)):t.push(n),t},[]):[]},gk=function(e,t){for(;(e=e.previousSibling)&&an(e);)t+=e.data.length;return t},Em=function(e){return function(t){return e===t}},bk=function(e){var t,n;t=yf(Sm(e)),n=av(t,Em(e),e),t=t.slice(0,n+1);var r=Ki(t,function(a,i,o){return an(i)&&an(t[o-1])&&a++,a},0);return t=na(t,Kt([e.nodeName])),n=av(t,Em(e),e),n-r},km=function(e){var t;return an(e)?t="text()":t=e.nodeName.toLowerCase(),t+"["+bk(e)+"]"},yk=function(e,t,n){var r=[];for(t=t.parentNode;t!==e&&!(n&&n(t));t=t.parentNode)r.push(t);return r},xm=function(e,t){var n,r,a=[],i,o,u;return n=t.container(),r=t.offset(),an(n)?i=gk(n,r):(o=n.childNodes,r>=o.length?(i="after",r=o.length-1):i="before",n=o[r]),a.push(km(n)),u=yk(e,n),u=na(u,es(xr)),a=a.concat(ss(u,function(s){return km(s)})),a.reverse().join("/")+","+i},Ck=function(e,t,n){var r=yf(e);return r=na(r,function(a,i){return!an(a)||!an(r[i-1])}),r=na(r,Kt([t])),r[n]},wk=function(e,t){for(var n=e,r=0,a;an(n);){if(a=n.data.length,t>=r&&t<=r+a){e=n,t=t-r;break}if(!an(n.nextSibling)){e=n,t=a;break}r+=a,n=n.nextSibling}return an(e)&&t>e.data.length&&(t=e.data.length),A(e,t)},Nm=function(e,t){var n;if(!t)return null;var r=t.split(","),a=r[0].split("/");n=r.length>1?r[1]:"before";var i=Ki(a,function(o,u){var s=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(u);return s?(s[1]==="text()"&&(s[1]="#text"),Ck(o,s[1],parseInt(s[2],10))):null},e);return i?an(i)?wk(i,parseInt(n,10)):(n==="after"?n=wm(i)+1:n=wm(i),A(i.parentNode,n)):null},Oo=_e,Sk=function(e,t,n){var r,a;for(a=e(t.data.slice(0,n)).length,r=t.previousSibling;r&&Q(r);r=r.previousSibling)a+=e(r.data).length;return a},Tm=function(e,t,n,r,a){var i=r[a?"startContainer":"endContainer"],o=r[a?"startOffset":"endOffset"],u=[],s,f=0,l=e.getRoot();for(Q(i)?u.push(n?Sk(t,i,o):o):(s=i.childNodes,o>=s.length&&s.length&&(f=1,o=Math.max(0,s.length-1)),u.push(e.nodeIndex(s[o],n)+f));i&&i!==l;i=i.parentNode)u.push(e.nodeIndex(i,n));return u},Ek=function(e,t,n,r){var a=t.dom,i={};return i.start=Tm(a,e,n,r,!0),t.isCollapsed()||(i.end=Tm(a,e,n,r,!1)),bd(r)&&(i.isFakeCaret=!0),i},Cf=function(e,t,n){var r=0;return _.each(e.select(t),function(a){if(a.getAttribute("data-mce-bogus")!=="all"){if(a===n)return!1;r++}}),r},Am=function(e,t){var n,r,a,i=t?"start":"end";n=e[i+"Container"],r=e[i+"Offset"],ae(n)&&n.nodeName==="TR"&&(a=n.childNodes,n=a[Math.min(t?r:r-1,a.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))},Rm=function(e){return Am(e,!0),Am(e,!1),e},Bm=function(e,t){var n;if(ae(e)&&(e=or(e,t),Oo(e)))return e;if(Lt(e)&&(Q(e)&&ca(e)&&(e=e.parentNode),n=e.previousSibling,Oo(n)||(n=e.nextSibling,Oo(n))))return n},kk=function(e){return Bm(e.startContainer,e.startOffset)||Bm(e.endContainer,e.endOffset)},_m=function(e,t,n){var r=n.getNode(),a=r?r.nodeName:null,i=n.getRng();if(Oo(r)||a==="IMG")return{name:a,index:Cf(n.dom,a,r)};var o=kk(i);return o?(a=o.tagName,{name:a,index:Cf(n.dom,a,o)}):Ek(e,n,t,i)},xk=function(e){var t=e.getRng();return{start:xm(e.dom.getRoot(),A.fromRangeStart(t)),end:xm(e.dom.getRoot(),A.fromRangeEnd(t))}},Nk=function(e){return{rng:e.getRng()}},Dm=function(e,t,n){var r={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return n?e.create("span",r,"&#xFEFF;"):e.create("span",r)},Om=function(e,t){var n=e.dom,r=e.getRng(),a=n.uniqueId(),i=e.isCollapsed(),o=e.getNode(),u=o.nodeName;if(u==="IMG")return{name:u,index:Cf(n,u,o)};var s=Rm(r.cloneRange());if(!i){s.collapse(!1);var f=Dm(n,a+"_end",t);bf(n,s,f)}r=Rm(r),r.collapse(!0);var l=Dm(n,a+"_start",t);return bf(n,r,l),e.moveToBookmark({id:a,keep:!0}),{id:a}},Tk=function(e,t,n){return t===2?_m(Xn,n,e):t===3?xk(e):t?Nk(e):Om(e,!1)},Pm=G(_m,Tt,!0),Ak=xe.DOM,Rk="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow",Im=function(e,t,n){var r=e.getParam(t,n);if(r.indexOf("=")!==-1){var a=e.getParam(t,"","hash");return je(a,e.id).getOr(n)}else return r},Bk=function(e){return e.getParam("iframe_attrs",{})},_k=function(e){return e.getParam("doctype","<!DOCTYPE html>")},Dk=function(e){return e.getParam("document_base_url","")},Ok=function(e){return Im(e,"body_id","tinymce")},Pk=function(e){return Im(e,"body_class","")},Lm=function(e){return e.getParam("content_security_policy","")},Ik=function(e){return e.getParam("br_in_pre",!0)},ft=function(e){if(e.getParam("force_p_newlines",!1))return"p";var t=e.getParam("forced_root_block","p");return t===!1?"":t===!0?"p":t},hi=function(e){return e.getParam("forced_root_block_attrs",{})},Lk=function(e){return e.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},$k=function(e){return e.getParam("no_newline_selector","")},Fk=function(e){return e.getParam("keep_styles",!0)},Mk=function(e){return e.getParam("end_container_on_empty_block",!1)},Uk=function(e){return _.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},zk=function(e){return _.explode(e.getParam("font_size_classes",""))},Hk=function(e){return e.getParam("images_dataimg_filter",qe,"function")},$m=function(e){return e.getParam("automatic_uploads",!0,"boolean")},Vk=function(e){return e.getParam("images_reuse_filename",!1,"boolean")},Wk=function(e){return e.getParam("images_replace_blob_uris",!0,"boolean")},Fm=function(e){return e.getParam("icons","","string")},qk=function(e){return e.getParam("icons_url","","string")},jk=function(e){return e.getParam("images_upload_url","","string")},Kk=function(e){return e.getParam("images_upload_base_path","","string")},Gk=function(e){return e.getParam("images_upload_credentials",!1,"boolean")},Xk=function(e){return e.getParam("images_upload_handler",null,"function")},Yk=function(e){return e.getParam("content_css_cors",!1,"boolean")},Mm=function(e){return e.getParam("referrer_policy","","string")},Um=function(e){return e.getParam("language","en","string")},Qk=function(e){return e.getParam("language_url","","string")},zm=function(e){return e.getParam("indent_use_margin",!1)},Zk=function(e){return e.getParam("indentation","40px","string")},Jk=function(e){var t=e.getParam("content_css");return He(t)?De(t.split(","),vs):Vt(t)?t:t===!1||e.inline?[]:["default"]},Hm=function(e){var t=e.getParam("font_css",[]);return Vt(t)?t:De(t.split(","),vs)},ex=function(e){return e.getParam("directionality",rn.isRtl()?"rtl":void 0)},tx=function(e){return e.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Vm=function(e){var t=e.getParam("object_resizing");return t===!1||se.iOS?!1:He(t)?t:"table,img,figure.image,div,video,iframe"},nx=function(e){return e.getParam("resize_img_proportional",!0,"boolean")},rx=function(e){return e.getParam("placeholder",Ak.getAttrib(e.getElement(),"placeholder"),"string")},Wm=function(e){return e.getParam("event_root")},ax=function(e){return e.getParam("service_message")},gi=function(e){return e.getParam("theme")},ix=function(e){return e.getParam("validate")},bi=function(e){return e.getParam("inline_boundaries")!==!1},ox=function(e){return e.getParam("formats")},ux=function(e){var t=e.getParam("preview_styles",Rk);return He(t)?t:""},sx=function(e){return e.getParam("format_empty_lines",!1,"boolean")},fx=function(e){return e.getParam("custom_ui_selector","","string")},lx=function(e){return e.getParam("theme_url")},cx=function(e){return e.getParam("inline")},vx=function(e){return e.getParam("hidden_input")},dx=function(e){return e.getParam("submit_patch")},mx=function(e){return e.getParam("encoding")==="xml"},px=function(e){return e.getParam("add_form_submit_trigger")},hx=function(e){return e.getParam("add_unload_trigger")},gx=function(e){return ft(e)!==""},bx=function(e){return e.getParam("custom_undo_redo_levels",0,"number")},yx=function(e){return e.getParam("disable_nodechange")},Cx=function(e){return e.getParam("readonly")},wx=function(e){return e.getParam("content_css_cors")},wf=function(e){return e.getParam("plugins","","string")},Sx=function(e){return e.getParam("external_plugins")},Ex=function(e){return e.getParam("block_unsupported_drop",!0,"boolean")},kx=function(e){return e.getParam("visual",!0,"boolean")},xx=function(e){return e.getParam("visual_table_class","mce-item-table","string")},Nx=function(e){return e.getParam("visual_anchor_class","mce-item-anchor","string")},Tx=function(e){return e.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")},Ax=ae,qm=Q,jm=function(e){var t=e.parentNode;t&&t.removeChild(e)},Km=function(e){var t=Xn(e);return{count:e.length-t.length,text:t}},Gm=function(e){for(var t;(t=e.data.lastIndexOf(nt))!==-1;)e.deleteData(t,1)},Xm=function(e,t){return Or(e),t},Rx=function(e,t){var n=Km(e.data.substr(0,t.offset())),r=Km(e.data.substr(t.offset())),a=n.text+r.text;return a.length>0?(Gm(e),A(e,t.offset()-n.count)):t},Bx=function(e,t){var n=t.container(),r=KC(dn(n.childNodes),e).map(function(a){return a<t.offset()?A(n,t.offset()-1):t}).getOr(t);return Or(e),r},_x=function(e,t){return qm(e)&&t.container()===e?Rx(e,t):Xm(e,t)},Dx=function(e,t){return t.container()===e.parentNode?Bx(e,t):Xm(e,t)},Ox=function(e,t){return A.isTextPosition(t)?_x(e,t):Dx(e,t)},Or=function(e){Ax(e)&&Lt(e)&&(gd(e)?e.removeAttribute("data-mce-caret"):jm(e)),qm(e)&&(Gm(e),e.data.length===0&&jm(e))},Sf=Wt().browser,Px=_e,Ix=Gt,Lx=to,$x="*[contentEditable=false],video,audio,embed,object",Ym=function(e,t,n){var r=cm(t.getBoundingClientRect(),n),a,i;if(e.tagName==="BODY"){var o=e.ownerDocument.documentElement;a=e.scrollLeft||o.scrollLeft,i=e.scrollTop||o.scrollTop}else{var u=e.getBoundingClientRect();a=e.scrollLeft-u.left,i=e.scrollTop-u.top}r.left+=a,r.right+=a,r.top+=i,r.bottom+=i,r.width=1;var s=t.offsetWidth-t.clientWidth;return s>0&&(n&&(s*=-1),r.left+=s,r.right+=s),r},Fx=function(e){for(var t=kt(k.fromDom(e),$x),n=0;n<t.length;n++){var r=t[n].dom,a=r.previousSibling;if(co(a)){var i=a.data;i.length===1?a.parentNode.removeChild(a):a.deleteData(i.length-1,1)}if(a=r.nextSibling,lo(a)){var i=a.data;i.length===1?a.parentNode.removeChild(a):a.deleteData(0,1)}}},Mx=function(e,t,n,r){var a=Ca(),i,o,u=ft(e),s=u.length>0?u:"p",f=function(p,h){var y;if(l(),Lx(h))return null;if(n(h)){o=aS(s,h,p);var g=Ym(t,h,p);oe(o).css("top",g.top);var E=oe('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(ie({},g)).appendTo(t)[0];a.set({caret:E,element:h,before:p}),p&&oe(E).addClass("mce-visual-caret-before"),c(),y=h.ownerDocument.createRange(),y.setStart(o,0),y.setEnd(o,0)}else return o=nS(h,p),y=h.ownerDocument.createRange(),yi(o.nextSibling)?(y.setStart(o,0),y.setEnd(o,0)):(y.setStart(o,1),y.setEnd(o,1)),y;return y},l=function(){Fx(t),o&&(Or(o),o=null),a.on(function(p){oe(p.caret).remove(),a.clear()}),i&&(ot.clearInterval(i),i=void 0)},c=function(){i=ot.setInterval(function(){r()?oe("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden"):oe("div.mce-visual-caret",t).addClass("mce-visual-caret-hidden")},500)},v=function(){a.on(function(p){var h=Ym(t,p.element,p.before);oe(p.caret).css(ie({},h))})},d=function(){return ot.clearInterval(i)},m=function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"};return{show:f,hide:l,getCss:m,reposition:v,destroy:d}},Qm=function(){return Sf.isIE()||Sf.isEdge()||Sf.isFirefox()},yi=function(e){return Px(e)||Ix(e)},Pr=function(e){return yi(e)||oa(e)&&Qm()},Ef=_e,Ux=Gt,zx=eo("display","block table table-cell table-caption list-item"),Zm=Lt,Jm=ca,ep=ae,Hx=bn,xa=function(e){return e>0},Ir=function(e){return e<0},Po=function(e,t){for(var n;n=e(t);)if(!Jm(n))return n;return null},Na=function(e,t,n,r,a){var i=new Ge(e,r),o=Ef(e)||Jm(e);if(Ir(t)){if(o&&(e=Po(i.prev.bind(i),!0),n(e)))return e;for(;e=Po(i.prev.bind(i),a);)if(n(e))return e}if(xa(t)){if(o&&(e=Po(i.next.bind(i),!0),n(e)))return e;for(;e=Po(i.next.bind(i),a);)if(n(e))return e}return null},sr=function(e,t){for(;e&&e!==t;){if(zx(e))return e;e=e.parentNode}return null},wn=function(e,t,n){return sr(e.container(),n)===sr(t.container(),n)},kf=function(e,t){if(!t)return null;var n=t.container(),r=t.offset();return ep(n)?n.childNodes[r+e]:null},tp=function(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Vx=function(e,t,n){return sr(t,e)===sr(n,e)},np=function(e,t,n){for(var r=e?"previousSibling":"nextSibling";n&&n!==t;){var a=n[r];if(Zm(a)&&(a=a[r]),Ef(a)||Ux(a)){if(Vx(t,a,n))return a;break}if(Hx(a))break;n=n.parentNode}return null},Ci=G(tp,!0),wi=G(tp,!1),xf=function(e,t,n){var r,a=G(np,!0,t),i=G(np,!1,t),o=n.startContainer,u=n.startOffset;if(ca(o)){ep(o)||(o=o.parentNode);var s=o.getAttribute("data-mce-caret");if(s==="before"&&(r=o.nextSibling,Pr(r)))return Ci(r);if(s==="after"&&(r=o.previousSibling,Pr(r)))return wi(r)}if(!n.collapsed)return n;if(Q(o)){if(Zm(o)){if(e===1){if(r=i(o),r)return Ci(r);if(r=a(o),r)return wi(r)}if(e===-1){if(r=a(o),r)return wi(r);if(r=i(o),r)return Ci(r)}return n}if(co(o)&&u>=o.data.length-1)return e===1&&(r=i(o),r)?Ci(r):n;if(lo(o)&&u<=1)return e===-1&&(r=a(o),r)?wi(r):n;if(u===o.data.length)return r=i(o),r?Ci(r):n;if(u===0)return r=a(o),r?wi(r):n}return n},rp=function(e,t){return b.from(kf(e?0:-1,t)).filter(Ef)},Si=function(e,t,n){var r=xf(e,t,n);return e===-1?A.fromRangeStart(r):A.fromRangeEnd(r)},Io=function(e){return b.from(e.getNode()).map(k.fromDom)},Wx=function(e){return b.from(e.getNode(!0)).map(k.fromDom)},Nf=function(e,t){for(;t=e(t);)if(t.isVisible())return t;return t},Lo=function(e,t){var n=wn(e,t);return!n&&$e(e.getNode())?!0:n},Qe;(function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"})(Qe||(Qe={}));var qx=_e,Sn=Q,ap=ae,Tf=$e,Ta=bn,ip=pS,$o=vo,jx=function(e,t){for(var n=[];e&&e!==t;)n.push(e),e=e.parentNode;return n},op=function(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null},up=function(e,t){if(xa(e)){if(Ta(t.previousSibling)&&!Sn(t.previousSibling))return A.before(t);if(Sn(t))return A(t,0)}if(Ir(e)){if(Ta(t.nextSibling)&&!Sn(t.nextSibling))return A.after(t);if(Sn(t))return A(t,t.data.length)}return Ir(e)?Tf(t)?A.before(t):A.after(t):A.before(t)},Kx=function(e,t){var n=t.nextSibling;return n&&Ta(n)?Sn(n)?A(n,0):A.before(n):Af(Qe.Forwards,A.after(t),e)},Af=function(e,t,n){var r,a,i,o;if(!ap(n)||!t)return null;if(t.isEqual(A.after(n))&&n.lastChild){if(o=A.after(n.lastChild),Ir(e)&&Ta(n.lastChild)&&ap(n.lastChild))return Tf(n.lastChild)?A.before(n.lastChild):o}else o=t;var u=o.container(),s=o.offset();if(Sn(u)){if(Ir(e)&&s>0)return A(u,--s);if(xa(e)&&s<u.length)return A(u,++s);r=u}else{if(Ir(e)&&s>0&&(a=op(u,s-1),Ta(a)))return!ip(a)&&(i=Na(a,e,$o,a),i)?Sn(i)?A(i,i.data.length):A.after(i):Sn(a)?A(a,a.data.length):A.before(a);if(xa(e)&&s<u.childNodes.length&&(a=op(u,s),Ta(a)))return Tf(a)?Kx(n,a):!ip(a)&&(i=Na(a,e,$o,a),i)?Sn(i)?A(i,0):A.before(i):Sn(a)?A(a,0):A.after(a);r=a||o.getNode()}if((xa(e)&&o.isAtEnd()||Ir(e)&&o.isAtStart())&&(r=Na(r,e,qe,n,!0),$o(r,n)))return up(e,r);a=Na(r,e,$o,n);var f=Vn(me(jx(u,n),qx));return f&&(!a||!f.contains(a))?(xa(e)?o=A.after(f):o=A.before(f),o):a?up(e,a):null},on=function(e){return{next:function(t){return Af(Qe.Forwards,t,e)},prev:function(t){return Af(Qe.Backwards,t,e)}}},Gx=function(e,t,n){var r=e?A.before(n):A.after(n);return Mt(e,t,r)},Xx=function(e){return $e(e)?A.before(e):A.after(e)},sp=function(e){return A.isTextPosition(e)?e.offset()===0:bn(e.getNode())},fp=function(e){if(A.isTextPosition(e)){var t=e.container();return e.offset()===t.data.length}else return bn(e.getNode(!0))},lp=function(e,t){return!A.isTextPosition(e)&&!A.isTextPosition(t)&&e.getNode()===t.getNode(!0)},Yx=function(e){return!A.isTextPosition(e)&&$e(e.getNode())},Qx=function(e,t,n){return e?!lp(t,n)&&!Yx(t)&&fp(t)&&sp(n):!lp(n,t)&&sp(t)&&fp(n)},Mt=function(e,t,n){var r=on(t);return b.from(e?r.next(n):r.prev(n))},Fo=function(e,t,n){return Mt(e,t,n).bind(function(r){return wn(n,r,t)&&Qx(e,n,r)?Mt(e,t,r):b.some(r)})},cp=function(e,t,n,r){return Fo(e,t,n).bind(function(a){return r(a)?cp(e,t,a,r):b.some(a)})},Aa=function(e,t){var n=e?t.firstChild:t.lastChild;return Q(n)?b.some(A(n,e?0:n.data.length)):n?bn(n)?b.some(e?A.before(n):Xx(n)):Gx(e,t,n):b.none()},un=G(Mt,!0),En=G(Mt,!1),wt=G(Aa,!0),kn=G(Aa,!1),vp="_mce_caret",xn=function(e){return ae(e)&&e.id===vp},Lr=function(e,t){for(;t&&t!==e;){if(t.id===vp)return t;t=t.parentNode}return null},Zx=function(e){return He(e.start)},Jx=function(e){return pe(e,"rng")},e1=function(e){return pe(e,"id")},t1=function(e){return pe(e,"name")},dp=function(e){return _.isArray(e.start)},mp=function(e,t){return ae(t)&&e.isBlock(t)&&!t.innerHTML&&!se.ie&&(t.innerHTML='<br data-mce-bogus="1" />'),t},n1=function(e,t){var n,r=e.createRng();return n=Nm(e.getRoot(),t.start),r.setStart(n.container(),n.offset()),n=Nm(e.getRoot(),t.end),r.setEnd(n.container(),n.offset()),r},r1=function(e,t){var n=e.ownerDocument.createTextNode(nt);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)},a1=function(e){return e.hasChildNodes()===!1},i1=function(e,t){return kn(e).fold(Re,function(n){return t.setStart(n.container(),n.offset()),t.setEnd(n.container(),n.offset()),!0})},pp=function(e,t,n){return a1(t)&&Lr(e,t)?(r1(t,n),!0):!1},hp=function(e,t,n,r){var a=n[t?"start":"end"],i,o,u,s,f=e.getRoot();if(a){for(u=a[0],o=f,i=a.length-1;i>=1;i--){if(s=o.childNodes,pp(f,o,r))return!0;if(a[i]>s.length-1)return pp(f,o,r)?!0:i1(o,r);o=s[a[i]]}o.nodeType===3&&(u=Math.min(a[0],o.nodeValue.length)),o.nodeType===1&&(u=Math.min(a[0],o.childNodes.length)),t?r.setStart(o,u):r.setEnd(o,u)}return!0},Rf=function(e){return Q(e)&&e.data.length>0},gp=function(e,t,n){var r=e.get(n.id+"_"+t),a,i,o,u,s=n.keep,f,l;if(r){if(a=r.parentNode,t==="start"?(s?r.hasChildNodes()?(a=r.firstChild,i=1):Rf(r.nextSibling)?(a=r.nextSibling,i=0):Rf(r.previousSibling)?(a=r.previousSibling,i=r.previousSibling.data.length):(a=r.parentNode,i=e.nodeIndex(r)+1):i=e.nodeIndex(r),f=a,l=i):(s?r.hasChildNodes()?(a=r.firstChild,i=1):Rf(r.previousSibling)?(a=r.previousSibling,i=r.previousSibling.data.length):(a=r.parentNode,i=e.nodeIndex(r)):i=e.nodeIndex(r),f=a,l=i),!s){for(u=r.previousSibling,o=r.nextSibling,_.each(_.grep(r.childNodes),function(c){Q(c)&&(c.nodeValue=c.nodeValue.replace(/\uFEFF/g,""))});r=e.get(n.id+"_"+t);)e.remove(r,!0);u&&o&&u.nodeType===o.nodeType&&Q(u)&&!se.opera&&(i=u.nodeValue.length,u.appendData(o.nodeValue),e.remove(o),f=u,l=i)}return b.some(A(f,l))}else return b.none()},o1=function(e,t){var n=e.createRng();return hp(e,!0,t,n)&&hp(e,!1,t,n)?b.some(n):b.none()},u1=function(e,t){var n=gp(e,"start",t),r=gp(e,"end",t);return Et(n,r.or(n),function(a,i){var o=e.createRng();return o.setStart(mp(e,a.container()),a.offset()),o.setEnd(mp(e,i.container()),i.offset()),o})},s1=function(e,t){return b.from(e.select(t.name)[t.index]).map(function(n){var r=e.createRng();return r.selectNode(n),r})},f1=function(e,t){var n=e.dom;if(t){if(dp(t))return o1(n,t);if(Zx(t))return b.some(n1(n,t));if(e1(t))return u1(n,t);if(t1(t))return s1(n,t);if(Jx(t))return b.some(t.rng)}return b.none()},l1=function(e,t,n){return Tk(e,t,n)},c1=function(e,t){f1(e,t).each(function(n){e.setRng(n)})},Ut=function(e){return ae(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark"},v1=function(e){return function(t){return e===t}},Ei=v1(At),Ra=function(e){return e!==""&&` \f
\r \v`.indexOf(e)!==-1},Bf=function(e){return!Ra(e)&&!Ei(e)},Mo=function(e){return!!e.nodeType},d1=function(e){return e&&/^(IMG)$/.test(e.nodeName)},bp=function(e,t,n){var r=n.startOffset,a=n.startContainer;if(!(a===n.endContainer&&d1(a.childNodes[r]))&&ae(a)){var i=a.childNodes,o=void 0;r<i.length?(a=i[r],o=new Ge(a,e.getParent(a,e.isBlock))):(a=i[i.length-1],o=new Ge(a,e.getParent(a,e.isBlock)),o.next(!0));for(var u=o.current();u;u=o.next())if(Q(u)&&!Of(u)){n.setStart(u,0),t.setRng(n);return}}},_f=function(e,t,n){if(e){var r=t?"nextSibling":"previousSibling";for(e=n?e:e[r];e;e=e[r])if(ae(e)||!Of(e))return e}},Df=function(e,t){return Mo(t)&&(t=t.nodeName),!!e.schema.getTextBlockElements()[t.toLowerCase()]},Ba=function(e,t,n){return e.schema.isValidChild(t,n)},Of=function(e,t){if(t===void 0&&(t=!1),Ne(e)&&Q(e)){var n=t?e.data.replace(/ /g,"\xA0"):e.data;return Nr(n)}else return!1},m1=function(e){return Ne(e)&&Q(e)&&e.length===0},$n=function(e,t){return Oe(e)?e=e(t):Ne(t)&&(e=e.replace(/%(\w+)/g,function(n,r){return t[r]||n})),e},Pf=function(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()},If=function(e,t,n){return(n==="color"||n==="backgroundColor")&&(t=e.toHex(t)),n==="fontWeight"&&t===700&&(t="bold"),n==="fontFamily"&&(t=t.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+t},Uo=function(e,t,n){return If(e,e.getStyle(t,n),n)},yp=function(e,t){var n;return e.getParent(t,function(r){return n=e.getStyle(r,"text-decoration"),n&&n!=="none"}),n},zo=function(e,t,n){return e.getParents(t,n,e.getRoot())},p1=function(e,t){var n=function(r){var a=function(i){return i.length>1&&i.charAt(0)==="%"};return bt(["styles","attributes"],function(i){return je(r,i).exists(function(o){var u=Vt(o)?o:e0(o);return bt(u,a)})})};return bt(e.formatter.get(t),n)},h1=function(e,t,n){var r=["inline","block","selector","attributes","styles","classes"],a=function(i){return Xa(i,function(o,u){return bt(r,function(s){return s===u})})};return bt(e.formatter.get(t),function(i){var o=a(i);return bt(e.formatter.get(n),function(u){var s=a(u);return t0(o,s)})})},Nn=function(e){return ta(e,"block")},Bt=function(e){return ta(e,"selector")},Ze=function(e){return ta(e,"inline")},g1=function(e){return Bt(e)&&Ze(e)&&no(je(e,"mixed"),!0)},Lf=function(e){return Bt(e)&&e.expand!==!1&&!Ze(e)},_a=Ut,Cp=zo,wp=Of,b1=Df,y1=function(e){return $e(e)&&e.getAttribute("data-mce-bogus")&&!e.nextSibling},Sp=function(e,t){for(var n=t;n;){if(ae(n)&&e.getContentEditable(n))return e.getContentEditable(n)==="false"?n:t;n=n.parentNode}return t},Ep=function(e,t,n,r){for(var a=t.data,i=n;e?i>=0:i<a.length;e?i--:i++)if(r(a.charAt(i)))return e?i+1:i;return-1},C1=function(e,t,n){return Ep(e,t,n,function(r){return Ei(r)||Ra(r)})},w1=function(e,t,n){return Ep(e,t,n,Bf)},kp=function(e,t,n,r,a,i){var o,u=e.getParent(n,e.isBlock)||t,s=function(l,c,v){var d=lm(e),m=a?d.backwards:d.forwards;return b.from(m(l,c,function(p,h){return _a(p.parentNode)?-1:(o=p,v(a,p,h))},u))},f=s(n,r,C1);return f.bind(function(l){return i?s(l.container,l.offset+(a?-1:0),w1):b.some(l)}).orThunk(function(){return o?b.some({container:o,offset:a?0:o.length}):b.none()})},xp=function(e,t,n,r,a){Q(r)&&sv(r.data)&&r[a]&&(r=r[a]);for(var i=Cp(e,r),o=0;o<i.length;o++)for(var u=0;u<t.length;u++){var s=t[u];if(!(Ne(s.collapsed)&&s.collapsed!==n.collapsed)&&Bt(s)&&e.is(i[o],s.selector))return i[o]}return r},Np=function(e,t,n,r){var a=n,i=e.dom,o=i.getRoot(),u=t[0];if(Nn(u)&&(a=u.wrapper?null:i.getParent(n,u.block,o)),!a){var s=i.getParent(n,"LI,TD,TH");a=i.getParent(Q(n)?n.parentNode:n,function(f){return f!==o&&b1(e,f)},s)}if(a&&Nn(u)&&u.wrapper&&(a=Cp(i,a,"ul,ol").reverse()[0]||a),!a)for(a=n;a[r]&&!i.isBlock(a[r])&&(a=a[r],!Pf(a,"br")););return a||n},Tp=function(e,t,n,r){var a=n.parentNode;return Ne(n[r])?!1:a===t||vn(a)||e.isBlock(a)?!0:Tp(e,t,a,r)},Ho=function(e,t,n,r,a){var i=n,o=a?"previousSibling":"nextSibling",u=e.getRoot();if(Q(n)&&!wp(n)&&(a?r>0:r<n.data.length))return n;for(;;){if(!t[0].block_expand&&e.isBlock(i))return i;for(var s=i[o];s;s=s[o]){var f=Q(s)&&!Tp(e,u,s,o);if(!_a(s)&&!y1(s)&&!wp(s,f))return i}if(i===u||i.parentNode===u){n=i;break}i=i.parentNode}return n},Ap=function(e){return _a(e.parentNode)||_a(e)},Da=function(e,t,n,r){r===void 0&&(r=!1);var a=t.startContainer,i=t.startOffset,o=t.endContainer,u=t.endOffset,s=e.dom,f=n[0];if(ae(a)&&a.hasChildNodes()&&(a=or(a,i),Q(a)&&(i=0)),ae(o)&&o.hasChildNodes()&&(o=or(o,t.collapsed?u:u-1),Q(o)&&(u=o.nodeValue.length)),a=Sp(s,a),o=Sp(s,o),Ap(a)&&(a=_a(a)?a:a.parentNode,t.collapsed?a=a.previousSibling||a:a=a.nextSibling||a,Q(a)&&(i=t.collapsed?a.length:0)),Ap(o)&&(o=_a(o)?o:o.parentNode,t.collapsed?o=o.nextSibling||o:o=o.previousSibling||o,Q(o)&&(u=t.collapsed?0:o.length)),t.collapsed){var l=kp(s,e.getBody(),a,i,!0,r);l.each(function(v){var d=v.container,m=v.offset;a=d,i=m});var c=kp(s,e.getBody(),o,u,!1,r);c.each(function(v){var d=v.container,m=v.offset;o=d,u=m})}return(Ze(f)||f.block_expand)&&((!Ze(f)||!Q(a)||i===0)&&(a=Ho(s,n,a,i,!0)),(!Ze(f)||!Q(o)||u===o.nodeValue.length)&&(o=Ho(s,n,o,u,!1))),Lf(f)&&(a=xp(s,n,t,a,"previousSibling"),o=xp(s,n,t,o,"nextSibling")),(Nn(f)||Bt(f))&&(a=Np(e,n,a,"previousSibling"),o=Np(e,n,o,"nextSibling"),Nn(f)&&(s.isBlock(a)||(a=Ho(s,n,a,i,!0)),s.isBlock(o)||(o=Ho(s,n,o,u,!1)))),ae(a)&&(i=s.nodeIndex(a),a=a.parentNode),ae(o)&&(u=s.nodeIndex(o)+1,o=o.parentNode),{startContainer:a,startOffset:i,endContainer:o,endOffset:u}},ki=function(e,t,n){var r=t.startOffset,a=or(t.startContainer,r),i=t.endOffset,o=or(t.endContainer,i-1),u=function(p){var h=p[0];Q(h)&&h===a&&r>=h.data.length&&p.splice(0,1);var y=p[p.length-1];return i===0&&p.length>0&&y===o&&Q(y)&&p.splice(p.length-1,1),p},s=function(p,h,y){for(var g=[];p&&p!==y;p=p[h])g.push(p);return g},f=function(p,h){return e.getParent(p,function(y){return y.parentNode===h},h)},l=function(p,h,y){for(var g=y?"nextSibling":"previousSibling",E=p,S=E.parentNode;E&&E!==h;E=S){S=E.parentNode;var C=s(E===p?E:E[g],g);C.length&&(y||C.reverse(),n(u(C)))}};if(a===o)return n(u([a]));var c=e.findCommonAncestor(a,o);if(e.isChildOf(a,o))return l(a,c,!0);if(e.isChildOf(o,a))return l(o,c);var v=f(a,c)||a,d=f(o,c)||o;l(a,v,!0);var m=s(v===a?v:v.nextSibling,"nextSibling",d===o?d.nextSibling:d);m.length&&n(u(m)),l(o,d)},$f=function(e){var t=[];if(e)for(var n=0;n<e.rangeCount;n++)t.push(e.getRangeAt(n));return t},S1=function(e){return Jr(e,function(t){var n=Bo(t);return n?[k.fromDom(n)]:[]})},E1=function(e){return $f(e).length>1},k1=function(e){return me(S1(e),uo)},x1=function(e){return kt(e,"td[data-mce-selected],th[data-mce-selected]")},Rp=function(e,t){var n=x1(t);return n.length>0?n:k1(e)},Oa=function(e){return Rp($f(e.selection.getSel()),k.fromDom(e.getBody()))},xi=function(e,t){return io(e,"table",t)},N1=function(e){var t=e.startContainer,n=e.startOffset;return Q(t)?n===0?b.some(k.fromDom(t)):b.none():b.from(t.childNodes[n]).map(k.fromDom)},T1=function(e){var t=e.endContainer,n=e.endOffset;return Q(t)?n===t.data.length?b.some(k.fromDom(t)):b.none():b.from(t.childNodes[n-1]).map(k.fromDom)},Bp=function(e){return zv(e).fold(X([e]),function(t){return[e].concat(Bp(t))})},Ff=function(e){return hs(e).fold(X([e]),function(t){return Ke(t)==="br"?Er(t).map(function(n){return[e].concat(Ff(n))}).getOr([]):[e].concat(Ff(t))})},Mf=function(e,t){return Et(N1(t),T1(t),function(n,r){var a=et(Bp(e),G(Te,n)),i=et(Ff(e),G(Te,r));return a.isSome()&&i.isSome()}).getOr(!1)},Uf=function(e,t,n,r){var a=n,i=new Ge(n,a),o=Xa(e.schema.getMoveCaretBeforeOnEnterElements(),function(u,s){return!Je(["td","th","table"],s.toLowerCase())});do{if(Q(n)&&_.trim(n.nodeValue).length!==0){r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length);return}if(o[n.nodeName]){r?t.setStartBefore(n):n.nodeName==="BR"?t.setEndBefore(n):t.setEndAfter(n);return}}while(n=r?i.next():i.prev());a.nodeName==="BODY"&&(r?t.setStart(a,0):t.setEnd(a,a.childNodes.length))},Vo=function(e){var t=e.selection.getSel();return t&&t.rangeCount>0},zf=function(e,t){var n=Oa(e);n.length>0?Y(n,function(r){var a=r.dom,i=e.dom.createRng();i.setStartBefore(a),i.setEndAfter(a),t(i,!0)}):t(e.selection.getRng(),!1)},Hf=function(e,t,n){var r=Om(e,t);n(r),e.moveToBookmark(r)},A1=function(e,t){var n=function(i){if(!e(i))throw new Error("Can only get "+t+" value of a "+t+" node");return r(i).getOr("")},r=function(i){return e(i)?b.from(i.dom.nodeValue):b.none()},a=function(i,o){if(!e(i))throw new Error("Can only set raw "+t+" value of a "+t+" node");i.dom.nodeValue=o};return{get:n,getOption:r,set:a}},R1=A1(qt,"text"),Vf=function(e){return R1.get(e)},B1=function(e){return qt(e)&&Vf(e)===nt},_1=function(e,t,n,r){return Jt(t).fold(function(){return"skipping"},function(a){return r==="br"||B1(t)?"valid":KE(t)?"existing":xn(t.dom)?"caret":!Ba(e,n,r)||!Ba(e,Ke(a),n)?"invalid-child":"valid"})},D1=function(e,t){var n=Da(e,t,[{inline:"span"}]);t.setStart(n.startContainer,n.startOffset),t.setEnd(n.endContainer,n.endOffset),e.selection.setRng(t)},_p=function(e,t,n,r){var a=t.uid,i=a===void 0?im("mce-annotation"):a,o=r0(t,["uid"]),u=k.fromTag("span",e);Ao(u,df()),hn(u,""+Ro(),i),hn(u,""+di(),n);var s=r(i,o),f=s.attributes,l=f===void 0?{}:f,c=s.classes,v=c===void 0?[]:c;return qn(u,l),JE(u,v),u},O1=function(e,t,n,r,a){var i=[],o=_p(e.getDoc(),a,n,r),u=Ca(),s=function(){u.clear()},f=function(){return u.get().getOrThunk(function(){var d=wa(o);return i.push(d),u.set(d),d})},l=function(d){Y(d,c)},c=function(d){var m=_1(e,d,"span",Ke(d));switch(m){case"invalid-child":{s();var p=jt(d);l(p),s();break}case"valid":{var h=f();ow(d,h);break}}},v=function(d){var m=De(d,k.fromDom);l(m)};return ki(e.dom,t,function(d){s(),v(d)}),i},P1=function(e,t,n,r){e.undoManager.transact(function(){var a=e.selection,i=a.getRng(),o=Oa(e).length>0;if(i.collapsed&&!o&&D1(e,i),a.getRng().collapsed&&!o){var u=_p(e.getDoc(),r,t,n.decorate);om(u,At),a.getRng().insertNode(u.dom),a.select(u.dom)}else Hf(a,!1,function(){zf(e,function(s){O1(e,s,t,n.decorate,r)})})})},Dp=function(e){var t=ZE();QE(e,t);var n=YE(e);return{register:function(r,a){t.register(r,a)},annotate:function(r,a){t.lookup(r).each(function(i){P1(e,r,i,a)})},annotationChanged:function(r,a){n.addListener(r,a)},remove:function(r){rm(e,b.some(r)).each(function(a){var i=a.elements;Y(i,jv)})},getAll:function(r){var a=XE(e,r);return tv(a,function(i){return De(i,function(o){return o.dom})})}}},Ni=function(e){return{getBookmark:G(l1,e),moveToBookmark:G(c1,e)}};Ni.isBookmarkNode=Ut;var Pa=function(e,t){for(;t&&t!==e;){if(pn(t)||_e(t))return t;t=t.parentNode}return null},Wf=function(e,t,n){if(n.collapsed)return!1;if(se.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(ae(r))return bt(r.getClientRects(),function(a){return dm(a,e,t)})}return bt(n.getClientRects(),function(a){return dm(a,e,t)})},I1=function(e,t){return e.fire("PreProcess",t)},L1=function(e,t){return e.fire("PostProcess",t)},$1=function(e){return e.fire("remove")},F1=function(e){return e.fire("detach")},M1=function(e,t){return e.fire("SwitchMode",{mode:t})},U1=function(e,t,n,r,a){e.fire("ObjectResizeStart",{target:t,width:n,height:r,origin:a})},z1=function(e,t,n,r,a){e.fire("ObjectResized",{target:t,width:n,height:r,origin:a})},H1=function(e){return e.fire("PreInit")},V1=function(e){return e.fire("PostRender")},W1=function(e){return e.fire("Init")},q1=function(e,t){return e.fire("PlaceholderToggle",{state:t})},Op=function(e,t,n){return e.fire(t,n)},Pp=function(e,t,n,r){return e.fire("FormatApply",{format:t,node:n,vars:r})},qf=function(e,t,n,r){return e.fire("FormatRemove",{format:t,node:n,vars:r})},re={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||re.metaKeyPressed(e)},metaKeyPressed:function(e){return se.mac?e.metaKey:e.ctrlKey&&!e.altKey}},j1=_e,Ip=function(e,t){var n="data-mce-selected",r=t.dom,a=_.each,i,o,u,s,f,l,c,v,d,m,p,h,y,g,E,S=t.getDoc(),C=document,x=Math.abs,B=Math.round,L=t.getBody(),ne,q,D={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},ee=function(N){return N&&(N.nodeName==="IMG"||t.dom.is(N,"figure.image"))},U=function(N){return Gt(N)||r.hasClass(N,"mce-preview-object")},W=function(N,$){if(N.type==="longpress"||N.type.indexOf("touch")===0){var I=N.touches[0];return ee(N.target)&&!Wf(I.clientX,I.clientY,$)}else return ee(N.target)&&!Wf(N.clientX,N.clientY,$)},F=function(N){var $=N.target;W(N,t.selection.getRng())&&!N.isDefaultPrevented()&&t.selection.select($)},V=function(N){return r.is(N,"figure.image")?[N.querySelector("img")]:r.hasClass(N,"mce-preview-object")&&Ne(N.firstElementChild)?[N,N.firstElementChild]:[N]},K=function(N){var $=Vm(t);return!$||N.getAttribute("data-mce-resize")==="false"||N===t.getBody()?!1:r.hasClass(N,"mce-preview-object")?ra(k.fromDom(N.firstElementChild),$):ra(k.fromDom(N),$)},O=function(N){return U(N)?r.create("img",{src:se.transparentSrc}):N.cloneNode(!0)},j=function(N,$,I){if(Ne(I)){var J=V(N);Y(J,function(te){te.style[$]||!t.schema.isValid(te.nodeName.toLowerCase(),$)?r.setStyle(te,$,I):r.setAttrib(te,$,""+I)})}},fe=function(N,$,I){j(N,"width",$),j(N,"height",I)},ge=function(N){var $,I,J,te,Ce;$=N.screenX-l,I=N.screenY-c,g=$*s[2]+m,E=I*s[3]+p,g=g<5?5:g,E=E<5?5:E,(ee(i)||U(i))&&nx(t)!==!1?J=!re.modifierPressed(N):J=re.modifierPressed(N),J&&(x($)>x(I)?(E=B(g*h),g=B(E/h)):(g=B(E/h),E=B(g*h))),fe(o,g,E),te=s.startPos.x+$,Ce=s.startPos.y+I,te=te>0?te:0,Ce=Ce>0?Ce:0,r.setStyles(u,{left:te,top:Ce,display:"block"}),u.innerHTML=g+" &times; "+E,s[2]<0&&o.clientWidth<=g&&r.setStyle(o,"left",v+(m-g)),s[3]<0&&o.clientHeight<=E&&r.setStyle(o,"top",d+(p-E)),$=L.scrollWidth-ne,I=L.scrollHeight-q,$+I!==0&&r.setStyles(u,{left:te-$,top:Ce-I}),y||(U1(t,i,m,p,"corner-"+s.name),y=!0)},he=function(){var N=y;y=!1,N&&(j(i,"width",g),j(i,"height",E)),r.unbind(S,"mousemove",ge),r.unbind(S,"mouseup",he),C!==S&&(r.unbind(C,"mousemove",ge),r.unbind(C,"mouseup",he)),r.remove(o),r.remove(u),r.remove(f),We(i),N&&(z1(t,i,g,E,"corner-"+s.name),r.setAttrib(i,"style",r.getAttrib(i,"style"))),t.nodeChanged()},We=function(N){P();var $=r.getPos(N,L),I=$.x,J=$.y,te=N.getBoundingClientRect(),Ce=te.width||te.right-te.left,Fe=te.height||te.bottom-te.top;i!==N&&(Be(),i=N,g=E=0);var Le=t.fire("ObjectSelected",{target:N}),Hn=r.getAttrib(i,n,"1");K(N)&&!Le.isDefaultPrevented()?a(D,function(ct,pt){var Me,Ot=function(ht){var _n=V(i)[0];l=ht.screenX,c=ht.screenY,m=_n.clientWidth,p=_n.clientHeight,h=p/m,s=ct,s.name=pt,s.startPos={x:Ce*ct[0]+I,y:Fe*ct[1]+J},ne=L.scrollWidth,q=L.scrollHeight,f=r.add(L,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),r.setStyles(f,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),o=O(i),r.addClass(o,"mce-clonedresizable"),r.setAttrib(o,"data-mce-bogus","all"),o.contentEditable="false",r.setStyles(o,{left:I,top:J,margin:0}),fe(o,Ce,Fe),o.removeAttribute(n),L.appendChild(o),r.bind(S,"mousemove",ge),r.bind(S,"mouseup",he),C!==S&&(r.bind(C,"mousemove",ge),r.bind(C,"mouseup",he)),u=r.add(L,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},m+" &times; "+p)};Me=r.get("mceResizeHandle"+pt),Me&&r.remove(Me),Me=r.add(L,"div",{id:"mceResizeHandle"+pt,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+pt+"-resize; margin:0; padding:0"}),se.ie===11&&(Me.contentEditable=!1),r.bind(Me,"mousedown",function(ht){ht.stopImmediatePropagation(),ht.preventDefault(),Ot(ht)}),ct.elm=Me,r.setStyles(Me,{left:Ce*ct[0]+I-Me.offsetWidth/2,top:Fe*ct[1]+J-Me.offsetHeight/2})}):Be(),r.getAttrib(i,n)||i.setAttribute(n,Hn)},Be=function(){P(),i&&i.removeAttribute(n),Pe(D,function(N,$){var I=r.get("mceResizeHandle"+$);I&&(r.unbind(I),r.remove(I))})},lt=function(N){var $,I,J=function(te,Ce){if(te)do if(te===Ce)return!0;while(te=te.parentNode)};if(!(y||t.removed)){if(a(r.select("img[data-mce-selected],hr[data-mce-selected]"),function(te){te.removeAttribute(n)}),I=N.type==="mousedown"?N.target:e.getNode(),I=r.$(I).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],J(I,L)&&(z(),$=e.getStart(!0),J($,I)&&J(e.getEnd(!0),I))){We(I);return}Be()}},xt=function(N){return j1(Pa(t.getBody(),N))},P=function(){Pe(D,function(N){N.elm&&(r.unbind(N.elm),delete N.elm)})},z=function(){try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};t.on("init",function(){if(z(),se.browser.isIE()||se.browser.isEdge()){t.on("mousedown click",function(I){var J=I.target,te=J.nodeName;!y&&/^(TABLE|IMG|HR)$/.test(te)&&!xt(J)&&(I.button!==2&&t.selection.select(J,te==="TABLE"),I.type==="mousedown"&&t.nodeChanged())});var N=function(I){var J=function(te){ot.setEditorTimeout(t,function(){return t.selection.select(te)})};if(xt(I.target)||Gt(I.target)){I.preventDefault(),J(I.target);return}/^(TABLE|IMG|HR)$/.test(I.target.nodeName)&&(I.preventDefault(),I.target.tagName==="IMG"&&J(I.target))};r.bind(L,"mscontrolselect",N),t.on("remove",function(){return r.unbind(L,"mscontrolselect",N)})}var $=ot.throttle(function(I){t.composing||lt(I)});t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",$),t.on("keyup compositionend",function(I){i&&i.nodeName==="TABLE"&&$(I)}),t.on("hide blur",Be),t.on("contextmenu longpress",F,!0)}),t.on("remove",P);var Z=function(){i=o=f=null};return{isResizable:K,showResizeRect:We,hideResizeRect:Be,updateResizeRect:lt,destroy:Z}},K1=function(e){return pn(e)||_e(e)},G1=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},X1=function(e,t,n){var r,a=n.elementFromPoint(e,t),i=n.body.createTextRange();if((!a||a.tagName==="HTML")&&(a=n.body),i.moveToElementText(a),r=_.toArray(i.getClientRects()),r=r.sort(function(o,u){return o=Math.abs(Math.max(o.top-t,o.bottom-t)),u=Math.abs(Math.max(u.top-t,u.bottom-t)),o-u}),r.length>0){t=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(e,t),i.collapse(!0),i}catch{}}return null},Y1=function(e,t){var n=e&&e.parentElement?e.parentElement():null;return _e(G1(n,t,K1))?null:e},jf=function(e,t,n){var r,a,i=n;if(i.caretPositionFromPoint)a=i.caretPositionFromPoint(e,t),a&&(r=n.createRange(),r.setStart(a.offsetNode,a.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(e,t);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch{r=X1(e,t,n)}return Y1(r,n.body)}return r},Kf=function(e,t){return e&&t&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},Q1=function(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null},Lp=function(e,t,n){return Q1(e,t,n)!==null},Z1=function(e,t,n){return Lp(e,t,function(r){return r.nodeName===n})},Gf=function(e){return e&&e.nodeName==="TABLE"},J1=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},eN=function(e,t){return Lt(e)&&Lp(e,t,xn)===!1},$p=function(e,t,n){for(var r=new Ge(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());t=r[n?"prev":"next"]();)if($e(t))return!0},tN=function(e,t){return e.previousSibling&&e.previousSibling.nodeName===t},nN=function(e,t){for(;t&&t!==e;){if(_e(t))return!0;t=t.parentNode}return!1},Xf=function(e,t,n,r,a){var i,o=e.getRoot(),u,s=e.schema.getNonEmptyElements(),f=e.getParent(a.parentNode,e.isBlock)||o;if(r&&$e(a)&&t&&e.isEmpty(f))return b.some(A(a.parentNode,e.nodeIndex(a)));for(var l=new Ge(a,f);u=l[r?"prev":"next"]();){if(e.getContentEditableParent(u)==="false"||eN(u,o))return b.none();if(Q(u)&&u.nodeValue.length>0)return Z1(u,o,"A")===!1?b.some(A(u,r?u.nodeValue.length:0)):b.none();if(e.isBlock(u)||s[u.nodeName.toLowerCase()])return b.none();i=u}return n&&i?b.some(A(i,0)):b.none()},Fp=function(e,t,n,r){var a,i,o=e.getRoot(),u,s,f=!1;a=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var l=ae(a)&&i===a.childNodes.length,c=e.schema.getNonEmptyElements();if(s=n,Lt(a))return b.none();if(ae(a)&&i>a.childNodes.length-1&&(s=!1),Ss(a)&&(a=o,i=0),a===o){if(s&&(u=a.childNodes[i>0?i-1:0],u&&(Lt(u)||c[u.nodeName]||Gf(u))))return b.none();if(a.hasChildNodes()){if(i=Math.min(!s&&i>0?i-1:i,a.childNodes.length-1),a=a.childNodes[i],i=Q(a)&&l?a.data.length:0,!t&&a===o.lastChild&&Gf(a)||nN(o,a)||Lt(a))return b.none();if(a.hasChildNodes()&&Gf(a)===!1){u=a;var v=new Ge(a,o);do{if(_e(u)||Lt(u)){f=!1;break}if(Q(u)&&u.nodeValue.length>0){i=s?0:u.nodeValue.length,a=u,f=!0;break}if(c[u.nodeName.toLowerCase()]&&!J1(u)){i=e.nodeIndex(u),a=u.parentNode,s||i++,f=!0;break}}while(u=s?v.next():v.prev())}}}return t&&(Q(a)&&i===0&&Xf(e,l,t,!0,a).each(function(d){a=d.container(),i=d.offset(),f=!0}),ae(a)&&(u=a.childNodes[i],u||(u=a.childNodes[i-1]),u&&$e(u)&&!tN(u,"A")&&!$p(e,u,!1)&&!$p(e,u,!0)&&Xf(e,l,t,!0,u).each(function(d){a=d.container(),i=d.offset(),f=!0}))),s&&!t&&Q(a)&&i===a.nodeValue.length&&Xf(e,l,t,!1,a).each(function(d){a=d.container(),i=d.offset(),f=!0}),f?b.some(A(a,i)):b.none()},Wo=function(e,t){var n=t.collapsed,r=t.cloneRange(),a=A.fromRangeStart(t);return Fp(e,n,!0,r).each(function(i){(!n||!A.isAbove(a,i))&&r.setStart(i.container(),i.offset())}),n||Fp(e,n,!1,r).each(function(i){r.setEnd(i.container(),i.offset())}),n&&r.collapse(!0),Kf(t,r)?b.none():b.some(r)},qo=function(e,t){return e.splitText(t)},jo=function(e){var t=e.startContainer,n=e.startOffset,r=e.endContainer,a=e.endOffset;return t===r&&Q(t)?n>0&&n<t.nodeValue.length&&(r=qo(t,n),t=r.previousSibling,a>n?(a=a-n,t=r=qo(r,a).previousSibling,a=r.nodeValue.length,n=0):a=0):(Q(t)&&n>0&&n<t.nodeValue.length&&(t=qo(t,n),n=0),Q(r)&&a>0&&a<r.nodeValue.length&&(r=qo(r,a).previousSibling,a=r.nodeValue.length)),{startContainer:t,startOffset:n,endContainer:r,endOffset:a}},Ti=function(e){var t=function(a,i){return ki(e,a,i)},n=jo,r=function(a){return Wo(e,a).fold(Re,function(i){return a.setStart(i.startContainer,i.startOffset),a.setEnd(i.endContainer,i.endOffset),!0})};return{walk:t,split:n,normalize:r}};Ti.compareRanges=Kf,Ti.getCaretRangeFromPoint=jf,Ti.getSelectedNode=Bo,Ti.getNode=or;var rN=function(e,t){var n=function(u,s){if(!Zr(s)&&!s.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+s);var f=u.dom;ro(f)&&(f.style[e]=s+"px")},r=function(u){var s=t(u);if(s<=0||s===null){var f=Pn(u,e);return parseFloat(f)||0}return s},a=r,i=function(u,s){return Qt(s,function(f,l){var c=Pn(u,l),v=c===void 0?0:parseInt(c,10);return isNaN(v)?f:f+v},0)},o=function(u,s,f){var l=i(u,f),c=s>l?s-l:0;return c};return{set:n,get:r,getOuter:a,aggregate:i,max:o}},aN=rN("height",function(e){var t=e.dom;return ti(e)?t.getBoundingClientRect().height:t.offsetHeight}),iN=function(e){return aN.get(e)},Mp=function(e,t){var n=e.view(t);return n.fold(X([]),function(r){var a=e.owner(r),i=Mp(e,a);return[r].concat(i)})},oN=function(e,t){var n=t.owner(e);return Mp(t,n)},uN=function(e){var t,n=e.dom===document?b.none():b.from((t=e.dom.defaultView)===null||t===void 0?void 0:t.frameElement);return n.map(k.fromDom)},sN=function(e){return aa(e)},fN=Object.freeze({__proto__:null,view:uN,owner:sN}),lN=function(e){var t=k.fromDom(document),n=Cs(t),r=oN(e,fN),a=ys(e),i=Qc(r,function(o,u){var s=ys(u);return{left:o.left+s.left,top:o.top+s.top}},{left:0,top:0});return ia(i.left+a.left+n.left,i.top+a.top+n.top)},Yf=function(e){return Ke(e)==="textarea"},cN=function(e,t){var n=e.fire("ScrollIntoView",t);return n.isDefaultPrevented()},vN=function(e,t){e.fire("AfterScrollIntoView",t)},dN=function(e,t){var n=jt(e);if(n.length===0||Yf(e))return{element:e,offset:t};if(t<n.length&&!Yf(n[t]))return{element:n[t],offset:0};var r=n[n.length-1];return Yf(r)?{element:e,offset:t}:Ke(r)==="img"?{element:r,offset:1}:qt(r)?{element:r,offset:Vf(r).length}:{element:r,offset:jt(r).length}},Up=function(e,t){var n=fw(e),r=iN(e);return{element:e,bottom:n.top+r,height:r,pos:n,cleanup:t}},mN=function(e,t){var n=dN(e,t),r=k.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+nt+"</span>");return en(n.element,r),Up(r,function(){return tt(r)})},pN=function(e){return Up(k.fromDom(e),ve)},zp=function(e,t,n,r){gN(e,function(a,i){return hN(e,t,n,r)},n)},Hp=function(e,t,n,r,a){var i={elm:r.element.dom,alignToTop:a};if(!cN(e,i)){var o=Cs(t).top;n(t,o,r,a),vN(e,i)}},hN=function(e,t,n,r){var a=k.fromDom(e.getBody()),i=k.fromDom(e.getDoc());Sw(a);var o=mN(k.fromDom(n.startContainer),n.startOffset);Hp(e,i,t,o,r),o.cleanup()},Vp=function(e,t,n,r){var a=k.fromDom(e.getDoc());Hp(e,a,n,pN(t),r)},gN=function(e,t,n){var r=n.startContainer,a=n.startOffset,i=n.endContainer,o=n.endOffset;t(k.fromDom(r),k.fromDom(i));var u=e.dom.createRng();u.setStart(r,a),u.setEnd(i,o),e.selection.setRng(n)},Qf=function(e,t,n,r){var a=e.pos;if(n)Gv(a.left,a.top,r);else{var i=a.top-t+e.height;Gv(a.left,i,r)}},Wp=function(e,t,n,r,a){var i=n+t,o=r.pos.top,u=r.bottom,s=u-o>=n;if(o<t)Qf(r,n,a!==!1,e);else if(o>i){var f=s?a!==!1:a===!0;Qf(r,n,f,e)}else u>i&&!s&&Qf(r,n,a===!0,e)},qp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;Wp(e,t,a,n,r)},jp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;Wp(e,t,a,n,r);var i=lN(n.element),o=Qv(window);i.top<o.y?Xv(n.element,r!==!1):i.top>o.bottom&&Xv(n.element,r===!0)},bN=function(e,t,n){return zp(e,qp,t,n)},yN=function(e,t,n){return Vp(e,t,qp,n)},CN=function(e,t,n){return zp(e,jp,t,n)},wN=function(e,t,n){return Vp(e,t,jp,n)},SN=function(e,t,n){var r=e.inline?yN:wN;r(e,t,n)},Ai=function(e,t,n){var r=e.inline?bN:CN;r(e,t,n)},EN=function(){return k.fromDom(document)},kN=function(e){return e.dom.focus()},Kp=function(e){var t=kr(e).dom;return e.dom===t.activeElement},Zf=function(e){return e===void 0&&(e=EN()),b.from(e.dom.activeElement).map(k.fromDom)},xN=function(e){return Zf(kr(e)).filter(function(t){return e.dom.contains(t.dom)})},NN=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},TN={create:NN},Jf=Kn.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),AN=function(e,t,n,r){return e.fold(t,n,r)},RN=function(e){return e.fold(Tt,Tt,Tt)},BN=Jf.before,_N=Jf.on,DN=Jf.after,ON={before:BN,on:_N,after:DN,cata:AN,getStart:RN},Ko=Kn.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),PN=function(e){return Ko.exact(e.start,e.soffset,e.finish,e.foffset)},IN=function(e){return e.match({domRange:function(t){return k.fromDom(t.startContainer)},relative:function(t,n){return ON.getStart(t)},exact:function(t,n,r,a){return t}})},LN=Ko.domRange,$N=Ko.relative,FN=Ko.exact,MN=function(e){var t=IN(e);return Fv(t)},UN=TN.create,Gp={domRange:LN,relative:$N,exact:FN,exactFromRange:PN,getWin:MN,range:UN},zN=Wt().browser,Xp=function(e,t){var n=qt(t)?Vf(t).length:jt(t).length+1;return e>n?n:e<0?0:e},HN=function(e){return Gp.range(e.start,Xp(e.soffset,e.start),e.finish,Xp(e.foffset,e.finish))},Yp=function(e,t){return!Ji(t.dom)&&(Wn(e,t)||Te(e,t))},el=function(e){return function(t){return Yp(e,t.start)&&Yp(e,t.finish)}},Qp=function(e){return e.inline===!0||zN.isIE()},Zp=function(e){return Gp.range(k.fromDom(e.startContainer),e.startOffset,k.fromDom(e.endContainer),e.endOffset)},VN=function(e){var t=e.getSelection(),n=!t||t.rangeCount===0?b.none():b.from(t.getRangeAt(0));return n.map(Zp)},WN=function(e){var t=Fv(e);return VN(t.dom).filter(el(e))},qN=function(e,t){return b.from(t).filter(el(e)).map(HN)},jN=function(e){var t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),b.some(t)}catch{return b.none()}},Go=function(e){var t=Qp(e)?WN(k.fromDom(e.getBody())):b.none();e.bookmark=t.isSome()?t:e.bookmark},KN=function(e,t){var n=k.fromDom(e.getBody()),r=Qp(e)?b.from(t):b.none(),a=r.map(Zp).filter(el(n));e.bookmark=a.isSome()?a:e.bookmark},tl=function(e){var t=e.bookmark?e.bookmark:b.none();return t.bind(function(n){return qN(k.fromDom(e.getBody()),n)}).bind(jN)},GN=function(e){tl(e).each(function(t){return e.selection.setRng(t)})},XN=function(e){var t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1},Jp={isEditorUIElement:XN},YN=function(e){return e.type==="nodechange"&&e.selectionChange},QN=function(e,t){var n=function(){t.throttle()};xe.DOM.bind(document,"mouseup",n),e.on("remove",function(){xe.DOM.unbind(document,"mouseup",n)})},ZN=function(e){e.on("focusout",function(){Go(e)})},JN=function(e,t){e.on("mouseup touchend",function(n){t.throttle()})},eT=function(e,t){var n=Wt().browser;n.isIE()?ZN(e):JN(e,t),e.on("keyup NodeChange",function(r){YN(r)||Go(e)})},tT=function(e){var t=cf(function(){Go(e)},0);e.on("init",function(){e.inline&&QN(e,t),eT(e,t)}),e.on("remove",function(){t.cancel()})},Ri,nl=xe.DOM,nT=function(e){return Jp.isEditorUIElement(e)},rT=function(e){var t=e.classList;return t!==void 0?t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"):!1},Xo=function(e,t){var n=fx(e),r=nl.getParent(t,function(a){return nT(a)||(n?e.dom.is(a,n):!1)});return r!==null},aT=function(e){try{var t=kr(k.fromDom(e.getElement()));return Zf(t).fold(function(){return document.body},function(n){return n.dom})}catch{return document.body}},iT=function(e,t){var n=t.editor;tT(n),n.on("focusin",function(){var r=e.focusedEditor;r!==n&&(r&&r.fire("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.fire("focus",{blurredEditor:r}),n.focus(!0))}),n.on("focusout",function(){ot.setEditorTimeout(n,function(){var r=e.focusedEditor;!Xo(n,aT(n))&&r===n&&(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Ri||(Ri=function(r){var a=e.activeEditor;a&&aw(r).each(function(i){i.ownerDocument===document&&i!==document.body&&!Xo(a,i)&&e.focusedEditor===a&&(a.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})},nl.bind(document,"focusin",Ri))},oT=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(nl.unbind(document,"focusin",Ri),Ri=null)},uT=function(e){e.on("AddEditor",G(iT,e)),e.on("RemoveEditor",G(oT,e))},sT=function(e,t){return e.dom.getParent(t,function(n){return e.dom.getContentEditable(n)==="true"})},fT=function(e){return e.collapsed?b.from(or(e.startContainer,e.startOffset)).map(k.fromDom):b.none()},lT=function(e,t){return fT(t).bind(function(n){return Qw(n)?b.some(n):Wn(e,n)===!1?b.some(e):b.none()})},eh=function(e,t){lT(k.fromDom(e.getBody()),t).bind(function(n){return wt(n.dom)}).fold(function(){e.selection.normalize()},function(n){return e.selection.setRng(n.toRange())})},rl=function(e){if(e.setActive)try{e.setActive()}catch{e.focus()}else e.focus()},cT=function(e){return Kp(e)||xN(e).isSome()},vT=function(e){return e.iframeElement&&Kp(k.fromDom(e.iframeElement))},dT=function(e){var t=e.getBody();return t&&cT(k.fromDom(t))},mT=function(e){var t=kr(k.fromDom(e.getElement()));return Zf(t).filter(function(n){return!rT(n.dom)&&Xo(e,n.dom)}).isSome()},$r=function(e){return e.inline?dT(e):vT(e)},pT=function(e){return $r(e)||mT(e)},hT=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),e.bookmark!==void 0&&$r(e)===!1&&tl(e).each(function(i){e.selection.setRng(i),r=i});var a=sT(e,t.getNode());if(e.$.contains(n,a)){rl(a),eh(e,r),al(e);return}e.inline||(se.opera||rl(n),e.getWin().focus()),(se.gecko||e.inline)&&(rl(n),eh(e,r)),al(e)},al=function(e){return e.editorManager.setActive(e)},gT=function(e,t){e.removed||(t?al(e):hT(e))},th=function(e,t,n,r,a){var i=n?t.startContainer:t.endContainer,o=n?t.startOffset:t.endOffset;return b.from(i).map(k.fromDom).map(function(u){return!r||!t.collapsed?Yi(u,a(u,o)).getOr(u):u}).bind(function(u){return Zt(u)?b.some(u):Jt(u).filter(Zt)}).map(function(u){return u.dom}).getOr(e)},nh=function(e,t,n){return th(e,t,!0,n,function(r,a){return Math.min(Hv(r),a)})},rh=function(e,t,n){return th(e,t,!1,n,function(r,a){return a>0?a-1:a})},ah=function(e,t){for(var n=e;e&&Q(e)&&e.length===0;)e=t?e.nextSibling:e.previousSibling;return e||n},bT=function(e,t){var n,r,a;if(!t)return e;r=t.startContainer,a=t.endContainer;var i=t.startOffset,o=t.endOffset;return n=t.commonAncestorContainer,!t.collapsed&&(r===a&&o-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),r.nodeType===3&&a.nodeType===3&&(r.length===i?r=ah(r.nextSibling,!0):r=r.parentNode,o===0?a=ah(a.previousSibling,!1):a=a.parentNode,r&&r===a))?r:n&&n.nodeType===3?n.parentNode:n},yT=function(e,t,n,r){var a,i=[],o=e.getRoot();if(n=e.getParent(n||nh(o,t,t.collapsed),e.isBlock),r=e.getParent(r||rh(o,t,t.collapsed),e.isBlock),n&&n!==o&&i.push(n),n&&r&&n!==r){a=n;for(var u=new Ge(n,o);(a=u.next())&&a!==r;)e.isBlock(a)&&i.push(a)}return r&&n!==r&&r!==o&&i.push(r),i},CT=function(e,t,n){return b.from(t).map(function(r){var a=e.nodeIndex(r),i=e.createRng();return i.setStart(r.parentNode,a),i.setEnd(r.parentNode,a+1),n&&(Uf(e,i,r,!0),Uf(e,i,r,!1)),i})},il=function(e,t){return De(t,function(n){var r=e.fire("GetSelectionRange",{range:n});return r.range!==n?r.range:n})},wT={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Yo=function(e,t,n){var r=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[a];if(i)return i;for(var o=e.parent;o&&o!==t;o=o.parent)if(i=o[a],i)return i}},ST=function(e){if(!Nr(e.value))return!1;var t=e.parent;return!(t&&(t.name!=="span"||t.attr("style"))&&/^[ ]+$/.test(e.value))},ih=function(e){var t=e.name==="a"&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},Xt=function(){function e(t,n){this.name=t,this.type=n,n===1&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var r=new e(t,wT[t]||1);return n&&Pe(n,function(a,i){r.attr(i,a)}),r},e.prototype.replace=function(t){var n=this;return t.parent&&t.remove(),n.insert(t,n),n.remove(),n},e.prototype.attr=function(t,n){var r=this,a;if(typeof t!="string")return t!=null&&Pe(t,function(o,u){r.attr(u,o)}),r;if(a=r.attributes){if(n!==void 0){if(n===null){if(t in a.map){delete a.map[t];for(var i=a.length;i--;)if(a[i].name===t)return a.splice(i,1),r}return r}if(t in a.map){for(var i=a.length;i--;)if(a[i].name===t){a[i].value=n;break}}else a.push({name:t,value:n});return a.map[t]=n,r}return a.map[t]}},e.prototype.clone=function(){var t=this,n=new e(t.name,t.type),r;if(r=t.attributes){var a=[];a.map={};for(var i=0,o=r.length;i<o;i++){var u=r[i];u.name!=="id"&&(a[a.length]={name:u.name,value:u.value},a.map[u.name]=u.value)}n.attributes=a}return n.value=t.value,n.shortEnded=t.shortEnded,n},e.prototype.wrap=function(t){var n=this;return n.parent.insert(t,n),t.append(n),n},e.prototype.unwrap=function(){for(var t=this,n=t.firstChild;n;){var r=n.next;t.insert(n,t,!0),n=r}t.remove()},e.prototype.remove=function(){var t=this,n=t.parent,r=t.next,a=t.prev;return n&&(n.firstChild===t?(n.firstChild=r,r&&(r.prev=null)):a.next=r,n.lastChild===t?(n.lastChild=a,a&&(a.next=null)):r.prev=a,t.parent=t.next=t.prev=null),t},e.prototype.append=function(t){var n=this;t.parent&&t.remove();var r=n.lastChild;return r?(r.next=t,t.prev=r,n.lastChild=t):n.lastChild=n.firstChild=t,t.parent=n,t},e.prototype.insert=function(t,n,r){t.parent&&t.remove();var a=n.parent||this;return r?(n===a.firstChild?a.firstChild=t:n.prev.next=t,t.prev=n.prev,t.next=n,n.prev=t):(n===a.lastChild?a.lastChild=t:n.next.prev=t,t.next=n.next,t.prev=n,n.next=t),t.parent=a,t},e.prototype.getAll=function(t){for(var n=this,r=[],a=n.firstChild;a;a=Yo(a,n))a.name===t&&r.push(a);return r},e.prototype.children=function(){for(var t=this,n=[],r=t.firstChild;r;r=r.next)n.push(r);return n},e.prototype.empty=function(){var t=this;if(t.firstChild){for(var n=[],r=t.firstChild;r;r=Yo(r,t))n.push(r);for(var a=n.length;a--;){var r=n[a];r.parent=r.firstChild=r.lastChild=r.next=r.prev=null}}return t.firstChild=t.lastChild=null,t},e.prototype.isEmpty=function(t,n,r){n===void 0&&(n={});var a=this,i=a.firstChild;if(ih(a))return!1;if(i)do{if(i.type===1){if(i.attr("data-mce-bogus"))continue;if(t[i.name]||ih(i))return!1}if(i.type===8||i.type===3&&!ST(i)||i.type===3&&i.parent&&n[i.parent.name]&&Nr(i.value)||r&&r(i))return!1}while(i=Yo(i,a));return!0},e.prototype.walk=function(t){return Yo(this,null,t)},e}(),ET=function(e){for(var t=/data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi,n=[],r={},a=im("img"),i,o=0,u=0;i=t.exec(e);){var s=i[0],f=a+"_"+u++;r[f]=s,o<i.index&&n.push(e.substr(o,i.index-o)),n.push(f),o=i.index+s.length}var l=new RegExp(a+"_[0-9]+","g");return o===0?{prefix:a,uris:r,html:e,re:l}:(o<e.length&&n.push(e.substr(o)),{prefix:a,uris:r,html:n.join(""),re:l})},ol=function(e,t){return e.replace(t.re,function(n){return je(t.uris,n).getOr(n)})},kT=function(e){var t=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(e);return t?b.some({type:t[1],data:decodeURIComponent(t[2])}):b.none()},oh=_.each,xT=_.trim,NT="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),TT={ftp:21,http:80,https:443,mailto:25},AT=["img","video"],RT=function(e,t){return Ne(e)?!e:Ne(t)?!Je(AT,t):!0},BT=function(e,t,n){return e.allow_html_data_urls?!1:/^data:image\//i.test(t)?RT(e.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(t):/^data:/i.test(t)},fr=function(){function e(t,n){t=xT(t),this.settings=n||{};var r=this.settings.base_uri,a=this;if(/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)){a.source=t;return}var i=t.indexOf("//")===0;if(t.indexOf("/")===0&&!i&&(t=(r&&r.protocol||"http")+"://mce_host"+t),!/^[\w\-]*:?\/\//.test(t)){var o=this.settings.base_uri?this.settings.base_uri.path:new e(document.location.href).directory;if(this.settings.base_uri&&this.settings.base_uri.protocol=="")t="//mce_host"+a.toAbsPath(o,t);else{var u=/([^#?]*)([#?]?.*)/.exec(t);t=(r&&r.protocol||"http")+"://mce_host"+a.toAbsPath(o,u[1])+u[2]}}t=t.replace(/@@/g,"(mce_at)");var s=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t);oh(NT,function(f,l){var c=s[l];c&&(c=c.replace(/\(mce_at\)/g,"@@")),a[f]=c}),r&&(a.protocol||(a.protocol=r.protocol),a.userInfo||(a.userInfo=r.userInfo),!a.port&&a.host==="mce_host"&&(a.port=r.port),(!a.host||a.host==="mce_host")&&(a.host=r.host),a.source=""),i&&(a.protocol="")}return e.parseDataUri=function(t){var n,r=decodeURIComponent(t).split(","),a=/data:([^;]+)/.exec(r[0]);return a&&(n=a[1]),{type:n,data:r[1]}},e.isDomSafe=function(t,n,r){if(r===void 0&&(r={}),r.allow_script_urls)return!0;var a=Yn.decode(t).replace(/[\s\u0000-\u001F]+/g,"");try{a=decodeURIComponent(a)}catch{a=unescape(a)}return/((java|vb)script|mhtml):/i.test(a)?!1:!BT(r,a,n)},e.getDocumentBaseUrl=function(t){var n;return t.protocol.indexOf("http")!==0&&t.protocol!=="file:"?n=t.href:n=t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/")),n},e.prototype.setPath=function(t){var n=/^(.*?)\/?(\w+)?$/.exec(t);this.path=n[0],this.directory=n[1],this.file=n[2],this.source="",this.getURI()},e.prototype.toRelative=function(t){var n;if(t==="./")return t;var r=new e(t,{base_uri:this});if(r.host!=="mce_host"&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&r.protocol!=="")return r.getURI();var a=this.getURI(),i=r.getURI();return a===i||a.charAt(a.length-1)==="/"&&a.substr(0,a.length-1)===i?a:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},e.prototype.toAbsolute=function(t,n){var r=new e(t,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},e.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var n=TT[this.protocol];if(n&&(this.port||n)==(t.port||n))return!0}return!1},e.prototype.toRelPath=function(t,n){var r=0,a="",i,o,u=t.substring(0,t.lastIndexOf("/")).split("/"),s=n.split("/");if(u.length>=s.length){for(i=0,o=u.length;i<o;i++)if(i>=s.length||u[i]!==s[i]){r=i+1;break}}if(u.length<s.length){for(i=0,o=s.length;i<o;i++)if(i>=u.length||u[i]!==s[i]){r=i+1;break}}if(r===1)return n;for(i=0,o=u.length-(r-1);i<o;i++)a+="../";for(i=r-1,o=s.length;i<o;i++)i!==r-1?a+="/"+s[i]:a+=s[i];return a},e.prototype.toAbsPath=function(t,n){var r,a=0,i=[],o,u=/\/$/.test(n)?"/":"",s=t.split("/"),f=n.split("/");for(oh(s,function(l){l&&i.push(l)}),s=i,r=f.length-1,i=[];r>=0;r--)if(!(f[r].length===0||f[r]===".")){if(f[r]===".."){a++;continue}if(a>0){a--;continue}i.push(f[r])}return r=s.length-a,r<=0?o=ji(i).join("/"):o=s.slice(0,r).join("/")+"/"+ji(i).join("/"),o.indexOf("/")!==0&&(o="/"+o),u&&o.lastIndexOf("/")!==o.length-1&&(o+=u),o},e.prototype.getURI=function(t){t===void 0&&(t=!1);var n;return(!this.source||t)&&(n="",t||(this.protocol?n+=this.protocol+"://":n+="//",this.userInfo&&(n+=this.userInfo+"@"),this.host&&(n+=this.host),this.port&&(n+=":"+this.port)),this.path&&(n+=this.path),this.query&&(n+="?"+this.query),this.anchor&&(n+="#"+this.anchor),this.source=n),this.source},e}(),_T=_.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),DT=function(e){return e.indexOf("data-")===0||e.indexOf("aria-")===0},OT=fs(function(){return document.implementation.createHTMLDocument("parser")}),ul=function(e,t,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,a=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=e.getShortEndedElements(),o=1,u=n;o!==0;)for(r.lastIndex=u;;){var s=r.exec(t);if(s===null)return u;if(s[1]==="!"){Sr(s[2],"--")?u=sl(t,!1,s.index+3):u=sl(t,!0,s.index+1);break}else{a.lastIndex=r.lastIndex;var f=a.exec(t);if(Ka(f)||f.index!==r.lastIndex)continue;s[1]==="/"?o-=1:pe(i,s[2])||(o+=1),u=r.lastIndex+f[0].length;break}}return u},PT=function(e,t){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t))},sl=function(e,t,n){n===void 0&&(n=0);var r=e.toLowerCase();if(r.indexOf("[if ",n)!==-1&&PT(r,n)){var a=r.indexOf("[endif]",n);return r.indexOf(">",a)}else if(t){var i=r.indexOf(">",n);return i!==-1?i:r.length}else{var o=/--!?>/g;o.lastIndex=n;var u=o.exec(e);return u?u.index+u[0].length:r.length}},IT=function(e,t){var n=e.exec(t);if(n){var r=n[1],a=n[2];return typeof r=="string"&&r.toLowerCase()==="data-mce-bogus"?a:null}else return null},Qo=function(e,t){t===void 0&&(t=Zn()),e=e||{};var n=OT(),r=n.createElement("form");e.fix_self_closing!==!1&&(e.fix_self_closing=!0);var a=e.comment?e.comment:ve,i=e.cdata?e.cdata:ve,o=e.text?e.text:ve,u=e.start?e.start:ve,s=e.end?e.end:ve,f=e.pi?e.pi:ve,l=e.doctype?e.doctype:ve,c=function(d,m){m===void 0&&(m="html");for(var p=d.html,h,y=0,g,E,S=[],C,x,B,L,ne,q,D,ee,U,W,F,V,K,O,j,fe,ge,he=0,We=Yn.decode,Be=_.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),lt=m==="html"?0:1,xt=function(Se){var Ee,Ue;for(Ee=S.length;Ee--&&S[Ee].name!==Se;);if(Ee>=0){for(Ue=S.length-1;Ue>=Ee;Ue--)Se=S[Ue],Se.valid&&s(Se.name);S.length=Ee}},P=function(Se,Ee){return o(ol(Se,d),Ee)},z=function(Se){Se!==""&&(Se.charAt(0)===">"&&(Se=" "+Se),!e.allow_conditional_comments&&Se.substr(0,3).toLowerCase()==="[if"&&(Se=" "+Se),a(ol(Se,d)))},Z=function(Se){return ol(Se,d)},N=function(Se,Ee){var Ue=Se||"",fn=!Sr(Ue,"--"),ln=sl(p,fn,Ee);return Se=p.substr(Ee,ln-Ee),z(fn?Ue+Se:Se),ln+1},$=function(Se,Ee,Ue,fn,ln){if(Ee=Ee.toLowerCase(),Ue=Z(Ee in Fe?Ee:We(Ue||fn||ln||"")),Le&&!ne&&DT(Ee)===!1){var cn=F[Ee];if(!cn&&V){for(var gr=V.length;gr--&&(cn=V[gr],!cn.pattern.test(Ee)););gr===-1&&(cn=null)}if(!cn||cn.validValues&&!(Ue in cn.validValues))return}var Hc=Ee==="name"||Ee==="id";Hc&&Se in _T&&(Ue in n||Ue in r)||Be[Ee]&&!fr.isDomSafe(Ue,Se,e)||ne&&(Ee in Be||Ee.indexOf("on")===0)||(C.map[Ee]=Ue,C.push({name:Ee,value:Ue}))},I=new RegExp(`<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\\s*|\\/)>))`,"g"),J=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,te=t.getShortEndedElements(),Ce=e.self_closing_elements||t.getSelfClosingElements(),Fe=t.getBoolAttrs(),Le=e.validate,Hn=e.remove_internals,ct=e.fix_self_closing,pt=t.getSpecialElements(),Me=p+">";h=I.exec(Me);){var Ot=h[0];if(y<h.index&&P(We(p.substr(y,h.index-y))),g=h[7])g=g.toLowerCase(),g.charAt(0)===":"&&(g=g.substr(1)),xt(g);else if(g=h[8]){if(h.index+Ot.length>p.length){P(We(p.substr(h.index))),y=h.index+Ot.length;continue}g=g.toLowerCase(),g.charAt(0)===":"&&(g=g.substr(1)),q=g in te,ct&&Ce[g]&&S.length>0&&S[S.length-1].name===g&&xt(g);var ht=IT(J,h[9]);if(ht!==null){if(ht==="all"){y=ul(t,p,I.lastIndex),I.lastIndex=y;continue}ee=!1}if(!Le||(D=t.getElementRule(g))){if(ee=!0,Le&&(F=D.attributes,V=D.attributePatterns),(W=h[9])?(ne=W.indexOf("data-mce-type")!==-1,ne&&Hn&&(ee=!1),C=[],C.map={},W.replace(J,function(Se,Ee,Ue,fn,ln){return $(g,Ee,Ue,fn,ln),""})):(C=[],C.map={}),Le&&!ne){if(K=D.attributesRequired,O=D.attributesDefault,j=D.attributesForced,fe=D.removeEmptyAttrs,fe&&!C.length&&(ee=!1),j)for(x=j.length;x--;)U=j[x],L=U.name,ge=U.value,ge==="{$uid}"&&(ge="mce_"+he++),C.map[L]=ge,C.push({name:L,value:ge});if(O)for(x=O.length;x--;)U=O[x],L=U.name,L in C.map||(ge=U.value,ge==="{$uid}"&&(ge="mce_"+he++),C.map[L]=ge,C.push({name:L,value:ge}));if(K){for(x=K.length;x--&&!(K[x]in C.map););x===-1&&(ee=!1)}if(U=C.map["data-mce-bogus"]){if(U==="all"){y=ul(t,p,I.lastIndex),I.lastIndex=y;continue}ee=!1}}ee&&u(g,C,q)}else ee=!1;if(E=pt[g]){E.lastIndex=y=h.index+Ot.length,(h=E.exec(p))?(ee&&(B=p.substr(y,h.index-y)),y=h.index+h[0].length):(B=p.substr(y),y=p.length),ee&&(B.length>0&&P(B,!0),s(g)),I.lastIndex=y;continue}q||(!W||W.indexOf("/")!==W.length-1?S.push({name:g,valid:ee}):ee&&s(g))}else if(g=h[1])z(g);else if(g=h[2]){var _n=lt===1||e.preserve_cdata||S.length>0&&t.isValidChild(S[S.length-1].name,"#cdata");if(_n)i(g);else{y=N("",h.index+2),I.lastIndex=y;continue}}else if(g=h[3])l(g);else if((g=h[4])||Ot==="<!"){y=N(g,h.index+Ot.length),I.lastIndex=y;continue}else if(g=h[5])if(lt===1)f(g,h[6]);else{y=N("?",h.index+2),I.lastIndex=y;continue}y=h.index+Ot.length}for(y<p.length&&P(We(p.substr(y))),x=S.length-1;x>=0;x--)g=S[x],g.valid&&s(g.name)},v=function(d,m){m===void 0&&(m="html"),c(ET(d),m)};return{parse:v}};Qo.findEndTag=ul;var LT=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")},uh=function(e,t){for(var n=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r=e.schema,a=LT(e.getTempAttrs(),t),i=r.getShortEndedElements(),o;o=n.exec(a);){var u=n.lastIndex,s=o[0].length,f=void 0;i[o[1]]?f=u:f=Qo.findEndTag(r,a,u),a=a.substring(0,u-s)+a.substring(f),n.lastIndex=u-s}return Xn(a)},$T=uh,FT=function(e,t){var n=ft(e),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s|\xA0|<br \\/>|)<\\/"+n+`>[\r
]*|<br \\/>[\r
]*)$`);return t.replace(r,"")},MT=function(e,t){return ie(ie({},e),{format:t,get:!0,getInner:!0})},UT=function(e,t,n,r){var a=MT(t,n),i=t.no_events?a:e.fire("BeforeGetContent",a),o;return i.format==="raw"?o=_.trim($T(e.serializer,r.innerHTML)):i.format==="text"?o=e.dom.isEmpty(r)?"":Xn(r.innerText||r.textContent):i.format==="tree"?o=e.serializer.serialize(r,i):o=FT(e,e.serializer.serialize(r,i)),!Je(["text","tree"],i.format)&&!so(k.fromDom(r))?i.content=_.trim(o):i.content=o,i.no_events?i.content:e.fire("GetContent",i).content},zT=function(e,t,n){return b.from(e.getBody()).fold(X(t.format==="tree"?new Xt("body",11):""),function(r){return UT(e,t,n,r)})},HT=_.each,sh=function(e){var t=function(n,r){if(n.nodeName!==r.nodeName)return!1;var a=function(o){var u={};return HT(e.getAttribs(o),function(s){var f=s.nodeName.toLowerCase();f.indexOf("_")!==0&&f!=="style"&&f.indexOf("data-")!==0&&(u[f]=e.getAttrib(o,f))}),u},i=function(o,u){var s,f;for(f in o)if(pe(o,f)){if(s=u[f],typeof s=="undefined"||o[f]!==s)return!1;delete u[f]}for(f in u)if(pe(u,f))return!1;return!0};return!i(a(n),a(r))||!i(e.parseStyle(e.getAttrib(n,"style")),e.parseStyle(e.getAttrib(r,"style")))?!1:!Ut(n)&&!Ut(r)};return{compare:t}},fh=_.makeMap,lh=function(e){var t=[];e=e||{};var n=e.indent,r=fh(e.indent_before||""),a=fh(e.indent_after||""),i=Yn.getEncodeFunc(e.entity_encoding||"raw",e.entities),o=e.element_format==="html";return{start:function(u,s,f){var l,c,v,d;if(n&&r[u]&&t.length>0&&(d=t[t.length-1],d.length>0&&d!==`
`&&t.push(`
`)),t.push("<",u),s)for(l=0,c=s.length;l<c;l++)v=s[l],t.push(" ",v.name,'="',i(v.value,!0),'"');!f||o?t[t.length]=">":t[t.length]=" />",f&&n&&a[u]&&t.length>0&&(d=t[t.length-1],d.length>0&&d!==`
`&&t.push(`
`))},end:function(u){var s;t.push("</",u,">"),n&&a[u]&&t.length>0&&(s=t[t.length-1],s.length>0&&s!==`
`&&t.push(`
`))},text:function(u,s){u.length>0&&(t[t.length]=s?u:i(u))},cdata:function(u){t.push("<![CDATA[",u,"]]>")},comment:function(u){t.push("<!--",u,"-->")},pi:function(u,s){s?t.push("<?",u," ",i(s),"?>"):t.push("<?",u,"?>"),n&&t.push(`
`)},doctype:function(u){t.push("<!DOCTYPE",u,">",n?`
`:"")},reset:function(){t.length=0},getContent:function(){return t.join("").replace(/\n$/,"")}}},Ia=function(e,t){t===void 0&&(t=Zn());var n=lh(e);e=e||{},e.validate="validate"in e?e.validate:!0;var r=function(a){var i=e.validate,o={3:function(s){n.text(s.value,s.raw)},8:function(s){n.comment(s.value)},7:function(s){n.pi(s.name,s.value)},10:function(s){n.doctype(s.value)},4:function(s){n.cdata(s.value)},11:function(s){if(s=s.firstChild)do u(s);while(s=s.next)}};n.reset();var u=function(s){var f=o[s.type];if(f)f(s);else{var l=s.name,c=s.shortEnded,v=s.attributes;if(i&&v&&v.length>1){var d=[];d.map={};var m=t.getElementRule(s.name);if(m){for(var p=0,h=m.attributesOrder.length;p<h;p++){var y=m.attributesOrder[p];if(y in v.map){var g=v.map[y];d.map[y]=g,d.push({name:y,value:g})}}for(var p=0,h=v.length;p<h;p++){var y=v[p].name;if(!(y in d.map)){var g=v.map[y];d.map[y]=g,d.push({name:y,value:g})}}v=d}}if(n.start(s.name,v,c),!c){if(s=s.firstChild)do u(s);while(s=s.next);n.end(l)}}};return a.type===1&&!e.inner?u(a):o[11](a),n.getContent()};return{serialize:r}},ch=new Set;(function(){var e=["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"];Y(e,function(t){ch.add(t)})})();var vh=["font","text-decoration","text-emphasis"],fl=function(e,t){return ea(e.parseStyle(e.getAttrib(t,"style")))},VT=function(e){return ch.has(e)},WT=function(e,t){return Ga(fl(e,t),function(n){return!VT(n)})},qT=function(e){return me(e,function(t){return bt(vh,function(n){return Sr(t,n)})})},jT=function(e,t,n){var r=fl(e,t),a=fl(e,n),i=function(o){var u=e.getStyle(t,o),s=e.getStyle(n,o);return Gi(u)&&Gi(s)&&u!==s};return bt(r,function(o){var u=function(f){return bt(f,function(l){return l===o})};if(!u(a)&&u(vh)){var s=qT(a);return bt(s,i)}else return i(o)})},dh=function(e,t,n){return b.from(n.container()).filter(Q).exists(function(r){var a=e?0:-1;return t(r.data.charAt(n.offset()+a))})},ll=G(dh,!0,Ra),cl=G(dh,!1,Ra),KT=function(e){var t=e.container();return Q(t)&&(t.data.length===0||fo(t.data)&&Ni.isBookmarkNode(t.parentNode))},lr=function(e,t){return function(n){return b.from(kf(e?0:-1,n)).filter(t).isSome()}},mh=function(e){return mw(e)&&Pn(k.fromDom(e),"display")==="block"},ph=function(e){return _e(e)&&!vw(e)},GT=lr(!0,mh),XT=lr(!1,mh),La=lr(!0,Gt),$a=lr(!1,Gt),hh=lr(!0,oa),gh=lr(!1,oa),cr=lr(!0,ph),vr=lr(!1,ph),YT=function(e){for(var t=[],n=e.dom;n;)t.push(k.fromDom(n)),n=n.lastChild;return t},QT=function(e){var t=kt(e,"br"),n=me(YT(e).slice(-1),fa);t.length===n.length&&Y(n,tt)},Fr=function(e){bs(e),at(e,k.fromHtml('<br data-mce-bogus="1">'))},ZT=function(e){hs(e).each(function(t){Er(t).each(function(n){gn(e)&&fa(t)&&gn(n)&&tt(t)})})},JT=function(e){return e.slice(0,-1)},eA=function(e,t,n){return Wn(t,e)?JT(Z0(e,function(r){return n(r)||Te(r,t)})):[]},bh=function(e,t){return eA(e,t,Re)},Fn=function(e,t){return[e].concat(bh(e,t))},vl=function(e,t,n){return cp(e,t,n,KT)},yh=function(e,t){return et(Fn(k.fromDom(t.container()),e),gn)},Ch=function(e,t,n){return vl(e,t.dom,n).forall(function(r){return yh(t,n).fold(function(){return wn(r,n,t.dom)===!1},function(a){return wn(r,n,t.dom)===!1&&Wn(a,k.fromDom(r.container()))})})},wh=function(e,t,n){return yh(t,n).fold(function(){return vl(e,t.dom,n).forall(function(r){return wn(r,n,t.dom)===!1})},function(r){return vl(e,r.dom,n).isNone()})},dl=G(wh,!1),Sh=G(wh,!0),tA=G(Ch,!1),nA=G(Ch,!0),rA=function(e){return Io(e).exists(fa)},Zo=function(e,t,n){var r=me(Fn(k.fromDom(n.container()),t),gn),a=Pt(r).getOr(t);return Mt(e,a.dom,n).filter(rA)},ml=function(e,t){return Io(t).exists(fa)||Zo(!0,e,t).isSome()},pl=function(e,t){return Wx(t).exists(fa)||Zo(!1,e,t).isSome()},aA=G(Zo,!1),iA=G(Zo,!0),Eh=function(e){return A.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd()},kh=function(e,t){var n=me(Fn(k.fromDom(t.container()),e),gn);return Pt(n).getOr(e)},xh=function(e,t){return Eh(t)?cl(t):cl(t)||En(kh(e,t).dom,t).exists(cl)},Nh=function(e,t){return Eh(t)?ll(t):ll(t)||un(kh(e,t).dom,t).exists(ll)},oA=function(e){return Je(["pre","pre-wrap"],e)},hl=function(e){return Io(e).bind(function(t){return ao(t,Zt)}).exists(function(t){return oA(Pn(t,"white-space"))})},uA=function(e,t){return En(e.dom,t).isNone()},sA=function(e,t){return un(e.dom,t).isNone()},fA=function(e,t){return uA(e,t)||sA(e,t)||dl(e,t)||Sh(e,t)||pl(e,t)||ml(e,t)},lA=function(e,t){return hl(t)?!1:fA(e,t)||xh(e,t)||Nh(e,t)},Jo=function(e,t){return hl(t)?!1:dl(e,t)||tA(e,t)||pl(e,t)||xh(e,t)},cA=function(e){var t=e.container(),n=e.offset();return Q(t)&&n<t.data.length?A(t,n+1):e},eu=function(e,t){return hl(t)?!1:Sh(e,t)||nA(e,t)||ml(e,t)||Nh(e,t)},Th=function(e,t){return Jo(e,t)||eu(e,cA(t))},Ah=function(e,t){return Ei(e.charAt(t))},vA=function(e){var t=e.container();return Q(t)&&yt(t.data,At)},dA=function(e){var t=e.split("");return De(t,function(n,r){return Ei(n)&&r>0&&r<t.length-1&&Bf(t[r-1])&&Bf(t[r+1])?" ":n}).join("")},mA=function(e,t){var n=t.data,r=A(t,0);return Ah(n,0)&&!Th(e,r)?(t.data=" "+n.slice(1),!0):!1},pA=function(e){var t=e.data,n=dA(t);return n!==t?(e.data=n,!0):!1},hA=function(e,t){var n=t.data,r=A(t,n.length-1);return Ah(n,n.length-1)&&!Th(e,r)?(t.data=n.slice(0,-1)+" ",!0):!1},gA=function(e,t){return b.some(t).filter(vA).bind(function(n){var r=n.container(),a=mA(e,r)||pA(r)||hA(e,r);return a?b.some(n):b.none()})},Rh=function(e){var t=k.fromDom(e.getBody());e.selection.isCollapsed()&&gA(t,A.fromRangeStart(e.selection.getRng())).each(function(n){e.selection.setRng(n.toRange())})},bA=function(e,t,n){var r=Qt(e,function(a,i){return Ra(i)||Ei(i)?a.previousCharIsSpace||a.str===""&&t||a.str.length===e.length-1&&n?{previousCharIsSpace:!1,str:a.str+At}:{previousCharIsSpace:!0,str:a.str+" "}:{previousCharIsSpace:!1,str:a.str+i}},{previousCharIsSpace:!1,str:""});return r.str},Bh=function(e,t,n){if(n!==0){var r=k.fromDom(e),a=ii(r,gn).getOr(r),i=e.data.slice(t,t+n),o=t+n>=e.data.length&&eu(a,A(e,e.data.length)),u=t===0&&Jo(a,A(e,0));e.replaceData(t,n,bA(i,u,o))}},tu=function(e,t){var n=e.data.slice(t),r=n.length-m0(n).length;Bh(e,t,r)},gl=function(e,t){var n=e.data.slice(0,t),r=n.length-uv(n).length;Bh(e,t-r,r)},bl=function(e,t,n,r){r===void 0&&(r=!0);var a=uv(e.data).length,i=r?e:t,o=r?t:e;return r?i.appendData(o.data):i.insertData(0,o.data),tt(k.fromDom(o)),n&&tu(i,a),i},yA=function(e,t){var n=e.container(),r=e.offset();return A.isTextPosition(e)===!1&&n===t.parentNode&&r>A.before(t).offset()},CA=function(e,t){return yA(t,e)?A(t.container(),t.offset()-1):t},wA=function(e){return Q(e)?A(e,0):A.before(e)},SA=function(e){return Q(e)?A(e,e.data.length):A.after(e)},_h=function(e){return bn(e.previousSibling)?b.some(SA(e.previousSibling)):e.previousSibling?kn(e.previousSibling):b.none()},Dh=function(e){return bn(e.nextSibling)?b.some(wA(e.nextSibling)):e.nextSibling?wt(e.nextSibling):b.none()},EA=function(e,t){var n=A.before(t.previousSibling?t.previousSibling:t.parentNode);return En(e,n).fold(function(){return un(e,A.after(t))},b.some)},kA=function(e,t){return un(e,A.after(t)).fold(function(){return En(e,A.before(t))},b.some)},xA=function(e,t){return _h(t).orThunk(function(){return Dh(t)}).orThunk(function(){return EA(e,t)})},NA=function(e,t){return Dh(t).orThunk(function(){return _h(t)}).orThunk(function(){return kA(e,t)})},TA=function(e,t,n){return e?NA(t,n):xA(t,n)},AA=function(e,t,n){return TA(e,t,n).map(G(CA,n))},Oh=function(e,t,n){n.fold(function(){e.focus()},function(r){e.selection.setRng(r.toRange(),t)})},RA=function(e){return function(t){return t.dom===e}},BA=function(e,t){return t&&pe(e.schema.getBlockElements(),Ke(t))},_A=function(e){if(Xe(e)){var t=k.fromHtml('<br data-mce-bogus="1">');return bs(e),at(e,t),b.some(A.before(t.dom))}else return b.none()},DA=function(e,t,n){var r=Er(e).filter(qt),a=Ja(e).filter(qt);return tt(e),hw(r,a,t,function(i,o,u){var s=i.dom,f=o.dom,l=s.data.length;return bl(s,f,n),u.container()===f?A(s,l):u}).orThunk(function(){return n&&(r.each(function(i){return gl(i.dom,i.dom.length)}),a.each(function(i){return tu(i.dom,0)})),t})},OA=function(e,t){return pe(e.schema.getTextInlineElements(),Ke(t))},Mr=function(e,t,n,r){r===void 0&&(r=!0);var a=AA(t,e.getBody(),n.dom),i=ii(n,G(BA,e),RA(e.getBody())),o=DA(n,a,OA(e,n));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):i.bind(_A).fold(function(){r&&Oh(e,t,o)},function(u){r&&Oh(e,t,b.some(u))})},PA=function(e){return function(t){return Te(e,t)}},yl=function(e){return kt(e,"td,th")},IA=function(e,t){var n=function(f){return xi(k.fromDom(f),t)},r=n(e.startContainer),a=n(e.endContainer),i=r.isSome(),o=a.isSome(),u=Et(r,a,Te).getOr(!1),s=!u&&i&&o;return{startTable:r,endTable:a,isStartInTable:i,isEndInTable:o,isSameTable:u,isMultiTable:s}},Cl=function(e,t){return{start:e,end:t}},LA=function(e,t,n){return{rng:e,table:t,cells:n}},Bi=Kn.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),nu=function(e,t){return Ts(k.fromDom(e),"td,th",t)},Ph=function(e){return!Te(e.start,e.end)},Ih=function(e,t){return xi(e.start,t).bind(function(n){return xi(e.end,t).bind(function(r){return gw(Te(n,r),n)})})},FA=function(e,t){return!Ph(e)&&Ih(e,t).exists(function(n){var r=n.dom.rows;return r.length===1&&r[0].cells.length===1})},MA=function(e,t){var n=nu(e.startContainer,t),r=nu(e.endContainer,t);return Et(n,r,Cl)},UA=function(e){return function(t){return xi(t,e).bind(function(n){return wr(yl(n)).map(function(r){return Cl(t,r)})})}},zA=function(e){return function(t){return xi(t,e).bind(function(n){return Pt(yl(n)).map(function(r){return Cl(r,t)})})}},wl=function(e){return function(t){return Ih(t,e).map(function(n){return LA(t,n,yl(n))})}},Lh=function(e,t,n,r){if(n.collapsed||!e.forall(Ph))return b.none();if(t.isSameTable){var a=e.bind(wl(r));return b.some({start:a,end:a})}else{var i=nu(n.startContainer,r),o=nu(n.endContainer,r),u=i.bind(UA(r)).bind(wl(r)),s=o.bind(zA(r)).bind(wl(r));return b.some({start:u,end:s})}},$h=function(e,t){return qi(e,function(n){return Te(n,t)})},Sl=function(e){return Et($h(e.cells,e.rng.start),$h(e.cells,e.rng.end),function(t,n){return e.cells.slice(t,n+1)})},HA=function(e,t,n){return e.exists(function(r){return FA(r,n)&&Mf(r.start,t)})},Fh=function(e,t){var n=t.startTable,r=t.endTable,a=e.cloneRange();return n.each(function(i){return a.setStartAfter(i.dom)}),r.each(function(i){return a.setEndBefore(i.dom)}),a},VA=function(e,t,n,r){return Lh(e,t,n,r).bind(function(a){var i=a.start,o=a.end;return i.or(o)}).bind(function(a){var i=t.isSameTable,o=Sl(a).getOr([]);if(i&&a.cells.length===o.length)return b.some(Bi.fullTable(a.table));if(o.length>0){if(i)return b.some(Bi.partialTable(o,b.none()));var u=Fh(n,t);return b.some(Bi.partialTable(o,b.some(ie(ie({},t),{rng:u}))))}else return b.none()})},WA=function(e,t,n,r){return Lh(e,t,n,r).bind(function(a){var i=a.start,o=a.end,u=i.bind(Sl).getOr([]),s=o.bind(Sl).getOr([]);if(u.length>0&&s.length>0){var f=Fh(n,t);return b.some(Bi.multiTable(u,s,f))}else return b.none()})},qA=function(e,t){var n=PA(e),r=MA(t,n),a=IA(t,n);return HA(r,t,n)?r.map(function(i){return Bi.singleCellTable(t,i.start)}):a.isMultiTable?WA(r,a,t,n):VA(r,a,t,n)},Mh=function(e){var t=K0(e)?Er(e):hs(e);return t.bind(Mh).orThunk(function(){return b.some(e)})},Uh=function(e){return Y(e,function(t){jn(t,"contenteditable"),Fr(t)})},jA=function(e,t){return b.from(e.dom.getParent(t,e.dom.isBlock)).map(k.fromDom)},KA=function(e,t,n){n.each(function(r){t?tt(r):(Fr(r),e.selection.setCursorLocation(r.dom,0))})},El=function(e,t,n,r){var a=n.cloneRange();r?(a.setStart(n.startContainer,n.startOffset),a.setEndAfter(t.dom.lastChild)):(a.setStartBefore(t.dom.firstChild),a.setEnd(n.endContainer,n.endOffset)),kl(e,a,t,!1)},zh=function(e){var t=Oa(e),n=k.fromDom(e.selection.getNode());to(n.dom)&&Xe(n)?e.selection.setCursorLocation(n.dom,0):e.selection.collapse(!0),t.length>1&&bt(t,function(r){return Te(r,n)})&&hn(n,"data-mce-selected","1")},Hh=function(e,t,n){var r=e.selection.getRng(),a=n.bind(function(i){var o=i.rng,u=i.isStartInTable,s=jA(e,u?o.endContainer:o.startContainer);o.deleteContents(),KA(e,u,s.filter(Xe));var f=u?t[0]:t[t.length-1];return El(e,f,r,u),Xe(f)?b.none():b.some(u?t.slice(1):t.slice(0,-1))}).getOr(t);return Uh(a),zh(e),!0},GA=function(e,t,n,r){var a=e.selection.getRng(),i=t[0],o=n[n.length-1];El(e,i,a,!0),El(e,o,a,!1);var u=Xe(i)?t:t.slice(1),s=Xe(o)?n:n.slice(0,-1);return Uh(u.concat(s)),r.deleteContents(),zh(e),!0},kl=function(e,t,n,r){r===void 0&&(r=!0),t.deleteContents();var a=Mh(n).getOr(n),i=k.fromDom(e.dom.getParent(a.dom,e.dom.isBlock));if(Xe(i)&&(Fr(i),r&&e.selection.setCursorLocation(i.dom,0)),!Te(n,i)){var o=no(Jt(i),n)?[]:J0(i);Y(o.concat(jt(n)),function(u){!Te(u,i)&&!Wn(u,i)&&Xe(u)&&tt(u)})}return!0},XA=function(e,t){return Mr(e,!1,t),!0},YA=function(e,t,n){return qA(t,n).map(function(r){return r.fold(G(kl,e),G(XA,e),G(Hh,e),G(GA,e))})},QA=function(e,t){return ru(e,t)},ZA=function(e,t,n,r){return xl(t,r).fold(function(){return YA(e,t,n)},function(a){return QA(e,a)}).getOr(!1)},JA=function(e,t,n){var r=k.fromDom(e.getBody()),a=e.selection.getRng();return n.length!==0?Hh(e,n,b.none()):ZA(e,r,a,t)},Vh=function(e,t){return et(Fn(t,e),uo)},xl=function(e,t){return et(Fn(t,e),Y0("caption"))},eR=function(e,t,n,r,a){return Fo(n,e.getBody(),a).bind(function(i){return Vh(t,k.fromDom(i.getNode())).map(function(o){return Te(o,r)===!1})})},ru=function(e,t){return Fr(t),e.selection.setCursorLocation(t.dom,0),b.some(!0)},tR=function(e,t,n,r){return wt(e.dom).bind(function(a){return kn(e.dom).map(function(i){return t?n.isEqual(a)&&r.isEqual(i):n.isEqual(i)&&r.isEqual(a)})}).getOr(!0)},nR=function(e,t){return ru(e,t)},rR=function(e,t,n){return xl(e,k.fromDom(n.getNode())).map(function(r){return Te(r,t)===!1})},aR=function(e,t,n,r,a){return Fo(n,e.getBody(),a).bind(function(i){return tR(r,n,a,i)?nR(e,r):rR(t,r,i)}).or(b.some(!0))},iR=function(e,t,n,r){var a=A.fromRangeStart(e.selection.getRng());return Vh(n,r).bind(function(i){return Xe(i)?ru(e,i):eR(e,n,t,i,a)}).getOr(!1)},oR=function(e,t,n,r){var a=A.fromRangeStart(e.selection.getRng());return Xe(r)?ru(e,r):aR(e,n,t,r,a)},Wh=function(e,t){return e?hh(t):gh(t)},uR=function(e,t){var n=A.fromRangeStart(e.selection.getRng());return Wh(t,n)||Mt(t,e.getBody(),n).exists(function(r){return Wh(t,r)})},sR=function(e,t,n){var r=k.fromDom(e.getBody());return xl(r,n).fold(function(){return iR(e,t,r,n)||uR(e,t)},function(a){return oR(e,t,r,a).getOr(!1)})},au=function(e,t){var n=k.fromDom(e.selection.getStart(!0)),r=Oa(e);return e.selection.isCollapsed()&&r.length===0?sR(e,t,n):JA(e,n,r)},fR=function(e,t,n,r){var a=document.createRange();return a.setStart(e,t),a.setEnd(n,r),a},lR=function(e){var t=A.fromRangeStart(e),n=A.fromRangeEnd(e),r=e.commonAncestorContainer;return Mt(!1,r,n).map(function(a){return!wn(t,n,r)&&wn(t,a,r)?fR(t.container(),t.offset(),a.container(),a.offset()):e}).getOr(e)},Nl=function(e){return e.collapsed?e:lR(e)},cR=function(e){return e.firstChild&&e.firstChild===e.lastChild},vR=function(e){return e.name==="br"||e.value===At},dR=function(e,t){var n=e.getBlockElements();return n[t.name]&&cR(t)&&vR(t.firstChild)},mR=function(e,t){var n=e.getNonEmptyElements();return t&&(t.isEmpty(n)||dR(e,t))},pR=function(e,t){var n=t.firstChild,r=t.lastChild;return n&&n.name==="meta"&&(n=n.next),r&&r.attr("id")==="mce_marker"&&(r=r.prev),mR(e,r)&&(r=r.prev),!n||n!==r?!1:n.name==="ul"||n.name==="ol"},hR=function(e){var t=e.firstChild,n=e.lastChild;return t&&t.nodeName==="META"&&t.parentNode.removeChild(t),n&&n.id==="mce_marker"&&n.parentNode.removeChild(n),e},gR=function(e,t,n){var r=t.serialize(n),a=e.createFragment(r);return hR(a)},bR=function(e){return me(e.childNodes,function(t){return t.nodeName==="LI"})},yR=function(e){return e.data===At||$e(e)},CR=function(e){return e&&e.firstChild&&e.firstChild===e.lastChild&&yR(e.firstChild)},wR=function(e){return!e.firstChild||CR(e)},SR=function(e){return e.length>0&&wR(e[e.length-1])?e.slice(0,-1):e},Tl=function(e,t){var n=e.getParent(t,e.isBlock);return n&&n.nodeName==="LI"?n:null},ER=function(e,t){return!!Tl(e,t)},kR=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]},xR=function(e,t){var n=A.before(e),r=on(t),a=r.next(n);return a?a.toRange():null},qh=function(e,t){var n=A.after(e),r=on(t),a=r.prev(n);return a?a.toRange():null},NR=function(e,t,n,r){var a=kR(e,r),i=e.parentNode;return i.insertBefore(a[0],e),_.each(t,function(o){i.insertBefore(o,e)}),i.insertBefore(a[1],e),i.removeChild(e),qh(t[t.length-1],n)},TR=function(e,t,n){var r=e.parentNode;return _.each(t,function(a){r.insertBefore(a,e)}),xR(e,n)},AR=function(e,t,n,r){return r.insertAfter(t.reverse(),e),qh(t[0],n)},RR=function(e,t,n,r){var a=gR(t,e,r),i=Tl(t,n.startContainer),o=SR(bR(a.firstChild)),u=1,s=2,f=t.getRoot(),l=function(c){var v=A.fromRangeStart(n),d=on(t.getRoot()),m=c===u?d.prev(v):d.next(v);return m?Tl(t,m.getNode())!==i:!0};return l(u)?TR(i,o,f):l(s)?AR(i,o,f,t):NR(i,o,f,n)},BR=function(e,t,n){var r=k.fromDom(e.getRoot());return Jo(r,A.fromRangeStart(t))?n=n.replace(/^ /,"&nbsp;"):n=n.replace(/^&nbsp;/," "),eu(r,A.fromRangeEnd(t))?n=n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n=n.replace(/&nbsp;(<br( \/)?>)?$/," "),n},Al=to,_R=function(e,t,n){if(n!==null){var r=e.getParent(t.endContainer,Al);return n===r&&Mf(k.fromDom(n),t)}else return!1},DR=function(e,t,n){if(n.getAttribute("data-mce-bogus")==="all")n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,a=n.lastChild;!r||r===a&&r.nodeName==="BR"?e.dom.setHTML(n,t):e.selection.setContent(t)}},OR=function(e,t){b.from(e.getParent(t,"td,th")).map(k.fromDom).each(ZT)},PR=function(e,t){var n=e.schema.getTextInlineElements(),r=e.dom;if(t){var a=e.getBody(),i=sh(r);_.each(r.select("*[data-mce-fragment]"),function(o){var u=Ne(n[o.nodeName.toLowerCase()]);if(u&&WT(r,o))for(var s=o.parentNode;Ne(s)&&s!==a;s=s.parentNode){var f=jT(r,o,s);if(f)break;if(i.compare(s,o)){r.remove(o,!0);break}}})}},IR=function(e){for(var t=e;t=t.walk();)t.type===1&&t.attr("data-mce-fragment","1")},LR=function(e){_.each(e.getElementsByTagName("*"),function(t){t.removeAttribute("data-mce-fragment")})},$R=function(e){return!!e.getAttribute("data-mce-fragment")},FR=function(e,t){return t&&!e.schema.getShortEndedElements()[t.nodeName]},MR=function(e,t){var n,r=e.dom,a=e.selection;if(!!t){a.scrollIntoView(t);var i=Pa(e.getBody(),t);if(r.getContentEditable(i)==="false"){r.remove(t),a.select(i);return}var o=r.createRng(),u=t.previousSibling;if(Q(u)){if(o.setStart(u,u.nodeValue.length),!se.ie){var s=t.nextSibling;Q(s)&&(u.appendData(s.data),s.parentNode.removeChild(s))}}else o.setStartBefore(t),o.setEndBefore(t);var f=function(c){var v=A.fromRangeStart(c),d=on(e.getBody());if(v=d.next(v),v)return v.toRange()},l=r.getParent(t,r.isBlock);r.remove(t),l&&r.isEmpty(l)&&(e.$(l).empty(),o.setStart(l,0),o.setEnd(l,0),!Al(l)&&!$R(l)&&(n=f(o))?(o=n,r.remove(l)):r.add(l,r.create("br",{"data-mce-bogus":"1"}))),a.setRng(o)}},UR=function(e){var t=e.dom,n=Nl(e.selection.getRng());e.selection.setRng(n);var r=t.getParent(n.startContainer,Al);_R(t,n,r)?kl(e,n,k.fromDom(r)):e.getDoc().execCommand("Delete",!1,null)},zR=function(e,t,n){var r,a,i,o=e.selection,u=e.dom;/^ | $/.test(t)&&(t=BR(u,o.getRng(),t));var s=e.parser,f=n.merge,l=Ia({validate:ix(e)},e.schema),c='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',v=e.fire("BeforeSetContent",{content:t,format:"html",selection:!0,paste:n.paste});if(v.isDefaultPrevented()){e.fire("SetContent",{content:v.content,format:"html",selection:!0,paste:n.paste});return}t=v.content,t.indexOf("{$caret}")===-1&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,c),a=o.getRng();var d=a.startContainer||(a.parentElement?a.parentElement():null),m=e.getBody();d===m&&o.isCollapsed()&&u.isBlock(m.firstChild)&&FR(e,m.firstChild)&&u.isEmpty(m.firstChild)&&(a=u.createRng(),a.setStart(m.firstChild,0),a.setEnd(m.firstChild,0),o.setRng(a)),o.isCollapsed()||UR(e),r=o.getNode();var p={context:r.nodeName.toLowerCase(),data:n.data,insert:!0},h=s.parse(t,p);if(n.paste===!0&&pR(e.schema,h)&&ER(u,r)){a=RR(l,u,o.getRng(),h),o.setRng(a),e.fire("SetContent",v);return}if(IR(h),i=h.lastChild,i.attr("id")==="mce_marker"){var y=i;for(i=i.prev;i;i=i.walk(!0))if(i.type===3||!u.isBlock(i.name)){e.schema.isValidChild(i.parent.name,"span")&&i.parent.insert(y,i,i.name==="br");break}}if(e._selectionOverrides.showBlockCaretContainer(r),!p.invalid)t=l.serialize(h),DR(e,t,r);else{e.selection.setContent(c),r=o.getNode();var g=e.getBody();for(r.nodeType===9?r=i=g:i=r;i!==g;)r=i,i=i.parentNode;t=r===g?g.innerHTML:u.getOuterHTML(r),t=l.serialize(s.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return l.serialize(h)}))),r===g?u.setHTML(g,t):u.setOuterHTML(r,t)}PR(e,f),MR(e,u.get("mce_marker")),LR(e.getBody()),OR(u,o.getStart()),e.fire("SetContent",v),e.addVisual()},Rl=function(e,t){t(e),e.firstChild&&Rl(e.firstChild,t),e.next&&Rl(e.next,t)},HR=function(e,t,n){var r={},a={},i=[];n.firstChild&&Rl(n.firstChild,function(s){Y(e,function(f){f.name===s.name&&(r[f.name]?r[f.name].nodes.push(s):r[f.name]={filter:f,nodes:[s]})}),Y(t,function(f){typeof s.attr(f.name)=="string"&&(a[f.name]?a[f.name].nodes.push(s):a[f.name]={filter:f,nodes:[s]})})});for(var o in r)pe(r,o)&&i.push(r[o]);for(var u in a)pe(a,u)&&i.push(a[u]);return i},VR=function(e,t,n){var r=HR(e,t,n);Y(r,function(a){Y(a.filter.callbacks,function(i){i(a.nodes,a.filter.name,{})})})},WR="html",Bl=function(e){return e instanceof Xt},qR=function(e){$r(e)&&wt(e.getBody()).each(function(t){var n=t.getNode(),r=oa(n)?wt(n).getOr(t):t;e.selection.setRng(r.toRange())})},_l=function(e,t,n){e.dom.setHTML(e.getBody(),t),n!==!0&&qR(e)},jR=function(e,t,n,r){if(n.length===0||/^\s+$/.test(n)){var a='<br data-mce-bogus="1">';t.nodeName==="TABLE"?n="<tr><td>"+a+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(n="<li>"+a+"</li>");var i=ft(e);i&&e.schema.isValidChild(t.nodeName.toLowerCase(),i.toLowerCase())?(n=a,n=e.dom.createHTML(i,hi(e),n)):n||(n='<br data-mce-bogus="1">'),_l(e,n,r.no_selection),e.fire("SetContent",r)}else r.format!=="raw"&&(n=Ia({validate:e.validate},e.schema).serialize(e.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=so(k.fromDom(t))?n:_.trim(n),_l(e,r.content,r.no_selection),r.no_events||e.fire("SetContent",r);return r.content},KR=function(e,t,n,r){VR(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),n);var a=Ia({validate:e.validate},e.schema).serialize(n);return r.content=so(k.fromDom(t))?a:_.trim(a),_l(e,r.content,r.no_selection),r.no_events||e.fire("SetContent",r),n},GR=function(e,t){return ie(ie({format:WR},e),{set:!0,content:Bl(t)?"":t})},XR=function(e,t,n){var r=GR(n,t),a=n.no_events?r:e.fire("BeforeSetContent",r);return Bl(t)||(t=a.content),b.from(e.getBody()).fold(X(t),function(i){return Bl(t)?KR(e,i,t,a):jR(e,i,t,a)})},YR=function(e,t){return Iw(e,t).isSome()},jh=function(e){return Oe(e)?e:Re},QR=function(e,t,n){for(var r=e.dom,a=jh(n);r.parentNode;){r=r.parentNode;var i=k.fromDom(r),o=t(i);if(o.isSome())return o;if(a(i))break}return b.none()},Dl=function(e,t,n){var r=t(e),a=jh(n);return r.orThunk(function(){return a(e)?b.none():QR(e,t,a)})},Ol=Pf,Kh=function(e,t,n){var r=e.formatter.get(n);if(r)for(var a=0;a<r.length;a++){var i=r[a];if(Bt(i)&&i.inherit===!1&&e.dom.is(t,i.selector))return!0}return!1},Pl=function(e,t,n,r,a){var i=e.dom.getRoot();return t===i?!1:(t=e.dom.getParent(t,function(o){return Kh(e,o,n)?!0:o.parentNode===i||!!Tn(e,o,n,r,!0)}),!!Tn(e,t,n,r,a))},Il=function(e,t,n){if(Ol(t,n.inline)||Ol(t,n.block))return!0;if(n.selector)return t.nodeType===1&&e.is(t,n.selector)},Gh=function(e,t,n,r,a,i){var o=n[r];if(Oe(n.onmatch))return n.onmatch(t,n,r);if(o){if(Nt(o.length)){for(var u in o)if(pe(o,u)){var s=r==="attributes"?e.getAttrib(t,u):Uo(e,t,u),f=$n(o[u],i),l=vn(s)||sv(s);if(l&&vn(f))continue;if(a&&l&&!n.exact||(!a||n.exact)&&!Ol(s,If(e,f,u)))return!1}}else for(var c=0;c<o.length;c++)if(r==="attributes"?e.getAttrib(t,o[c]):Uo(e,t,o[c]))return!0}return!0},Tn=function(e,t,n,r,a){var i=e.formatter.get(n),o=e.dom;if(i&&t)for(var u=0;u<i.length;u++){var s=i[u];if(Il(e.dom,t,s)&&Gh(o,t,s,"attributes",a,r)&&Gh(o,t,s,"styles",a,r)){var f=s.classes;if(f){for(var l=0;l<f.length;l++)if(!e.dom.hasClass(t,$n(f[l],r)))return}return s}}},Ll=function(e,t,n,r,a){if(r)return Pl(e,r,t,n,a);if(r=e.selection.getNode(),Pl(e,r,t,n,a))return!0;var i=e.selection.getStart();return!!(i!==r&&Pl(e,i,t,n,a))},ZR=function(e,t,n){var r=[],a={},i=e.selection.getStart();return e.dom.getParent(i,function(o){for(var u=0;u<t.length;u++){var s=t[u];!a[s]&&Tn(e,o,s,n)&&(a[s]=!0,r.push(s))}},e.dom.getRoot()),r},JR=function(e,t){var n=function(a){return Te(a,k.fromDom(e.getBody()))},r=function(a,i){return Tn(e,a.dom,i)?b.some(i):b.none()};return b.from(e.selection.getStart(!0)).bind(function(a){return Dl(k.fromDom(a),function(i){return ev(t,function(o){return r(i,o)})},n)}).getOrNull()},eB=function(e,t){var n=e.formatter.get(t),r=e.dom;if(n)for(var a=e.selection.getStart(),i=zo(r,a),o=n.length-1;o>=0;o--){var u=n[o];if(!Bt(u)||Ne(u.defaultBlock))return!0;for(var s=i.length-1;s>=0;s--)if(r.is(i[s],u.selector))return!0}return!1},tB=function(e,t,n){return Qt(n,function(r,a){var i=p1(e,a);return e.formatter.matchNode(t,a,{},i)?r.concat([a]):r},[])},Fa=nt,Xh="_mce_caret",nB=function(e,t){return e.importNode(t,!0)},rB=function(e){for(var t=[];e;){if(e.nodeType===3&&e.nodeValue!==Fa||e.childNodes.length>1)return[];e.nodeType===1&&t.push(e),e=e.firstChild}return t},Yh=function(e){return rB(e).length>0},Qh=function(e){if(e){var t=new Ge(e,e);for(e=t.current();e;e=t.next())if(Q(e))return e}return null},$l=function(e){var t=k.fromTag("span");return qn(t,{id:Xh,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&at(t,k.fromText(Fa)),t},aB=function(e){var t=Qh(e);return t&&t.nodeValue.charAt(0)===Fa&&t.deleteData(0,1),t},Fl=function(e,t,n){n===void 0&&(n=!0);var r=e.dom,a=e.selection;if(Yh(t))Mr(e,!1,k.fromDom(t),n);else{var i=a.getRng(),o=r.getParent(t,r.isBlock),u=i.startContainer,s=i.startOffset,f=i.endContainer,l=i.endOffset,c=aB(t);r.remove(t,!0),u===c&&s>0&&i.setStart(c,s-1),f===c&&l>0&&i.setEnd(c,l-1),o&&r.isEmpty(o)&&Fr(k.fromDom(o)),a.setRng(i)}},Ml=function(e,t,n){n===void 0&&(n=!0);var r=e.dom,a=e.selection;if(t)Fl(e,t,n);else if(t=Lr(e.getBody(),a.getStart()),!t)for(;t=r.get(Xh);)Fl(e,t,!1)},iB=function(e,t,n){var r=e.dom,a=r.getParent(n,G(Df,e));a&&r.isEmpty(a)?n.parentNode.replaceChild(t,n):(QT(k.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(t,n):r.insertAfter(t,n))},Zh=function(e,t){return e.appendChild(t),t},Jh=function(e,t){var n=Qc(e,function(r,a){return Zh(r,a.cloneNode(!1))},t);return Zh(n,n.ownerDocument.createTextNode(Fa))},oB=function(e,t,n,r,a,i){var o=e.formatter,u=e.dom,s=me(ea(o.get()),function(v){return v!==r&&!yt(v,"removeformat")}),f=tB(e,n,s),l=me(f,function(v){return!h1(e,v,r)});if(l.length>0){var c=n.cloneNode(!1);return u.add(t,c),o.remove(r,a,c,i),u.remove(c),b.some(c)}else return b.none()},uB=function(e,t,n){var r,a,i=e.selection,o=i.getRng(),u=o.startOffset,s=o.startContainer,f=s.nodeValue;r=Lr(e.getBody(),i.getStart()),r&&(a=Qh(r));var l=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(f&&u>0&&u<f.length&&l.test(f.charAt(u))&&l.test(f.charAt(u-1))){var c=i.getBookmark();o.collapse(!0);var v=Da(e,o,e.formatter.get(t));v=jo(v),e.formatter.apply(t,n,v),i.moveToBookmark(c)}else(!r||a.nodeValue!==Fa)&&(r=nB(e.getDoc(),$l(!0).dom),a=r.firstChild,o.insertNode(r),u=1),e.formatter.apply(t,n,r),i.setCursorLocation(a,u)},sB=function(e,t,n,r){var a=e.dom,i=e.selection,o,u,s,f=[],l=i.getRng(),c=l.startContainer,v=l.startOffset;for(u=c,c.nodeType===3&&(v!==c.nodeValue.length&&(o=!0),u=u.parentNode);u;){if(Tn(e,u,t,n,r)){s=u;break}u.nextSibling&&(o=!0),f.push(u),u=u.parentNode}if(!!s)if(o){var d=i.getBookmark();l.collapse(!0);var m=Da(e,l,e.formatter.get(t),!0);m=jo(m),e.formatter.remove(t,n,m,r),i.moveToBookmark(d)}else{var p=Lr(e.getBody(),s),h=$l(!1).dom;iB(e,h,p!==null?p:s);var y=oB(e,h,s,t,n,r),g=Jh(f.concat(y.toArray()),h);Fl(e,p,!1),i.setCursorLocation(g,1),a.isEmpty(s)&&a.remove(s)}},fB=function(e,t){var n=e.selection,r=e.getBody();Ml(e,null,!1),(t===8||t===46)&&n.isCollapsed()&&n.getStart().innerHTML===Fa&&Ml(e,Lr(r,n.getStart())),(t===37||t===39)&&Ml(e,Lr(r,n.getStart()))},lB=function(e){e.on("mouseup keydown",function(t){fB(e,t.keyCode)})},cB=function(e,t){var n=$l(!1),r=Jh(t,n.dom);return en(k.fromDom(e),n),tt(k.fromDom(e)),A(r,0)},vB=function(e,t){var n=e.schema.getTextInlineElements();return pe(n,Ke(t))&&!xn(t.dom)&&!xr(t.dom)},dB=function(e){return xn(e.dom)&&Yh(e.dom)},iu={},eg=na,tg=Ya,mB=function(e,t){var n=iu[e];n||(iu[e]=[]),iu[e].push(t)},pB=function(e,t){tg(iu[e],function(n){n(t)})};mB("pre",function(e){var t=e.selection.getRng(),n,r=function(o){return i(o.previousSibling)&&rv(n,o.previousSibling)!==-1},a=function(o,u){oe(u).remove(),oe(o).append("<br><br>").append(u.childNodes)},i=Kt(["pre"]);t.collapsed||(n=e.selection.getSelectedBlocks(),tg(eg(eg(n,i),r),function(o){a(o.previousSibling,o)}))});var Ul=_.each,zl=function(e){return ae(e)&&!Ut(e)&&!xn(e)&&!xr(e)},ng=function(e,t){for(var n=e;n;n=n[t]){if(Q(n)&&Gi(n.data))return e;if(ae(n)&&!Ut(n))return n}return e},rg=function(e,t,n){var r=sh(e);if(t&&n&&(t=ng(t,"previousSibling"),n=ng(n,"nextSibling"),r.compare(t,n))){for(var a=t.nextSibling;a&&a!==n;){var i=a;a=a.nextSibling,t.appendChild(i)}return e.remove(n),_.each(_.grep(n.childNodes),function(o){t.appendChild(o)}),t}return n},ag=function(e,t,n,r){if(r&&t.merge_siblings!==!1){var a=rg(e,_f(r),r);rg(e,a,_f(a,!0))}},hB=function(e,t,n){if(t.clear_child_styles){var r=t.links?"*:not(a)":"*";Ul(e.select(r,n),function(a){zl(a)&&Ul(t.styles,function(i,o){e.setStyle(a,o,"")})})}},Hl=function(e,t,n){Ul(e.childNodes,function(r){zl(r)&&(t(r)&&n(r),r.hasChildNodes()&&Hl(r,t,n))})},gB=function(e,t){t.nodeName==="SPAN"&&e.getAttribs(t).length===0&&e.remove(t,!0)},ig=function(e,t){return function(n){return!!(n&&Uo(e,n,t))}},og=function(e,t,n){return function(r){e.setStyle(r,t,n),r.getAttribute("style")===""&&r.removeAttribute("style"),gB(e,r)}},_i=Kn.generate([{keep:[]},{rename:["name"]},{removed:[]}]),bB=/^(src|href|style)$/,Vl=_.each,Ma=Pf,yB=function(e){return/^(TR|TH|TD)$/.test(e.nodeName)},ug=function(e,t,n){return e.isChildOf(t,n)&&t!==n&&!e.isBlock(n)},sg=function(e,t,n){var r=t[n?"startContainer":"endContainer"],a=t[n?"startOffset":"endOffset"];if(ae(r)){var i=r.childNodes.length-1;!n&&a&&a--,r=r.childNodes[a>i?i:a]}return Q(r)&&n&&a>=r.nodeValue.length&&(r=new Ge(r,e.getBody()).next()||r),Q(r)&&!n&&a===0&&(r=new Ge(r,e.getBody()).prev()||r),r},fg=function(e,t){var n=t?"firstChild":"lastChild";if(yB(e)&&e[n]){var r=e[n];return e.nodeName==="TR"&&r[n]||r}return e},Wl=function(e,t,n,r){var a=e.create(n,r);return t.parentNode.insertBefore(a,t),a.appendChild(t),a},lg=function(e,t,n,r,a){var i=k.fromDom(t),o=k.fromDom(e.create(r,a)),u=n?Uv(i):Mv(i);return Qi(o,u),n?(en(i,o),qv(o,i)):(ei(i,o),at(o,i)),o.dom},CB=function(e,t,n){if(Ze(n)&&Ma(t,n.inline)||Nn(n)&&Ma(t,n.block))return!0;if(Bt(n))return ae(t)&&e.is(t,n.selector)},wB=function(e,t){return t.links&&e.nodeName==="A"},ou=function(e,t,n,r){var a=_f(t,n,r);return vn(a)||a.nodeName==="BR"||e.isBlock(a)},SB=function(e,t,n){var r=t.parentNode,a,i=e.dom,o=ft(e);Nn(n)&&(o?r===i.getRoot()&&(!n.list_block||!Ma(t,n.list_block))&&Y(dn(t.childNodes),function(u){Ba(e,o,u.nodeName.toLowerCase())?a?a.appendChild(u):(a=Wl(i,u,o),i.setAttribs(a,e.settings.forced_root_block_attrs)):a=null}):i.isBlock(t)&&!i.isBlock(r)&&(!ou(i,t,!1)&&!ou(i,t.firstChild,!0,!0)&&t.insertBefore(i.create("br"),t.firstChild),!ou(i,t,!0)&&!ou(i,t.lastChild,!1,!0)&&t.appendChild(i.create("br")))),!(g1(n)&&!Ma(n.inline,t))&&i.remove(t,!0)},cg=function(e,t,n,r,a){var i,o=e.dom;if(!CB(o,r,t)&&!wB(r,t))return _i.keep();var u=r;if(Ze(t)&&t.remove==="all"&&Vt(t.preserve_attributes)){var s=me(o.getAttribs(u),function(v){return Je(t.preserve_attributes,v.name.toLowerCase())});if(o.removeAllAttribs(u),Y(s,function(v){return o.setAttrib(u,v.name,v.value)}),s.length>0)return _i.rename("span")}if(t.remove!=="all"){Vl(t.styles,function(v,d){v=If(o,$n(v,n),d+""),Zr(d)&&(d=v,a=null),(t.remove_similar||!a||Ma(Uo(o,a,d),v))&&o.setStyle(u,d,""),i=!0}),i&&o.getAttrib(u,"style")===""&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),Vl(t.attributes,function(v,d){var m;if(v=$n(v,n),Zr(d)&&(d=v,a=null),t.remove_similar||!a||Ma(o.getAttrib(a,d),v)){if(d==="class"&&(v=o.getAttrib(u,d),v&&(m="",Y(v.split(/\s+/),function(p){/mce\-\w+/.test(p)&&(m+=(m?" ":"")+p)}),m))){o.setAttrib(u,d,m);return}if(bB.test(d)&&u.removeAttribute("data-mce-"+d),d==="style"&&Kt(["li"])(u)&&o.getStyle(u,"list-style-type")==="none"){u.removeAttribute(d),o.setStyle(u,"list-style-type","none");return}d==="class"&&u.removeAttribute("className"),u.removeAttribute(d)}}),Vl(t.classes,function(v){v=$n(v,n),(!a||o.hasClass(a,v))&&o.removeClass(u,v)});for(var f=o.getAttribs(u),l=0;l<f.length;l++){var c=f[l].nodeName;if(c.indexOf("_")!==0&&c.indexOf("data-")!==0)return _i.keep()}}return t.remove!=="none"?(SB(e,u,t),_i.removed()):_i.keep()},Ua=function(e,t,n,r,a){return cg(e,t,n,r,a).fold(Re,function(i){return e.dom.rename(r,i),!0},qe)},EB=function(e,t,n,r,a){var i;return Y(zo(e.dom,t.parentNode).reverse(),function(o){if(!i&&o.id!=="_start"&&o.id!=="_end"){var u=Tn(e,o,n,r,a);u&&u.split!==!1&&(i=o)}}),i},kB=function(e,t,n,r){return cg(e,t,n,r,r).fold(X(r),function(a){var i=e.dom.createFragment();return i.appendChild(r),e.dom.rename(r,a)},X(null))},xB=function(e,t,n,r,a,i,o,u){var s,f,l,c=e.dom;if(n){for(var v=n.parentNode,d=r.parentNode;d&&d!==v;d=d.parentNode){s=c.clone(d,!1);for(var m=0;m<t.length&&(s=kB(e,t[m],u,s),s!==null);m++);s&&(f&&s.appendChild(f),l||(l=s),f=s)}i&&(!o.mixed||!c.isBlock(n))&&(r=c.split(n,r)),f&&(a.parentNode.insertBefore(f,a),l.appendChild(a),Ze(o)&&ag(c,o,u,f))}return r},vg=function(e,t,n,r,a){var i=e.formatter.get(t),o=i[0],u=!0,s=e.dom,f=e.selection,l=function(g){var E=EB(e,g,t,n,a);return xB(e,i,E,g,g,!0,o,n)},c=function(g){return Ut(g)&&ae(g)&&(g.id==="_start"||g.id==="_end")},v=function(g){return bt(i,function(E){return Ua(e,E,n,g,g)})},d=function(g){var E=!0,S=!1;ae(g)&&s.getContentEditable(g)&&(E=u,u=s.getContentEditable(g)==="true",S=!0);var C=dn(g.childNodes);if(u&&!S){var x=v(g),B=x||bt(i,function(D){return Il(s,g,D)}),L=g.parentNode;!B&&Ne(L)&&Lf(o)&&v(L)}if(o.deep&&C.length){for(var ne=0;ne<C.length;ne++)d(C[ne]);S&&(u=E)}var q=["underline","line-through","overline"];Y(q,function(D){ae(g)&&e.dom.getStyle(g,"text-decoration")===D&&g.parentNode&&yp(s,g.parentNode)===D&&Ua(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:D}},null,g)})},m=function(g){var E=s.get(g?"_start":"_end"),S=E[g?"firstChild":"lastChild"];return c(S)&&(S=S[g?"firstChild":"lastChild"]),Q(S)&&S.data.length===0&&(S=g?E.previousSibling||E.nextSibling:E.nextSibling||E.previousSibling),s.remove(E,!0),S},p=function(g){var E,S,C=Da(e,g,i,g.collapsed);if(o.split){if(C=jo(C),E=sg(e,C,!0),S=sg(e,C),E!==S){if(E=fg(E,!0),S=fg(S,!1),ug(s,E,S)){var x=b.from(E.firstChild).getOr(E);l(lg(s,x,!0,"span",{id:"_start","data-mce-type":"bookmark"})),m(!0);return}if(ug(s,S,E)){var x=b.from(S.lastChild).getOr(S);l(lg(s,x,!1,"span",{id:"_end","data-mce-type":"bookmark"})),m(!1);return}E=Wl(s,E,"span",{id:"_start","data-mce-type":"bookmark"}),S=Wl(s,S,"span",{id:"_end","data-mce-type":"bookmark"});var B=s.createRng();B.setStartAfter(E),B.setEndBefore(S),ki(s,B,function(L){Y(L,function(ne){!Ut(ne)&&!Ut(ne.parentNode)&&l(ne)})}),l(E),l(S),E=m(!0),S=m()}else E=S=l(E);C.startContainer=E.parentNode?E.parentNode:E,C.startOffset=s.nodeIndex(E),C.endContainer=S.parentNode?S.parentNode:S,C.endOffset=s.nodeIndex(S)+1}ki(s,C,function(L){Y(L,d)})};if(r){if(Mo(r)){var h=s.createRng();h.setStartBefore(r),h.setEndAfter(r),p(h)}else p(r);qf(e,t,r,n);return}if(s.getContentEditable(f.getNode())==="false"){r=f.getNode();for(var y=0;y<i.length&&!(i[y].ceFalseOverride&&Ua(e,i[y],n,r,r));y++);qf(e,t,r,n);return}!f.isCollapsed()||!Ze(o)||Oa(e).length?(Hf(f,!0,function(){zf(e,p)}),Ze(o)&&Ll(e,t,n,f.getStart())&&bp(s,f,f.getRng()),e.nodeChanged()):sB(e,t,n,a),qf(e,t,r,n)},dg=_.each,NB=function(e,t,n,r){var a=function(i){if(i.nodeType===1&&i.parentNode&&i.parentNode.nodeType===1){var o=yp(e,i.parentNode);e.getStyle(i,"color")&&o?e.setStyle(i,"text-decoration",o):e.getStyle(i,"text-decoration")===o&&e.setStyle(i,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(_.walk(r,a,"childNodes"),a(r))},TB=function(e,t,n,r){t.styles&&t.styles.backgroundColor&&Hl(r,ig(e,"fontSize"),og(e,"backgroundColor",$n(t.styles.backgroundColor,n)))},AB=function(e,t,n,r){Ze(t)&&(t.inline==="sub"||t.inline==="sup")&&(Hl(r,ig(e,"fontSize"),og(e,"fontSize","")),e.remove(e.select(t.inline==="sup"?"sub":"sup",r),!0))},RB=function(e,t,n,r){dg(t,function(a){Ze(a)&&dg(e.dom.select(a.inline,r),function(i){!zl(i)||Ua(e,a,n,i,a.exact?i:null)}),hB(e.dom,a,r)})},BB=function(e,t,n,r,a){Tn(e,a.parentNode,n,r)&&Ua(e,t,r,a)||t.merge_with_parents&&e.dom.getParent(a.parentNode,function(i){if(Tn(e,i,n,r))return Ua(e,t,r,a),!0})},uu=_.each,_B=function(e){return ae(e)&&!Ut(e)&&!xn(e)&&!xr(e)},DB=function(e,t,n,r){if(sx(e)&&Ze(t)){var a=Ad(e.schema),i=YR(k.fromDom(n),function(o){return xn(o.dom)});return ta(a,r)&&Xe(k.fromDom(n.parentNode),!1)&&!i}else return!1},ql=function(e,t,n,r){var a=e.formatter.get(t),i=a[0],o=!r&&e.selection.isCollapsed(),u=e.dom,s=e.selection,f=function(E,S){if(S===void 0&&(S=i),Oe(S.onformat)&&S.onformat(E,S,n,r),uu(S.styles,function(x,B){u.setStyle(E,B,$n(x,n))}),S.styles){var C=u.getAttrib(E,"style");C&&u.setAttrib(E,"data-mce-style",C)}uu(S.attributes,function(x,B){u.setAttrib(E,B,$n(x,n))}),uu(S.classes,function(x){x=$n(x,n),u.hasClass(E,x)||u.addClass(E,x)})},l=function(E,S){var C=!1;return uu(E,function(x){if(!Bt(x))return!1;if(!(Ne(x.collapsed)&&x.collapsed!==o)&&u.is(S,x.selector)&&!xn(S))return f(S,x),C=!0,!1}),C},c=function(E){if(He(E)){var S=u.create(E);return f(S),S}else return null},v=function(E,S,C){var x=[],B=!0,L=i.inline||i.block,ne=c(L);ki(E,S,function(q){var D,ee=function(U){var W=!1,F=B,V=U.nodeName.toLowerCase(),K=U.parentNode,O=K.nodeName.toLowerCase();if(ae(U)&&E.getContentEditable(U)&&(F=B,B=E.getContentEditable(U)==="true",W=!0),$e(U)&&!DB(e,i,U,O)){D=null,Nn(i)&&E.remove(U);return}if(Nn(i)&&i.wrapper&&Tn(e,U,t,n)){D=null;return}if(B&&!W&&Nn(i)&&!i.wrapper&&Df(e,V)&&Ba(e,O,L)){var j=E.rename(U,L);f(j),x.push(j),D=null;return}if(Bt(i)){var fe=l(a,U);if(!fe&&Ne(K)&&Lf(i)&&(fe=l(a,K)),!Ze(i)||fe){D=null;return}}B&&!W&&Ba(e,L,V)&&Ba(e,O,L)&&!(!C&&Q(U)&&fo(U.data))&&!xn(U)&&(!Ze(i)||!E.isBlock(U))?(D||(D=E.clone(ne,!1),U.parentNode.insertBefore(D,U),x.push(D)),D.appendChild(U)):(D=null,Y(dn(U.childNodes),ee),W&&(B=F),D=null)};Y(q,ee)}),i.links===!0&&Y(x,function(q){var D=function(ee){ee.nodeName==="A"&&f(ee,i),Y(dn(ee.childNodes),D)};D(q)}),Y(x,function(q){var D=function(W){var F=0;return Y(W.childNodes,function(V){!m1(V)&&!Ut(V)&&F++}),F},ee=function(W){var F=et(W.childNodes,_B).filter(function(V){return Il(E,V,i)});return F.map(function(V){var K=E.clone(V,!1);return f(K),E.replace(K,W,!0),E.remove(V,!0),K}).getOr(W)},U=D(q);if((x.length>1||!E.isBlock(q))&&U===0){E.remove(q,!0);return}(Ze(i)||Nn(i)&&i.wrapper)&&(!i.exact&&U===1&&(q=ee(q)),RB(e,a,n,q),BB(e,i,t,n,q),TB(E,i,n,q),NB(E,i,n,q),AB(E,i,n,q),ag(E,i,n,q))})};if(u.getContentEditable(s.getNode())==="false"){r=s.getNode();for(var d=0,m=a.length;d<m;d++){var p=a[d];if(p.ceFalseOverride&&Bt(p)&&u.is(r,p.selector)){f(r,p);break}}Pp(e,t,r,n);return}if(i){if(r)if(Mo(r)){if(!l(a,r)){var h=u.createRng();h.setStartBefore(r),h.setEndAfter(r),v(u,Da(e,h,a),!0)}}else v(u,r,!0);else if(!o||!Ze(i)||Oa(e).length){var y=s.getNode(),g=a[0];!e.settings.forced_root_block&&g.defaultBlock&&!u.getParent(y,u.isBlock)&&ql(e,g.defaultBlock),s.setRng(Nl(s.getRng())),Hf(s,!0,function(){zf(e,function(E,S){var C=S?E:Da(e,E,a);v(u,C,!1)})}),bp(u,s,s.getRng()),e.nodeChanged()}else uB(e,t,n);pB(t,e)}Pp(e,t,r,n)},mg=function(e){return pe(e,"vars")},OB=function(e,t){e.set({}),t.on("NodeChange",function(n){bg(t,n.element,e.get())}),t.on("FormatApply FormatRemove",function(n){var r=b.from(n.node).map(function(a){return Mo(a)?a:a.startContainer}).bind(function(a){return ae(a)?b.some(a):b.from(a.parentElement)}).getOrThunk(function(){return pg(t)});bg(t,r,e.get())})},pg=function(e){return e.selection.getStart()},hg=function(e,t,n,r,a){var i=function(u){var s=e.formatter.matchNode(u,n,a!=null?a:{},r);return!Nt(s)},o=function(u){return Kh(e,u,n)?!0:r?!1:Ne(e.formatter.matchNode(u,n,a,!0))};return Zc(t,i,o)},gg=function(e,t){var n=t!=null?t:pg(e);return me(zo(e.dom,n),function(r){return ae(r)&&!xr(r)})},bg=function(e,t,n){var r=gg(e,t);Pe(n,function(a,i){var o=function(u){var s=hg(e,r,i,u.similar,mg(u)?u.vars:void 0),f=s.isSome();if(u.state.get()!==f){u.state.set(f);var l=s.getOr(t);mg(u)?u.callback(f,{node:l,format:i,parents:r}):Y(u.callbacks,function(c){return c(f,{node:l,format:i,parents:r})})}};Y([a.withSimilar,a.withoutSimilar],o),Y(a.withVars,o)})},PB=function(e,t,n,r,a,i){var o=t.get();Y(n.split(","),function(u){var s=je(o,u).getOrThunk(function(){var c={withSimilar:{state:vt(!1),similar:!0,callbacks:[]},withoutSimilar:{state:vt(!1),similar:!1,callbacks:[]},withVars:[]};return o[u]=c,c}),f=function(){var c=gg(e);return hg(e,c,u,a,i).isSome()};if(Nt(i)){var l=a?s.withSimilar:s.withoutSimilar;l.callbacks.push(r),l.callbacks.length===1&&l.state.set(f())}else s.withVars.push({state:vt(f()),similar:a,vars:i,callback:r})}),t.set(o)},IB=function(e,t,n){var r=e.get();Y(t.split(","),function(a){return je(r,a).each(function(i){r[a]={withSimilar:ie(ie({},i.withSimilar),{callbacks:me(i.withSimilar.callbacks,function(o){return o!==n})}),withoutSimilar:ie(ie({},i.withoutSimilar),{callbacks:me(i.withoutSimilar.callbacks,function(o){return o!==n})}),withVars:me(i.withVars,function(o){return o.callback!==n})}})}),e.set(r)},LB=function(e,t,n,r,a,i){return t.get()===null&&OB(t,e),PB(e,t,n,r,a,i),{unbind:function(){return IB(t,n,r)}}},$B=function(e,t,n,r){var a=e.formatter.get(t);Ll(e,t,n,r)&&(!("toggle"in a[0])||a[0].toggle)?vg(e,t,n,r):ql(e,t,n,r)},jl=function(e,t){var n=t||document,r=n.createDocumentFragment();return Y(e,function(a){r.appendChild(a.dom)}),k.fromDom(r)},Kl=function(e,t,n){return{element:e,width:t,rows:n}},yg=function(e,t){return{element:e,cells:t}},FB=function(e,t){return{x:e,y:t}},Cg=function(e,t){var n=parseInt(ri(e,t),10);return isNaN(n)?1:n},MB=function(e,t,n,r,a){for(var i=Cg(a,"rowspan"),o=Cg(a,"colspan"),u=e.rows,s=n;s<n+i;s++){u[s]||(u[s]=yg(sm(r),[]));for(var f=t;f<t+o;f++){var l=u[s].cells;l[f]=s===n&&f===t?a:wa(a)}}},UB=function(e,t,n){var r=e.rows,a=r[n]?r[n].cells:[];return!!a[t]},zB=function(e,t,n){for(;UB(e,t,n);)t++;return t},wg=function(e){return Qt(e,function(t,n){return n.cells.length>t?n.cells.length:t},0)},Sg=function(e,t){for(var n=e.rows,r=0;r<n.length;r++)for(var a=n[r].cells,i=0;i<a.length;i++)if(Te(a[i],t))return b.some(FB(i,r));return b.none()},Eg=function(e,t,n,r,a){for(var i=[],o=e.rows,u=n;u<=a;u++){var s=o[u].cells,f=t<r?s.slice(t,r+1):s.slice(r,t+1);i.push(yg(o[u].element,f))}return i},HB=function(e,t,n){var r=t.x,a=t.y,i=n.x,o=n.y,u=a<o?Eg(e,r,a,i,o):Eg(e,r,o,i,a);return Kl(e.element,wg(u),u)},VB=function(e,t){var n=wa(e.element),r=k.fromTag("tbody");return Qi(r,t),at(n,r),n},WB=function(e){return De(e.rows,function(t){var n=De(t.cells,function(a){var i=sm(a);return jn(i,"colspan"),jn(i,"rowspan"),i}),r=wa(t.element);return Qi(r,n),r})},qB=function(e){var t=Kl(wa(e),0,[]);return Y(kt(e,"tr"),function(n,r){Y(kt(n,"td,th"),function(a,i){MB(t,zB(t,i,r),r,n,a)})}),Kl(t.element,wg(t.rows),t.rows)},jB=function(e){return VB(e,WB(e))},KB=function(e,t,n){return Sg(e,t).bind(function(r){return Sg(e,n).map(function(a){return HB(e,r,a)})})},GB=function(e){return et(e,function(t){return Ke(t)==="ul"||Ke(t)==="ol"})},XB=function(e,t){return et(e,function(n){return Ke(n)==="li"&&Mf(n,t)}).fold(X([]),function(n){return GB(e).map(function(r){var a=k.fromTag(Ke(r)),i=Xa(rd(r),function(o,u){return Sr(u,"list-style")});return ww(a,i),[k.fromTag("li"),a]}).getOr([])})},YB=function(e,t){var n=Qt(t,function(r,a){return at(a,r),a},e);return t.length>0?jl([n]):n},QB=function(e){return oi(e)?Jt(e).filter(_s).fold(X([]),function(t){return[e,t]}):_s(e)?[e]:[]},ZB=function(e,t){var n=k.fromDom(t.commonAncestorContainer),r=Fn(n,e),a=me(r,function(u){return Bs(u)||Xw(u)}),i=XB(r,t),o=a.concat(i.length?i:QB(n));return De(o,wa)},kg=function(){return jl([])},JB=function(e,t){return YB(k.fromDom(t.cloneContents()),ZB(e,t))},e_=function(e,t){return io(t,"table",G(Te,e))},t_=function(e,t){return e_(e,t[0]).bind(function(n){var r=t[0],a=t[t.length-1],i=qB(n);return KB(i,r,a).map(function(o){return jl([jB(o)])})}).getOrThunk(kg)},n_=function(e,t){return t.length>0&&t[0].collapsed?kg():JB(e,t[0])},r_=function(e,t){var n=Rp(t,e);return n.length>0?t_(e,n):n_(e,t)},a_=function(e){return e.replace(/^[ \f\n\r\t\v]+/,"")},su=function(e,t){return t>=0&&t<e.length&&Ra(e.charAt(t))},xg=function(e,t){var n=Xn(e.innerText);return t?a_(n):n},i_=function(e){return e.map(function(t){return t.nodeName}).getOr("div").toLowerCase()},o_=function(e){return b.from(e.selection.getRng()).map(function(t){var n=b.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),a=i_(n),i=se.browser.isIE()&&a!=="pre",o=e.dom.add(r,a,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents()),u=xg(o,i),s=Xn(o.textContent);if(e.dom.remove(o),su(s,0)||su(s,s.length-1)){var f=n.getOr(r),l=xg(f,i),c=l.indexOf(u);if(c===-1)return u;var v=su(l,c-1),d=su(l,c+u.length);return(v?" ":"")+u+(d?" ":"")}else return u}).getOr("")},u_=function(e,t){var n=e.selection.getRng(),r=e.dom.create("body"),a=e.selection.getSel(),i=il(e,$f(a)),o=t.contextual?r_(k.fromDom(e.getBody()),i).dom:n.cloneContents();return o&&r.appendChild(o),e.selection.serializer.serialize(r,t)},s_=function(e,t){return ie(ie({},e),{format:t,get:!0,selection:!0})},f_=function(e,t,n){n===void 0&&(n={});var r=s_(n,t),a=e.fire("BeforeGetContent",r);if(a.isDefaultPrevented())return e.fire("GetContent",a),a.content;if(a.format==="text")return o_(e);a.getInner=!0;var i=u_(e,a);return a.format==="tree"?i:(a.content=e.selection.isCollapsed()?"":i,e.fire("GetContent",a),a.content)},Gl=0,Ng=1,Tg=2,l_=function(e,t){var n=e.length+t.length+2,r=new Array(n),a=new Array(n),i=function(l,c,v){return{start:l,end:c,diag:v}},o=function(l,c,v,d,m){var p=s(l,c,v,d);if(p===null||p.start===c&&p.diag===c-d||p.end===l&&p.diag===l-v)for(var h=l,y=v;h<c||y<d;)h<c&&y<d&&e[h]===t[y]?(m.push([Gl,e[h]]),++h,++y):c-l>d-v?(m.push([Tg,e[h]]),++h):(m.push([Ng,t[y]]),++y);else{o(l,p.start,v,p.start-p.diag,m);for(var g=p.start;g<p.end;++g)m.push([Gl,e[g]]);o(p.end,c,p.end-p.diag,d,m)}},u=function(l,c,v,d){for(var m=l;m-c<d&&m<v&&e[m]===t[m-c];)++m;return i(l,m,c)},s=function(l,c,v,d){var m=c-l,p=d-v;if(m===0||p===0)return null;var h=m-p,y=p+m,g=(y%2===0?y:y+1)/2;r[1+g]=l,a[1+g]=c+1;var E,S,C,x,B;for(E=0;E<=g;++E){for(S=-E;S<=E;S+=2){for(C=S+g,S===-E||S!==E&&r[C-1]<r[C+1]?r[C]=r[C+1]:r[C]=r[C-1]+1,x=r[C],B=x-l+v-S;x<c&&B<d&&e[x]===t[B];)r[C]=++x,++B;if(h%2!==0&&h-E<=S&&S<=h+E&&a[C-h]<=r[C])return u(a[C-h],S+l-v,c,d)}for(S=h-E;S<=h+E;S+=2){for(C=S+g-h,S===h-E||S!==h+E&&a[C+1]<=a[C-1]?a[C]=a[C+1]-1:a[C]=a[C-1],x=a[C]-1,B=x-l+v-S;x>=l&&B>=v&&e[x]===t[B];)a[C]=x--,B--;if(h%2===0&&-E<=S&&S<=E&&a[C]<=r[C+h])return u(a[C],S+l-v,c,d)}}},f=[];return o(0,e.length,0,t.length,f),f},Ag=function(e){return ae(e)?e.outerHTML:Q(e)?Yn.encodeRaw(e.data,!1):dw(e)?"<!--"+e.data+"-->":""},c_=function(e){var t,n=document.createElement("div"),r=document.createDocumentFragment();for(e&&(n.innerHTML=e);t=n.firstChild;)r.appendChild(t);return r},v_=function(e,t,n){var r=c_(t);if(e.hasChildNodes()&&n<e.childNodes.length){var a=e.childNodes[n];a.parentNode.insertBefore(r,a)}else e.appendChild(r)},d_=function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}},m_=function(e,t){var n=0;Y(e,function(r){r[0]===Gl?n++:r[0]===Ng?(v_(t,r[1],n),n++):r[0]===Tg&&d_(t,n)})},p_=function(e){return me(De(dn(e.childNodes),Ag),function(t){return t.length>0})},h_=function(e,t){var n=De(dn(t.childNodes),Ag);return m_(l_(n,e),t),t},g_=fs(function(){return document.implementation.createHTMLDocument("undo")}),b_=function(e){return e.indexOf("</iframe>")!==-1},y_=function(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}},C_=function(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}},Xl=function(e){var t=p_(e.getBody()),n=Jr(t,function(a){var i=uh(e.serializer,a);return i.length>0?[i]:[]}),r=n.join("");return b_(r)?y_(n):C_(r)},Yl=function(e,t,n){var r=n?t.beforeBookmark:t.bookmark;t.type==="fragmented"?h_(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:Ne(r)&&dp(r)?!r.isFakeCaret:!0}),e.selection.moveToBookmark(r)},Ql=function(e){return e.type==="fragmented"?e.fragments.join(""):e.content},Rg=function(e){var t=k.fromTag("body",g_());return om(t,Ql(e)),Y(kt(t,"*[data-mce-bogus]"),jv),nk(t)},w_=function(e,t){return Ql(e)===Ql(t)},S_=function(e,t){return Rg(e)===Rg(t)},fu=function(e,t){return!e||!t?!1:w_(e,t)?!0:S_(e,t)},Zl=function(e){return e.get()===0},lu=function(e,t,n){Zl(n)&&(e.typing=t)},Bg=function(e,t){e.typing&&(lu(e,!1,t),e.add())},E_=function(e){e.typing&&(e.typing=!1,e.add())},k_=function(e,t,n){Zl(t)&&n.set(Pm(e.selection))},x_=function(e,t,n,r,a,i,o){var u=Xl(e);if(i=i||{},i=_.extend(i,u),Zl(r)===!1||e.removed)return null;var s=t.data[n.get()];if(e.fire("BeforeAddUndo",{level:i,lastLevel:s,originalEvent:o}).isDefaultPrevented()||s&&fu(s,i))return null;t.data[n.get()]&&a.get().each(function(v){t.data[n.get()].beforeBookmark=v});var f=bx(e);if(f&&t.data.length>f){for(var l=0;l<t.data.length-1;l++)t.data[l]=t.data[l+1];t.data.length--,n.set(t.data.length)}i.bookmark=Pm(e.selection),n.get()<t.data.length-1&&(t.data.length=n.get()+1),t.data.push(i),n.set(t.data.length-1);var c={level:i,lastLevel:s,originalEvent:o};return n.get()>0?(e.setDirty(!0),e.fire("AddUndo",c),e.fire("change",c)):e.fire("AddUndo",c),i},N_=function(e,t,n){t.data=[],n.set(0),t.typing=!1,e.fire("ClearUndos")},T_=function(e,t,n,r,a){if(t.transact(r)){var i=t.data[n.get()].bookmark,o=t.data[n.get()-1];Yl(e,o,!0),t.transact(a)&&(t.data[n.get()-1].beforeBookmark=i)}},A_=function(e,t,n){var r;return t.get()<n.length-1&&(t.set(t.get()+1),r=n[t.get()],Yl(e,r,!1),e.setDirty(!0),e.fire("Redo",{level:r})),r},R_=function(e,t,n,r){var a;return t.typing&&(t.add(),t.typing=!1,lu(t,!1,n)),r.get()>0&&(r.set(r.get()-1),a=t.data[r.get()],Yl(e,a,!0),e.setDirty(!0),e.fire("Undo",{level:a})),a},B_=function(e){e.clear(),e.add()},__=function(e,t,n){return n.get()>0||t.typing&&t.data[0]&&!fu(Xl(e),t.data[0])},D_=function(e,t){return t.get()<e.data.length-1&&!e.typing},O_=function(e,t,n){return Bg(e,t),e.beforeChange(),e.ignore(n),e.add()},P_=function(e,t){try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},I_=function(e,t){var n=e.dom,r=Ne(t)?t:e.getBody();Nt(e.hasVisual)&&(e.hasVisual=kx(e)),Y(n.select("table,a",r),function(a){switch(a.nodeName){case"TABLE":var i=xx(e),o=n.getAttrib(a,"border");(!o||o==="0")&&e.hasVisual?n.addClass(a,i):n.removeClass(a,i);break;case"A":if(!n.getAttrib(a,"href")){var u=n.getAttrib(a,"name")||a.id,s=Nx(e);u&&e.hasVisual?n.addClass(a,s):n.removeClass(a,s)}break}}),e.fire("VisualAid",{element:t,hasVisual:e.hasVisual})},_g=function(e){return{undoManager:{beforeChange:function(t,n){return k_(e,t,n)},add:function(t,n,r,a,i,o){return x_(e,t,n,r,a,i,o)},undo:function(t,n,r){return R_(e,t,n,r)},redo:function(t,n){return A_(e,t,n)},clear:function(t,n){return N_(e,t,n)},reset:function(t){return B_(t)},hasUndo:function(t,n){return __(e,t,n)},hasRedo:function(t,n){return D_(t,n)},transact:function(t,n,r){return O_(t,n,r)},ignore:function(t,n){return P_(t,n)},extra:function(t,n,r,a){return T_(e,t,n,r,a)}},formatter:{match:function(t,n,r,a){return Ll(e,t,n,r,a)},matchAll:function(t,n){return ZR(e,t,n)},matchNode:function(t,n,r,a){return Tn(e,t,n,r,a)},canApply:function(t){return eB(e,t)},closest:function(t){return JR(e,t)},apply:function(t,n,r){return ql(e,t,n,r)},remove:function(t,n,r,a){return vg(e,t,n,r,a)},toggle:function(t,n,r){return $B(e,t,n,r)},formatChanged:function(t,n,r,a,i){return LB(e,t,n,r,a,i)}},editor:{getContent:function(t,n){return zT(e,t,n)},setContent:function(t,n){return XR(e,t,n)},insertContent:function(t,n){return zR(e,t,n)},addVisual:function(t){return I_(e,t)}},selection:{getContent:function(t,n){return f_(e,t,n)}},raw:{getModel:function(){return b.none()}}}},L_=function(e){var t=function(u){return Qr(u)?u:{}},n=e.undoManager,r=e.formatter,a=e.editor,i=e.selection,o=e.raw;return{undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:function(u,s,f){return n.transact(f)},ignore:function(u,s){return n.ignore(s)},extra:function(u,s,f,l){return n.extra(f,l)}},formatter:{match:function(u,s,f,l){return r.match(u,t(s),l)},matchAll:r.matchAll,matchNode:r.matchNode,canApply:function(u){return r.canApply(u)},closest:function(u){return r.closest(u)},apply:function(u,s,f){return r.apply(u,t(s))},remove:function(u,s,f,l){return r.remove(u,t(s))},toggle:function(u,s,f){return r.toggle(u,t(s))},formatChanged:function(u,s,f,l,c){return r.formatChanged(s,f,l,c)}},editor:{getContent:function(u,s){return a.getContent(u)},setContent:function(u,s){return a.setContent(u,s)},insertContent:function(u,s){return a.insertContent(u)},addVisual:a.addVisual},selection:{getContent:function(u,s){return i.getContent(s)}},raw:{getModel:function(){return b.some(o.getRawModel())}}}},$_=function(){var e=X(null),t=X("");return{undoManager:{beforeChange:ve,add:e,undo:e,redo:e,clear:ve,reset:ve,hasUndo:Re,hasRedo:Re,transact:e,ignore:ve,extra:ve},formatter:{match:Re,matchAll:X([]),matchNode:X(void 0),canApply:Re,closest:t,apply:ve,remove:ve,toggle:ve,formatChanged:X({unbind:ve})},editor:{getContent:t,setContent:t,insertContent:ve,addVisual:ve},selection:{getContent:t},raw:{getModel:X(b.none())}}},Mn=function(e){return pe(e.plugins,"rtc")},F_=function(e){return je(e.plugins,"rtc").bind(function(t){return b.from(t.setup)})},M_=function(e){var t=e;return F_(e).fold(function(){return t.rtcInstance=_g(e),b.none()},function(n){return t.rtcInstance=$_(),b.some(function(){return n().then(function(r){return t.rtcInstance=L_(r),r.rtc.isRemote})})})},Jl=function(e){return e.rtcInstance?e.rtcInstance:_g(e)},Ve=function(e){var t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},U_=function(e,t,n){Ve(e).undoManager.beforeChange(t,n)},z_=function(e,t,n,r,a,i,o){return Ve(e).undoManager.add(t,n,r,a,i,o)},H_=function(e,t,n,r){return Ve(e).undoManager.undo(t,n,r)},V_=function(e,t,n){return Ve(e).undoManager.redo(t,n)},W_=function(e,t,n){Ve(e).undoManager.clear(t,n)},q_=function(e,t){Ve(e).undoManager.reset(t)},j_=function(e,t,n){return Ve(e).undoManager.hasUndo(t,n)},K_=function(e,t,n){return Ve(e).undoManager.hasRedo(t,n)},G_=function(e,t,n,r){return Ve(e).undoManager.transact(t,n,r)},X_=function(e,t,n){Ve(e).undoManager.ignore(t,n)},Y_=function(e,t,n,r,a){Ve(e).undoManager.extra(t,n,r,a)},Q_=function(e,t,n,r,a){return Ve(e).formatter.match(t,n,r,a)},Z_=function(e,t,n){return Ve(e).formatter.matchAll(t,n)},J_=function(e,t,n,r,a){return Ve(e).formatter.matchNode(t,n,r,a)},eD=function(e,t){return Ve(e).formatter.canApply(t)},tD=function(e,t){return Ve(e).formatter.closest(t)},nD=function(e,t,n,r){Ve(e).formatter.apply(t,n,r)},rD=function(e,t,n,r,a){Ve(e).formatter.remove(t,n,r,a)},aD=function(e,t,n,r){Ve(e).formatter.toggle(t,n,r)},iD=function(e,t,n,r,a,i){return Ve(e).formatter.formatChanged(t,n,r,a,i)},oD=function(e,t,n){return Jl(e).editor.getContent(t,n)},uD=function(e,t,n){return Jl(e).editor.setContent(t,n)},sD=function(e,t,n){return Jl(e).editor.insertContent(t,n)},fD=function(e,t,n){return Ve(e).selection.getContent(t,n)},lD=function(e,t){return Ve(e).editor.addVisual(t)},cD=function(e,t){t===void 0&&(t={});var n=t.format?t.format:"html";return fD(e,n,t)},Dg=function(e){return e.dom.length===0?(tt(e),b.none()):b.some(e)},vD=function(e,t){return e.filter(function(n){return Ni.isBookmarkNode(n.dom)}).bind(t?Ja:Er)},dD=function(e,t,n,r){var a=e.dom,i=t.dom,o=r?a.length:i.length;r?(bl(a,i,!1,!r),n.setStart(i,o)):(bl(i,a,!1,!r),n.setEnd(i,o))},mD=function(e,t){Jt(e).each(function(n){var r=e.dom;t&&Jo(n,A(r,0))?tu(r,0):!t&&eu(n,A(r,r.length))&&gl(r,r.length)})},Og=function(e,t,n,r){e.bind(function(a){var i=r?gl:tu;return i(a.dom,r?a.dom.length:0),t.filter(qt).map(function(o){return dD(a,o,n,r)})}).orThunk(function(){var a=vD(t,r).or(t).filter(qt);return a.map(function(i){return mD(i,r)})})},pD=function(e,t){var n=b.from(t.firstChild).map(k.fromDom),r=b.from(t.lastChild).map(k.fromDom);e.deleteContents(),e.insertNode(t);var a=n.bind(Er).filter(qt).bind(Dg),i=r.bind(Ja).filter(qt).bind(Dg);Og(a,n,e,!0),Og(i,r,e,!1),e.collapse(!1)},hD=function(e,t){return ie(ie({format:"html"},e),{set:!0,selection:!0,content:t})},gD=function(e,t){if(t.format!=="raw"){var n=e.selection.getRng(),r=e.dom.getParent(n.commonAncestorContainer,e.dom.isBlock),a=r?{context:r.nodeName.toLowerCase()}:{},i=e.parser.parse(t.content,ie(ie({isRootContent:!0,forced_root_block:!1},a),t));return Ia({validate:e.validate},e.schema).serialize(i)}else return t.content},bD=function(e,t,n){n===void 0&&(n={});var r=hD(n,t),a=r;if(!r.no_events){var i=e.fire("BeforeSetContent",r);if(i.isDefaultPrevented()){e.fire("SetContent",i);return}else a=i}a.content=gD(e,a);var o=e.selection.getRng();pD(o,o.createContextualFragment(a.content)),e.selection.setRng(o),Ai(e,o),a.no_events||e.fire("SetContent",a)},Pg=function(e,t,n){if(e&&pe(e,t)){var r=me(e[t],function(a){return a!==n});r.length===0?delete e[t]:e[t]=r}};function yD(e,t){var n,r,a=function(o,u){return et(u,function(s){return e.is(s,o)})},i=function(o){return e.getParents(o,null,e.getRoot())};return{selectorChangedWithUnbind:function(o,u){return n||(n={},r={},t.on("NodeChange",function(s){var f=s.element,l=i(f),c={};_.each(n,function(v,d){a(d,l).each(function(m){r[d]||(Y(v,function(p){p(!0,{node:m,selector:d,parents:l})}),r[d]=v),c[d]=v})}),_.each(r,function(v,d){c[d]||(delete r[d],_.each(v,function(m){m(!1,{node:f,selector:d,parents:l})}))})})),n[o]||(n[o]=[]),n[o].push(u),a(o,i(t.selection.getStart())).each(function(){r[o]=n[o]}),{unbind:function(){Pg(n,o,u),Pg(r,o,u)}}}}}var Ig=function(e){return!!e.select},Lg=function(e){return!!(e&&e.ownerDocument)&&Wn(k.fromDom(e.ownerDocument),k.fromDom(e))},CD=function(e){return e?Ig(e)?!0:Lg(e.startContainer)&&Lg(e.endContainer):!1},$g=function(e,t,n,r){var a,i,o=yD(e,r).selectorChangedWithUnbind,u=function(O,j){var fe=e.createRng();Ne(O)&&Ne(j)?(fe.setStart(O,j),fe.setEnd(O,j),E(fe),h(!1)):(Uf(e,fe,r.getBody(),!0),E(fe))},s=function(O){return cD(r,O)},f=function(O,j){return bD(r,O,j)},l=function(O){return nh(r.getBody(),g(),O)},c=function(O){return rh(r.getBody(),g(),O)},v=function(O,j){return V.getBookmark(O,j)},d=function(O){return V.moveToBookmark(O)},m=function(O,j){return CT(e,O,j).each(E),O},p=function(){var O=g(),j=y();return!O||O.item?!1:O.compareEndPoints?O.compareEndPoints("StartToEnd",O)===0:!j||O.collapsed},h=function(O){var j=g();j.collapse(!!O),E(j)},y=function(){return t.getSelection?t.getSelection():t.document.selection},g=function(){var O,j,fe,ge=function(Be,lt,xt){try{return lt.compareBoundaryPoints(Be,xt)}catch{return-1}},he=t.document;if(r.bookmark!==void 0&&$r(r)===!1){var We=tl(r);if(We.isSome())return We.map(function(Be){return il(r,[Be])[0]}).getOr(he.createRange())}try{(O=y())&&!Ji(O.anchorNode)&&(O.rangeCount>0?j=O.getRangeAt(0):j=O.createRange?O.createRange():he.createRange(),j=il(r,[j])[0])}catch{}return j||(j=he.createRange?he.createRange():he.body.createTextRange()),j.setStart&&j.startContainer.nodeType===9&&j.collapsed&&(fe=e.getRoot(),j.setStart(fe,0),j.setEnd(fe,0)),a&&i&&(ge(j.START_TO_START,j,a)===0&&ge(j.END_TO_END,j,a)===0?j=i:(a=null,i=null)),j},E=function(O,j){var fe;if(!!CD(O)){var ge=Ig(O)?O:null;if(ge){i=null;try{ge.select()}catch{}return}var he=y(),We=r.fire("SetSelectionRange",{range:O,forward:j});if(O=We.range,he){i=O;try{he.removeAllRanges(),he.addRange(O)}catch{}j===!1&&he.extend&&(he.collapse(O.endContainer,O.endOffset),he.extend(O.startContainer,O.startOffset)),a=he.rangeCount>0?he.getRangeAt(0):null}!O.collapsed&&O.startContainer===O.endContainer&&he.setBaseAndExtent&&!se.ie&&O.endOffset-O.startOffset<2&&O.startContainer.hasChildNodes()&&(fe=O.startContainer.childNodes[O.startOffset],fe&&fe.tagName==="IMG"&&(he.setBaseAndExtent(O.startContainer,O.startOffset,O.endContainer,O.endOffset),(he.anchorNode!==O.startContainer||he.focusNode!==O.endContainer)&&he.setBaseAndExtent(fe,0,fe,1))),r.fire("AfterSetSelectionRange",{range:O,forward:j})}},S=function(O){return f(e.getOuterHTML(O)),O},C=function(){return bT(r.getBody(),g())},x=function(O,j){return yT(e,g(),O,j)},B=function(){var O=y(),j=O==null?void 0:O.anchorNode,fe=O==null?void 0:O.focusNode;if(!O||!j||!fe||Ji(j)||Ji(fe))return!0;var ge=e.createRng();ge.setStart(j,O.anchorOffset),ge.collapse(!0);var he=e.createRng();return he.setStart(fe,O.focusOffset),he.collapse(!0),ge.compareBoundaryPoints(ge.START_TO_START,he)<=0},L=function(){var O=g(),j=y();if(!E1(j)&&Vo(r)){var fe=Wo(e,O);return fe.each(function(ge){E(ge,B())}),fe.getOr(O)}return O},ne=function(O,j){return o(O,j),F},q=function(){for(var O,j=e.getRoot();j&&j.nodeName!=="BODY";){if(j.scrollHeight>j.clientHeight){O=j;break}j=j.parentNode}return O},D=function(O,j){Ne(O)?SN(r,O,j):Ai(r,g(),j)},ee=function(O,j){return E(jf(O,j,r.getDoc()))},U=function(){var O=g();return O.collapsed?A.fromRangeStart(O).getClientRects()[0]:O.getBoundingClientRect()},W=function(){t=a=i=null,K.destroy()},F={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:n,editor:r,collapse:h,setCursorLocation:u,getContent:s,setContent:f,getBookmark:v,moveToBookmark:d,select:m,isCollapsed:p,isForward:B,setNode:S,getNode:C,getSel:y,setRng:E,getRng:g,getStart:l,getEnd:c,getSelectedBlocks:x,normalize:L,selectorChanged:ne,selectorChangedWithUnbind:o,getScrollContainer:q,scrollIntoView:D,placeCaretAt:ee,getBoundingClientRect:U,destroy:W},V=Ni(F),K=Ip(F,r);return F.bookmarkManager=V,F.controlSelection=K,F},wD=function(e,t){Y(t,function(n){e.attr(n,null)})},SD=function(e,t,n){e.addNodeFilter("font",function(r){Y(r,function(a){var i=t.parse(a.attr("style")),o=a.attr("color"),u=a.attr("face"),s=a.attr("size");o&&(i.color=o),u&&(i["font-family"]=u),s&&(i["font-size"]=n[parseInt(a.attr("size"),10)-1]),a.name="span",a.attr("style",t.serialize(i)),wD(a,["color","face","size"])})})},ED=function(e,t){e.addNodeFilter("strike",function(n){Y(n,function(r){var a=t.parse(r.attr("style"));a["text-decoration"]="line-through",r.name="span",r.attr("style",t.serialize(a))})})},kD=function(e,t){var n=Hs();t.convert_fonts_to_spans&&SD(e,n,_.explode(t.font_size_legacy_values)),ED(e,n)},xD=function(e,t){t.inline_styles&&kD(e,t)},ND=function(e){return new it(function(t,n){var r=function(){n("Cannot convert "+e+" to Blob. Resource might not exist or is inaccessible.")};try{var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(){a.status===200?t(a.response):r()},a.onerror=r,a.send()}catch{r()}})},ec=function(e){var t,n=decodeURIComponent(e).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(t=r[1]),{type:t,data:n[1]}},Fg=function(e,t){var n;try{n=atob(t)}catch{return b.none()}for(var r=new Uint8Array(n.length),a=0;a<r.length;a++)r[a]=n.charCodeAt(a);return b.some(new Blob([r],{type:e}))},TD=function(e){return new it(function(t){var n=ec(e),r=n.type,a=n.data;Fg(r,a).fold(function(){return t(new Blob([]))},t)})},Mg=function(e){return e.indexOf("blob:")===0?ND(e):e.indexOf("data:")===0?TD(e):null},AD=function(e){return new it(function(t){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(e)})},RD=0,tc=function(e){return(e||"blobid")+RD++},BD=function(e,t,n,r){var a,i;if(t.src.indexOf("blob:")===0){i=e.getByUri(t.src),i?n({image:t,blobInfo:i}):Mg(t.src).then(function(f){AD(f).then(function(l){a=ec(l).data,i=e.create(tc(),f,a),e.add(i),n({image:t,blobInfo:i})})},function(f){r(f)});return}var o=ec(t.src),u=o.data,s=o.type;a=u,i=e.getByData(a,s),i?n({image:t,blobInfo:i}):Mg(t.src).then(function(f){i=e.create(tc(),f,a),e.add(i),n({image:t,blobInfo:i})},function(f){r(f)})},_D=function(e){return e?dn(e.getElementsByTagName("img")):[]},DD=function(e,t){var n={},r=function(a,i){i||(i=qe);var o=me(_D(a),function(s){var f=s.src;return!se.fileApi||s.hasAttribute("data-mce-bogus")||s.hasAttribute("data-mce-placeholder")||!f||f===se.transparentSrc?!1:f.indexOf("blob:")===0?!e.isUploaded(f)&&i(s):f.indexOf("data:")===0?i(s):!1}),u=De(o,function(s){if(n[s.src]!==void 0)return new it(function(l){n[s.src].then(function(c){if(typeof c=="string")return c;l({image:s,blobInfo:c.blobInfo})})});var f=new it(function(l,c){BD(t,s,l,c)}).then(function(l){return delete n[l.image.src],l}).catch(function(l){return delete n[s.src],l});return n[s.src]=f,f});return it.all(u)};return{findAll:r}},nc=function(e,t,n,r){var a=e.padd_empty_with_br||t.insert;a&&n[r.name]?r.empty().append(new Xt("br",1)).shortEnded=!0:r.empty().append(new Xt("#text",3)).value=At},OD=function(e){return Ug(e,"#text")&&e.firstChild.value===At},Ug=function(e,t){return e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t},PD=function(e,t){var n=e.getElementRule(t.name);return n&&n.paddEmpty},Di=function(e,t,n,r){return r.isEmpty(t,n,function(a){return PD(e,a)})},ID=function(e,t){return e&&(pe(t,e.name)||e.name==="br")},LD=function(e){return Ne(e.attr("data-mce-bogus"))},$D=function(e){return e.attr("src")===se.transparentSrc||Ne(e.attr("data-mce-placeholder"))},FD=function(e,t){if(t.images_dataimg_filter){var n=new Image;return n.src=e.attr("src"),Pe(e.attributes.map,function(r,a){n.setAttribute(a,r)}),t.images_dataimg_filter(n)}else return!0},MD=function(e,t){var n=t.blob_cache,r=function(a){var i=a.attr("src");$D(a)||LD(a)||kT(i).filter(function(){return FD(a,t)}).bind(function(o){var u=o.type,s=o.data;return b.from(n.getByData(s,u)).orThunk(function(){return Fg(u,s).map(function(f){var l=n.create(tc(),f,s);return n.add(l),l})})}).each(function(o){a.attr("src",o.blobUri())})};n&&e.addAttributeFilter("src",function(a){return Y(a,r)})},UD=function(e,t){var n=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",function(r,a,i){var o,u=r.length,s,f=_.extend({},n.getBlockElements()),l=n.getNonEmptyElements(),c,v,d,m,p=n.getWhiteSpaceElements(),h,y;for(f.body=1,o=0;o<u;o++)if(s=r[o],c=s.parent,f[s.parent.name]&&s===c.lastChild){for(d=s.prev;d;){if(m=d.name,m!=="span"||d.attr("data-mce-type")!=="bookmark"){m==="br"&&(s=null);break}d=d.prev}s&&(s.remove(),Di(n,l,p,c)&&(h=n.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&nc(t,i,f,c))))}else{for(v=s;c&&c.firstChild===v&&c.lastChild===v&&(v=c,!f[c.name]);)c=c.parent;v===c&&t.padd_empty_with_br!==!0&&(y=new Xt("#text",3),y.value=At,s.replace(y))}}),e.addAttributeFilter("href",function(r){var a=r.length,i=function(s){var f=s.split(" ").filter(function(l){return l.length>0});return f.concat(["noopener"]).sort().join(" ")},o=function(s){var f=s?_.trim(s):"";return/\b(noopener)\b/g.test(f)?f:i(f)};if(!t.allow_unsafe_link_target)for(;a--;){var u=r[a];u.name==="a"&&u.attr("target")==="_blank"&&u.attr("rel",o(u.attr("rel")))}}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",function(r){for(var a=r.length,i,o,u,s;a--;)if(s=r[a],s.name==="a"&&s.firstChild&&!s.attr("href")){u=s.parent,i=s.lastChild;do o=i.prev,u.insert(i,s),i=o;while(i)}}),t.fix_list_elements&&e.addNodeFilter("ul,ol",function(r){for(var a=r.length,i,o;a--;)if(i=r[a],o=i.parent,o.name==="ul"||o.name==="ol")if(i.prev&&i.prev.name==="li")i.prev.append(i);else{var u=new Xt("li",1);u.attr("style","list-style-type: none"),i.wrap(u)}}),t.validate&&n.getValidClasses()&&e.addAttributeFilter("class",function(r){for(var a=n.getValidClasses(),i=r.length;i--;){for(var o=r[i],u=o.attr("class").split(" "),s="",f=0;f<u.length;f++){var l=u[f],c=!1,v=a["*"];v&&v[l]&&(c=!0),v=a[o.name],!c&&v&&v[l]&&(c=!0),c&&(s&&(s+=" "),s+=l)}s.length||(s=null),o.attr("class",s)}}),MD(e,t)},zg=_.makeMap,Hg=_.each,Vg=_.explode,zD=_.extend,rc=function(e,t){t===void 0&&(t=Zn());var n={},r=[],a={},i={};e=e||{},e.validate="validate"in e?e.validate:!0,e.root_name=e.root_name||"body";var o=function(m){for(var p=zg("tr,td,th,tbody,thead,tfoot,table"),h=t.getNonEmptyElements(),y=t.getWhiteSpaceElements(),g=t.getTextBlockElements(),E=t.getSpecialElements(),S=function(V,K){if(K===void 0&&(K=V.parent),E[V.name])V.empty().remove();else{for(var O=V.children(),j=0,fe=O;j<fe.length;j++){var ge=fe[j];t.isValidChild(K.name,ge.name)||S(ge,K)}V.unwrap()}},C=0;C<m.length;C++){var x=m[C],B=void 0,L=void 0,ne=void 0;if(!(!x.parent||x.fixed)){if(g[x.name]&&x.parent.name==="li"){for(var q=x.next;q&&g[q.name];){q.name="li",q.fixed=!0,x.parent.insert(q,x.parent);q=q.next}x.unwrap();continue}var D=[x];for(B=x.parent;B&&!t.isValidChild(B.name,x.name)&&!p[B.name];B=B.parent)D.push(B);if(B&&D.length>1)if(t.isValidChild(B.name,x.name)){D.reverse(),L=u(D[0].clone());for(var ee=L,U=0;U<D.length-1;U++){t.isValidChild(ee.name,D[U].name)?(ne=u(D[U].clone()),ee.append(ne)):ne=ee;for(var W=D[U].firstChild;W&&W!==D[U+1];){var F=W.next;ne.append(W),W=F}ee=ne}Di(t,h,y,L)?B.insert(x,D[0],!0):(B.insert(L,D[0],!0),B.insert(x,L)),B=D[0],(Di(t,h,y,B)||Ug(B,"br"))&&B.empty().remove()}else S(x);else if(x.parent){if(x.name==="li"){var q=x.prev;if(q&&(q.name==="ul"||q.name==="ol")){q.append(x);continue}if(q=x.next,q&&(q.name==="ul"||q.name==="ol")){q.insert(x,q.firstChild,!0);continue}x.wrap(u(new Xt("ul",1)));continue}t.isValidChild(x.parent.name,"div")&&t.isValidChild("div",x.name)?x.wrap(u(new Xt("div",1))):S(x)}}}},u=function(m){var p=m.name;if(p in n){var h=a[p];h?h.push(m):a[p]=[m]}for(var y=r.length;y--;){var g=r[y].name;if(g in m.attributes.map){var h=i[g];h?h.push(m):i[g]=[m]}}return m},s=function(m,p){Hg(Vg(m),function(h){var y=n[h];y||(n[h]=y=[]),y.push(p)})},f=function(){var m=[];for(var p in n)pe(n,p)&&m.push({name:p,callbacks:n[p]});return m},l=function(m,p){Hg(Vg(m),function(h){var y;for(y=0;y<r.length;y++)if(r[y].name===h){r[y].callbacks.push(p);return}r.push({name:h,callbacks:[p]})})},c=function(){return[].concat(r)},v=function(m,p){var h,y,g,E,S,C,x,B=[],L,ne=function(N){return N===!1?"":N===!0?"p":N};p=p||{},a={},i={};var q=zD(zg("script,style,head,html,body,title,meta,param"),t.getBlockElements()),D=Ad(t),ee=t.getNonEmptyElements(),U=t.children,W=e.validate,F="forced_root_block"in p?p.forced_root_block:e.forced_root_block,V=ne(F),K=t.getWhiteSpaceElements(),O=/^[ \t\r\n]+/,j=/[ \t\r\n]+$/,fe=/[ \t\r\n]+/g,ge=/^[ \t\r\n]+$/,he=pe(K,p.context)||pe(K,e.root_name),We=function(){var N=Z.firstChild,$=null,I=function(te){te&&(N=te.firstChild,N&&N.type===3&&(N.value=N.value.replace(O,"")),N=te.lastChild,N&&N.type===3&&(N.value=N.value.replace(j,"")))};if(!!t.isValidChild(Z.name,V.toLowerCase())){for(;N;){var J=N.next;N.type===3||N.type===1&&N.name!=="p"&&!q[N.name]&&!N.attr("data-mce-type")?($||($=Be(V,1),$.attr(e.forced_root_block_attrs),Z.insert($,N)),$.append(N)):(I($),$=null),N=J}I($)}},Be=function(N,$){var I=new Xt(N,$),J;return N in n&&(J=a[N],J?J.push(I):a[N]=[I]),I},lt=function(N){for(var $=t.getBlockElements(),I=N.prev;I&&I.type===3;){var J=I.value.replace(j,"");if(J.length>0){I.value=J;return}var te=I.next;if(te){if(te.type===3&&te.value.length){I=I.prev;continue}if(!$[te.name]&&te.name!=="script"&&te.name!=="style"){I=I.prev;continue}}var Ce=I.prev;I.remove(),I=Ce}},xt=function(N){var $={};for(var I in N)I!=="li"&&I!=="p"&&($[I]=N[I]);return $},P=function(N){for(var $=N;Ne($);){if($.name in D)return Di(t,ee,K,$);$=$.parent}return!1},z=Qo({validate:W,document:e.document,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_script_urls:e.allow_script_urls,allow_conditional_comments:e.allow_conditional_comments,preserve_cdata:e.preserve_cdata,self_closing_elements:xt(t.getSelfClosingElements()),cdata:function(N){L.append(Be("#cdata",4)).value=N},text:function(N,$){var I;he||(N=N.replace(fe," "),ID(L.lastChild,q)&&(N=N.replace(O,""))),N.length!==0&&(I=Be("#text",3),I.raw=!!$,L.append(I).value=N)},comment:function(N){L.append(Be("#comment",8)).value=N},pi:function(N,$){L.append(Be(N,7)).value=$,lt(L)},doctype:function(N){var $=L.append(Be("#doctype",10));$.value=N,lt(L)},start:function(N,$,I){var J=W?t.getElementRule(N):{};if(J){var te=Be(J.outputName||N,1);te.attributes=$,te.shortEnded=I,L.append(te);var Ce=U[L.name];Ce&&U[te.name]&&!Ce[te.name]&&B.push(te);for(var Fe=r.length;Fe--;){var Le=r[Fe].name;Le in $.map&&(C=i[Le],C?C.push(te):i[Le]=[te])}q[N]&&lt(te),I||(L=te),!he&&K[N]&&(he=!0)}},end:function(N){var $,I,J,te=W?t.getElementRule(N):{};if(te){if(q[N]&&!he){if($=L.firstChild,$&&$.type===3)if(I=$.value.replace(O,""),I.length>0)$.value=I,$=$.next;else for(J=$.next,$.remove(),$=J;$&&$.type===3;)I=$.value,J=$.next,(I.length===0||ge.test(I))&&($.remove(),$=J),$=J;if($=L.lastChild,$&&$.type===3)if(I=$.value.replace(j,""),I.length>0)$.value=I,$=$.prev;else for(J=$.prev,$.remove(),$=J;$&&$.type===3;)I=$.value,J=$.prev,(I.length===0||ge.test(I))&&($.remove(),$=J),$=J}he&&K[N]&&(he=!1);var Ce=Di(t,ee,K,L),Fe=L.parent;te.paddInEmptyBlock&&Ce&&P(L)?nc(e,p,q,L):te.removeEmpty&&Ce?q[L.name]?L.empty().remove():L.unwrap():te.paddEmpty&&(OD(L)||Ce)&&nc(e,p,q,L),L=Fe}}},t),Z=L=new Xt(p.context||e.root_name,11);if(z.parse(m,p.format),W&&B.length&&(p.context?p.invalid=!0:o(B)),V&&(Z.name==="body"||p.isRootContent)&&We(),!p.invalid){for(x in a)if(!!pe(a,x)){for(C=n[x],h=a[x],E=h.length;E--;)h[E].parent||h.splice(E,1);for(y=0,g=C.length;y<g;y++)C[y](h,x,p)}for(y=0,g=r.length;y<g;y++)if(C=r[y],C.name in i){for(h=i[C.name],E=h.length;E--;)h[E].parent||h.splice(E,1);for(E=0,S=C.callbacks.length;E<S;E++)C.callbacks[E](h,C.name,p)}}return Z},d={schema:t,addAttributeFilter:l,getAttributeFilters:c,addNodeFilter:s,getNodeFilters:f,filterNode:u,parse:v};return UD(d,e),xD(d,e),d},HD=function(e,t,n){e.addAttributeFilter("data-mce-tabindex",function(r,a){for(var i=r.length;i--;){var o=r[i];o.attr("tabindex",o.attr("data-mce-tabindex")),o.attr(a,null)}}),e.addAttributeFilter("src,href,style",function(r,a){for(var i="data-mce-"+a,o=t.url_converter,u=t.url_converter_scope,s=r.length;s--;){var f=r[s],l=f.attr(i);l!==void 0?(f.attr(a,l.length>0?l:null),f.attr(i,null)):(l=f.attr(a),a==="style"?l=n.serializeStyle(n.parseStyle(l),f.name):o&&(l=o.call(u,l,a,f.name)),f.attr(a,l.length>0?l:null))}}),e.addAttributeFilter("class",function(r){for(var a=r.length;a--;){var i=r[a],o=i.attr("class");o&&(o=i.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),i.attr("class",o.length>0?o:null))}}),e.addAttributeFilter("data-mce-type",function(r,a,i){for(var o=r.length;o--;){var u=r[o];if(u.attr("data-mce-type")==="bookmark"&&!i.cleanup){var s=b.from(u.firstChild).exists(function(f){return!fo(f.value)});s?u.unwrap():u.remove()}}}),e.addNodeFilter("noscript",function(r){for(var a=r.length;a--;){var i=r[a].firstChild;i&&(i.value=Yn.decode(i.value))}}),e.addNodeFilter("script,style",function(r,a){for(var i=function(l){return l.replace(/(<!--\[CDATA\[|\]\]-->)/g,`
`).replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},o=r.length;o--;){var u=r[o],s=u.firstChild?u.firstChild.value:"";if(a==="script"){var f=u.attr("type");f&&u.attr("type",f==="mce-no/type"?null:f.replace(/^mce\-/,"")),t.element_format==="xhtml"&&s.length>0&&(u.firstChild.value=`// <![CDATA[
`+i(s)+`
// ]]>`)}else t.element_format==="xhtml"&&s.length>0&&(u.firstChild.value=`<!--
`+i(s)+`
-->`)}}),e.addNodeFilter("#comment",function(r){for(var a=r.length;a--;){var i=r[a];t.preserve_cdata&&i.value.indexOf("[CDATA[")===0?(i.name="#cdata",i.type=4,i.value=n.decode(i.value.replace(/^\[CDATA\[|\]\]$/g,""))):i.value.indexOf("mce:protected ")===0&&(i.name="#text",i.type=3,i.raw=!0,i.value=unescape(i.value).substr(14))}}),e.addNodeFilter("xml:namespace,input",function(r,a){for(var i=r.length;i--;){var o=r[i];o.type===7?o.remove():o.type===1&&a==="input"&&!o.attr("type")&&o.attr("type","text")}}),e.addAttributeFilter("data-mce-type",function(r){Y(r,function(a){a.attr("data-mce-type")==="format-caret"&&(a.isEmpty(e.schema.getNonEmptyElements())?a.remove():a.unwrap())})}),e.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(r,a){for(var i=r.length;i--;)r[i].attr(a,null)})},VD=function(e){var t=function(a){return a&&a.name==="br"},n=e.lastChild;if(t(n)){var r=n.prev;t(r)&&(n.remove(),r.remove())}},WD=function(e,t,n){var r,a=e.dom,i=t.cloneNode(!0),o=document.implementation;if(o.createHTMLDocument){var u=o.createHTMLDocument("");_.each(i.nodeName==="BODY"?i.childNodes:[i],function(s){u.body.appendChild(u.importNode(s,!0))}),i.nodeName!=="BODY"?i=u.body.firstChild:i=u.body,r=a.doc,a.doc=u}return I1(e,ie(ie({},n),{node:i})),r&&(a.doc=r),i},qD=function(e,t){return e&&e.hasEventListeners("PreProcess")&&!t.no_events},jD=function(e,t,n){return qD(e,n)?WD(e,t,n):t},KD=function(e,t,n){_.inArray(t,n)===-1&&(e.addAttributeFilter(n,function(r,a){for(var i=r.length;i--;)r[i].attr(a,null)}),t.push(n))},GD=function(e,t,n){if(!t.no_events&&e){var r=L1(e,ie(ie({},t),{content:n}));return r.content}else return n},XD=function(e,t,n){var r=Xn(n.getInner?t.innerHTML:e.getOuterHTML(t));return n.selection||so(k.fromDom(t))?r:_.trim(r)},YD=function(e,t,n){var r=n.selection?ie({forced_root_block:!1},n):n,a=e.parse(t,r);return VD(a),a},QD=function(e,t,n){var r=Ia(e,t);return r.serialize(n)},ZD=function(e,t,n,r,a){var i=QD(t,n,r);return GD(e,a,i)},JD=function(e,t){var n=["data-mce-selected"],r=t&&t.dom?t.dom:xe.DOM,a=t&&t.schema?t.schema:Zn(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0;var i=rc(e,a);HD(i,e,r);var o=function(u,s){s===void 0&&(s={});var f=ie({format:"html"},s),l=jD(t,u,f),c=XD(r,l,f),v=YD(i,c,f);return f.format==="tree"?v:ZD(t,e,a,v,f)};return{schema:a,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:o,addRules:a.addValidElements,setRules:a.setValidElements,addTempAttr:G(KD,i,n),getTempAttrs:X(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},Wg=function(e,t){var n=JD(e,t);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}},eO="html",tO=function(e,t){t===void 0&&(t={});var n=t.format?t.format:eO;return oD(e,t,n)},ac=function(e,t,n){return n===void 0&&(n={}),uD(e,t,n)},cu=xe.DOM,nO=function(e){cu.setStyle(e.id,"display",e.orgDisplay)},vu=function(e){return b.from(e).each(function(t){return t.destroy()})},rO=function(e){e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null,e.bodyElement=e.contentDocument=e.contentWindow=null,e.iframeElement=e.targetElm=null,e.selection&&(e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null)},aO=function(e){var t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),cu.unbind(t,"submit reset",e.formEventDelegate))},iO=function(e){if(!e.removed){var t=e._selectionOverrides,n=e.editorUpload,r=e.getBody(),a=e.getElement();r&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&a&&cu.remove(a.nextSibling),$1(e),e.editorManager.remove(e),!e.inline&&r&&nO(e),F1(e),cu.remove(e.getContainer()),vu(t),vu(n),e.destroy()}},oO=function(e,t){var n=e.selection,r=e.dom;if(!e.destroyed){if(!t&&!e.removed){e.remove();return}t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),vu(n),vu(r)),aO(e),rO(e),e.destroyed=!0}},uO=function(e,t){var n=Qr(e)&&Qr(t);return n?qg(e,t):t},sO=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length===0)throw new Error("Can't merge zero objects");for(var r={},a=0;a<t.length;a++){var i=t[a];for(var o in i)pe(i,o)&&(r[o]=e(r[o],i[o]))}return r}},qg=sO(uO),fO="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),lO="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),cO="imagetools,toc".split(","),vO=function(e){var t=me(fO,function(r){return pe(e,r)}),n=e.forced_root_block;return(n===!1||n==="")&&t.push("forced_root_block (false only)"),as(t)},dO=function(e){var t=_.makeMap(e.plugins," "),n=function(a){return pe(t,a)},r=Dn(Dn([],me(lO,n),!0),Jr(cO,function(a){return n(a)?[a+" (moving to premium)"]:[]}),!0);return as(r)},mO=function(e,t){var n=vO(e),r=dO(t),a=r.length>0,i=n.length>0,o=t.theme==="mobile";if(a||i||o){var u=`
- `,s=o?`
Themes:`+u+"mobile":"",f=a?`
Plugins:`+u+r.join(u):"",l=i?`
Settings:`+u+n.join(u):"";console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+s+f+l)}},pO=function(e,t){return{sections:X(e),settings:X(t)}},ic=Wt().deviceType,hO=ic.isTouch(),jg=ic.isPhone(),gO=ic.isTablet(),bO=["lists","autolink","autosave"],Kg={table_grid:!1,object_resizing:!1,resize:!1},Oi=function(e){var t=Vt(e)?e.join(" "):e,n=De(He(t)?t.split(" "):[],vs);return me(n,function(r){return r.length>0})},yO=function(e){return me(e,G(Je,bO))},CO=function(e,t){var n=ZC(t,function(r,a){return Je(e,a)});return pO(n.t,n.f)},wO=function(e,t,n){n===void 0&&(n={});var r=e.sections(),a=je(r,t).getOr({});return _.extend({},n,a)},du=function(e,t){return pe(e.sections(),t)},SO=function(e,t,n){var r=e.sections();return du(e,t)&&r[t].theme===n},EO=function(e,t){return du(e,t)?e.sections()[t]:{}},Gg=function(e,t){return je(e,"toolbar_mode").orThunk(function(){return je(e,"toolbar_drawer").map(function(n){return n===!1?"wrap":n})}).getOr(t)},kO=function(e,t,n,r,a){var i={id:t,theme:"silver",toolbar_mode:Gg(e,"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:a.convertURL,url_converter_scope:a};return ie(ie({},i),r?Kg:{})},xO=function(e,t){var n={resize:!1,toolbar_mode:Gg(e,"scrolling"),toolbar_sticky:!1},r={menubar:!1};return ie(ie(ie({},Kg),n),t?r:{})},NO=function(e,t){var n=t.external_plugins?t.external_plugins:{};return e&&e.external_plugins?_.extend({},e.external_plugins,n):n},TO=function(e,t){return[].concat(Oi(e)).concat(Oi(t))},AO=function(e,t,n,r){return e&&SO(t,"mobile","mobile")?yO(r):e&&du(t,"mobile")?r:n},RO=function(e,t,n,r){var a=Oi(n.forced_plugins),i=Oi(r.plugins),o=EO(t,"mobile"),u=o.plugins?Oi(o.plugins):i,s=AO(e,t,i,u),f=TO(a,s);if(se.browser.isIE()&&Je(f,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return _.extend(r,{plugins:f.join(" ")})},BO=function(e,t){return e&&du(t,"mobile")},_O=function(e,t,n,r,a){var i=e?{mobile:xO(a.mobile||{},t)}:{},o=CO(["mobile"],qg(i,a)),u=_.extend(n,r,o.settings(),BO(e,o)?wO(o,"mobile"):{},{validate:!0,external_plugins:NO(r,o.settings())});return RO(e,o,r,u)},DO=function(e,t,n,r,a){var i=kO(a,t,n,hO,e),o=_O(jg||gO,jg,i,r,a);return o.deprecation_warnings!==!1&&mO(a,o),o},Ur=function(e,t,n){return b.from(t.settings[n]).filter(e)},OO=function(e){var t={};return typeof e=="string"?Y(e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(","),function(n){var r=n.split("=");r.length>1?t[_.trim(r[0])]=_.trim(r[1]):t[_.trim(r[0])]=_.trim(r[0])}):t=e,t},PO=function(e){return function(t){return Vt(t)&&Ga(t,e)}},IO=function(e,t,n,r){var a=t in e.settings?e.settings[t]:n;return r==="hash"?OO(a):r==="string"?Ur(He,e,t).getOr(n):r==="number"?Ur(Zr,e,t).getOr(n):r==="boolean"?Ur(jc,e,t).getOr(n):r==="object"?Ur(Qr,e,t).getOr(n):r==="array"?Ur(Vt,e,t).getOr(n):r==="string[]"?Ur(PO(He),e,t).getOr(n):r==="function"?Ur(Oe,e,t).getOr(n):a},LO=function(){var e={},t=function(a,i){e[a]=i},n=function(a){return e[a]?e[a]:{icons:{}}},r=function(a){return pe(e,a)};return{add:t,get:n,has:r}},mu=LO(),Xg=function(e,t){var n=t.dom;return n[e]},Yg=function(e,t){return parseInt(Pn(t,e),10)},$O=G(Xg,"clientWidth"),FO=G(Xg,"clientHeight"),MO=G(Yg,"margin-top"),UO=G(Yg,"margin-left"),zO=function(e){return e.dom.getBoundingClientRect()},HO=function(e,t,n){var r=$O(e),a=FO(e);return t>=0&&n>=0&&t<=r&&n<=a},VO=function(e,t,n,r){var a=zO(t),i=e?a.left+t.dom.clientLeft+UO(t):0,o=e?a.top+t.dom.clientTop+MO(t):0,u=n-i,s=r-o;return{x:u,y:s}},Qg=function(e,t,n){var r=k.fromDom(e.getBody()),a=e.inline?r:Q0(r),i=VO(e.inline,a,t,n);return HO(a,i.x,i.y)},WO=function(e){return b.from(e).map(k.fromDom)},qO=function(e){var t=e.inline?e.getBody():e.getContentAreaContainer();return WO(t).map(ti).getOr(!1)},jO=function(){var e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,reposition:e,getArgs:e}},Zg=function(e){var t=[],n=function(){var v=e.theme;return v&&v.getNotificationManagerImpl?v.getNotificationManagerImpl():jO()},r=function(){return b.from(t[0])},a=function(v,d){return v.type===d.type&&v.text===d.text&&!v.progressBar&&!v.timeout&&!d.progressBar&&!d.timeout},i=function(){t.length>0&&n().reposition(t)},o=function(v){t.push(v)},u=function(v){qi(t,function(d){return d===v}).each(function(d){t.splice(d,1)})},s=function(v,d){if(d===void 0&&(d=!0),!(e.removed||!qO(e)))return d&&e.fire("BeforeOpenNotification",{notification:v}),et(t,function(m){return a(n().getArgs(m),v)}).getOrThunk(function(){e.editorManager.setActive(e);var m=n().open(v,function(){u(m),i(),r().fold(function(){return e.focus()},function(p){return kN(k.fromDom(p.getEl()))})});return o(m),i(),e.fire("OpenNotification",{notification:ie({},m)}),m})},f=function(){r().each(function(v){n().close(v),u(v),i()})},l=X(t),c=function(v){v.on("SkinLoaded",function(){var d=ax(v);d&&s({text:d,type:"warning",timeout:0},!1),i()}),v.on("show ResizeEditor ResizeWindow NodeChange",function(){ot.requestAnimationFrame(i)}),v.on("remove",function(){Y(t.slice(),function(d){n().close(d)})})};return c(e),{open:s,close:f,getNotifications:l}},sn=Rt.PluginManager,dr=Rt.ThemeManager;function KO(){var e=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}}var Jg=function(e){var t=[],n=function(){var p=e.theme;return p&&p.getWindowManagerImpl?p.getWindowManagerImpl():KO()},r=function(p,h){return function(){for(var y=[],g=0;g<arguments.length;g++)y[g]=arguments[g];return h?h.apply(p,y):void 0}},a=function(p){e.fire("OpenWindow",{dialog:p})},i=function(p){e.fire("CloseWindow",{dialog:p})},o=function(p){t.push(p),a(p)},u=function(p){i(p),t=me(t,function(h){return h!==p}),t.length===0&&e.focus()},s=function(){return b.from(t[t.length-1])},f=function(p){e.editorManager.setActive(e),Go(e);var h=p();return o(h),h},l=function(p,h){return f(function(){return n().open(p,h,u)})},c=function(p){return f(function(){return n().openUrl(p,u)})},v=function(p,h,y){var g=n();g.alert(p,r(y||g,h))},d=function(p,h,y){var g=n();g.confirm(p,r(y||g,h))},m=function(){s().each(function(p){n().close(p),u(p)})};return e.on("remove",function(){Y(t,function(p){n().close(p)})}),{open:l,openUrl:c,alert:v,confirm:d,close:m}},eb=function(e,t){e.notificationManager.open({type:"error",text:t})},pu=function(e,t){e._skinLoaded?eb(e,t):e.on("SkinLoaded",function(){eb(e,t)})},GO=function(e,t){pu(e,rn.translate(["Failed to upload image: {0}",t]))},oc=function(e,t,n){Op(e,t,{message:n}),console.error(n)},uc=function(e,t,n){return n?"Failed to load "+e+": "+n+" from url "+t:"Failed to load "+e+" url: "+t},sc=function(e,t,n){oc(e,"PluginLoadError",uc("plugin",t,n))},XO=function(e,t,n){oc(e,"IconsLoadError",uc("icons",t,n))},YO=function(e,t,n){oc(e,"LanguageLoadError",uc("language",t,n))},QO=function(e,t,n){var r=rn.translate(["Failed to initialize plugin: {0}",t]);Op(e,"PluginLoadError",{message:r}),hu(r,n),pu(e,r)},hu=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,Dn([e],t,!1)):r.log.apply(r,Dn([e],t,!1)))},ZO=function(e){return/^[a-z0-9\-]+$/i.test(e)},JO=function(e){return tb(e,Jk(e))},eP=function(e){return tb(e,Hm(e))},tb=function(e,t){var n=e.editorManager.baseURL+"/skins/content",r=e.editorManager.suffix,a="content"+r+".css",i=e.inline===!0;return De(t,function(o){return ZO(o)&&!i?n+"/"+o+"/"+a:e.documentBaseURI.toAbsolute(o)})},tP=function(e){e.contentCSS=e.contentCSS.concat(JO(e),eP(e))},nb=function(){var e=1,t=2,n={},r=function(v,d){return{status:v,resultUri:d}},a=function(v){return v in n},i=function(v){var d=n[v];return d?d.resultUri:null},o=function(v){return a(v)?n[v].status===e:!1},u=function(v){return a(v)?n[v].status===t:!1},s=function(v){n[v]=r(e,null)},f=function(v,d){n[v]=r(t,d)},l=function(v){delete n[v]},c=function(){n={}};return{hasBlobUri:a,getResultUri:i,isPending:o,isUploaded:u,markPending:s,markUploaded:f,removeFailed:l,destroy:c}},nP=0,rP=function(){var e=function(){return Math.round(Math.random()*4294967295).toString(36)},t=new Date().getTime();return"s"+t.toString(36)+e()+e()+e()},rb=function(e){return e+nP+++rP()},aP=function(){var e=[],t=function(c){var v={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};return v[c.toLowerCase()]||"dat"},n=function(c,v,d,m,p){if(He(c)){var h=c;return r({id:h,name:m,filename:p,blob:v,base64:d})}else{if(Qr(c))return r(c);throw new Error("Unknown input type")}},r=function(c){if(!c.blob||!c.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var v=c.id||rb("blobid"),d=c.name||v,m=c.blob;return{id:X(v),name:X(d),filename:X(c.filename||d+"."+t(m.type)),blob:X(m),base64:X(c.base64),blobUri:X(c.blobUri||URL.createObjectURL(m)),uri:X(c.uri)}},a=function(c){o(c.id())||e.push(c)},i=function(c){return et(e,c).getOrUndefined()},o=function(c){return i(function(v){return v.id()===c})},u=function(c){return i(function(v){return v.blobUri()===c})},s=function(c,v){return i(function(d){return d.base64()===c&&d.blob().type===v})},f=function(c){e=me(e,function(v){return v.blobUri()===c?(URL.revokeObjectURL(v.blobUri()),!1):!0})},l=function(){Y(e,function(c){URL.revokeObjectURL(c.blobUri())}),e=[]};return{create:n,add:a,get:o,getByUri:u,getByData:s,findFirst:i,removeByUri:f,destroy:l}},iP=function(e,t){var n={},r=function(m,p){return m?m.replace(/\/$/,"")+"/"+p.replace(/^\//,""):p},a=function(m,p,h,y){var g=new XMLHttpRequest;g.open("POST",t.url),g.withCredentials=t.credentials,g.upload.onprogress=function(S){y(S.loaded/S.total*100)},g.onerror=function(){h("Image upload failed due to a XHR Transport error. Code: "+g.status)},g.onload=function(){if(g.status<200||g.status>=300){h("HTTP Error: "+g.status);return}var S=JSON.parse(g.responseText);if(!S||typeof S.location!="string"){h("Invalid JSON: "+g.responseText);return}p(r(t.basePath,S.location))};var E=new FormData;E.append("file",m.blob(),m.filename()),g.send(E)},i=function(){return new it(function(m){m([])})},o=function(m,p){return{url:p,blobInfo:m,status:!0}},u=function(m,p,h){return{url:"",blobInfo:m,status:!1,error:{message:p,options:h}}},s=function(m,p){_.each(n[m],function(h){h(p)}),delete n[m]},f=function(m,p,h){return e.markPending(m.blobUri()),new it(function(y){var g,E;try{var S=function(){g&&(g.close(),E=ve)},C=function(B){S(),e.markUploaded(m.blobUri(),B),s(m.blobUri(),o(m,B)),y(o(m,B))},x=function(B,L){var ne=L||{};S(),e.removeFailed(m.blobUri()),s(m.blobUri(),u(m,B,ne)),y(u(m,B,ne))};E=function(B){B<0||B>100||b.from(g).orThunk(function(){return b.from(h).map(HC)}).each(function(L){g=L,L.progressBar.value(B)})},p(m,C,x,E)}catch(B){y(u(m,B.message,{}))}})},l=function(m){return m===a},c=function(m){var p=m.blobUri();return new it(function(h){n[p]=n[p]||[],n[p].push(h)})},v=function(m,p){return m=_.grep(m,function(h){return!e.isUploaded(h.blobUri())}),it.all(_.map(m,function(h){return e.isPending(h.blobUri())?c(h):f(h,t.handler,p)}))},d=function(m,p){return!t.url&&l(t.handler)?i():v(m,p)};return Oe(t.handler)===!1&&(t.handler=a),{upload:d}},ab=function(e){return function(){return e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},ib=function(e,t){return iP(t,{url:jk(e),basePath:Kk(e),credentials:Gk(e),handler:Xk(e)})},oP=function(e){var t=nb(),n=ib(e,t);return{upload:function(r,a){return a===void 0&&(a=!0),n.upload(r,a?ab(e):void 0)}}},uP=function(e){var t=vt(null);e.on("change AddUndo",function(r){t.set(ie({},r.level))});var n=function(){var r=e.undoManager.data;wr(r).filter(function(a){return!fu(t.get(),a)}).each(function(a){e.setDirty(!0),e.fire("change",{level:a,lastLevel:is(r,r.length-2).getOrNull()})})};return{fireIfChanged:n}},sP=function(e){var t=aP(),n,r,a=nb(),i=[],o=uP(e),u=function(S){return function(C){return e.selection?S(C):[]}},s=function(S){return S+(S.indexOf("?")===-1?"?":"&")+new Date().getTime()},f=function(S,C,x){var B=0;do B=S.indexOf(C,B),B!==-1&&(S=S.substring(0,B)+x+S.substr(B+C.length),B+=x.length-C.length+1);while(B!==-1);return S},l=function(S,C,x){var B='src="'+x+'"'+(x===se.transparentSrc?' data-mce-placeholder="1"':"");return S=f(S,'src="'+C+'"',B),S=f(S,'data-mce-src="'+C+'"','data-mce-src="'+x+'"'),S},c=function(S,C){Y(e.undoManager.data,function(x){x.type==="fragmented"?x.fragments=De(x.fragments,function(B){return l(B,S,C)}):x.content=l(x.content,S,C)})},v=function(S,C){var x=e.convertURL(C,"src");c(S.src,C),e.$(S).attr({src:Vk(e)?s(C):C,"data-mce-src":x})},d=function(S){return n||(n=ib(e,a)),y().then(u(function(C){var x=De(C,function(B){return B.blobInfo});return n.upload(x,ab(e)).then(u(function(B){var L=[],ne=De(B,function(q,D){var ee=C[D].blobInfo,U=C[D].image;return q.status&&Wk(e)?(t.removeByUri(U.src),Mn(e)||v(U,q.url)):q.error&&(q.error.options.remove&&(c(U.getAttribute("src"),se.transparentSrc),L.push(U)),GO(e,q.error.message)),{element:U,status:q.status,uploadUri:q.url,blobInfo:ee}});return ne.length>0&&o.fireIfChanged(),L.length>0&&(Mn(e)?console.error("Removing images on failed uploads is currently unsupported for RTC"):e.undoManager.transact(function(){Y(L,function(q){e.dom.remove(q),t.removeByUri(q.src)})})),S&&S(ne),ne}))}))},m=function(S){if($m(e))return d(S)},p=function(S){if(Ga(i,function(x){return x(S)})===!1)return!1;if(S.getAttribute("src").indexOf("data:")===0){var C=Hk(e);return C(S)}return!0},h=function(S){i.push(S)},y=function(){return r||(r=DD(a,t)),r.findAll(e.getBody(),p).then(u(function(S){return S=me(S,function(C){return typeof C=="string"?(pu(e,C),!1):!0}),Mn(e)||Y(S,function(C){c(C.image.src,C.blobInfo.blobUri()),C.image.src=C.blobInfo.blobUri(),C.image.removeAttribute("data-mce-src")}),S}))},g=function(){t.destroy(),a.destroy(),r=n=null},E=function(S){return S.replace(/src="(blob:[^"]+)"/g,function(C,x){var B=a.getResultUri(x);if(B)return'src="'+B+'"';var L=t.getByUri(x);if(L||(L=Qt(e.editorManager.get(),function(q,D){return q||D.editorUpload&&D.editorUpload.blobCache.getByUri(x)},null)),L){var ne=L.blob();return'src="data:'+ne.type+";base64,"+L.base64()+'"'}return C})};return e.on("SetContent",function(){$m(e)?m():y()}),e.on("RawSaveContent",function(S){S.content=E(S.content)}),e.on("GetContent",function(S){S.source_view||S.format==="raw"||S.format==="tree"||(S.content=E(S.content))}),e.on("PostRender",function(){e.parser.addNodeFilter("img",function(S){Y(S,function(C){var x=C.attr("src");if(!t.getByUri(x)){var B=a.getResultUri(x);B&&C.attr("src",B)}})})}),{blobCache:t,addFilter:h,uploadImages:d,uploadImagesAuto:m,scanForImages:y,destroy:g}},fP=function(e){var t={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(n,r,a){return ae(n)&&n.hasAttribute("href")},onformat:function(n,r,a){_.each(a,function(i,o){e.setAttrib(n,o,i)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(n){var r;return(r=n==null?void 0:n.customValue)!==null&&r!==void 0?r:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return _.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),function(n){t[n]={block:n,remove:"all"}}),t},lP=function(e){var t={},n=function(o){return Ne(o)?t[o]:t},r=function(o){return pe(t,o)},a=function(o,u){o&&(He(o)?(Vt(u)||(u=[u]),Y(u,function(s){Nt(s.deep)&&(s.deep=!Bt(s)),Nt(s.split)&&(s.split=!Bt(s)||Ze(s)),Nt(s.remove)&&Bt(s)&&!Ze(s)&&(s.remove="none"),Bt(s)&&Ze(s)&&(s.mixed=!0,s.block_expand=!0),He(s.classes)&&(s.classes=s.classes.split(/\s+/))}),t[o]=u):Pe(o,function(s,f){a(f,s)}))},i=function(o){return o&&t[o]&&delete t[o],t};return a(fP(e.dom)),a(ox(e)),{get:n,has:r,register:a,unregister:i}},gu=_.each,dt=xe.DOM,ob=function(e,t){var n,r,a,i=t&&t.schema||Zn({}),o=function(l,c){c.classes.length&&dt.addClass(l,c.classes.join(" ")),dt.setAttribs(l,c.attrs)},u=function(l){r=typeof l=="string"?{name:l,classes:[],attrs:{}}:l;var c=dt.create(r.name);return o(c,r),c},s=function(l,c){var v=typeof l!="string"?l.nodeName.toLowerCase():l,d=i.getElementRule(v),m=d&&d.parentsRequired;return m&&m.length?c&&_.inArray(m,c)!==-1?c:m[0]:!1},f=function(l,c,v){var d,m,p=c.length>0&&c[0],h=p&&p.name,y=s(l,h);if(y)h===y?(m=c[0],c=c.slice(1)):m=y;else if(p)m=c[0],c=c.slice(1);else if(!v)return l;return m&&(d=u(m),d.appendChild(l)),v&&(d||(d=dt.create("div"),d.appendChild(l)),_.each(v,function(g){var E=u(g);d.insertBefore(E,l)})),f(d,c,m&&m.siblings)};return e&&e.length?(r=e[0],n=u(r),a=dt.create("div"),a.appendChild(f(n,e.slice(1),r.siblings)),a):""},cP=function(e){var t,n={classes:[],attrs:{}};return e=n.selector=_.trim(e),e!=="*"&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(r,a,i,o,u){switch(a){case"#":n.attrs.id=i;break;case".":n.classes.push(i);break;case":":_.inArray("checked disabled enabled read-only required".split(" "),i)!==-1&&(n.attrs[i]=i);break}if(o==="["){var s=u.match(/([\w\-]+)(?:\=\"([^\"]+))?/);s&&(n.attrs[s[1]]=s[2])}return""})),n.name=t||"div",n},vP=function(e){return!e||typeof e!="string"?[]:(e=e.split(/\s*,\s*/)[0],e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),_.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(t){var n=_.map(t.split(/(?:~\+|~|\+)/),cP),r=n.pop();return n.length&&(r.siblings=n),r}).reverse())},dP=function(e,t){var n,r,a="",i,o=ux(e);if(o==="")return"";var u=function(c){return c.replace(/%(\w+)/g,"")};if(typeof t=="string"){if(t=e.formatter.get(t),!t)return;t=t[0]}if("preview"in t){var s=je(t,"preview");if(no(s,!1))return"";o=s.getOr(o)}n=t.block||t.inline||"span";var f=vP(t.selector);f.length?(f[0].name||(f[0].name=n),n=t.selector,r=ob(f,e)):r=ob([n],e);var l=dt.select(n,r)[0]||r.firstChild;return gu(t.styles,function(c,v){var d=u(c);d&&dt.setStyle(l,v,d)}),gu(t.attributes,function(c,v){var d=u(c);d&&dt.setAttrib(l,v,d)}),gu(t.classes,function(c){var v=u(c);dt.hasClass(l,v)||dt.addClass(l,v)}),e.fire("PreviewFormats"),dt.setStyles(r,{position:"absolute",left:-65535}),e.getBody().appendChild(r),i=dt.getStyle(e.getBody(),"fontSize",!0),i=/px$/.test(i)?parseInt(i,10):0,gu(o.split(" "),function(c){var v=dt.getStyle(l,c,!0);if(!(c==="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(v)&&(v=dt.getStyle(e.getBody(),c,!0),dt.toHex(v).toLowerCase()==="#ffffff"))&&!(c==="color"&&dt.toHex(v).toLowerCase()==="#000000")){if(c==="font-size"&&/em|%$/.test(v)){if(i===0)return;var d=parseFloat(v)/(/%$/.test(v)?100:1);v=d*i+"px"}c==="border"&&v&&(a+="padding:0 2px;"),a+=c+":"+v+";"}}),e.fire("AfterPreviewFormats"),dt.remove(r),a},mP=function(e){e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(var t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},ub=function(e){var t=lP(e),n=vt(null);return mP(e),lB(e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:function(r,a,i){nD(e,r,a,i)},remove:function(r,a,i,o){rD(e,r,a,i,o)},toggle:function(r,a,i){aD(e,r,a,i)},match:function(r,a,i,o){return Q_(e,r,a,i,o)},closest:function(r){return tD(e,r)},matchAll:function(r,a){return Z_(e,r,a)},matchNode:function(r,a,i,o){return J_(e,r,a,i,o)},canApply:function(r){return eD(e,r)},formatChanged:function(r,a,i,o){return iD(e,n,r,a,i,o)},getCssText:G(dP,e)}},sb=function(e){switch(e.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},pP=function(e,t,n){var r=vt(!1),a=function(s){lu(t,!1,n),t.add({},s)};e.on("init",function(){t.add()}),e.on("BeforeExecCommand",function(s){var f=s.command;sb(f)||(Bg(t,n),t.beforeChange())}),e.on("ExecCommand",function(s){var f=s.command;sb(f)||a(s)}),e.on("ObjectResizeStart cut",function(){t.beforeChange()}),e.on("SaveContent ObjectResized blur",a),e.on("dragend",a),e.on("keyup",function(s){var f=s.keyCode;s.isDefaultPrevented()||((f>=33&&f<=36||f>=37&&f<=40||f===45||s.ctrlKey)&&(a(),e.nodeChanged()),(f===46||f===8)&&e.nodeChanged(),r.get()&&t.typing&&fu(Xl(e),t.data[0])===!1&&(e.isDirty()===!1&&(e.setDirty(!0),e.fire("change",{level:t.data[0],lastLevel:null})),e.fire("TypingUndo"),r.set(!1),e.nodeChanged()))}),e.on("keydown",function(s){var f=s.keyCode;if(!s.isDefaultPrevented()){if(f>=33&&f<=36||f>=37&&f<=40||f===45){t.typing&&a(s);return}var l=s.ctrlKey&&!s.altKey||s.metaKey;(f<16||f>20)&&f!==224&&f!==91&&!t.typing&&!l&&(t.beforeChange(),lu(t,!0,n),t.add({},s),r.set(!0))}}),e.on("mousedown",function(s){t.typing&&a(s)});var i=function(s){return s.inputType==="insertReplacementText"},o=function(s){return s.inputType==="insertText"&&s.data===null},u=function(s){return s.inputType==="insertFromPaste"||s.inputType==="insertFromDrop"};e.on("input",function(s){s.inputType&&(i(s)||o(s)||u(s))&&a(s)}),e.on("AddUndo Undo Redo ClearUndos",function(s){s.isDefaultPrevented()||e.nodeChanged()})},hP=function(e){e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")},fb=function(e){var t=Ca(),n=vt(0),r=vt(0),a={data:[],typing:!1,beforeChange:function(){U_(e,n,t)},add:function(i,o){return z_(e,a,r,n,t,i,o)},undo:function(){return H_(e,a,n,r)},redo:function(){return V_(e,r,a.data)},clear:function(){W_(e,a,r)},reset:function(){q_(e,a)},hasUndo:function(){return j_(e,a,r)},hasRedo:function(){return K_(e,a,r)},transact:function(i){return G_(e,a,n,i)},ignore:function(i){X_(e,n,i)},extra:function(i,o){Y_(e,a,r,i,o)}};return Mn(e)||pP(e,a,n),hP(e),a},gP=[9,27,re.HOME,re.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,re.DOWN,re.UP,re.LEFT,re.RIGHT].concat(se.browser.isFirefox()?[224]:[]),lb="data-mce-placeholder",cb=function(e){return e.type==="keydown"||e.type==="keyup"},vb=function(e){var t=e.keyCode;return t===re.BACKSPACE||t===re.DELETE},bP=function(e){if(cb(e)){var t=e.keyCode;return!vb(e)&&(re.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||Je(gP,t))}else return!1},yP=function(e){return cb(e)&&!(vb(e)||e.type==="keyup"&&e.keyCode===229)},CP=function(e,t,n){if(Xe(k.fromDom(t),!1)){var r=n==="",a=t.firstElementChild;return a?e.getStyle(t.firstElementChild,"padding-left")||e.getStyle(t.firstElementChild,"padding-right")?!1:r?!e.isBlock(a):n===a.nodeName.toLowerCase():!0}else return!1},wP=function(e){var t=e.dom,n=ft(e),r=rx(e),a=function(i,o){if(!bP(i)){var u=e.getBody(),s=yP(i)?!1:CP(t,u,n),f=t.getAttrib(u,lb)!=="";(f!==s||o)&&(t.setAttrib(u,lb,s?r:null),t.setAttrib(u,"aria-placeholder",s?r:null),q1(e,s),e.on(s?"keydown":"keyup",a),e.off(s?"keyup":"keydown",a))}};r&&e.on("init",function(i){a(i,!0),e.on("change SetContent ExecCommand",a),e.on("paste",function(o){return ot.setEditorTimeout(e,function(){return a(o)})})})},SP=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,EP=function(e){return SP.test(e)},zr=function(e,t){return ra(k.fromDom(t),tx(e))},kP=function(e){return xe.DOM.getStyle(e,"direction",!0)==="rtl"||EP(e.textContent)},xP=function(e,t,n){return me(xe.DOM.getParents(n.container(),"*",t),e)},mr=function(e,t,n){var r=xP(e,t,n);return b.from(r[r.length-1])},NP=function(e,t,n){var r=sr(t,e),a=sr(n,e);return r&&r===a},TP=function(e){return Os(e)||Ps(e)},zt=function(e,t){if(!t)return t;var n=t.container(),r=t.offset();return e?va(n)?Q(n.nextSibling)?A(n.nextSibling,0):A.after(n):Os(t)?A(n,r+1):t:va(n)?Q(n.previousSibling)?A(n.previousSibling,n.previousSibling.data.length):A.before(n):Ps(t)?A(n,r-1):t},db=G(zt,!0),mb=G(zt,!1),AP=function(e){return function(t){return Te(e,k.fromDom(t.dom.parentNode))}},RP=function(e){return hd(e)||oi(e)},bu=function(e,t){return Wn(e,t)?ao(t,RP,AP(e)):b.none()},BP=function(e){var t=e.getBody(),n=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(n,0)},pb=function(e){e.dom.isEmpty(e.getBody())&&(e.setContent(""),BP(e))},_P=function(e,t,n){return Et(wt(n),kn(n),function(r,a){var i=zt(!0,r),o=zt(!1,a),u=zt(!1,t);return e?un(n,u).exists(function(s){return s.isEqual(o)&&t.isEqual(i)}):En(n,u).exists(function(s){return s.isEqual(i)&&t.isEqual(o)})}).getOr(!0)},DP=function(e,t){return{block:e,position:t}},OP=function(e,t){return{from:e,to:t}},fc=function(e,t){var n=k.fromDom(e),r=k.fromDom(t.container());return bu(n,r).map(function(a){return DP(a,t)})},PP=function(e){return Te(e.from.block,e.to.block)===!1},IP=function(e){return Jt(e.from.block).bind(function(t){return Jt(e.to.block).filter(function(n){return Te(t,n)})}).isSome()},LP=function(e){return _e(e.from.block.dom)===!1&&_e(e.to.block.dom)===!1},$P=function(e,t,n){return $e(n.position.getNode())&&Xe(n.block)===!1?Aa(!1,n.block.dom).bind(function(r){return r.isEqual(n.position)?Mt(t,e,r).bind(function(a){return fc(e,a)}):b.some(n)}).getOr(n):n},FP=function(e,t,n){var r=fc(e,A.fromRangeStart(n)),a=r.bind(function(i){return Mt(t,e,i.position).bind(function(o){return fc(e,o).map(function(u){return $P(e,t,u)})})});return Et(r,a,OP).filter(function(i){return PP(i)&&IP(i)&&LP(i)})},MP=function(e,t,n){return n.collapsed?FP(e,t,n):b.none()},UP=function(e){var t=jt(e);return qi(t,gn).fold(X(t),function(n){return t.slice(0,n)})},hb=function(e){var t=UP(e);return Y(t,tt),t},gb=function(e,t){var n=Fn(t,e);return et(n.reverse(),function(r){return Xe(r)}).each(tt)},zP=function(e){return me(Mv(e),function(t){return!Xe(t)}).length===0},HP=function(e,t,n,r){if(Xe(n))return Fr(n),wt(n.dom);zP(r)&&Xe(t)&&en(r,k.fromTag("br"));var a=En(n.dom,A.before(r.dom));return Y(hb(t),function(i){en(r,i)}),gb(e,t),a},VP=function(e,t,n){if(Xe(n))return tt(n),Xe(t)&&Fr(t),wt(t.dom);var r=kn(n.dom);return Y(hb(t),function(a){at(n,a)}),gb(e,t),r},WP=function(e,t){var n=Fn(t,e);return b.from(n[n.length-1])},qP=function(e,t){return Wn(t,e)?WP(t,e):b.none()},bb=function(e,t){Aa(e,t.dom).map(function(n){return n.getNode()}).map(k.fromDom).filter(fa).each(tt)},yb=function(e,t,n){return bb(!0,t),bb(!1,n),qP(t,n).fold(G(VP,e,t,n),G(HP,e,t,n))},Cb=function(e,t,n,r){return t?yb(e,r,n):yb(e,n,r)},yu=function(e,t){var n=k.fromDom(e.getBody()),r=MP(n.dom,t,e.selection.getRng()).bind(function(a){return Cb(n,t,a.from.block,a.to.block)});return r.each(function(a){e.selection.setRng(a.toRange())}),r.isSome()},jP=function(e,t){var n=t.getRng();return Et(bu(e,k.fromDom(n.startContainer)),bu(e,k.fromDom(n.endContainer)),function(r,a){return Te(r,a)===!1?(n.deleteContents(),Cb(e,!0,r,a).each(function(i){t.setRng(i.toRange())}),!0):!1}).getOr(!1)},wb=function(e,t){var n=k.fromDom(t),r=G(Te,e);return ii(n,uo,r).isSome()},KP=function(e,t){return wb(e,t.startContainer)||wb(e,t.endContainer)},GP=function(e,t){var n=En(e.dom,A.fromRangeStart(t)).isNone(),r=un(e.dom,A.fromRangeEnd(t)).isNone();return!KP(e,t)&&n&&r},XP=function(e){return e.setContent(""),e.selection.setCursorLocation(),!0},YP=function(e){var t=k.fromDom(e.getBody()),n=e.selection.getRng();return GP(t,n)?XP(e):jP(t,e.selection)},Cu=function(e,t){return e.selection.isCollapsed()?!1:YP(e)},QP=pn,ZP=_e,Un=function(e,t,n,r,a){return b.from(t._selectionOverrides.showCaret(e,n,r,a))},JP=function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t},za=function(e,t){var n=e.fire("BeforeObjectSelected",{target:t});return n.isDefaultPrevented()?b.none():b.some(JP(t))},Sb=function(e,t,n){var r=xf(1,e.getBody(),t),a=A.fromRangeStart(r),i=a.getNode();if(yi(i))return Un(1,e,i,!a.isAtEnd(),!1);var o=a.getNode(!0);if(yi(o))return Un(1,e,o,!1,!1);var u=e.dom.getParent(a.getNode(),function(s){return ZP(s)||QP(s)});return yi(u)?Un(1,e,u,!1,n):b.none()},lc=function(e,t,n){return t.collapsed?Sb(e,t,n).getOr(t):t},eI=function(e){return cr(e)||La(e)},tI=function(e){return vr(e)||$a(e)},nI=function(e,t){Q(t)&&t.data.length===0&&e.remove(t)},Eb=function(e,t,n,r,a,i){return Un(r,e,i.getNode(!a),a,!0).each(function(o){if(t.collapsed){var u=t.cloneRange();a?u.setEnd(o.startContainer,o.startOffset):u.setStart(o.endContainer,o.endOffset),u.deleteContents()}else t.deleteContents();e.selection.setRng(o)}),nI(e.dom,n),!0},rI=function(e,t){var n=e.selection.getRng();if(!Q(n.commonAncestorContainer))return!1;var r=t?Qe.Forwards:Qe.Backwards,a=on(e.getBody()),i=G(Nf,t?a.next:a.prev),o=t?eI:tI,u=Si(r,e.getBody(),n),s=zt(t,i(u));if(!s||!Lo(u,s))return!1;if(o(s))return Eb(e,n,u.getNode(),r,t,s);var f=i(s);return f&&o(f)&&Lo(s,f)?Eb(e,n,u.getNode(),r,t,f):!1},wu=function(e,t){return rI(e,t)},aI=function(e){return uo(k.fromDom(e))||oi(k.fromDom(e))},_t=Kn.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),iI=function(e,t){var n=t.getNode(e===!1),r=e?"after":"before";return ae(n)&&n.getAttribute("data-mce-caret")===r},oI=function(e,t,n,r){var a=function(i){return Bs(k.fromDom(i))&&!wn(n,r,e)};return rp(!t,n).fold(function(){return rp(t,r).fold(Re,a)},a)},kb=function(e,t,n,r){var a=r.getNode(t===!1);return bu(k.fromDom(e),k.fromDom(n.getNode())).map(function(i){return Xe(i)?_t.remove(i.dom):_t.moveToElement(a)}).orThunk(function(){return b.some(_t.moveToElement(a))})},xb=function(e,t,n){return Mt(t,e,n).bind(function(r){return aI(r.getNode())||oI(e,t,n,r)?b.none():t&&_e(r.getNode())||t===!1&&_e(r.getNode(!0))?kb(e,t,n,r):t&&vr(n)||t===!1&&cr(n)?b.some(_t.moveToPosition(r)):b.none()})},uI=function(e,t){return e&&_e(t.nextSibling)?b.some(_t.moveToElement(t.nextSibling)):e===!1&&_e(t.previousSibling)?b.some(_t.moveToElement(t.previousSibling)):b.none()},sI=function(e,t,n){return n.fold(function(r){return b.some(_t.remove(r))},function(r){return b.some(_t.moveToElement(r))},function(r){return wn(t,r,e)?b.none():b.some(_t.moveToPosition(r))})},fI=function(e,t,n){return iI(t,n)?uI(t,n.getNode(t===!1)).fold(function(){return xb(e,t,n)},b.some):xb(e,t,n).bind(function(r){return sI(e,n,r)})},lI=function(e,t,n){var r=xf(t?1:-1,e,n),a=A.fromRangeStart(r),i=k.fromDom(e);return t===!1&&vr(a)?b.some(_t.remove(a.getNode(!0))):t&&cr(a)?b.some(_t.remove(a.getNode())):t===!1&&cr(a)&&pl(i,a)?aA(i,a).map(function(o){return _t.remove(o.getNode())}):t&&vr(a)&&ml(i,a)?iA(i,a).map(function(o){return _t.remove(o.getNode())}):fI(e,t,a)},cI=function(e,t){return function(n){return e._selectionOverrides.hideFakeCaret(),Mr(e,t,k.fromDom(n)),!0}},vI=function(e,t){return function(n){var r=t?A.before(n):A.after(n);return e.selection.setRng(r.toRange()),!0}},dI=function(e){return function(t){return e.selection.setRng(t.toRange()),!0}},Nb=function(e,t){return b.from(Pa(e.getBody(),t))},mI=function(e,t){var n=e.selection.getNode();return Nb(e,n).filter(_e).fold(function(){return lI(e.getBody(),t,e.selection.getRng()).exists(function(r){return r.fold(cI(e,t),vI(e,t),dI(e))})},qe)},pI=function(e){Y(kt(e,".mce-offscreen-selection"),tt)},hI=function(e,t){var n=e.selection.getNode();if(_e(n)&&!to(n)){var r=Nb(e,n.parentNode).filter(_e);return r.fold(function(){return pI(k.fromDom(e.getBody())),Mr(e,t,k.fromDom(e.selection.getNode())),pb(e),!0},qe)}return!1},Tb=function(e){var t=e.dom,n=e.selection,r=Pa(e.getBody(),n.getNode());if(pn(r)&&t.isBlock(r)&&t.isEmpty(r)){var a=t.create("br",{"data-mce-bogus":"1"});t.setHTML(r,""),r.appendChild(a),n.setRng(A.before(a).toRange())}return!0},Su=function(e,t){return e.selection.isCollapsed()?mI(e,t):hI(e,t)},gI=function(e,t){var n=A.fromRangeStart(e.selection.getRng());return Mt(t,e.getBody(),n).filter(function(r){return t?GT(r):XT(r)}).bind(function(r){return b.from(kf(t?0:-1,r))}).exists(function(r){return e.selection.select(r),!0})},Eu=function(e,t){return e.selection.isCollapsed()?gI(e,t):!1},Ha=Q,Ab=function(e){return Ha(e)&&e.data[0]===nt},Rb=function(e){return Ha(e)&&e.data[e.data.length-1]===nt},Bb=function(e){return e.ownerDocument.createTextNode(nt)},bI=function(e){if(Ha(e.previousSibling))return Rb(e.previousSibling)||e.previousSibling.appendData(nt),e.previousSibling;if(Ha(e))return Ab(e)||e.insertData(0,nt),e;var t=Bb(e);return e.parentNode.insertBefore(t,e),t},yI=function(e){if(Ha(e.nextSibling))return Ab(e.nextSibling)||e.nextSibling.insertData(0,nt),e.nextSibling;if(Ha(e))return Rb(e)||e.appendData(nt),e;var t=Bb(e);return e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t},ku=function(e,t){return e?bI(t):yI(t)},CI=G(ku,!0),wI=G(ku,!1),_b=function(e,t){return Q(e.container())?ku(t,e.container()):ku(t,e.getNode())},Db=function(e,t){var n=t.get();return n&&e.container()===n&&va(n)},cc=function(e,t){return t.fold(function(n){Or(e.get());var r=CI(n);return e.set(r),b.some(A(r,r.length-1))},function(n){return wt(n).map(function(r){if(Db(r,e))return A(e.get(),1);Or(e.get());var a=_b(r,!0);return e.set(a),A(a,1)})},function(n){return kn(n).map(function(r){if(Db(r,e))return A(e.get(),e.get().length-1);Or(e.get());var a=_b(r,!1);return e.set(a),A(a,a.length-1)})},function(n){Or(e.get());var r=wI(n);return e.set(r),b.some(A(r,1))})},Ob=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].apply(null,t);if(r.isSome())return r}return b.none()},mt=Kn.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Pb=function(e,t){var n=sr(t,e);return n||e},SI=function(e,t,n){var r=db(n),a=Pb(t,r.container());return mr(e,a,r).fold(function(){return un(a,r).bind(G(mr,e,a)).map(function(i){return mt.before(i)})},b.none)},EI=function(e,t){return Lr(e,t)===null},Ib=function(e,t,n){return mr(e,t,n).filter(G(EI,t))},kI=function(e,t,n){var r=mb(n);return Ib(e,t,r).bind(function(a){var i=En(a,r);return i.isNone()?b.some(mt.start(a)):b.none()})},xI=function(e,t,n){var r=db(n);return Ib(e,t,r).bind(function(a){var i=un(a,r);return i.isNone()?b.some(mt.end(a)):b.none()})},NI=function(e,t,n){var r=mb(n),a=Pb(t,r.container());return mr(e,a,r).fold(function(){return En(a,r).bind(G(mr,e,a)).map(function(i){return mt.after(i)})},b.none)},Lb=function(e){return kP(vc(e))===!1},An=function(e,t,n){var r=Ob([SI,kI,xI,NI],[e,t,n]);return r.filter(Lb)},vc=function(e){return e.fold(Tt,Tt,Tt,Tt)},$b=function(e){return e.fold(X("before"),X("start"),X("end"),X("after"))},xu=function(e){return e.fold(mt.before,mt.before,mt.after,mt.after)},dc=function(e){return e.fold(mt.start,mt.start,mt.end,mt.end)},TI=function(e,t){return $b(e)===$b(t)&&vc(e)===vc(t)},AI=function(e,t,n,r,a,i){return Et(mr(t,n,r),mr(t,n,a),function(o,u){return o!==u&&NP(n,o,u)?mt.after(e?o:u):i}).getOr(i)},RI=function(e,t){return e.fold(qe,function(n){return!TI(n,t)})},BI=function(e,t,n,r,a){var i=zt(e,a),o=Mt(e,n,i).map(G(zt,e)),u=o.fold(function(){return r.map(xu)},function(s){return An(t,n,s).map(G(AI,e,t,n,i,s)).filter(G(RI,r))});return u.filter(Lb)},_I=function(e,t){return e?t.fold(Cr(b.some,mt.start),b.none,Cr(b.some,mt.after),b.none):t.fold(b.none,Cr(b.some,mt.before),b.none,Cr(b.some,mt.end))},mc=function(e,t,n,r){var a=zt(e,r),i=An(t,n,a);return An(t,n,a).bind(G(_I,e)).orThunk(function(){return BI(e,t,n,i,r)})};G(mc,!1),G(mc,!0);var DI=function(e){return Oe(e.selection.getSel().modify)},Fb=function(e,t,n){var r=e?1:-1;return t.setRng(A(n.container(),n.offset()+r).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},OI=function(e,t){var n=t.selection.getRng(),r=e?A.fromRangeEnd(n):A.fromRangeStart(n);return DI(t)?e&&Os(r)?Fb(!0,t.selection,r):!e&&Ps(r)?Fb(!1,t.selection,r):!1:!1},Rn;(function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"})(Rn||(Rn={}));var Nu=function(e,t){return e===Qe.Backwards?ji(t):t},PI=function(e,t,n){return e===Qe.Forwards?t.next(n):t.prev(n)},II=function(e,t,n,r){return $e(r.getNode(t===Qe.Forwards))?Rn.Br:wn(n,r)===!1?Rn.Block:Rn.Wrap},Mb=function(e,t,n,r){for(var a=on(n),i=r,o=[];i;){var u=PI(t,a,i);if(!u)break;if($e(u.getNode(!1)))return t===Qe.Forwards?{positions:Nu(t,o).concat([u]),breakType:Rn.Br,breakAt:b.some(u)}:{positions:Nu(t,o),breakType:Rn.Br,breakAt:b.some(u)};if(!u.isVisible()){i=u;continue}if(e(i,u)){var s=II(n,t,i,u);return{positions:Nu(t,o),breakType:s,breakAt:b.some(u)}}o.push(u),i=u}return{positions:Nu(t,o),breakType:Rn.Eol,breakAt:b.none()}},Ub=function(e,t,n,r){return t(n,r).breakAt.map(function(a){var i=t(n,a).positions;return e===Qe.Backwards?i.concat(a):[a].concat(i)}).getOr([])},pc=function(e,t){return Qt(e,function(n,r){return n.fold(function(){return b.some(r)},function(a){return Et(Pt(a.getClientRects()),Pt(r.getClientRects()),function(i,o){var u=Math.abs(t-i.left),s=Math.abs(t-o.left);return s<=u?r:a}).or(n)})},b.none())},zb=function(e,t){return Pt(t.getClientRects()).bind(function(n){return pc(e,n.left)})},Pi=G(Mb,A.isAbove,-1),Ii=G(Mb,A.isBelow,1),LI=G(Ub,-1,Pi),$I=G(Ub,1,Ii),FI=function(e,t){return Pi(e,t).breakAt.isNone()},MI=function(e,t){return Ii(e,t).breakAt.isNone()},UI=function(e){return wt(e).map(function(t){return[t].concat(Ii(e,t).positions)}).getOr([])},zI=function(e){return kn(e).map(function(t){return Pi(e,t).positions.concat(t)}).getOr([])},HI=function(e){var t=function(r){return De(r,function(a){var i=_r(a);return i.node=e,i})};if(ae(e))return t(e.getClientRects());if(Q(e)){var n=e.ownerDocument.createRange();return n.setStart(e,0),n.setEnd(e,e.data.length),t(n.getClientRects())}},hc=function(e){return Jr(e,HI)},Hr;(function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"})(Hr||(Hr={}));var VI=function(e,t,n,r){for(;r=Na(r,e,vo,t);)if(n(r))return},Hb=function(e,t,n,r,a,i){var o=0,u=[],s=function(c){var v=hc([c]);e===-1&&(v=v.reverse());for(var d=0;d<v.length;d++){var m=v[d];if(!n(m,f)){if(u.length>0&&t(m,Vn(u))&&o++,m.line=o,a(m))return!0;u.push(m)}}},f=Vn(i.getClientRects());if(!f)return u;var l=i.getNode();return s(l),VI(e,r,s,l),u},WI=function(e,t){return t.line>e},qI=function(e,t){return t.line===e},jI=G(Hb,Hr.Up,Ea,ka),KI=G(Hb,Hr.Down,ka,Ea),GI=function(e,t,n,r){var a=on(t),i,o,u,s,f=[],l=0,c=function(p){return Vn(p.getClientRects())};e===1?(i=a.next,o=ka,u=Ea,s=A.after(r)):(i=a.prev,o=Ea,u=ka,s=A.before(r));var v=c(s);do if(!!s.isVisible()){var d=c(s);if(!u(d,v)){f.length>0&&o(d,Vn(f))&&l++;var m=_r(d);if(m.position=s,m.line=l,n(m))return f;f.push(m)}}while(s=i(s));return f},Vb=function(e){return function(t){return WI(e,t)}},gc=function(e){return function(t){return qI(e,t)}},XI=_e,Wb=Na,bc=function(e,t){return Math.abs(e.left-t)},yc=function(e,t){return Math.abs(e.right-t)},qb=function(e,t){return e>=t.left&&e<=t.right},YI=function(e,t){return e>=t.top&&e<=t.bottom},QI=function(e){return ta(e,"node")},Tu=function(e,t,n){return n===void 0&&(n=qe),Ki(e,function(r,a){if(qb(t,a))return n(a)?a:r;if(qb(t,r))return n(r)?r:a;var i=Math.min(bc(r,t),yc(r,t)),o=Math.min(bc(a,t),yc(a,t));return o===i&&QI(a)&&XI(a.node)||o<i?a:r})},jb=function(e,t,n,r,a){var i=Wb(r,e,vo,t,!a);do if(!i||n(i))return;while(i=Wb(i,e,vo,t))},ZI=function(e,t,n){n===void 0&&(n=!0);var r=[],a=function(i,o){var u=me(hc([o]),function(s){return!i(s,t)});return r=r.concat(u),u.length===0};return r.push(t),jb(Hr.Up,e,G(a,Ea),t.node,n),jb(Hr.Down,e,G(a,ka),t.node,n),r},JI=function(e){return me(dn(e.getElementsByTagName("*")),Pr)},eL=function(e,t){return{node:e.node,before:bc(e,t)<yc(e,t)}},tL=function(e,t,n){var r=hc(JI(e)),a=me(r,G(YI,n)),i=function(s){return!oa(s.node)&&!Gt(s.node)},o=Tu(a,t,i);if(o){var u=i(o);if(o=Tu(ZI(e,o,u),t,i),o&&Pr(o.node))return eL(o,t)}return null},zn=function(e,t){e.selection.setRng(t),Ai(e,e.selection.getRng())},Cc=function(e,t,n){return b.some(lc(e,t,n))},Kb=function(e,t,n,r,a,i){var o=t===Qe.Forwards,u=on(e.getBody()),s=G(Nf,o?u.next:u.prev),f=o?r:a;if(!n.collapsed){var l=Bo(n);if(i(l))return Un(t,e,l,t===Qe.Backwards,!1)}var c=Si(t,e.getBody(),n);if(f(c))return za(e,c.getNode(!o));var v=zt(o,s(c)),d=bd(n);if(!v)return d?b.some(n):b.none();if(f(v))return Un(t,e,v.getNode(!o),o,!1);var m=s(v);return m&&f(m)&&Lo(v,m)?Un(t,e,m.getNode(!o),o,!1):d?Cc(e,v.toRange(),!1):b.none()},Gb=function(e,t,n,r,a,i){var o=Si(t,e.getBody(),n),u=Vn(o.getClientRects()),s=t===Hr.Down;if(!u)return b.none();var f=s?KI:jI,l=f(e.getBody(),Vb(1),o),c=me(l,gc(1)),v=u.left,d=Tu(c,v);if(d&&i(d.node)){var m=Math.abs(v-d.left),p=Math.abs(v-d.right);return Un(t,e,d.node,m<p,!1)}var h;if(r(o)?h=o.getNode():a(o)?h=o.getNode(!0):h=Bo(n),h){var y=GI(t,e.getBody(),Vb(1),h),g=Tu(me(y,gc(1)),v);if(g||(g=Vn(me(y,gc(0))),g))return Cc(e,g.position.toRange(),!1)}return c.length===0?wc(e,s).filter(s?a:r).map(function(E){return lc(e,E.toRange(),!1)}):b.none()},wc=function(e,t){var n=e.selection.getRng(),r=e.getBody();if(t){var a=A.fromRangeEnd(n),i=Ii(r,a);return wr(i.positions)}else{var a=A.fromRangeStart(n),i=Pi(r,a);return Pt(i.positions)}},Xb=function(e,t,n){return wc(e,t).filter(n).exists(function(r){return e.selection.setRng(r.toRange()),!0})},Au=function(e,t){var n=e.dom.createRng();n.setStart(t.container(),t.offset()),n.setEnd(t.container(),t.offset()),e.selection.setRng(n)},Yb=function(e,t){e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},Qb=function(e,t,n){return cc(t,n).map(function(r){return Au(e,r),n})},nL=function(e,t,n){var r=e.getBody(),a=A.fromRangeStart(e.selection.getRng()),i=G(zr,e),o=mc(n,i,r,a);return o.bind(function(u){return Qb(e,t,u)})},rL=function(e,t,n){var r=De(kt(k.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),function(o){return o.dom}),a=me(r,e),i=me(n,e);Y(Jc(a,i),G(Yb,!1)),Y(Jc(i,a),G(Yb,!0))},aL=function(e,t){if(e.selection.isCollapsed()&&e.composing!==!0&&t.get()){var n=A.fromRangeStart(e.selection.getRng());A.isTextPosition(n)&&TP(n)===!1&&(Au(e,Ox(t.get(),n)),t.set(null))}},iL=function(e,t,n,r){if(t.selection.isCollapsed()){var a=me(r,e);Y(a,function(i){var o=A.fromRangeStart(t.selection.getRng());An(e,t.getBody(),o).bind(function(u){return Qb(t,n,u)})})}},Zb=function(e,t,n){return bi(e)?nL(e,t,n).isSome():!1},Jb=function(e,t,n){return bi(t)?OI(e,t):!1},oL=function(e){var t=vt(null),n=G(zr,e);return e.on("NodeChange",function(r){bi(e)&&!(se.browser.isIE()&&r.initial)&&(rL(n,e.dom,r.parents),aL(e,t),iL(n,e,t,r.parents))}),t},uL=G(Jb,!0),sL=G(Jb,!1),Ru=function(e,t,n){if(bi(e)){var r=wc(e,t).getOrThunk(function(){var a=e.selection.getRng();return t?A.fromRangeEnd(a):A.fromRangeStart(a)});return An(G(zr,e),e.getBody(),r).exists(function(a){var i=xu(a);return cc(n,i).exists(function(o){return Au(e,o),!0})})}else return!1},fL=function(e,t){var n=document.createRange();return n.setStart(e.container(),e.offset()),n.setEnd(t.container(),t.offset()),n},lL=function(e){return Et(wt(e),kn(e),function(t,n){var r=zt(!0,t),a=zt(!1,n);return un(e,r).forall(function(i){return i.isEqual(a)})}).getOr(!0)},ey=function(e,t){return function(n){return cc(t,n).exists(function(r){return Au(e,r),!0})}},ty=function(e,t,n,r){var a=e.getBody(),i=G(zr,e);e.undoManager.ignore(function(){e.selection.setRng(fL(n,r)),e.execCommand("Delete"),An(i,a,A.fromRangeStart(e.selection.getRng())).map(dc).map(ey(e,t))}),e.nodeChanged()},cL=function(e,t){var n=sr(t,e);return n||e},vL=function(e,t,n,r){var a=cL(e.getBody(),r.container()),i=G(zr,e),o=An(i,a,r);return o.bind(function(u){return n?u.fold(X(b.some(dc(u))),b.none,X(b.some(xu(u))),b.none):u.fold(b.none,X(b.some(xu(u))),b.none,X(b.some(dc(u))))}).map(ey(e,t)).getOrThunk(function(){var u=Fo(n,a,r),s=u.bind(function(f){return An(i,a,f)});return Et(o,s,function(){return mr(i,a,r).exists(function(f){return lL(f)?(Mr(e,n,k.fromDom(f)),!0):!1})}).orThunk(function(){return s.bind(function(f){return u.map(function(l){return n?ty(e,t,r,l):ty(e,t,l,r),!0})})}).getOr(!1)})},Bu=function(e,t,n){if(e.selection.isCollapsed()&&bi(e)){var r=A.fromRangeStart(e.selection.getRng());return vL(e,t,n,r)}return!1},dL=function(e,t){var n=Fn(t,e);return qi(n,gn).fold(X(n),function(r){return n.slice(0,r)})},mL=function(e){return Hv(e)===1},pL=function(e,t,n,r){var a=G(vB,t),i=De(me(r,a),function(u){return u.dom});if(i.length===0)Mr(t,e,n);else{var o=cB(n.dom,i);t.selection.setRng(o.toRange())}},hL=function(e,t){var n=k.fromDom(e.getBody()),r=k.fromDom(e.selection.getStart()),a=me(dL(n,r),mL);return wr(a).exists(function(i){var o=A.fromRangeStart(e.selection.getRng());return _P(t,o,i.dom)&&!dB(i)?(pL(t,e,i,a),!0):!1})},_u=function(e,t){return e.selection.isCollapsed()?hL(e,t):!1},Sc=function(e,t,n){return e._selectionOverrides.hideFakeCaret(),Mr(e,t,k.fromDom(n)),!0},gL=function(e,t){var n=t?La:$a,r=t?Qe.Forwards:Qe.Backwards,a=Si(r,e.getBody(),e.selection.getRng());return n(a)?Sc(e,t,a.getNode(!t)):b.from(zt(t,a)).filter(function(i){return n(i)&&Lo(a,i)}).exists(function(i){return Sc(e,t,i.getNode(!t))})},bL=function(e,t){var n=e.selection.getNode();return Gt(n)?Sc(e,t,n):!1},Du=function(e,t){return e.selection.isCollapsed()?gL(e,t):bL(e,t)},yL=function(e){return ao(e,function(t){return pn(t.dom)||_e(t.dom)}).exists(function(t){return pn(t.dom)})},Ec=function(e){var t=parseInt(e,10);return isNaN(t)?0:t},ny=function(e,t){var n=e||Yw(t)?"margin":"padding",r=Pn(t,"direction")==="rtl"?"-right":"-left";return n+r},CL=function(e,t,n,r,a,i){var o=ny(n,k.fromDom(i));if(t==="outdent"){var u=Math.max(0,Ec(i.style[o])-r);e.setStyle(i,o,u?u+a:"")}else{var u=Ec(i.style[o])+r+a;e.setStyle(i,o,u)}},wL=function(e,t){return Ga(t,function(n){var r=ny(zm(e),n),a=ks(n,r).map(Ec).getOr(0),i=e.dom.getContentEditable(n.dom);return i!=="false"&&a>0})},ry=function(e){var t=iy(e);return!e.mode.isReadOnly()&&(t.length>1||wL(e,t))},ay=function(e){return _s(e)||oi(e)},SL=function(e){return Jt(e).exists(ay)},iy=function(e){return me(tk(e.selection.getSelectedBlocks()),function(t){return!ay(t)&&!SL(t)&&yL(t)})},oy=function(e,t){var n=e.dom,r=e.selection,a=e.formatter,i=Zk(e),o=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),s=zm(e),f=ft(e);!e.queryCommandState("InsertUnorderedList")&&!e.queryCommandState("InsertOrderedList")&&f===""&&!n.getParent(r.getNode(),n.isBlock)&&a.apply("div"),Y(iy(e),function(l){CL(n,t,s,u,o,l.dom)})},uy=function(e,t){if(e.selection.isCollapsed()&&ry(e)){var n=e.dom,r=e.selection.getRng(),a=A.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(i!==null&&dl(k.fromDom(i),a))return oy(e,"outdent"),!0}return!1},sy=function(e,t){e.getDoc().execCommand(t,!1,null)},EL=function(e,t){if(!uy(e)){if(Su(e,!1))return;if(wu(e,!1))return;if(Bu(e,t,!1))return;if(yu(e,!1))return;if(au(e))return;if(Eu(e,!1))return;if(Du(e,!1))return;if(Cu(e))return;if(_u(e,!1))return;sy(e,"Delete"),pb(e)}},kL=function(e,t){if(!Su(e,!0)){if(wu(e,!0))return;if(Bu(e,t,!0))return;if(yu(e,!0))return;if(au(e))return;if(Eu(e,!0))return;if(Du(e,!0))return;if(Cu(e))return;if(_u(e,!0))return;sy(e,"ForwardDelete")}},xL=function(e,t){e.addCommand("delete",function(){EL(e,t)}),e.addCommand("forwardDelete",function(){kL(e,t)})},fy=5,NL=400,ly=function(e){return e.touches===void 0||e.touches.length!==1?b.none():b.some(e.touches[0])},TL=function(e,t){var n=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y);return n>fy||r>fy},AL=function(e){var t=Ca(),n=vt(!1),r=em(function(a){e.fire("longpress",ie(ie({},a),{type:"longpress"})),n.set(!0)},NL);e.on("touchstart",function(a){ly(a).each(function(i){r.cancel();var o={x:i.clientX,y:i.clientY,target:a.target};r.throttle(a),n.set(!1),t.set(o)})},!0),e.on("touchmove",function(a){r.cancel(),ly(a).each(function(i){t.on(function(o){TL(i,o)&&(t.clear(),n.set(!1),e.fire("longpresscancel"))})})},!0),e.on("touchend touchcancel",function(a){r.cancel(),a.type!=="touchcancel"&&t.get().filter(function(i){return i.target.isEqualNode(a.target)}).each(function(){n.get()?a.preventDefault():e.fire("tap",ie(ie({},a),{type:"tap"}))})},!0)},kc=function(e,t){return pe(e,t.nodeName)},RL=function(e,t){return Q(t)?!0:ae(t)?!kc(e,t)&&!Ut(t):!1},BL=function(e,t,n){return bt(bh(k.fromDom(n),k.fromDom(t)),function(r){return kc(e,r.dom)})},_L=function(e,t){if(Q(t)){if(t.nodeValue.length===0)return!0;if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||kc(e,t.nextSibling)))return!0}return!1},DL=function(e){var t=e.dom,n=e.selection,r=e.schema,a=r.getBlockElements(),i=n.getStart(),o=e.getBody(),u,s,f,l=ft(e);if(!(!i||!ae(i)||!l)){var c=o.nodeName.toLowerCase();if(!(!r.isValidChild(c,l.toLowerCase())||BL(a,o,i))){var v=n.getRng(),d=v.startContainer,m=v.startOffset,p=v.endContainer,h=v.endOffset,y=$r(e);for(i=o.firstChild;i;)if(RL(a,i)){if(_L(a,i)){s=i,i=i.nextSibling,t.remove(s);continue}u||(u=t.create(l,hi(e)),i.parentNode.insertBefore(u,i),f=!0),s=i,i=i.nextSibling,u.appendChild(s)}else u=null,i=i.nextSibling;f&&y&&(v.setStart(d,m),v.setEnd(p,h),n.setRng(v),e.nodeChanged())}}},OL=function(e){ft(e)&&e.on("NodeChange",G(DL,e))},PL=function(e){return oo(k.fromDom(e.getBody()),"*[data-mce-caret]").map(function(t){return t.dom}).getOrNull()},IL=function(e){e.selection.setRng(e.selection.getRng())},cy=function(e,t){t.hasAttribute("data-mce-caret")&&(Is(t),IL(e),e.selection.scrollIntoView(t))},LL=function(e,t){var n=PL(e);if(!!n){if(t.type==="compositionstart"){t.preventDefault(),t.stopPropagation(),cy(e,n);return}gd(n)&&(cy(e,n),e.undoManager.add())}},$L=function(e){e.on("keyup compositionstart",G(LL,e))},vy=_e,FL=function(e,t,n){return Kb(t,e,n,cr,vr,vy)},ML=function(e,t,n){var r=function(i){return cr(i)||hh(i)},a=function(i){return vr(i)||gh(i)};return Gb(t,e,n,r,a,vy)},UL=function(e){var t=e.dom.create(ft(e));return(!se.ie||se.ie>=11)&&(t.innerHTML='<br data-mce-bogus="1">'),t},dy=function(e,t,n){var r=on(e.getBody()),a=G(Nf,t===1?r.next:r.prev);if(n.collapsed&&gx(e)){var i=e.dom.getParent(n.startContainer,"PRE");if(!i)return;var o=a(A.fromRangeStart(n));if(!o){var u=UL(e);t===1?e.$(i).after(u):e.$(i).before(u),e.selection.select(u,!0),e.selection.collapse()}}},zL=function(e,t){var n=t?Qe.Forwards:Qe.Backwards,r=e.selection.getRng();return FL(n,e,r).orThunk(function(){return dy(e,n,r),b.none()})},HL=function(e,t){var n=t?1:-1,r=e.selection.getRng();return ML(n,e,r).orThunk(function(){return dy(e,n,r),b.none()})},my=function(e,t){return zL(e,t).exists(function(n){return zn(e,n),!0})},py=function(e,t){return HL(e,t).exists(function(n){return zn(e,n),!0})},hy=function(e,t){var n=t?vr:cr;return Xb(e,t,n)},VL=function(e){return Je(["figcaption"],Ke(e))},gy=function(e){var t=document.createRange();return t.setStartBefore(e.dom),t.setEndBefore(e.dom),t},by=function(e,t,n){n?at(e,t):qv(e,t)},WL=function(e,t){var n=k.fromTag("br");return by(e,n,t),gy(n)},qL=function(e,t,n,r){var a=k.fromTag(n),i=k.fromTag("br");return qn(a,r),at(a,i),by(e,a,t),gy(i)},jL=function(e,t,n,r){return t===""?WL(e,r):qL(e,r,t,n)},KL=function(e,t){var n=G(Te,t);return ao(k.fromDom(e.container()),gn,n).filter(VL)},GL=function(e,t,n){return t?MI(e.dom,n):FI(e.dom,n)},XL=function(e,t){var n=k.fromDom(e.getBody()),r=A.fromRangeStart(e.selection.getRng()),a=ft(e),i=hi(e);return KL(r,n).exists(function(){if(GL(n,t,r)){var o=jL(n,a,i,t);return e.selection.setRng(o),!0}else return!1})},yy=function(e,t){return e.selection.isCollapsed()?XL(e,t):!1},YL=function(e){return De(e,function(t){return ie({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:ve},t)})},QL=function(e,t){return t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey},ZL=function(e,t){return Jr(YL(e),function(n){return QL(n,t)?[n]:[]})},de=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(null,t)}},Va=function(e,t){return et(ZL(e,t),function(n){return n.action()})},Cy=function(e,t){var n=t?Qe.Forwards:Qe.Backwards,r=e.selection.getRng();return Kb(e,n,r,La,$a,Gt).exists(function(a){return zn(e,a),!0})},wy=function(e,t){var n=t?1:-1,r=e.selection.getRng();return Gb(e,n,r,La,$a,Gt).exists(function(a){return zn(e,a),!0})},Sy=function(e,t){var n=t?$a:La;return Xb(e,t,n)},JL=function(e,t){return{left:e.left-t,top:e.top-t,right:e.right+t*2,bottom:e.bottom+t*2,width:e.width+t,height:e.height+t}},e$=function(e,t){return Jr(t,function(n){var r=JL(_r(n.getBoundingClientRect()),-1);return[{x:r.left,y:e(r),cell:n},{x:r.right,y:e(r),cell:n}]})},t$=function(e,t,n){return Qt(e,function(r,a){return r.fold(function(){return b.some(a)},function(i){var o=Math.sqrt(Math.abs(i.x-t)+Math.abs(i.y-n)),u=Math.sqrt(Math.abs(a.x-t)+Math.abs(a.y-n));return b.some(u<o?a:i)})},b.none())},Ey=function(e,t,n,r,a){var i=kt(k.fromDom(n),"td,th,caption").map(function(u){return u.dom}),o=me(e$(e,i),function(u){return t(u,a)});return t$(o,r,a).map(function(u){return u.cell})},n$=function(e){return e.bottom},r$=function(e){return e.top},a$=function(e,t){return e.y<t},i$=function(e,t){return e.y>t},o$=G(Ey,n$,a$),u$=G(Ey,r$,i$),s$=function(e,t){return Pt(t.getClientRects()).bind(function(n){return o$(e,n.left,n.top)}).bind(function(n){return zb(zI(n),t)})},f$=function(e,t){return wr(t.getClientRects()).bind(function(n){return u$(e,n.left,n.top)}).bind(function(n){return zb(UI(n),t)})},l$=function(e,t,n){return n.breakAt.exists(function(r){return e(t,r).breakAt.isSome()})},c$=function(e){return e.breakType===Rn.Wrap&&e.positions.length===0},v$=function(e){return e.breakType===Rn.Br&&e.positions.length===1},ky=function(e,t,n){var r=e(t,n);return c$(r)||!$e(n.getNode())&&v$(r)?!l$(e,t,r):r.breakAt.isNone()},d$=G(ky,Pi),m$=G(ky,Ii),p$=function(e,t,n){var r=A.fromRangeStart(t);return Aa(!e,n).exists(function(a){return a.isEqual(r)})},h$=function(e,t,n,r){var a=e.selection.getRng(),i=t?1:-1;return Qm()&&p$(t,a,n)?(Un(i,e,n,!t,!1).each(function(o){zn(e,o)}),!0):!1},g$=function(e,t,n){return s$(t,n).orThunk(function(){return Pt(n.getClientRects()).bind(function(r){return pc(LI(e,A.before(t)),r.left)})}).getOr(A.before(t))},b$=function(e,t,n){return f$(t,n).orThunk(function(){return Pt(n.getClientRects()).bind(function(r){return pc($I(e,A.after(t)),r.left)})}).getOr(A.after(t))},xy=function(e,t){var n=t.getNode(e);return ae(n)&&n.nodeName==="TABLE"?b.some(n):b.none()},y$=function(e,t,n,r){var a=ft(t);a?t.undoManager.transact(function(){var i=k.fromTag(a);qn(i,hi(t)),at(i,k.fromTag("br")),e?ei(k.fromDom(n),i):en(k.fromDom(n),i);var o=t.dom.createRng();o.setStart(i.dom,0),o.setEnd(i.dom,0),zn(t,o)}):zn(t,r.toRange())},Ny=function(e,t,n){var r=xy(!!t,n),a=t===!1;r.fold(function(){return zn(e,n.toRange())},function(i){return Aa(a,e.getBody()).filter(function(o){return o.isEqual(n)}).fold(function(){return zn(e,n.toRange())},function(o){return y$(t,e,i,n)})})},C$=function(e,t,n,r){var a=e.selection.getRng(),i=A.fromRangeStart(a),o=e.getBody();if(!t&&d$(r,i)){var u=g$(o,n,i);return Ny(e,t,u),!0}else if(t&&m$(r,i)){var u=b$(o,n,i);return Ny(e,t,u),!0}else return!1},Ty=function(e,t,n){return b.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(function(r){return b.from(e.dom.getParent(r,"table")).map(function(a){return n(e,t,a,r)})}).getOr(!1)},Ay=function(e,t){return Ty(e,t,h$)},Ry=function(e,t){return Ty(e,t,C$)},w$=function(e,t,n){var r=Wt().os;Va([{keyCode:re.RIGHT,action:de(my,e,!0)},{keyCode:re.LEFT,action:de(my,e,!1)},{keyCode:re.UP,action:de(py,e,!1)},{keyCode:re.DOWN,action:de(py,e,!0)},{keyCode:re.RIGHT,action:de(Ay,e,!0)},{keyCode:re.LEFT,action:de(Ay,e,!1)},{keyCode:re.UP,action:de(Ry,e,!1)},{keyCode:re.DOWN,action:de(Ry,e,!0)},{keyCode:re.RIGHT,action:de(Cy,e,!0)},{keyCode:re.LEFT,action:de(Cy,e,!1)},{keyCode:re.UP,action:de(wy,e,!1)},{keyCode:re.DOWN,action:de(wy,e,!0)},{keyCode:re.RIGHT,action:de(Zb,e,t,!0)},{keyCode:re.LEFT,action:de(Zb,e,t,!1)},{keyCode:re.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:de(uL,e,t)},{keyCode:re.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:de(sL,e,t)},{keyCode:re.UP,action:de(yy,e,!1)},{keyCode:re.DOWN,action:de(yy,e,!0)}],n).each(function(a){n.preventDefault()})},S$=function(e,t){e.on("keydown",function(n){n.isDefaultPrevented()===!1&&w$(e,t,n)})},E$=function(e,t,n){Va([{keyCode:re.BACKSPACE,action:de(uy,e,!1)},{keyCode:re.BACKSPACE,action:de(Su,e,!1)},{keyCode:re.DELETE,action:de(Su,e,!0)},{keyCode:re.BACKSPACE,action:de(wu,e,!1)},{keyCode:re.DELETE,action:de(wu,e,!0)},{keyCode:re.BACKSPACE,action:de(Bu,e,t,!1)},{keyCode:re.DELETE,action:de(Bu,e,t,!0)},{keyCode:re.BACKSPACE,action:de(au,e,!1)},{keyCode:re.DELETE,action:de(au,e,!0)},{keyCode:re.BACKSPACE,action:de(Eu,e,!1)},{keyCode:re.DELETE,action:de(Eu,e,!0)},{keyCode:re.BACKSPACE,action:de(Du,e,!1)},{keyCode:re.DELETE,action:de(Du,e,!0)},{keyCode:re.BACKSPACE,action:de(Cu,e,!1)},{keyCode:re.DELETE,action:de(Cu,e,!0)},{keyCode:re.BACKSPACE,action:de(yu,e,!1)},{keyCode:re.DELETE,action:de(yu,e,!0)},{keyCode:re.BACKSPACE,action:de(_u,e,!1)},{keyCode:re.DELETE,action:de(_u,e,!0)}],n).each(function(r){n.preventDefault()})},k$=function(e,t){Va([{keyCode:re.BACKSPACE,action:de(Tb,e)},{keyCode:re.DELETE,action:de(Tb,e)}],t)},x$=function(e,t){e.on("keydown",function(n){n.isDefaultPrevented()===!1&&E$(e,t,n)}),e.on("keyup",function(n){n.isDefaultPrevented()===!1&&k$(e,n)})},N$=function(e){for(;e;){if(e.nodeType===1||e.nodeType===3&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}},Li=function(e,t){var n,r=t,a=e.dom,i=e.schema.getMoveCaretBeforeOnEnterElements();if(!!t){if(/^(LI|DT|DD)$/.test(t.nodeName)){var o=N$(t.firstChild);o&&/^(UL|OL|DL)$/.test(o.nodeName)&&t.insertBefore(a.doc.createTextNode(At),t.firstChild)}var u=a.createRng();if(t.normalize(),t.hasChildNodes()){for(var s=new Ge(t,t);n=s.current();){if(Q(n)){u.setStart(n,0),u.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}r=n,n=s.next()}n||(u.setStart(r,0),u.setEnd(r,0))}else $e(t)?t.nextSibling&&a.isBlock(t.nextSibling)?(u.setStartBefore(t),u.setEndBefore(t)):(u.setStartAfter(t),u.setEndAfter(t)):(u.setStart(t,0),u.setEnd(t,0));e.selection.setRng(u),Ai(e,u)}},T$=function(e,t){var n=e.getRoot(),r,a;for(r=t;r!==n&&e.getContentEditable(r)!=="false";)e.getContentEditable(r)==="true"&&(a=r),r=r.parentNode;return r!==n?a:n},xc=function(e){return b.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock))},A$=function(e){return xc(e).fold(X(""),function(t){return t.nodeName.toUpperCase()})},R$=function(e){return xc(e).filter(function(t){return oi(k.fromDom(t))}).isSome()},B$=function(e,t){return e.firstChild&&e.firstChild.nodeName===t},_$=function(e){var t;return((t=e.parentNode)===null||t===void 0?void 0:t.firstChild)===e},By=function(e,t){return e&&e.parentNode&&e.parentNode.nodeName===t},_y=function(e){return e&&/^(OL|UL|LI)$/.test(e.nodeName)},D$=function(e){return _y(e)&&_y(e.parentNode)},Ou=function(e){var t=e.parentNode;return/^(LI|DT|DD)$/.test(t.nodeName)?t:e},Pu=function(e,t,n){for(var r=e[n?"firstChild":"lastChild"];r&&!ae(r);)r=r[n?"nextSibling":"previousSibling"];return r===t},O$=function(e,t,n,r,a){var i=e.dom,o=e.selection.getRng();if(n!==e.getBody()){D$(n)&&(a="LI");var u=a?t(a):i.create("BR");if(Pu(n,r,!0)&&Pu(n,r,!1))if(By(n,"LI")){var s=Ou(n);i.insertAfter(u,s),_$(n)?i.remove(s):i.remove(n)}else i.replace(u,n);else if(Pu(n,r,!0))By(n,"LI")?(i.insertAfter(u,Ou(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n),i.remove(r);else if(Pu(n,r,!1))i.insertAfter(u,Ou(n)),i.remove(r);else{n=Ou(n);var f=o.cloneRange();f.setStartAfter(r),f.setEndAfter(n);var l=f.extractContents();a==="LI"&&B$(l,"LI")?(u=l.firstChild,i.insertAfter(l,n)):(i.insertAfter(l,n),i.insertAfter(u,n)),i.remove(r)}Li(e,u)}},P$=function(e){Y(nm(k.fromDom(e),qt),function(t){var n=t.dom;n.nodeValue=Xn(n.nodeValue)})},I$=function(e,t){return t&&t.nodeName==="A"&&e.isEmpty(t)},L$=function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)},Nc=function(e){e.innerHTML='<br data-mce-bogus="1">'},Tc=function(e,t){return e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t},Dy=function(e,t){return t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.getContentEditable(t)!=="true"},$$=function(e,t,n){var r=n,a=[],i;if(!!r){for(;r=r.firstChild;){if(e.isBlock(r))return;ae(r)&&!t[r.nodeName.toLowerCase()]&&a.push(r)}for(i=a.length;i--;)r=a[i],(!r.hasChildNodes()||r.firstChild===r.lastChild&&r.firstChild.nodeValue===""||I$(e,r))&&e.remove(r)}},Ac=function(e,t,n){return Q(t)===!1?n:e?n===1&&t.data.charAt(n-1)===nt?0:n:n===t.data.length-1&&t.data.charAt(n)===nt?t.data.length:n},F$=function(e){var t=e.cloneRange();return t.setStart(e.startContainer,Ac(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,Ac(!1,e.endContainer,e.endOffset)),t},M$=function(e){do Q(e)&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)},Oy=function(e,t){var n=e.getRoot(),r,a;for(r=t;r!==n&&e.getContentEditable(r)!=="false";)e.getContentEditable(r)==="true"&&(a=r),r=r.parentNode;return r!==n?a:n},U$=function(e,t,n){var r=e.dom;b.from(n.style).map(r.parseStyle).each(function(s){var f=rd(k.fromDom(t)),l=ie(ie({},f),s);r.setStyles(t,l)});var a=b.from(n.class).map(function(s){return s.split(/\s+/)}),i=b.from(t.className).map(function(s){return me(s.split(/\s+/),function(f){return f!==""})});Et(a,i,function(s,f){var l=me(f,function(v){return!Je(s,v)}),c=Dn(Dn([],s,!0),l,!0);r.setAttrib(t,"class",c.join(" "))});var o=["style","class"],u=Xa(n,function(s,f){return!Je(o,f)});r.setAttribs(t,u)},$i=function(e,t){var n=ft(e);if(n&&n.toLowerCase()===t.tagName.toLowerCase()){var r=hi(e);U$(e,t,r)}},z$=function(e,t,n,r,a){var i,o,u,s,f,l,c=t||"P",v=e.dom,d=Oy(v,r);if(o=v.getParent(r,v.isBlock),!o||!Dy(v,o)){if(o=o||d,o===e.getBody()||L$(o)?l=o.nodeName.toLowerCase():l=o.parentNode.nodeName.toLowerCase(),!o.hasChildNodes())return i=v.create(c),$i(e,i),o.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(s=r;s.parentNode!==o;)s=s.parentNode;for(;s&&!v.isBlock(s);)u=s,s=s.previousSibling;if(u&&e.schema.isValidChild(l,c.toLowerCase())){for(i=v.create(c),$i(e,i),u.parentNode.insertBefore(i,u),s=u;s&&!v.isBlock(s);)f=s.nextSibling,i.appendChild(s),s=f;n.setStart(r,a),n.setEnd(r,a)}}return r},H$=function(e,t){t.normalize();var n=t.lastChild;(!n||/^(left|right)$/gi.test(e.getStyle(n,"float",!0)))&&e.add(t,"br")},V$=function(e,t){var n,r,a,i,o,u,s,f,l,c,v=e.dom,d=e.schema,m=d.getNonEmptyElements(),p=e.selection.getRng(),h=function(B){var L=r,ne,q,D,ee=d.getTextInlineElements();if(B||f==="TABLE"||f==="HR"?ne=v.create(B||l):ne=i.cloneNode(!1),D=ne,Fk(e)===!1)v.setAttrib(ne,"style",null),v.setAttrib(ne,"class",null);else do if(ee[L.nodeName]){if(xn(L)||Ut(L))continue;q=L.cloneNode(!1),v.setAttrib(q,"id",""),ne.hasChildNodes()?(q.appendChild(ne.firstChild),ne.appendChild(q)):(D=q,ne.appendChild(q))}while((L=L.parentNode)&&L!==C);return $i(e,ne),Nc(D),ne},y=function(B){var L,ne,q=Ac(B,r,a);if(Q(r)&&(B?q>0:q<r.nodeValue.length))return!1;if(r.parentNode===i&&c&&!B||B&&ae(r)&&r===i.firstChild)return!0;if(Tc(r,"TABLE")||Tc(r,"HR"))return c&&!B||!c&&B;var D=new Ge(r,i);for(Q(r)&&(B&&q===0?D.prev():!B&&q===r.nodeValue.length&&D.next());L=D.current();){if(ae(L)){if(!L.getAttribute("data-mce-bogus")&&(ne=L.nodeName.toLowerCase(),m[ne]&&ne!=="br"))return!1}else if(Q(L)&&!Nr(L.nodeValue))return!1;B?D.prev():D.next()}return!0},g=function(){/^(H[1-6]|PRE|FIGURE)$/.test(f)&&x!=="HGROUP"?o=h(l):o=h(),Mk(e)&&Dy(v,s)&&v.isEmpty(i)?o=v.split(s,i):v.insertAfter(o,i),Li(e,o)};Wo(v,p).each(function(B){p.setStart(B.startContainer,B.startOffset),p.setEnd(B.endContainer,B.endOffset)}),r=p.startContainer,a=p.startOffset,l=ft(e);var E=!!(t&&t.shiftKey),S=!!(t&&t.ctrlKey);ae(r)&&r.hasChildNodes()&&(c=a>r.childNodes.length-1,r=r.childNodes[Math.min(a,r.childNodes.length-1)]||r,c&&Q(r)?a=r.nodeValue.length:a=0);var C=Oy(v,r);if(!!C){(l&&!E||!l&&E)&&(r=z$(e,l,p,r,a)),i=v.getParent(r,v.isBlock),s=i?v.getParent(i.parentNode,v.isBlock):null,f=i?i.nodeName.toUpperCase():"";var x=s?s.nodeName.toUpperCase():"";if(x==="LI"&&!S&&(i=s,s=s.parentNode,f=x),/^(LI|DT|DD)$/.test(f)&&v.isEmpty(i)){O$(e,h,s,i,l);return}l&&i===e.getBody()||(l=l||"P",ca(i)?(o=Is(i),v.isEmpty(i)&&Nc(i),$i(e,o),Li(e,o)):y()?g():y(!0)?(o=i.parentNode.insertBefore(h(),i),Li(e,Tc(i,"HR")?o:i)):(n=F$(p).cloneRange(),n.setEndAfter(i),u=n.extractContents(),P$(u),M$(u),o=u.firstChild,v.insertAfter(u,i),$$(v,m,o),H$(v,i),v.isEmpty(i)&&Nc(i),o.normalize(),v.isEmpty(o)?(v.remove(o),g()):($i(e,o),Li(e,o))),v.setAttrib(o,"id",""),e.fire("NewBlock",{newBlock:o}))}},W$=function(e,t,n){for(var r=new Ge(t,n),a,i=e.getNonEmptyElements();a=r.next();)if(i[a.nodeName.toLowerCase()]||a.length>0)return!0},Py=function(e,t,n){var r=e.dom.createRng();n?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)),e.selection.setRng(r),Ai(e,r)},q$=function(e,t){var n=e.selection,r=e.dom,a=n.getRng(),i,o;Wo(r,a).each(function(m){a.setStart(m.startContainer,m.startOffset),a.setEnd(m.endContainer,m.endOffset)});var u=a.startOffset,s=a.startContainer;if(s.nodeType===1&&s.hasChildNodes()){var f=u>s.childNodes.length-1;s=s.childNodes[Math.min(u,s.childNodes.length-1)]||s,f&&s.nodeType===3?u=s.nodeValue.length:u=0}var l=r.getParent(s,r.isBlock),c=l?r.getParent(l.parentNode,r.isBlock):null,v=c?c.nodeName.toUpperCase():"",d=!!(t&&t.ctrlKey);v==="LI"&&!d&&(l=c),s&&s.nodeType===3&&u>=s.nodeValue.length&&(W$(e.schema,s,l)||(i=r.create("br"),a.insertNode(i),a.setStartAfter(i),a.setEndAfter(i),o=!0)),i=r.create("br"),bf(r,a,i),Py(e,i,o),e.undoManager.add()},j$=function(e,t){var n=k.fromTag("br");en(k.fromDom(t),n),e.undoManager.add()},K$=function(e,t){X$(e.getBody(),t)||ei(k.fromDom(t),k.fromTag("br"));var n=k.fromTag("br");ei(k.fromDom(t),n),Py(e,n.dom,!1),e.undoManager.add()},G$=function(e){return $e(e.getNode())},X$=function(e,t){return G$(A.after(t))?!0:un(e,A.after(t)).map(function(n){return $e(n.getNode())}).getOr(!1)},Iy=function(e){return e&&e.nodeName==="A"&&"href"in e},Y$=function(e){return e.fold(Re,Iy,Iy,Re)},Q$=function(e){var t=G(zr,e),n=A.fromRangeStart(e.selection.getRng());return An(t,e.getBody(),n).filter(Y$)},Z$=function(e,t){t.fold(ve,G(j$,e),G(K$,e),ve)},Ly=function(e,t){var n=Q$(e);n.isSome()?n.each(G(Z$,e)):q$(e,t)},$y=function(e,t){return xc(e).filter(function(n){return t.length>0&&ra(k.fromDom(n),t)}).isSome()},J$=function(e){return $y(e,Lk(e))},eF=function(e){return $y(e,$k(e))},Dt=Kn.generate([{br:[]},{block:[]},{none:[]}]),tF=function(e,t){return eF(e)},Rc=function(e){return function(t,n){var r=ft(t)==="";return r===e}},Fy=function(e){return function(t,n){return R$(t)===e}},My=function(e,t){return function(n,r){var a=A$(n)===e.toUpperCase();return a===t}},Iu=function(e){return My("pre",e)},nF=function(){return My("summary",!0)},Lu=function(e){return function(t,n){return Ik(t)===e}},rF=function(e,t){return J$(e)},Fi=function(e,t){return t},Uy=function(e){var t=ft(e),n=T$(e.dom,e.selection.getStart());return n&&e.schema.isValidChild(n.nodeName,t||"P")},Ht=function(e,t){return function(n,r){var a=Qt(e,function(i,o){return i&&o(n,r)},!0);return a?b.some(t):b.none()}},aF=function(e,t){return Ob([Ht([tF],Dt.none()),Ht([nF()],Dt.br()),Ht([Iu(!0),Lu(!1),Fi],Dt.br()),Ht([Iu(!0),Lu(!1)],Dt.block()),Ht([Iu(!0),Lu(!0),Fi],Dt.block()),Ht([Iu(!0),Lu(!0)],Dt.br()),Ht([Fy(!0),Fi],Dt.br()),Ht([Fy(!0)],Dt.block()),Ht([Rc(!0),Fi,Uy],Dt.block()),Ht([Rc(!0)],Dt.br()),Ht([rF],Dt.br()),Ht([Rc(!1),Fi],Dt.br()),Ht([Uy],Dt.block())],[e,!!(t&&t.shiftKey)]).getOr(Dt.none())},zy=function(e,t){aF(e,t).fold(function(){Ly(e,t)},function(){V$(e,t)},ve)},iF=function(e,t){t.isDefaultPrevented()||(t.preventDefault(),E_(e.undoManager),e.undoManager.transact(function(){e.selection.isCollapsed()===!1&&e.execCommand("Delete"),zy(e,t)}))},oF=function(e){e.on("keydown",function(t){t.keyCode===re.ENTER&&iF(e,t)})},uF=function(e,t,n){Va([{keyCode:re.END,action:de(hy,e,!0)},{keyCode:re.HOME,action:de(hy,e,!1)},{keyCode:re.END,action:de(Sy,e,!0)},{keyCode:re.HOME,action:de(Sy,e,!1)},{keyCode:re.END,action:de(Ru,e,!0,t)},{keyCode:re.HOME,action:de(Ru,e,!1,t)}],n).each(function(r){n.preventDefault()})},sF=function(e,t){e.on("keydown",function(n){n.isDefaultPrevented()===!1&&uF(e,t,n)})},fF=Wt().browser,lF=function(e){var t=cf(function(){e.composing||Rh(e)},0);fF.isIE()&&(e.on("keypress",function(n){t.throttle()}),e.on("remove",function(n){t.cancel()}))},cF=function(e){lF(e),e.on("input",function(t){t.isComposing===!1&&Rh(e)})},vF=Wt(),dF=function(e,t,n){Va([{keyCode:re.PAGE_UP,action:de(Ru,e,!1,t)},{keyCode:re.PAGE_DOWN,action:de(Ru,e,!0,t)}],n)},Hy=function(e){return e.stopImmediatePropagation()},Vy=function(e){return e.keyCode===re.PAGE_UP||e.keyCode===re.PAGE_DOWN},Wy=function(e,t,n){n&&!e.get()?t.on("NodeChange",Hy,!0):!n&&e.get()&&t.off("NodeChange",Hy),e.set(n)},mF=function(e,t){if(!vF.os.isOSX()){var n=vt(!1);e.on("keydown",function(r){Vy(r)&&Wy(n,e,!0)}),e.on("keyup",function(r){r.isDefaultPrevented()===!1&&dF(e,t,r),Vy(r)&&n.get()&&(Wy(n,e,!1),e.nodeChanged())})}},qy=function(e,t){var n=t.container(),r=t.offset();return Q(n)?(n.insertData(r,e),b.some(A(n,r+e.length))):Io(t).map(function(a){var i=k.fromText(e);return t.isAtEnd()?ei(a,i):en(a,i),A(i.dom,e.length)})},pF=G(qy,At),hF=G(qy," "),gF=function(e){return function(t){return t.fold(function(n){return En(e.dom,A.before(n))},function(n){return wt(n)},function(n){return kn(n)},function(n){return un(e.dom,A.after(n))})}},bF=function(e,t){return function(n){return lA(e,n)?pF(t):hF(t)}},yF=function(e){return function(t){return e.selection.setRng(t.toRange()),e.nodeChanged(),!0}},CF=function(e){var t=A.fromRangeStart(e.selection.getRng()),n=k.fromDom(e.getBody());if(e.selection.isCollapsed()){var r=G(zr,e),a=A.fromRangeStart(e.selection.getRng());return An(r,e.getBody(),a).bind(gF(n)).bind(bF(n,t)).exists(yF(e))}else return!1},wF=function(e,t){Va([{keyCode:re.SPACEBAR,action:de(CF,e)}],t).each(function(n){t.preventDefault()})},SF=function(e){e.on("keydown",function(t){t.isDefaultPrevented()===!1&&wF(e,t)})},EF=function(e){var t=oL(e);return $L(e),S$(e,t),x$(e,t),oF(e),SF(e),cF(e),sF(e,t),mF(e,t),t},kF=function(e){return Mn(e)?vt(null):EF(e)},xF=function(){function e(t){this.lastPath=[],this.editor=t;var n,r=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",function(a){var i=t.selection.getRng(),o={startContainer:i.startContainer,startOffset:i.startOffset,endContainer:i.endContainer,endOffset:i.endOffset};(a.type==="nodechange"||!Kf(o,n))&&t.fire("SelectionChange"),n=o}),t.on("contextmenu",function(){t.fire("SelectionChange")}),t.on("SelectionChange",function(){var a=t.selection.getStart(!0);!a||!se.range&&t.selection.isCollapsed()||Vo(t)&&!r.isSameElementPath(a)&&t.dom.isChildOf(a,t.getBody())&&t.nodeChanged({selectionChange:!0})}),t.on("mouseup",function(a){!a.isDefaultPrevented()&&Vo(t)&&(t.selection.getNode().nodeName==="IMG"?ot.setEditorTimeout(t,function(){t.nodeChanged()}):t.nodeChanged())})}return e.prototype.nodeChanged=function(t){var n=this.editor.selection,r,a,i;this.editor.initialized&&n&&!yx(this.editor)&&!this.editor.mode.isReadOnly()&&(i=this.editor.getBody(),r=n.getStart(!0)||i,(r.ownerDocument!==this.editor.getDoc()||!this.editor.dom.isChildOf(r,i))&&(r=i),a=[],this.editor.dom.getParent(r,function(o){if(o===i)return!0;a.push(o)}),t=t||{},t.element=r,t.parents=a,this.editor.fire("NodeChange",t))},e.prototype.isSameElementPath=function(t){var n,r=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t);if(r.length===this.lastPath.length){for(n=r.length;n>=0&&r[n]===this.lastPath[n];n--);if(n===-1)return this.lastPath=r,!0}return this.lastPath=r,!1},e}(),NF=function(e){e.on("click",function(t){e.dom.getParent(t.target,"details")&&t.preventDefault()})},TF=function(e){e.parser.addNodeFilter("details",function(t){Y(t,function(n){n.attr("data-mce-open",n.attr("open")),n.attr("open","open")})}),e.serializer.addNodeFilter("details",function(t){Y(t,function(n){var r=n.attr("data-mce-open");n.attr("open",He(r)?r:null),n.attr("data-mce-open",null)})})},AF=function(e){NF(e),TF(e)},jy=function(e){return ae(e)&&hd(k.fromDom(e))},RF=function(e){var t=e.selection.getRng(),n=A.fromRangeStart(t),r=A.fromRangeEnd(t);if(A.isElementPosition(n)){var a=n.container();jy(a)&&wt(a).each(function(i){return t.setStart(i.container(),i.offset())})}if(A.isElementPosition(r)){var a=n.container();jy(a)&&kn(a).each(function(o){return t.setEnd(o.container(),o.offset())})}e.selection.setRng(Nl(t))},BF=function(e){e.on("click",function(t){t.detail>=3&&RF(e)})},Ky=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,a=n.defaultView;return{top:t.top+a.pageYOffset-r.clientTop,left:t.left+a.pageXOffset-r.clientLeft}},_F=function(e){return e.inline?Ky(e.getBody()):{left:0,top:0}},DF=function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},OF=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},a={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:a},PF=function(e,t){if(t.target.ownerDocument!==e.getDoc()){var n=Ky(e.getContentAreaContainer()),r=OF(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}return{left:t.pageX,top:t.pageY}},IF=function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}},LF=function(e,t){return IF(_F(e),DF(e),PF(e,t))},$u=_e,$F=pn,FF=function(e,t){return $u(t)&&t!==e},MF=function(e,t,n){return t===n||e.dom.isChildOf(t,n)?!1:!$u(t)},UF=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t},zF=function(e,t,n,r){var a=e.dom,i=t.cloneNode(!0);a.setStyles(i,{width:n,height:r}),a.setAttrib(i,"data-mce-selected",null);var o=a.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return a.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),a.setStyles(i,{margin:0,boxSizing:"border-box"}),o.appendChild(i),o},HF=function(e,t){e.parentNode!==t&&t.appendChild(e)},VF=function(e,t,n,r,a,i){var o=0,u=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>a&&(o=t.pageX+n-a),t.pageY+r>i&&(u=t.pageY+r-i),e.style.width=n-o+"px",e.style.height=r-u+"px"},Gy=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},WF=function(e){return e.button===0},qF=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}},jF=function(e,t){return function(n){if(WF(n)){var r=et(t.dom.getParents(n.target),uk($u,$F)).getOr(null);if(FF(t.getBody(),r)){var a=t.dom.getPos(r),i=t.getBody(),o=t.getDoc().documentElement;e.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(t.inline?i.scrollWidth:o.offsetWidth)-2,maxY:(t.inline?i.scrollHeight:o.offsetHeight)-2,relX:n.pageX-a.x,relY:n.pageY-a.y,width:r.offsetWidth,height:r.offsetHeight,ghost:zF(t,r,r.offsetWidth,r.offsetHeight)})}}}},KF=function(e,t){var n=ot.throttle(function(r,a){t._selectionOverrides.hideFakeCaret(),t.selection.placeCaretAt(r,a)},0);return t.on("remove",n.stop),function(r){return e.on(function(a){var i=Math.max(Math.abs(r.screenX-a.screenX),Math.abs(r.screenY-a.screenY));if(!a.dragging&&i>10){var o=t.fire("dragstart",{target:a.element});if(o.isDefaultPrevented())return;a.dragging=!0,t.focus()}if(a.dragging){var u=qF(a,LF(t,r));HF(a.ghost,t.getBody()),VF(a.ghost,u,a.width,a.height,a.maxX,a.maxY),n(r.clientX,r.clientY)}})}},GF=function(e){var t=e.getSel().getRangeAt(0),n=t.startContainer;return n.nodeType===3?n.parentNode:n},XF=function(e,t){return function(n){e.on(function(r){if(r.dragging){if(MF(t,GF(t.selection),r.element)){var a=UF(r.element),i=t.fire("drop",{clientX:n.clientX,clientY:n.clientY});i.isDefaultPrevented()||t.undoManager.transact(function(){Gy(r.element),t.insertContent(t.dom.getOuterHTML(a)),t._selectionOverrides.hideFakeCaret()})}t.fire("dragend")}}),Xy(e)}},YF=function(e,t){return function(){e.on(function(n){n.dragging&&t.fire("dragend")}),Xy(e)}},Xy=function(e){e.on(function(t){Gy(t.ghost)}),e.clear()},QF=function(e){var t=Ca(),n=xe.DOM,r=document,a=jF(t,e),i=KF(t,e),o=XF(t,e),u=YF(t,e);e.on("mousedown",a),e.on("mousemove",i),e.on("mouseup",o),n.bind(r,"mousemove",i),n.bind(r,"mouseup",u),e.on("remove",function(){n.unbind(r,"mousemove",i),n.unbind(r,"mouseup",u)}),e.on("keydown",function(s){s.keyCode===re.ESC&&u()})},ZF=function(e){e.on("drop",function(t){var n=typeof t.clientX!="undefined"?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;($u(n)||e.dom.getContentEditableParent(n)==="false")&&t.preventDefault()})},JF=function(e){var t=function(a){if(!a.isDefaultPrevented()){var i=a.dataTransfer;i&&(Je(i.types,"Files")||i.files.length>0)&&(a.preventDefault(),a.type==="drop"&&pu(e,"Dropped file type is not supported"))}},n=function(a){Xo(e,a.target)&&t(a)},r=function(){var a=xe.DOM,i=e.dom,o=document,u=e.inline?e.getBody():e.getDoc(),s=["drop","dragover"];Y(s,function(f){a.bind(o,f,n),i.bind(u,f,t)}),e.on("remove",function(){Y(s,function(f){a.unbind(o,f,n),i.unbind(u,f,t)})})};e.on("init",function(){ot.setEditorTimeout(e,r,0)})},eM=function(e){QF(e),ZF(e),Ex(e)&&JF(e)},tM=function(e){var t=cf(function(){if(!e.removed&&e.getBody().contains(document.activeElement)){var n=e.selection.getRng();if(n.collapsed){var r=lc(e,n,!1);e.selection.setRng(r)}}},0);e.on("focus",function(){t.throttle()}),e.on("blur",function(){t.cancel()})},nM=function(e){e.on("init",function(){e.on("focusin",function(t){var n=t.target;if(Gt(n)){var r=Pa(e.getBody(),n),a=_e(r)?r:n;e.selection.getNode()!==a&&za(e,a).each(function(i){return e.selection.setRng(i)})}})})},Yy=pn,Vr=_e,Fu=function(e,t){return Pa(e.getBody(),t)},rM=function(e){var t=e.selection,n=e.dom,r=n.isBlock,a=e.getBody(),i=Mx(e,a,r,function(){return $r(e)}),o="sel-"+n.uniqueId(),u="data-mce-selected",s,f=function(D){return n.hasClass(D,"mce-offscreen-selection")},l=function(D){return D!==a&&(Vr(D)||Gt(D))&&n.isChildOf(D,a)},c=function(D){return cr(D)||vr(D)||La(D)||$a(D)},v=function(){var D=n.get(o);return D&&D.getElementsByTagName("*")[0]},d=function(D){D&&t.setRng(D)},m=t.getRng,p=function(D,ee,U,W){W===void 0&&(W=!0);var F=e.fire("ShowCaret",{target:ee,direction:D,before:U});return F.isDefaultPrevented()?null:(W&&t.scrollIntoView(ee,D===-1),i.show(U,ee))},h=function(D){D.hasAttribute("data-mce-caret")&&(Is(D),d(m()),t.scrollIntoView(D))},y=function(){e.on("mouseup",function(F){var V=m();V.collapsed&&Qg(e,F.clientX,F.clientY)&&Sb(e,V,!1).each(d)}),e.on("click",function(F){var V=Fu(e,F.target);V&&(Vr(V)&&(F.preventDefault(),e.focus()),Yy(V)&&n.isChildOf(V,t.getNode())&&L())}),e.on("blur NewBlock",L),e.on("ResizeWindow FullscreenStateChanged",i.reposition);var D=function(F){var V=F.firstChild;if(vn(V))return!1;var K=A.before(V);if($e(K.getNode())&&F.childNodes.length===1)return!c(K);var O=on(F),j=O.next(K);return j&&!c(j)},ee=function(F,V){var K=n.getParent(F,r),O=n.getParent(V,r);return K===O},U=function(F,V){var K=n.getParent(F,r),O=n.getParent(V,r);return vn(K)?!1:F!==O&&n.isChildOf(K,O)&&Vr(Fu(e,K))===!1?!0:!n.isChildOf(O,K)&&!ee(K,O)&&D(K)};e.on("tap",function(F){var V=F.target,K=Fu(e,V);Vr(K)?(F.preventDefault(),za(e,K).each(B)):l(V)&&za(e,V).each(B)},!0),e.on("mousedown",function(F){var V=F.target;if(!(V!==a&&V.nodeName!=="HTML"&&!n.isChildOf(V,a))&&Qg(e,F.clientX,F.clientY)!==!1){var K=Fu(e,V);if(K)Vr(K)?(F.preventDefault(),za(e,K).each(B)):(L(),!(Yy(K)&&F.shiftKey)&&!Wf(F.clientX,F.clientY,t.getRng())&&(q(),t.placeCaretAt(F.clientX,F.clientY)));else if(l(V))za(e,V).each(B);else if(Pr(V)===!1){L(),q();var O=tL(a,F.clientX,F.clientY);if(O&&!U(V,O.node)){F.preventDefault();var j=p(1,O.node,O.before,!1);d(j),e.getBody().focus()}}}}),e.on("keypress",function(F){re.modifierPressed(F)||Vr(t.getNode())&&F.preventDefault()}),e.on("GetSelectionRange",function(F){var V=F.range;if(s){if(!s.parentNode){s=null;return}V=V.cloneRange(),V.selectNode(s),F.range=V}}),e.on("SetSelectionRange",function(F){F.range=S(F.range);var V=B(F.range,F.forward);V&&(F.range=V)});var W=function(F){return F.id==="mcepastebin"};e.on("AfterSetSelectionRange",function(F){var V=F.range,K=V.startContainer.parentNode;!E(V)&&!W(K)&&q(),f(K)||L()}),e.on("copy",function(F){var V=F.clipboardData;if(!F.isDefaultPrevented()&&F.clipboardData&&!se.ie){var K=v();K&&(F.preventDefault(),V.clearData(),V.setData("text/html",K.outerHTML),V.setData("text/plain",K.outerText||K.innerText))}}),eM(e),tM(e),nM(e)},g=function(D){return Lt(D)||lo(D)||co(D)},E=function(D){return g(D.startContainer)||g(D.endContainer)},S=function(D){var ee=e.schema.getShortEndedElements(),U=n.createRng(),W=D.startContainer,F=D.startOffset,V=D.endContainer,K=D.endOffset;return pe(ee,W.nodeName.toLowerCase())?F===0?U.setStartBefore(W):U.setStartAfter(W):U.setStart(W,F),pe(ee,V.nodeName.toLowerCase())?K===0?U.setEndBefore(V):U.setEndAfter(V):U.setEnd(V,K),U},C=function(D,ee,U){var W=e.$,F=oo(k.fromDom(e.getBody()),"#"+o).fold(function(){return W([])},function(O){return W([O.dom])});F.length===0&&(F=W('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",o),F.appendTo(e.getBody()));var V=n.createRng();ee===U&&se.ie?(F.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xA0</p>').append(ee),V.setStartAfter(F[0].firstChild.firstChild),V.setEndAfter(ee)):(F.empty().append(At).append(ee).append(At),V.setStart(F[0].firstChild,1),V.setEnd(F[0].lastChild,0)),F.css({top:n.getPos(D,e.getBody()).y}),F[0].focus();var K=t.getSel();return K.removeAllRanges(),K.addRange(V),V},x=function(D){var ee=D.cloneNode(!0),U=e.fire("ObjectSelected",{target:D,targetClone:ee});if(U.isDefaultPrevented())return null;var W=C(D,U.targetClone,ee),F=k.fromDom(D);return Y(kt(k.fromDom(e.getBody()),"*[data-mce-selected]"),function(V){Te(F,V)||jn(V,u)}),n.getAttrib(D,u)||D.setAttribute(u,"1"),s=D,q(),W},B=function(D,ee){if(!D)return null;if(D.collapsed){if(!E(D)){var U=ee?1:-1,W=Si(U,a,D),F=W.getNode(!ee);if(Pr(F))return p(U,F,ee?!W.isAtEnd():!1,!1);var V=W.getNode(ee);if(Pr(V))return p(U,V,ee?!1:!W.isAtEnd(),!1)}return null}var K=D.startContainer,O=D.startOffset,j=D.endOffset;if(K.nodeType===3&&O===0&&Vr(K.parentNode)&&(K=K.parentNode,O=n.nodeIndex(K),K=K.parentNode),K.nodeType!==1)return null;if(j===O+1&&K===D.endContainer){var fe=K.childNodes[O];if(l(fe))return x(fe)}return null},L=function(){s&&s.removeAttribute(u),oo(k.fromDom(e.getBody()),"#"+o).each(tt),s=null},ne=function(){i.destroy(),s=null},q=function(){i.hide()};return se.ceFalse&&!Mn(e)&&y(),{showCaret:p,showBlockCaretContainer:h,hideFakeCaret:q,destroy:ne}},aM=function(e){var t=_.each,n=re.BACKSPACE,r=re.DELETE,a=e.dom,i=e.selection,o=e.parser,u=se.gecko,s=se.ie,f=se.webkit,l="data:text/mce-internal,",c=s?"Text":"URL",v=function(P,z){try{e.getDoc().execCommand(P,!1,z)}catch{}},d=function(P){return P.isDefaultPrevented()},m=function(P){var z,Z;P.dataTransfer&&(e.selection.isCollapsed()&&P.target.tagName==="IMG"&&i.select(P.target),z=e.selection.getContent(),z.length>0&&(Z=l+escape(e.id)+","+escape(z),P.dataTransfer.setData(c,Z)))},p=function(P){var z;return P.dataTransfer&&(z=P.dataTransfer.getData(c),z&&z.indexOf(l)>=0)?(z=z.substr(l.length).split(","),{id:unescape(z[0]),html:unescape(z[1])}):null},h=function(P,z){e.queryCommandSupported("mceInsertClipboardContent")?e.execCommand("mceInsertClipboardContent",!1,{content:P,internal:z}):e.execCommand("mceInsertContent",!1,P)},y=function(){var P=function(Z){var N=a.create("body"),$=Z.cloneContents();return N.appendChild($),i.serializer.serialize(N,{format:"html"})},z=function(Z){var N=P(Z),$=a.createRng();$.selectNode(e.getBody());var I=P($);return N===I};e.on("keydown",function(Z){var N=Z.keyCode,$,I;if(!d(Z)&&(N===r||N===n)){if($=e.selection.isCollapsed(),I=e.getBody(),$&&!a.isEmpty(I)||!$&&!z(e.selection.getRng()))return;Z.preventDefault(),e.setContent(""),I.firstChild&&a.isBlock(I.firstChild)?e.selection.setCursorLocation(I.firstChild,0):e.selection.setCursorLocation(I,0),e.nodeChanged()}})},g=function(){e.shortcuts.add("meta+a",null,"SelectAll")},E=function(){e.inline||a.bind(e.getDoc(),"mousedown mouseup",function(P){var z;if(P.target===e.getDoc().documentElement)if(z=i.getRng(),e.getBody().focus(),P.type==="mousedown"){if(Lt(z.startContainer))return;i.placeCaretAt(P.clientX,P.clientY)}else i.setRng(z)})},S=function(){e.on("keydown",function(P){if(!d(P)&&P.keyCode===n){if(!e.getBody().getElementsByTagName("hr").length)return;if(i.isCollapsed()&&i.getRng().startOffset===0){var z=i.getNode(),Z=z.previousSibling;if(z.nodeName==="HR"){a.remove(z),P.preventDefault();return}Z&&Z.nodeName&&Z.nodeName.toLowerCase()==="hr"&&(a.remove(Z),P.preventDefault())}}})},C=function(){Range.prototype.getClientRects||e.on("mousedown",function(P){if(!d(P)&&P.target.nodeName==="HTML"){var z=e.getBody();z.blur(),ot.setEditorTimeout(e,function(){z.focus()})}})},x=function(){e.on("click",function(P){var z=P.target;/^(IMG|HR)$/.test(z.nodeName)&&a.getContentEditableParent(z)!=="false"&&(P.preventDefault(),e.selection.select(z),e.nodeChanged()),z.nodeName==="A"&&a.hasClass(z,"mce-item-anchor")&&(P.preventDefault(),i.select(z))})},B=function(){var P=function(){var Z=a.getAttribs(i.getStart().cloneNode(!1));return function(){var N=i.getStart();N!==e.getBody()&&(a.setAttrib(N,"style",null),t(Z,function($){N.setAttributeNode($.cloneNode(!0))}))}},z=function(){return!i.isCollapsed()&&a.getParent(i.getStart(),a.isBlock)!==a.getParent(i.getEnd(),a.isBlock)};e.on("keypress",function(Z){var N;if(!d(Z)&&(Z.keyCode===8||Z.keyCode===46)&&z())return N=P(),e.getDoc().execCommand("delete",!1,null),N(),Z.preventDefault(),!1}),a.bind(e.getDoc(),"cut",function(Z){var N;!d(Z)&&z()&&(N=P(),ot.setEditorTimeout(e,function(){N()}))})},L=function(){e.on("keydown",function(P){if(!d(P)&&P.keyCode===n&&i.isCollapsed()&&i.getRng().startOffset===0){var z=i.getNode().previousSibling;if(z&&z.nodeName&&z.nodeName.toLowerCase()==="table")return P.preventDefault(),!1}})},ne=function(){e.on("keydown",function(P){var z,Z;if(!(d(P)||P.keyCode!==re.BACKSPACE)){z=i.getRng();var N=z.startContainer,$=z.startOffset,I=a.getRoot();if(Z=N,!(!z.collapsed||$!==0)){for(;Z&&Z.parentNode&&Z.parentNode.firstChild===Z&&Z.parentNode!==I;)Z=Z.parentNode;Z.tagName==="BLOCKQUOTE"&&(e.formatter.toggle("blockquote",null,Z),z=a.createRng(),z.setStart(N,0),z.setEnd(N,0),i.setRng(z))}}})},q=function(){var P=function(){v("StyleWithCSS",!1),v("enableInlineTableEditing",!1),Vm(e)||v("enableObjectResizing",!1)};Cx(e)||e.on("BeforeExecCommand mousedown",P)},D=function(){var P=function(){t(a.select("a"),function(z){var Z=z.parentNode,N=a.getRoot();if(Z.lastChild===z){for(;Z&&!a.isBlock(Z);){if(Z.parentNode.lastChild!==Z||Z===N)return;Z=Z.parentNode}a.add(Z,"br",{"data-mce-bogus":1})}})};e.on("SetContent ExecCommand",function(z){(z.type==="setcontent"||z.command==="mceInsertLink")&&P()})},ee=function(){ft(e)&&e.on("init",function(){v("DefaultParagraphSeparator",ft(e))})},U=function(){e.on("keyup focusin mouseup",function(P){re.modifierPressed(P)||i.normalize()},!0)},W=function(){e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},F=function(){e.inline||e.on("keydown",function(){document.activeElement===document.body&&e.getWin().focus()})},V=function(){e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",function(P){var z;if(P.target.nodeName==="HTML"){if(se.ie>11){e.getBody().focus();return}z=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(z),e.selection.normalize(),e.nodeChanged()}}))},K=function(){se.mac&&e.on("keydown",function(P){if(re.metaKeyPressed(P)&&!P.shiftKey&&(P.keyCode===37||P.keyCode===39)){P.preventDefault();var z=e.selection.getSel();z.modify("move",P.keyCode===37?"backward":"forward","lineboundary")}})},O=function(){v("AutoUrlDetect",!1)},j=function(){e.on("click",function(P){var z=P.target;do if(z.tagName==="A"){P.preventDefault();return}while(z=z.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},fe=function(){e.on("init",function(){e.dom.bind(e.getBody(),"submit",function(P){P.preventDefault()})})},ge=function(){o.addNodeFilter("br",function(P){for(var z=P.length;z--;)P[z].attr("class")==="Apple-interchange-newline"&&P[z].remove()})},he=function(){e.on("dragstart",function(P){m(P)}),e.on("drop",function(P){if(!d(P)){var z=p(P);if(z&&z.id!==e.id){P.preventDefault();var Z=jf(P.x,P.y,e.getDoc());i.setRng(Z),h(z.html,!0)}}})},We=ve,Be=function(){if(!u||e.removed)return!1;var P=e.selection.getSel();return!P||!P.rangeCount||P.rangeCount===0},lt=function(){f&&(E(),x(),fe(),g(),se.iOS&&(F(),V(),j())),u&&(C(),q(),W(),K())},xt=function(){ne(),y(),se.windowsPhone||U(),f&&(E(),x(),ee(),fe(),L(),ge(),se.iOS?(F(),V(),j()):g()),se.ie>=11&&(V(),L()),se.ie&&(g(),O(),he()),u&&(S(),C(),B(),q(),D(),W(),K(),L())};return Mn(e)?lt():xt(),{refreshContentEditable:We,isHidden:Be}},Bc=xe.DOM,iM=function(e,t){var n=k.fromDom(e.getBody()),r=gs(kr(n)),a=k.fromTag("style");hn(a,"type","text/css"),at(a,k.fromText(t)),at(r,a),e.on("remove",function(){tt(a)})},oM=function(e){return e.inline?e.getElement().nodeName.toLowerCase():void 0},_c=function(e){return Xa(e,function(t){return Nt(t)===!1})},Qy=function(e){var t=e.settings;return _c({block_elements:t.block_elements,boolean_attributes:t.boolean_attributes,custom_elements:t.custom_elements,extended_valid_elements:t.extended_valid_elements,invalid_elements:t.invalid_elements,invalid_styles:t.invalid_styles,move_caret_before_on_enter_elements:t.move_caret_before_on_enter_elements,non_empty_elements:t.non_empty_elements,schema:t.schema,self_closing_elements:t.self_closing_elements,short_ended_elements:t.short_ended_elements,special:t.special,text_block_elements:t.text_block_elements,text_inline_elements:t.text_inline_elements,valid_children:t.valid_children,valid_classes:t.valid_classes,valid_elements:t.valid_elements,valid_styles:t.valid_styles,verify_html:t.verify_html,whitespace_elements:t.whitespace_elements,padd_empty_block_inline_children:t.format_empty_lines})},Zy=function(e){var t=e.settings,n=e.editorUpload.blobCache;return _c({allow_conditional_comments:t.allow_conditional_comments,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_html_in_named_anchor:t.allow_html_in_named_anchor,allow_script_urls:t.allow_script_urls,allow_unsafe_link_target:t.allow_unsafe_link_target,convert_fonts_to_spans:t.convert_fonts_to_spans,fix_list_elements:t.fix_list_elements,font_size_legacy_values:t.font_size_legacy_values,forced_root_block:t.forced_root_block,forced_root_block_attrs:t.forced_root_block_attrs,padd_empty_with_br:t.padd_empty_with_br,preserve_cdata:t.preserve_cdata,remove_trailing_brs:t.remove_trailing_brs,inline_styles:t.inline_styles,root_name:oM(e),validate:!0,blob_cache:n,document:e.getDoc(),images_dataimg_filter:t.images_dataimg_filter})},uM=function(e){var t=e.settings;return ie(ie(ie({},Zy(e)),Qy(e)),_c({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope,element_format:t.element_format,entities:t.entities,entity_encoding:t.entity_encoding,indent:t.indent,indent_after:t.indent_after,indent_before:t.indent_before}))},sM=function(e){var t=rc(Zy(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",function(n,r){for(var a=n.length,i,o,u=e.dom,s="data-mce-"+r;a--;)if(i=n[a],o=i.attr(r),o&&!i.attr(s)){if(o.indexOf("data:")===0||o.indexOf("blob:")===0)continue;r==="style"?(o=u.serializeStyle(u.parseStyle(o),i.name),o.length||(o=null),i.attr(s,o),i.attr(r,o)):r==="tabindex"?(i.attr(s,o),i.attr(r,null)):i.attr(s,e.convertURL(o,r,i.name))}}),t.addNodeFilter("script",function(n){for(var r=n.length;r--;){var a=n[r],i=a.attr("type")||"no/type";i.indexOf("mce-")!==0&&a.attr("type","mce-"+i)}}),e.settings.preserve_cdata&&t.addNodeFilter("#cdata",function(n){for(var r=n.length;r--;){var a=n[r];a.type=8,a.name="#comment",a.value="[CDATA["+e.dom.encode(a.value)+"]]"}}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(n){for(var r=n.length,a=e.schema.getNonEmptyElements();r--;){var i=n[r];i.isEmpty(a)&&i.getAll("br").length===0&&(i.append(new Xt("br",1)).shortEnded=!0)}}),t},fM=function(e){e.settings.auto_focus&&ot.setEditorTimeout(e,function(){var t;e.settings.auto_focus===!0?t=e:t=e.editorManager.get(e.settings.auto_focus),t.destroyed||t.focus()},100)},lM=function(e){var t=e.dom.getRoot();!e.inline&&(!Vo(e)||e.selection.getStart(!0)===t)&&wt(t).each(function(n){var r=n.getNode(),a=oa(r)?wt(r).getOr(n):n;se.browser.isIE()?KN(e,a.toRange()):e.selection.setRng(a.toRange())})},cM=function(e){e.bindPendingEventDelegates(),e.initialized=!0,W1(e),e.focus(!0),lM(e),e.nodeChanged({initial:!0}),e.execCallback("init_instance_callback",e),fM(e)},Jy=function(e){return e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader},vM=function(e,t,n){var r=[new it(function(a,i){return Jy(e).loadAll(t,a,i)})];return e.inline?r:r.concat([new it(function(a,i){return e.ui.styleSheetLoader.loadAll(n,a,i)})])},eC=function(e){var t=Jy(e),n=Hm(e),r=e.contentCSS,a=function(){t.unloadAll(r),e.inline||e.ui.styleSheetLoader.unloadAll(n)},i=function(){e.removed?a():e.on("remove",a)};if(e.contentStyles.length>0){var o="";_.each(e.contentStyles,function(s){o+=s+`\r
`}),e.dom.addStyle(o)}var u=it.all(vM(e,r,n)).then(i).catch(i);return e.settings.content_style&&iM(e,e.settings.content_style),u},dM=function(e){var t=e.settings,n=e.getDoc(),r=e.getBody();H1(e),!t.browser_spellcheck&&!t.gecko_spellcheck&&(n.body.spellcheck=!1,Bc.setAttrib(r,"spellcheck","false")),e.quirks=aM(e),V1(e);var a=ex(e);a!==void 0&&(r.dir=a),t.protect&&e.on("BeforeSetContent",function(i){_.each(t.protect,function(o){i.content=i.content.replace(o,function(u){return"<!--mce:protected "+escape(u)+"-->"})})}),e.on("SetContent",function(){e.addVisual(e.getBody())}),e.on("compositionstart compositionend",function(i){e.composing=i.type==="compositionstart"})},mM=function(e){Mn(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})},Dc=function(e){e.removed!==!0&&(mM(e),cM(e))},Oc=function(e,t){var n=e.settings,r=e.getElement(),a=e.getDoc();n.inline||(e.getElement().style.visibility=e.orgVisibility),!t&&!e.inline&&(a.open(),a.write(e.iframeHTML),a.close()),e.inline&&(Bc.addClass(r,"mce-content-body"),e.contentDocument=a=document,e.contentWindow=window,e.bodyElement=r,e.contentAreaContainer=r);var i=e.getBody();i.disabled=!0,e.readonly=!!n.readonly,e.readonly||(e.inline&&Bc.getStyle(i,"position",!0)==="static"&&(i.style.position="relative"),i.contentEditable=e.getParam("content_editable_state",!0)),i.disabled=!1,e.editorUpload=sP(e),e.schema=Zn(Qy(e)),e.dom=xe(a,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:e.inline?e.getBody():null,collect:function(){return e.inline},schema:e.schema,contentCssCors:Yk(e),referrerPolicy:Mm(e),onSetAttrib:function(s){e.fire("SetAttrib",s)}}),e.parser=sM(e),e.serializer=Wg(uM(e),e),e.selection=$g(e.dom,e.getWin(),e.serializer,e),e.annotator=Dp(e),e.formatter=ub(e),e.undoManager=fb(e),e._nodeChangeDispatcher=new xF(e),e._selectionOverrides=rM(e),AL(e),AF(e),Mn(e)||BF(e);var o=kF(e);xL(e,o),OL(e),wP(e);var u=M_(e);dM(e),u.fold(function(){eC(e).then(function(){return Dc(e)})},function(s){e.setProgressState(!0),eC(e).then(function(){s().then(function(f){e.setProgressState(!1),Dc(e)},function(f){e.notificationManager.open({type:"error",text:String(f)}),Dc(e)})})})},Mi=xe.DOM,pM=function(e,t){if(document.domain!==window.location.hostname&&se.browser.isIE()){var n=rb("mce");e[n]=function(){Oc(e)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+e.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return Mi.setAttrib(t,"src",r),!0}return!1},hM=function(e,t,n,r){var a=k.fromTag("iframe");return qn(a,r),qn(a,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),Ao(a,"tox-edit-area__iframe"),a},gM=function(e){var t=_k(e)+"<html><head>";Dk(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=Ok(e),r=Pk(e),a=e.translate(Tx(e));return Lm(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Lm(e)+'" />'),t+="</head>"+('<body id="'+n+'" class="mce-content-body '+r+'" data-id="'+e.id+'" aria-label="'+a+'">')+"<br></body></html>",t},bM=function(e,t){var n=e.translate("Rich Text Area"),r=hM(e.id,n,t.height,Bk(e)).dom;r.onload=function(){r.onload=null,e.fire("load")};var a=pM(e,r);return e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=gM(e),Mi.add(t.iframeContainer,r),a},yM=function(e,t){var n=bM(e,t);t.editorContainer&&(Mi.get(t.editorContainer).style.display=e.orgDisplay,e.hidden=Mi.isHidden(t.editorContainer)),e.getElement().style.display="none",Mi.setAttrib(e.id,"aria-hidden","true"),n||Oc(e)},tC=xe.DOM,nC=function(e,t,n){var r=sn.get(n),a=sn.urls[n]||e.documentBaseUrl.replace(/\/$/,"");if(n=_.trim(n),r&&_.inArray(t,n)===-1){if(_.each(sn.dependencies(n),function(o){nC(e,t,o)}),e.plugins[n])return;try{var i=new r(e,a,e.$);e.plugins[n]=i,i.init&&(i.init(e,a),t.push(n))}catch(o){QO(e,n,o)}}},rC=function(e){return e.replace(/^\-/,"")},CM=function(e){var t=[];_.each(wf(e).split(/[ ,]/),function(n){nC(e,t,rC(n))})},wM=function(e){var t=_.trim(Fm(e)),n=e.ui.registry.getAll().icons,r=ie(ie({},mu.get("default").icons),mu.get(t).icons);Pe(r,function(a,i){pe(n,i)||e.ui.registry.addIcon(i,a)})},SM=function(e){var t=gi(e);if(He(t)){e.settings.theme=rC(t);var n=dr.get(t);e.theme=new n(e,dr.urls[t]),e.theme.init&&e.theme.init(e,dr.urls[t]||e.documentBaseUrl.replace(/\/$/,""),e.$)}else e.theme={}},EM=function(e){return e.theme.renderUI()},kM=function(e){var t=e.getElement(),n=gi(e),r=n(e,t);return r.editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||e.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||e.id+"_iframecontainer"),r.height=r.iframeHeight?r.iframeHeight:t.offsetHeight,r},aC=function(e){return{editorContainer:e,iframeContainer:e,api:{}}},xM=function(e){var t=tC.create("div");return tC.insertAfter(t,e),aC(t)},NM=function(e){var t=e.getElement();return e.inline?aC(null):xM(t)},TM=function(e){var t=e.getElement();return e.orgDisplay=t.style.display,He(gi(e))?EM(e):Oe(gi(e))?kM(e):NM(e)},AM=function(e,t){var n={show:b.from(t.show).getOr(ve),hide:b.from(t.hide).getOr(ve),disable:b.from(t.disable).getOr(ve),isDisabled:b.from(t.isDisabled).getOr(Re),enable:function(){e.mode.isReadOnly()||b.from(t.enable).map(VC)}};e.ui=ie(ie({},e.ui),n)},iC=function(e){e.fire("ScriptsLoaded"),wM(e),SM(e),CM(e);var t=TM(e);AM(e,b.from(t.api).getOr({}));var n={editorContainer:t.editorContainer,iframeContainer:t.iframeContainer};return e.editorContainer=n.editorContainer?n.editorContainer:null,tP(e),e.inline?Oc(e):yM(e,n)},Wr=xe.DOM,oC=function(e){return e.charAt(0)==="-"},RM=function(e,t){var n=Um(t),r=Qk(t);if(rn.hasCode(n)===!1&&n!=="en"){var a=r!==""?r:t.editorManager.baseURL+"/langs/"+n+".js";e.add(a,ve,void 0,function(){YO(t,a,n)})}},BM=function(e,t,n,r){var a=gi(t);if(He(a)){if(!oC(a)&&!pe(dr.urls,a)){var i=lx(t);i?dr.load(a,t.documentBaseURI.toAbsolute(i)):dr.load(a,"themes/"+a+"/theme"+n+".js")}e.loadQueue(function(){dr.waitFor(a,r)})}else r()},_M=function(e){return b.from(qk(e)).filter(function(t){return t.length>0}).map(function(t){return{url:t,name:b.none()}})},uC=function(e,t,n){return b.from(t).filter(function(r){return r.length>0&&!mu.has(r)}).map(function(r){return{url:e.editorManager.baseURL+"/icons/"+r+"/icons"+n+".js",name:b.some(r)}})},DM=function(e,t,n){var r=uC(t,"default",n),a=_M(t).orThunk(function(){return uC(t,Fm(t),"")});Y(pw([r,a]),function(i){e.add(i.url,ve,void 0,function(){XO(t,i.url,i.name.getOrUndefined())})})},OM=function(e,t){_.each(Sx(e),function(n,r){sn.load(r,n,ve,void 0,function(){sc(e,n,r)}),e.settings.plugins+=" "+r}),_.each(wf(e).split(/[ ,]/),function(n){if(n=_.trim(n),n&&!sn.urls[n])if(oC(n)){n=n.substr(1,n.length);var r=sn.dependencies(n);_.each(r,function(i){var o={prefix:"plugins/",resource:i,suffix:"/plugin"+t+".js"},u=sn.createUrl(o,i);sn.load(u.resource,u,ve,void 0,function(){sc(e,u.prefix+u.resource+u.suffix,u.resource)})})}else{var a={prefix:"plugins/",resource:n,suffix:"/plugin"+t+".js"};sn.load(n,a,ve,void 0,function(){sc(e,a.prefix+a.resource+a.suffix,n)})}})},PM=function(e,t){var n=Ln.ScriptLoader;BM(n,e,t,function(){RM(n,e),DM(n,e,t),OM(e,t),n.loadQueue(function(){e.removed||iC(e)},e,function(){e.removed||iC(e)})})},IM=function(e,t){return pd.forElement(e,{contentCssCors:wx(t),referrerPolicy:Mm(t)})},LM=function(e){var t=e.id;rn.setCode(Um(e));var n=function(){Wr.unbind(window,"ready",n),e.render()};if(!pa.Event.domLoaded){Wr.bind(window,"ready",n);return}if(!!e.getElement()&&!!se.contentEditable){var r=k.fromDom(e.getElement()),a=yw(r);e.on("remove",function(){Xc(r.dom.attributes,function(o){return jn(r,o.name)}),qn(r,a)}),e.ui.styleSheetLoader=IM(r,e),cx(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");var i=e.getElement().form||Wr.getParent(t,"form");i&&(e.formElement=i,vx(e)&&!ws(e.getElement())&&(Wr.insertAfter(Wr.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=function(o){e.fire(o.type,o)},Wr.bind(i,"submit reset",e.formEventDelegate),e.on("reset",function(){e.resetContent()}),dx(e)&&!i.submit.nodeType&&!i.submit.length&&!i._mceOldSubmit&&(i._mceOldSubmit=i.submit,i.submit=function(){return e.editorManager.triggerSave(),e.setDirty(!1),i._mceOldSubmit(i)})),e.windowManager=Jg(e),e.notificationManager=Zg(e),mx(e)&&e.on("GetContent",function(o){o.save&&(o.content=Wr.encode(o.content))}),px(e)&&e.on("submit",function(){e.initialized&&e.save()}),hx(e)&&(e._beforeUnload=function(){e.initialized&&!e.destroyed&&!e.isHidden()&&e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),PM(e,e.suffix)}},$M=function(e,t){return lD(e,t)},FM={"font-size":"size","font-family":"face"},MM=function(e,t,n){var r=function(i){return ks(i,e).orThunk(function(){return Ke(i)==="font"?je(FM,e).bind(function(o){return td(i,o)}):b.none()})},a=function(i){return Te(k.fromDom(t),i)};return Dl(k.fromDom(n),function(i){return r(i)},a)},UM=function(e){return e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},zM=function(e,t){return b.from(xe.DOM.getStyle(t,e,!0))},sC=function(e){return function(t,n){return b.from(n).map(k.fromDom).filter(Zt).bind(function(r){return MM(e,t,r.dom).or(zM(e,r.dom))}).getOr("")}},HM=sC("font-size"),VM=Cr(UM,sC("font-family")),WM=function(e){return wt(e.getBody()).map(function(t){var n=t.container();return Q(n)?n.parentNode:n})},qM=function(e){return b.from(e.selection.getRng()).bind(function(t){var n=e.getBody(),r=t.startContainer===n&&t.startOffset===0;return r?b.none():b.from(e.selection.getStart(!0))})},jM=function(e,t){return qM(e).orThunk(G(WM,e)).map(k.fromDom).filter(Zt).bind(t)},Pc=function(e,t){return jM(e,Kc(b.some,t))},fC=function(e,t){if(/^[0-9.]+$/.test(t)){var n=parseInt(t,10);if(n>=1&&n<=7){var r=Uk(e),a=zk(e);return a?a[n-1]||t:r[n-1]||t}else return t}else return t},KM=function(e){var t=e.split(/\s*,\s*/);return De(t,function(n){return n.indexOf(" ")!==-1&&!(Sr(n,'"')||Sr(n,"'"))?"'"+n+"'":n}).join(",")},GM=function(e,t){var n=fC(e,t);e.formatter.toggle("fontname",{value:KM(n)}),e.nodeChanged()},XM=function(e){return Pc(e,function(t){return VM(e.getBody(),t.dom)}).getOr("")},YM=function(e,t){e.formatter.toggle("fontsize",{value:fC(e,t)}),e.nodeChanged()},QM=function(e){return Pc(e,function(t){return HM(e.getBody(),t.dom)}).getOr("")},ZM=function(e){return Pc(e,function(t){var n=k.fromDom(e.getBody()),r=Dl(t,function(i){return ks(i,"line-height")},G(Te,n)),a=function(){var i=parseFloat(Pn(t,"line-height")),o=parseFloat(Pn(t,"font-size"));return String(i/o)};return r.getOrThunk(a)}).getOr("")},JM=function(e,t){e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()},eU=function(e){if(typeof e!="string"){var t=_.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}},tU=function(e,t){var n=eU(t);sD(e,n.content,n.details)},Mu=_.each,nU=_.map,rU=_.inArray,lC=function(){function e(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return e.prototype.execCommand=function(t,n,r,a){var i,o=!1,u=this;if(!u.editor.removed){if(t.toLowerCase()!=="mcefocus"&&(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)&&(!a||!a.skip_focus)?u.editor.focus():GN(u.editor)),a=u.editor.fire("BeforeExecCommand",{command:t,ui:n,value:r}),a.isDefaultPrevented())return!1;var s=t.toLowerCase();if(i=u.commands.exec[s])return i(s,n,r),u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(Mu(this.editor.plugins,function(f){if(f.execCommand&&f.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),o=!0,!1}),o)return o;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,n,r))return u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{o=u.editor.getDoc().execCommand(t,n,r)}catch{}return o?(u.editor.fire("ExecCommand",{command:t,ui:n,value:r}),!0):!1}},e.prototype.queryCommandState=function(t){var n;if(!(this.editor.quirks.isHidden()||this.editor.removed)){if(t=t.toLowerCase(),n=this.commands.state[t])return n(t);try{return this.editor.getDoc().queryCommandState(t)}catch{}return!1}},e.prototype.queryCommandValue=function(t){var n;if(!(this.editor.quirks.isHidden()||this.editor.removed)){if(t=t.toLowerCase(),n=this.commands.value[t])return n(t);try{return this.editor.getDoc().queryCommandValue(t)}catch{}}},e.prototype.addCommands=function(t,n){n===void 0&&(n="exec");var r=this;Mu(t,function(a,i){Mu(i.toLowerCase().split(","),function(o){r.commands[n][o]=a})})},e.prototype.addCommand=function(t,n,r){var a=this;t=t.toLowerCase(),this.commands.exec[t]=function(i,o,u,s){return n.call(r||a.editor,o,u,s)}},e.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch{}return!1},e.prototype.addQueryStateHandler=function(t,n,r){var a=this;t=t.toLowerCase(),this.commands.state[t]=function(){return n.call(r||a.editor)}},e.prototype.addQueryValueHandler=function(t,n,r){var a=this;t=t.toLowerCase(),this.commands.value[t]=function(){return n.call(r||a.editor)}},e.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},e.prototype.execNativeCommand=function(t,n,r){return n===void 0&&(n=!1),r===void 0&&(r=null),this.editor.getDoc().execCommand(t,n,r)},e.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},e.prototype.toggleFormat=function(t,n){this.editor.formatter.toggle(t,n),this.editor.nodeChanged()},e.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},e.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},e.prototype.setupCommands=function(t){var n=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":ve,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(a,i,o){gT(t,o)},"Cut,Copy,Paste":function(a){var i=t.getDoc(),o;try{n.execNativeCommand(a)}catch{o=!0}if(a==="paste"&&!i.queryCommandEnabled(a)&&(o=!0),o||!i.queryCommandSupported(a)){var u=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");se.mac&&(u=u.replace(/Ctrl\+/g,"\u2318+")),t.notificationManager.open({text:u,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var a=t.dom.getParent(t.selection.getStart(),"a");a&&t.dom.remove(a,!0);return}t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(a){var i=a.substring(7);i==="full"&&(i="justify"),Mu("left,center,right,justify".split(","),function(o){i!==o&&t.formatter.remove("align"+o)}),i!=="none"&&n.toggleFormat("align"+i)},"InsertUnorderedList,InsertOrderedList":function(a){var i;n.execNativeCommand(a);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(i=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(i.nodeName)&&(n.storeSelection(),t.dom.split(i,o),n.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){n.toggleFormat(a)},"ForeColor,HiliteColor":function(a,i,o){n.toggleFormat(a,{value:o})},FontName:function(a,i,o){GM(t,o)},FontSize:function(a,i,o){YM(t,o)},LineHeight:function(a,i,o){JM(t,o)},Lang:function(a,i,o){n.toggleFormat(a,{value:o.code,customValue:o.customCode})},RemoveFormat:function(a){t.formatter.remove(a)},mceBlockQuote:function(){n.toggleFormat("blockquote")},FormatBlock:function(a,i,o){return n.toggleFormat(o||"p")},mceCleanup:function(){var a=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(a)},mceRemoveNode:function(a,i,o){var u=o||t.selection.getNode();u!==t.getBody()&&(n.storeSelection(),t.dom.remove(u,!0),n.restoreSelection())},mceSelectNodeDepth:function(a,i,o){var u=0;t.dom.getParent(t.selection.getNode(),function(s){if(s.nodeType===1&&u++===o)return t.selection.select(s),!1},t.getBody())},mceSelectNode:function(a,i,o){t.selection.select(o)},mceInsertContent:function(a,i,o){tU(t,o)},mceInsertRawHTML:function(a,i,o){t.selection.setContent("tiny_mce_marker");var u=t.getContent();t.setContent(u.replace(/tiny_mce_marker/g,function(){return o}))},mceInsertNewLine:function(a,i,o){zy(t,o)},mceToggleFormat:function(a,i,o){n.toggleFormat(o)},mceSetContent:function(a,i,o){t.setContent(o)},"Indent,Outdent":function(a){oy(t,a)},mceRepaint:ve,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(a,i,o){t.execCommand("mceInsertContent",!1,o.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(a,i,o){typeof o=="string"&&(o={href:o});var u=t.dom.getParent(t.selection.getNode(),"a");o.href=o.href.replace(/ /g,"%20"),(!u||!o.href)&&t.formatter.remove("link"),o.href&&t.formatter.apply("link",o,u)},selectAll:function(){var a=t.dom.getParent(t.selection.getStart(),pn);if(a){var i=t.dom.createRng();i.selectNodeContents(a),t.selection.setRng(i)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(a,i,o){return Ly(t,o),!0}});var r=function(a){return function(){var i=t.selection,o=i.isCollapsed()?[t.dom.getParent(i.getNode(),t.dom.isBlock)]:i.getSelectedBlocks(),u=nU(o,function(s){return!!t.formatter.matchNode(s,a)});return rU(u,!0)!==-1}};n.addCommands({JustifyLeft:r("alignleft"),JustifyCenter:r("aligncenter"),JustifyRight:r("alignright"),JustifyFull:r("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){return n.isFormatMatch(a)},mceBlockQuote:function(){return n.isFormatMatch("blockquote")},Outdent:function(){return ry(t)},"InsertUnorderedList,InsertOrderedList":function(a){var i=t.dom.getParent(t.selection.getNode(),"ul,ol");return i&&(a==="insertunorderedlist"&&i.tagName==="UL"||a==="insertorderedlist"&&i.tagName==="OL")}},"state"),n.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),n.addQueryValueHandler("FontName",function(){return XM(t)},this),n.addQueryValueHandler("FontSize",function(){return QM(t)},this),n.addQueryValueHandler("LineHeight",function(){return ZM(t)},this)},e}(),qr="data-mce-contenteditable",aU=function(e,t,n){tm(e,t)&&n===!1?jE(e,t):n&&Ao(e,t)},Ic=function(e,t,n){try{e.getDoc().execCommand(t,!1,String(n))}catch{}},Uu=function(e,t){e.dom.contentEditable=t?"true":"false"},iU=function(e){Y(kt(e,'*[contenteditable="true"]'),function(t){hn(t,qr,"true"),Uu(t,!1)})},oU=function(e){Y(kt(e,"*["+qr+'="true"]'),function(t){jn(t,qr),Uu(t,!0)})},uU=function(e){b.from(e.selection.getNode()).each(function(t){t.removeAttribute("data-mce-selected")})},sU=function(e){e.selection.setRng(e.selection.getRng())},fU=function(e,t){var n=k.fromDom(e.getBody());aU(n,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),uU(e),e.readonly=!0,Uu(n,!1),iU(n)):(e.readonly=!1,Uu(n,!0),oU(n),Ic(e,"StyleWithCSS",!1),Ic(e,"enableInlineTableEditing",!1),Ic(e,"enableObjectResizing",!1),pT(e)&&e.focus(),sU(e),e.nodeChanged())},jr=function(e){return e.readonly},cC=function(e){e.parser.addAttributeFilter("contenteditable",function(t){jr(e)&&Y(t,function(n){n.attr(qr,n.attr("contenteditable")),n.attr("contenteditable","false")})}),e.serializer.addAttributeFilter(qr,function(t){jr(e)&&Y(t,function(n){n.attr("contenteditable",n.attr(qr))})}),e.serializer.addTempAttr(qr)},lU=function(e){e.serializer?cC(e):e.on("PreInit",function(){cC(e)})},cU=function(e){return e.type==="click"},vU=function(e,t){var n=function(r){return Te(r,k.fromDom(e.getBody()))};return Ts(t,"a",n).bind(function(r){return td(r,"href")})},dU=function(e,t){if(cU(t)&&!re.metaKeyPressed(t)){var n=k.fromDom(t.target);vU(e,n).each(function(r){if(t.preventDefault(),/^#/.test(r)){var a=e.dom.select(r+',[name="'+d0(r,"#")+'"]');a.length&&e.selection.scrollIntoView(a[0],!0)}else window.open(r,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}},mU=function(e){e.on("ShowCaret",function(t){jr(e)&&t.preventDefault()}),e.on("ObjectSelected",function(t){jr(e)&&t.preventDefault()})},pU=_.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"," "),Lc=function(){function e(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||Re}return e.isNative=function(t){return!!pU[t.toLowerCase()]},e.prototype.fire=function(t,n){var r=t.toLowerCase(),a=Bd(r,n||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(a);var i=this.bindings[r];if(i)for(var o=0,u=i.length;o<u;o++){var s=i[o];if(!s.removed){if(s.once&&this.off(r,s.func),a.isImmediatePropagationStopped())return a;if(s.func.call(this.scope,a)===!1)return a.preventDefault(),a}}return a},e.prototype.on=function(t,n,r,a){if(n===!1&&(n=Re),n){var i={func:n,removed:!1};a&&_.extend(i,a);for(var o=t.toLowerCase().split(" "),u=o.length;u--;){var s=o[u],f=this.bindings[s];f||(f=[],this.toggleEvent(s,!0)),r?f=Dn([i],f,!0):f=Dn(Dn([],f,!0),[i],!1),this.bindings[s]=f}}return this},e.prototype.off=function(t,n){var r=this;if(t)for(var a=t.toLowerCase().split(" "),i=a.length;i--;){var o=a[i],u=this.bindings[o];if(!o)return Pe(this.bindings,function(f,l){r.toggleEvent(l,!1),delete r.bindings[l]}),this;if(u){if(!n)u.length=0;else{var s=Yc(u,function(f){return f.func===n});u=s.fail,this.bindings[o]=u,Y(s.pass,function(f){f.removed=!0})}u.length||(this.toggleEvent(t,!1),delete this.bindings[o])}}else Pe(this.bindings,function(f,l){r.toggleEvent(l,!1)}),this.bindings={};return this},e.prototype.once=function(t,n,r){return this.on(t,n,r,{once:!0})},e.prototype.has=function(t){return t=t.toLowerCase(),!(!this.bindings[t]||this.bindings[t].length===0)},e}(),Ui=function(e){return e._eventDispatcher||(e._eventDispatcher=new Lc({scope:e,toggleEvent:function(t,n){Lc.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,n)}})),e._eventDispatcher},zu={fire:function(e,t,n){var r=this;if(r.removed&&e!=="remove"&&e!=="detach")return t;var a=Ui(r).fire(e,t);if(n!==!1&&r.parent)for(var i=r.parent();i&&!a.isPropagationStopped();)i.fire(e,a,!1),i=i.parent();return a},on:function(e,t,n){return Ui(this).on(e,t,n)},off:function(e,t){return Ui(this).off(e,t)},once:function(e,t){return Ui(this).once(e,t)},hasEventListeners:function(e){return Ui(this).has(e)}},Hu=xe.DOM,Kr,Vu=function(e,t){if(t==="selectionchange")return e.getDoc();if(!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t))return e.getDoc().documentElement;var n=Wm(e);return n?(e.eventRoot||(e.eventRoot=Hu.select(n)[0]),e.eventRoot):e.getBody()},hU=function(e){return!e.hidden&&!jr(e)},vC=function(e,t,n){hU(e)?e.fire(t,n):jr(e)&&dU(e,n)},dC=function(e,t){var n;if(e.delegates||(e.delegates={}),!(e.delegates[t]||e.removed)){var r=Vu(e,t);if(Wm(e)){if(Kr||(Kr={},e.editorManager.on("removeEditor",function(){e.editorManager.activeEditor||Kr&&(Pe(Kr,function(a,i){e.dom.unbind(Vu(e,i))}),Kr=null)})),Kr[t])return;n=function(a){for(var i=a.target,o=e.editorManager.get(),u=o.length;u--;){var s=o[u].getBody();(s===i||Hu.isChildOf(i,s))&&vC(o[u],t,a)}},Kr[t]=n,Hu.bind(r,t,n)}else n=function(a){vC(e,t,a)},Hu.bind(r,t,n),e.delegates[t]=n}},mC=ie(ie({},zu),{bindPendingEventDelegates:function(){var e=this;_.each(e._pendingNativeEvents,function(t){dC(e,t)})},toggleNativeEvent:function(e,t){var n=this;e==="focus"||e==="blur"||n.removed||(t?n.initialized?dC(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(Vu(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t=e.getBody(),n=e.dom;e.delegates&&(Pe(e.delegates,function(r,a){e.dom.unbind(Vu(e,a),a,r)}),delete e.delegates),!e.inline&&t&&n&&(t.onload=null,n.unbind(e.getWin()),n.unbind(e.getDoc())),n&&(n.unbind(t),n.unbind(e.getContainer()))}}),gU=["design","readonly"],pC=function(e,t,n,r){var a=n[t.get()],i=n[r];try{i.activate()}catch(o){console.error("problem while activating editor mode "+r+":",o);return}a.deactivate(),a.editorReadOnly!==i.editorReadOnly&&fU(e,i.editorReadOnly),t.set(r),M1(e,r)},bU=function(e,t,n,r){if(r!==n.get()){if(!pe(t,r))throw new Error("Editor mode '"+r+"' is invalid");e.initialized?pC(e,n,t,r):e.on("init",function(){return pC(e,n,t,r)})}},yU=function(e,t,n){var r;if(Je(gU,t))throw new Error("Cannot override default mode "+t);return ie(ie({},e),(r={},r[t]=ie(ie({},n),{deactivate:function(){try{n.deactivate()}catch(a){console.error("problem while deactivating editor mode "+t+":",a)}}}),r))},CU=function(e){var t=vt("design"),n=vt({design:{activate:ve,deactivate:ve,editorReadOnly:!1},readonly:{activate:ve,deactivate:ve,editorReadOnly:!0}});return lU(e),mU(e),{isReadOnly:function(){return jr(e)},set:function(r){return bU(e,n.get(),t,r)},get:function(){return t.get()},register:function(r,a){n.set(yU(n.get(),r,a))}}},$c=_.each,Fc=_.explode,wU={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},hC=_.makeMap("alt,ctrl,shift,meta,access"),SU=function(e){var t,n={};$c(Fc(e.toLowerCase(),"+"),function(a){a in hC?n[a]=!0:/^[0-9]{2,}$/.test(a)?n.keyCode=parseInt(a,10):(n.charCode=a.charCodeAt(0),n.keyCode=wU[a]||a.toUpperCase().charCodeAt(0))});var r=[n.keyCode];for(t in hC)n[t]?r.push(t):n[t]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,se.mac?n.ctrl=!0:n.shift=!0),n.meta&&(se.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},gC=function(){function e(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;var n=this;t.on("keyup keypress keydown",function(r){(n.hasModifier(r)||n.isFunctionKey(r))&&!r.isDefaultPrevented()&&($c(n.shortcuts,function(a){if(n.matchShortcut(r,a))return n.pendingPatterns=a.subpatterns.slice(0),r.type==="keydown"&&n.executeShortcutAction(a),!0}),n.matchShortcut(r,n.pendingPatterns[0])&&(n.pendingPatterns.length===1&&r.type==="keydown"&&n.executeShortcutAction(n.pendingPatterns[0]),n.pendingPatterns.shift()))})}return e.prototype.add=function(t,n,r,a){var i=this,o=i.normalizeCommandFunc(r);return $c(Fc(_.trim(t)),function(u){var s=i.createShortcut(u,n,o,a);i.shortcuts[s.id]=s}),!0},e.prototype.remove=function(t){var n=this.createShortcut(t);return this.shortcuts[n.id]?(delete this.shortcuts[n.id],!0):!1},e.prototype.normalizeCommandFunc=function(t){var n=this,r=t;return typeof r=="string"?function(){n.editor.execCommand(r,!1,null)}:_.isArray(r)?function(){n.editor.execCommand(r[0],r[1],r[2])}:r},e.prototype.createShortcut=function(t,n,r,a){var i=_.map(Fc(t,">"),SU);return i[i.length-1]=_.extend(i[i.length-1],{func:r,scope:a||this.editor}),_.extend(i[0],{desc:this.editor.translate(n),subpatterns:i.slice(1)})},e.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},e.prototype.isFunctionKey=function(t){return t.type==="keydown"&&t.keyCode>=112&&t.keyCode<=123},e.prototype.matchShortcut=function(t,n){return!n||n.ctrl!==t.ctrlKey||n.meta!==t.metaKey||n.alt!==t.altKey||n.shift!==t.shiftKey?!1:t.keyCode===n.keyCode||t.charCode&&t.charCode===n.charCode?(t.preventDefault(),!0):!1},e.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},e}(),EU=function(){var e={},t={},n={},r={},a={},i={},o={},u=function(f,l){return function(c,v){return f[c.toLowerCase()]=ie(ie({},v),{type:l})}},s=function(f,l){return r[f.toLowerCase()]=l};return{addButton:u(e,"button"),addGroupToolbarButton:u(e,"grouptoolbarbutton"),addToggleButton:u(e,"togglebutton"),addMenuButton:u(e,"menubutton"),addSplitButton:u(e,"splitbutton"),addMenuItem:u(t,"menuitem"),addNestedMenuItem:u(t,"nestedmenuitem"),addToggleMenuItem:u(t,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(a,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(o,"sidebar"),addIcon:s,getAll:function(){return{buttons:e,menuItems:t,icons:r,popups:n,contextMenus:a,contextToolbars:i,sidebars:o}}}},kU=function(){var e=EU();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}},Gr=xe.DOM,bC=_.extend,xU=_.each,yC=_.resolve,NU=se.ie,Wu=function(){function e(t,n,r){var a=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=r,this.documentBaseUrl=r.documentBaseURL,bC(this,mC),this.settings=DO(this,t,this.documentBaseUrl,r.defaultSettings,n),this.settings.suffix&&(r.suffix=this.settings.suffix),this.suffix=r.suffix,this.settings.base_url&&r._setBaseUrl(this.settings.base_url),this.baseUri=r.baseURI,this.settings.referrer_policy&&(Ln.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),xe.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Rt.languageLoad=this.settings.language_load,Rt.baseURL=r.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new fr(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new gC(this),this.editorCommands=new lC(this),this.settings.cache_suffix&&(se.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:kU(),styleSheetLoader:void 0,show:ve,hide:ve,enable:ve,disable:ve,isDisabled:Re};var i=this,o=CU(i);this.mode=o,this.setMode=o.set,r.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=oe.overrideDefaults(function(){return{context:a.inline?a.getBody():a.getDoc(),element:a.getBody()}})}return e.prototype.render=function(){LM(this)},e.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},e.prototype.hasFocus=function(){return $r(this)},e.prototype.execCallback=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var a=this,i=a.settings[t],o;if(!!i)return a.callbackLookup&&(o=a.callbackLookup[t])&&(i=o.func,o=o.scope),typeof i=="string"&&(o=i.replace(/\.\w+$/,""),o=o?yC(o):0,i=yC(i),a.callbackLookup=a.callbackLookup||{},a.callbackLookup[t]={func:i,scope:o}),i.apply(o||a,n)},e.prototype.translate=function(t){return rn.translate(t)},e.prototype.getParam=function(t,n,r){return IO(this,t,n,r)},e.prototype.hasPlugin=function(t,n){var r=Je(wf(this).split(/[ ,]/),t);return r?n?sn.get(t)!==void 0:!0:!1},e.prototype.nodeChanged=function(t){this._nodeChangeDispatcher.nodeChanged(t)},e.prototype.addCommand=function(t,n,r){this.editorCommands.addCommand(t,n,r)},e.prototype.addQueryStateHandler=function(t,n,r){this.editorCommands.addQueryStateHandler(t,n,r)},e.prototype.addQueryValueHandler=function(t,n,r){this.editorCommands.addQueryValueHandler(t,n,r)},e.prototype.addShortcut=function(t,n,r,a){this.shortcuts.add(t,n,r,a)},e.prototype.execCommand=function(t,n,r,a){return this.editorCommands.execCommand(t,n,r,a)},e.prototype.queryCommandState=function(t){return this.editorCommands.queryCommandState(t)},e.prototype.queryCommandValue=function(t){return this.editorCommands.queryCommandValue(t)},e.prototype.queryCommandSupported=function(t){return this.editorCommands.queryCommandSupported(t)},e.prototype.show=function(){var t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(Gr.show(t.getContainer()),Gr.hide(t.id)),t.load(),t.fire("show"))},e.prototype.hide=function(){var t=this,n=t.getDoc();t.hidden||(NU&&n&&!t.inline&&n.execCommand("SelectAll"),t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(Gr.hide(t.getContainer()),Gr.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.fire("hide"))},e.prototype.isHidden=function(){return!!this.hidden},e.prototype.setProgressState=function(t,n){this.fire("ProgressState",{state:t,time:n})},e.prototype.load=function(t){var n=this,r=n.getElement(),a;if(n.removed)return"";if(r){t=t||{},t.load=!0;var i=ws(r)?r.value:r.innerHTML;return a=n.setContent(i,t),t.element=r,t.no_events||n.fire("LoadContent",t),t.element=r=null,a}},e.prototype.save=function(t){var n=this,r=n.getElement(),a,i;if(!(!r||!n.initialized||n.removed))return t=t||{},t.save=!0,t.element=r,a=t.content=n.getContent(t),t.no_events||n.fire("SaveContent",t),t.format==="raw"&&n.fire("RawSaveContent",t),a=t.content,ws(r)?r.value=a:((t.is_removing||!n.inline)&&(r.innerHTML=a),(i=Gr.getParent(n.id,"form"))&&xU(i.elements,function(o){if(o.name===n.id)return o.value=a,!1})),t.element=r=null,t.set_dirty!==!1&&n.setDirty(!1),a},e.prototype.setContent=function(t,n){return ac(this,t,n)},e.prototype.getContent=function(t){return tO(this,t)},e.prototype.insertContent=function(t,n){n&&(t=bC({content:t},n)),this.execCommand("mceInsertContent",!1,t)},e.prototype.resetContent=function(t){t===void 0?ac(this,this.startContent,{format:"raw"}):ac(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},e.prototype.isDirty=function(){return!this.isNotDirty},e.prototype.setDirty=function(t){var n=!this.isNotDirty;this.isNotDirty=!t,t&&t!==n&&this.fire("dirty")},e.prototype.getContainer=function(){var t=this;return t.container||(t.container=Gr.get(t.editorContainer||t.id+"_parent")),t.container},e.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},e.prototype.getElement=function(){return this.targetElm||(this.targetElm=Gr.get(this.id)),this.targetElm},e.prototype.getWin=function(){var t=this,n;return t.contentWindow||(n=t.iframeElement,n&&(t.contentWindow=n.contentWindow)),t.contentWindow},e.prototype.getDoc=function(){var t=this,n;return t.contentDocument||(n=t.getWin(),n&&(t.contentDocument=n.document)),t.contentDocument},e.prototype.getBody=function(){var t=this.getDoc();return this.bodyElement||(t?t.body:null)},e.prototype.convertURL=function(t,n,r){var a=this,i=a.settings;return i.urlconverter_callback?a.execCallback("urlconverter_callback",t,r,!0,n):!i.convert_urls||r&&r.nodeName==="LINK"||t.indexOf("file:")===0||t.length===0?t:i.relative_urls?a.documentBaseURI.toRelative(t):(t=a.documentBaseURI.toAbsolute(t,i.remove_script_host),t)},e.prototype.addVisual=function(t){$M(this,t)},e.prototype.remove=function(){iO(this)},e.prototype.destroy=function(t){oO(this,t)},e.prototype.uploadImages=function(t){return this.editorUpload.uploadImages(t)},e.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},e.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")},e.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},e.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},e.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},e}(),Yt=xe.DOM,TU=_.explode,Bn=_.each,AU=_.extend,RU=0,CC=!1,qu,pr=[],St=[],BU=function(e){return e!=="length"},wC=function(e){var t=e.type;Bn(hr.get(),function(n){switch(t){case"scroll":n.fire("ScrollWindow",e);break;case"resize":n.fire("ResizeWindow",e);break}})},SC=function(e){e!==CC&&(e?oe(window).on("resize scroll",wC):oe(window).off("resize scroll",wC),CC=e)},EC=function(e){var t=St;delete pr[e.id];for(var n=0;n<pr.length;n++)if(pr[n]===e){pr.splice(n,1);break}return St=me(St,function(r){return e!==r}),hr.activeEditor===e&&(hr.activeEditor=St.length>0?St[0]:null),hr.focusedEditor===e&&(hr.focusedEditor=null),t.length!==St.length},_U=function(e){return e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(EC(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null),e},DU=document.compatMode!=="CSS1Compat",hr=ie(ie({},zu),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:oe,majorVersion:"5",minorVersion:"10.7",releaseDate:"2022-12-06",editors:pr,i18n:rn,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var e=this,t,n,r="";n=fr.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));var a=window.tinymce||window.tinyMCEPreInit;if(a)t=a.base||a.baseURL,r=a.suffix;else{for(var i=document.getElementsByTagName("script"),o=0;o<i.length;o++){var u=i[o].src||"";if(u!==""){var s=u.substring(u.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(u)){s.indexOf(".min")!==-1&&(r=".min"),t=u.substring(0,u.lastIndexOf("/"));break}}}if(!t&&document.currentScript){var u=document.currentScript.src;u.indexOf(".min")!==-1&&(r=".min"),t=u.substring(0,u.lastIndexOf("/"))}}e.baseURL=new fr(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new fr(e.baseURL),e.suffix=r,uT(e)},overrideDefaults:function(e){var t=e.base_url;t&&this._setBaseUrl(t);var n=e.suffix;e.suffix&&(this.suffix=n),this.defaultSettings=e;var r=e.plugin_base_urls;r!==void 0&&Pe(r,function(a,i){Rt.PluginManager.urls[i]=a})},init:function(e){var t=this,n,r=_.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"," "),a=function(c,v){return c.inline&&v.tagName.toLowerCase()in r},i=function(c){var v=c.id;return v||(v=je(c,"name").filter(function(d){return!Yt.get(d)}).getOrThunk(Yt.uniqueId),c.setAttribute("id",v)),v},o=function(c){var v=e[c];if(!!v)return v.apply(t,[])},u=function(c,v){return v.constructor===RegExp?v.test(c.className):Yt.hasClass(c,v)},s=function(c){var v=[];if(se.browser.isIE()&&se.browser.version.major<11)return hu("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(DU)return hu("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(c.types)return Bn(c.types,function(m){v=v.concat(Yt.select(m.selector))}),v;if(c.selector)return Yt.select(c.selector);if(c.target)return[c.target];switch(c.mode){case"exact":var d=c.elements||"";d.length>0&&Bn(TU(d),function(m){var p=Yt.get(m);p?v.push(p):Bn(document.forms,function(h){Bn(h.elements,function(y){y.name===m&&(m="mce_editor_"+RU++,Yt.setAttrib(y,"id",m),v.push(y))})})});break;case"textareas":case"specific_textareas":Bn(Yt.select("textarea"),function(m){c.editor_deselector&&u(m,c.editor_deselector)||(!c.editor_selector||u(m,c.editor_selector))&&v.push(m)});break}return v},f=function(c){n=c},l=function(){var c=0,v=[],d,m=function(p,h,y){var g=new Wu(p,h,t);v.push(g),g.on("init",function(){++c===d.length&&f(v)}),g.targetElm=g.targetElm||y,g.render()};if(Yt.unbind(window,"ready",l),o("onpageload"),d=oe.unique(s(e)),e.types){Bn(e.types,function(p){_.each(d,function(h){return Yt.is(h,p.selector)?(m(i(h),AU({},e,p),h),!1):!0})});return}_.each(d,function(p){_U(t.get(p.id))}),d=_.grep(d,function(p){return!t.get(p.id)}),d.length===0?f([]):Bn(d,function(p){a(e,p)?hu("Could not initialize inline editor on invalid inline target element",p):m(i(p),e,p)})};return t.settings=e,Yt.bind(window,"ready",l),new it(function(c){n?c(n):f=function(v){c(v)}})},get:function(e){return arguments.length===0?St.slice(0):He(e)?et(St,function(t){return t.id===e}).getOr(null):Zr(e)&&St[e]?St[e]:null},add:function(e){var t=this,n=pr[e.id];return n===e||(t.get(e.id)===null&&(BU(e.id)&&(pr[e.id]=e),pr.push(e),St.push(e)),SC(!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),qu||(qu=function(r){var a=t.fire("BeforeUnload");if(a.returnValue)return r.preventDefault(),r.returnValue=a.returnValue,a.returnValue},window.addEventListener("beforeunload",qu))),e},createEditor:function(e,t){return this.add(new Wu(e,t,this))},remove:function(e){var t=this,n,r;if(!e){for(n=St.length-1;n>=0;n--)t.remove(St[n]);return}if(He(e)){Bn(Yt.select(e),function(a){r=t.get(a.id),r&&t.remove(r)});return}return r=e,Ka(t.get(r.id))?null:(EC(r)&&t.fire("RemoveEditor",{editor:r}),St.length===0&&window.removeEventListener("beforeunload",qu),r.remove(),SC(St.length>0),r)},execCommand:function(e,t,n){var r=this,a=r.get(n);switch(e){case"mceAddEditor":return r.get(n)||new Wu(n,r.settings,r).render(),!0;case"mceRemoveEditor":return a&&a.remove(),!0;case"mceToggleEditor":return a?(a.isHidden()?a.show():a.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return r.activeEditor?r.activeEditor.execCommand(e,t,n):!1},triggerSave:function(){Bn(St,function(e){e.save()})},addI18n:function(e,t){rn.add(e,t)},translate:function(e){return rn.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!==e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl:function(e){this.baseURL=new fr(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new fr(this.baseURL)}});hr.setup();var kC=Math.min,Wa=Math.max,ju=Math.round,xC=function(e,t,n){var r=t.x,a=t.y,i=e.w,o=e.h,u=t.w,s=t.h,f=(n||"").split("");return f[0]==="b"&&(a+=s),f[1]==="r"&&(r+=u),f[0]==="c"&&(a+=ju(s/2)),f[1]==="c"&&(r+=ju(u/2)),f[3]==="b"&&(a-=o),f[4]==="r"&&(r-=i),f[3]==="c"&&(a-=ju(o/2)),f[4]==="c"&&(r-=ju(i/2)),qa(r,a,i,o)},OU=function(e,t,n,r){var a,i;for(i=0;i<r.length;i++)if(a=xC(e,t,r[i]),a.x>=n.x&&a.x+a.w<=n.w+n.x&&a.y>=n.y&&a.y+a.h<=n.h+n.y)return r[i];return null},PU=function(e,t,n){return qa(e.x-t,e.y-n,e.w+t*2,e.h+n*2)},IU=function(e,t){var n=Wa(e.x,t.x),r=Wa(e.y,t.y),a=kC(e.x+e.w,t.x+t.w),i=kC(e.y+e.h,t.y+t.h);return a-n<0||i-r<0?null:qa(n,r,a-n,i-r)},LU=function(e,t,n){var r=e.x,a=e.y,i=e.x+e.w,o=e.y+e.h,u=t.x+t.w,s=t.y+t.h,f=Wa(0,t.x-r),l=Wa(0,t.y-a),c=Wa(0,i-u),v=Wa(0,o-s);return r+=f,a+=l,n&&(i+=f,o+=l,r-=c,a-=v),i-=c,o-=v,qa(r,a,i-r,o-a)},qa=function(e,t,n,r){return{x:e,y:t,w:n,h:r}},$U=function(e){return qa(e.left,e.top,e.width,e.height)},FU={inflate:PU,relativePosition:xC,findBestRelativePosition:OU,intersect:IU,clamp:LU,create:qa,fromClientRect:$U},MU=function(e,t,n){n===void 0&&(n=1e3);var r=!1,a=null,i=function(f){return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];r||(r=!0,a!==null&&(clearTimeout(a),a=null),f.apply(null,l))}},o=i(e),u=i(t),s=function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];!r&&a===null&&(a=setTimeout(function(){return u.apply(null,f)},n))};return{start:s,resolve:o,reject:u}},UU=function(){var e={},t={},n=function(a,i){var o='Script at URL "'+i+'" failed to load',u='Script at URL "'+i+"\" did not call `tinymce.Resource.add('"+a+"', data)` within 1 second";if(e[a]!==void 0)return e[a];var s=new it(function(f,l){var c=MU(f,l);t[a]=c.resolve,Ln.ScriptLoader.loadScript(i,function(){return c.start(u)},function(){return c.reject(o)})});return e[a]=s,s},r=function(a,i){t[a]!==void 0&&(t[a](i),delete t[a]),e[a]=it.resolve(i)};return{load:n,add:r}},zU=UU(),Ku=_.each,HU=_.extend,NC,Mc,TC=function(){};TC.extend=NC=function(e){var t=this,n=t.prototype,r=function(){var u,s,f,l=this;if(!Mc&&(l.init&&l.init.apply(l,arguments),s=l.Mixins,s))for(u=s.length;u--;)f=s[u],f.init&&f.init.apply(l,arguments)},a=function(){return this},i=function(u,s){return function(){var f=this,l=f._super;f._super=n[u];var c=s.apply(f,arguments);return f._super=l,c}};Mc=!0;var o=new t;return Mc=!1,e.Mixins&&(Ku(e.Mixins,function(u){for(var s in u)s!=="init"&&(e[s]=u[s])}),n.Mixins&&(e.Mixins=n.Mixins.concat(e.Mixins))),e.Methods&&Ku(e.Methods.split(","),function(u){e[u]=a}),e.Properties&&Ku(e.Properties.split(","),function(u){var s="_"+u;e[u]=function(f){var l=this;return f!==void 0?(l[s]=f,l):l[s]}}),e.Statics&&Ku(e.Statics,function(u,s){r[s]=u}),e.Defaults&&n.Defaults&&(e.Defaults=HU({},n.Defaults,e.Defaults)),Pe(e,function(u,s){typeof u=="function"&&n[s]?o[s]=i(s,u):o[s]=u}),r.prototype=o,r.constructor=r,r.extend=NC,r};var Gu=Math.min,Xu=Math.max,Xr=Math.round,VU=function(e){var t={},n=0,r=0,a=0,i=function(c,v,d){var m,p,h;m=0,p=0,h=0,c=c/255,v=v/255,d=d/255;var y=Gu(c,Gu(v,d)),g=Xu(c,Xu(v,d));if(y===g)return h=y,{h:0,s:0,v:h*100};var E=c===y?v-d:d===y?c-v:d-c;return m=c===y?3:d===y?1:5,m=60*(m-E/(g-y)),p=(g-y)/g,h=g,{h:Xr(m),s:Xr(p*100),v:Xr(h*100)}},o=function(c,v,d){if(c=(parseInt(c,10)||0)%360,v=parseInt(v,10)/100,d=parseInt(d,10)/100,v=Xu(0,Gu(v,1)),d=Xu(0,Gu(d,1)),v===0){n=r=a=Xr(255*d);return}var m=c/60,p=d*v,h=p*(1-Math.abs(m%2-1)),y=d-p;switch(Math.floor(m)){case 0:n=p,r=h,a=0;break;case 1:n=h,r=p,a=0;break;case 2:n=0,r=p,a=h;break;case 3:n=0,r=h,a=p;break;case 4:n=h,r=0,a=p;break;case 5:n=p,r=0,a=h;break;default:n=r=a=0}n=Xr(255*(n+y)),r=Xr(255*(r+y)),a=Xr(255*(a+y))},u=function(){var c=function(v){return v=parseInt(v,10).toString(16),v.length>1?v:"0"+v};return"#"+c(n)+c(r)+c(a)},s=function(){return{r:n,g:r,b:a}},f=function(){return i(n,r,a)},l=function(c){var v;return typeof c=="object"?"r"in c?(n=c.r,r=c.g,a=c.b):"v"in c&&o(c.h,c.s,c.v):(v=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(c))?(n=parseInt(v[1],10),r=parseInt(v[2],10),a=parseInt(v[3],10)):(v=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(c))?(n=parseInt(v[1],16),r=parseInt(v[2],16),a=parseInt(v[3],16)):(v=/#([0-F])([0-F])([0-F])/gi.exec(c))&&(n=parseInt(v[1]+v[1],16),r=parseInt(v[2]+v[2],16),a=parseInt(v[3]+v[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,a=a<0?0:a>255?255:a,t};return e&&l(e),t.toRgb=s,t.toHsv=f,t.toHex=u,t.parse=l,t},WU=function(e){var t=JSON.stringify(e);return He(t)?t.replace(/[\u0080-\uFFFF]/g,function(n){var r=n.charCodeAt(0).toString(16);return"\\u"+"0000".substring(r.length)+r}):t},Uc={serialize:WU,parse:function(e){try{return JSON.parse(e)}catch{}}},qU={callbacks:{},count:0,send:function(e){var t=this,n=xe.DOM,r=e.count!==void 0?e.count:t.count,a="tinymce_jsonp_"+r;t.callbacks[r]=function(i){n.remove(a),delete t.callbacks[r],e.callback(i)},n.add(n.doc.body,"script",{id:a,src:e.url,type:"text/javascript"}),t.count++}},Yu=ie(ie({},zu),{send:function(e){var t,n=0,r=function(){!e.async||t.readyState===4||n++>1e4?(e.success&&n<1e4&&t.status===200?e.success.call(e.success_scope,""+t.responseText,t,e):e.error&&e.error.call(e.error_scope,n>1e4?"TIMED_OUT":"GENERAL",t,e),t=null):ot.setTimeout(r,10)};if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",Yu.fire("beforeInitialize",{settings:e}),t=new XMLHttpRequest,t.overrideMimeType&&t.overrideMimeType(e.content_type),t.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(t.withCredentials=!0),e.content_type&&t.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&_.each(e.requestheaders,function(a){t.setRequestHeader(a.key,a.value)}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t=Yu.fire("beforeSend",{xhr:t,settings:e}).xhr,t.send(e.data),!e.async)return r();ot.setTimeout(r,10)}}),AC=_.extend,jU=function(){function e(t){this.settings=AC({},t),this.count=0}return e.sendRPC=function(t){return new e().send(t)},e.prototype.send=function(t){var n=t.error,r=t.success,a=AC(this.settings,t);a.success=function(i,o){i=Uc.parse(i),typeof i=="undefined"&&(i={error:"JSON Parse error."}),i.error?n.call(a.error_scope||a.scope,i.error,o):r.call(a.success_scope||a.scope,i.result)},a.error=function(i,o){n&&n.call(a.error_scope||a.scope,i,o)},a.data=Uc.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),a.content_type="application/json",Yu.send(a)},e}(),KU=function(){return function(){var e={},t=[],n={getItem:function(r){var a=e[r];return a||null},setItem:function(r,a){t.push(r),e[r]=String(a)},key:function(r){return t[r]},removeItem:function(r){t=t.filter(function(a){return a===r}),delete e[r]},clear:function(){t=[],e={}},length:0};return Object.defineProperty(n,"length",{get:function(){return t.length},configurable:!1,enumerable:!1}),n}()},zi;try{var zc="__storage_test__";zi=window.localStorage,zi.setItem(zc,zc),zi.removeItem(zc)}catch{zi=KU()}var GU=zi,XU={geom:{Rect:FU},util:{Promise:it,Delay:ot,Tools:_,VK:re,URI:fr,Class:TC,EventDispatcher:Lc,Observable:zu,I18n:rn,XHR:Yu,JSON:Uc,JSONRequest:jU,JSONP:qU,LocalStorage:GU,Color:VU,ImageUploader:oP},dom:{EventUtils:pa,Sizzle:we,DomQuery:oe,TreeWalker:Ge,TextSeeker:lm,DOMUtils:xe,ScriptLoader:Ln,RangeUtils:Ti,Serializer:Wg,StyleSheetLoader:md,ControlSelection:Ip,BookmarkManager:Ni,Selection:$g,Event:pa.Event},html:{Styles:Hs,Entities:Yn,Node:Xt,Schema:Zn,SaxParser:Qo,DomParser:rc,Writer:lh,Serializer:Ia},Env:se,AddOnManager:Rt,Annotator:Dp,Formatter:ub,UndoManager:fb,EditorCommands:lC,WindowManager:Jg,NotificationManager:Zg,EditorObservable:mC,Shortcuts:gC,Editor:Wu,FocusManager:Jp,EditorManager:hr,DOM:xe.DOM,ScriptLoader:Ln.ScriptLoader,PluginManager:sn,ThemeManager:dr,IconManager:mu,Resource:zU,trim:_.trim,isArray:_.isArray,is:_.is,toArray:_.toArray,makeMap:_.makeMap,each:_.each,map:_.map,grep:_.grep,inArray:_.inArray,extend:_.extend,create:_.create,walk:_.walk,createNS:_.createNS,resolve:_.resolve,explode:_.explode,_addCacheSuffix:_._addCacheSuffix,isOpera:se.opera,isWebKit:se.webkit,isIE:se.ie,isGecko:se.gecko,isMac:se.mac},RC=_.extend(hr,XU),YU=function(e){try{R.exports=e}catch{}},QU=function(e){window.tinymce=e,window.tinyMCE=e};QU(RC),YU(RC)})()})(FC);var LC=FC.exports,u2=function(){var R=this,ye=R.$createElement,le=R._self._c||ye;return le("div",{staticClass:"teditor-wrapper",on:{click:R.onClickWrap,touchstart:R.onTouchstart}},[le("div",{staticClass:"teditor-box",class:[!R.inline&&R.spinShow?"teditor-loadstyle":"teditor-loadedstyle"]},[R.inline?[le("div",{ref:"myTextarea",attrs:{id:R.id},domProps:{innerHTML:R._s(R.spinShow?"":R.content)}}),R.spinShow?le("Icon",{staticClass:"icon-loading icon-inline",attrs:{type:"ios-loading",size:18}}):R._e()]:[le("textarea",{ref:"myTextarea",attrs:{id:R.id}},[R._v(R._s(R.content))]),R.spinShow?le("Spin",{attrs:{fix:""}},[le("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading",size:18}}),le("div",[R._v(R._s(R.$L("\u52A0\u8F7D\u7EC4\u4EF6\u4E2D...")))])],1):R._e()],le("ImgUpload",{ref:"myUpload",staticClass:"upload-control",attrs:{type:"callback",uploadIng:R.uploadIng,num:"50"},on:{"update:uploadIng":function(ce){R.uploadIng=ce},"update:upload-ing":function(ce){R.uploadIng=ce},"on-callback":R.editorImage}}),le("Upload",{ref:"fileUpload",staticClass:"upload-control",attrs:{name:"files",action:R.actionUrl,headers:R.headers,multiple:"",format:R.uploadFormat,"show-upload-list":!1,"max-size":R.maxSize,"on-progress":R.handleProgress,"on-success":R.handleSuccess,"on-error":R.handleError,"on-format-error":R.handleFormatError,"on-exceeded-size":R.handleMaxSize,"before-upload":R.handleBeforeUpload}}),le("div",{directives:[{name:"show",rawName:"v-show",value:R.operateVisible,expression:"operateVisible"}],staticClass:"teditor-operate",style:R.operateStyles},[le("Dropdown",{attrs:{trigger:"custom",visible:R.operateVisible,transfer:""},on:{"on-clickoutside":function(ce){R.operateVisible=!1}}},[le("div",{style:{userSelect:R.operateVisible?"none":"auto",height:R.operateStyles.height}}),le("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[le("DropdownItem",{nativeOn:{click:function(ce){return R.onFull.apply(null,arguments)}}},[R._v(R._s(R.$L("\u7F16\u8F91")))]),R.operateLink?le("DropdownItem",{nativeOn:{click:function(ce){return R.onLinkPreview.apply(null,arguments)}}},[R._v(R._s(R.$L("\u6253\u5F00\u94FE\u63A5")))]):R._e(),R.operateImg?le("DropdownItem",{nativeOn:{click:function(ce){return R.onImagePreview.apply(null,arguments)}}},[R._v(R._s(R.$L("\u67E5\u770B\u56FE\u7247")))]):R._e()],1)],1)],1)],2),R.uploadIng>0?le("Spin",{attrs:{fix:""}},[le("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),le("div",[R._v(R._s(R.$L("\u6B63\u5728\u4E0A\u4F20\u6587\u4EF6...")))])],1):R._e(),le("Modal",{staticClass:"teditor-transfer",attrs:{"footer-hide":"",fullscreen:"",transfer:""},on:{"on-visible-change":R.transferChange},model:{value:R.transfer,callback:function(ce){R.transfer=ce},expression:"transfer"}},[le("div",{attrs:{slot:"close"},slot:"close"},[le("Button",{attrs:{type:"primary",size:"small"}},[R._v(R._s(R.$L("\u5B8C\u6210")))])],1),le("div",{staticClass:"teditor-transfer-body"},[le("textarea",{attrs:{id:"T_"+R.id}},[R._v(R._s(R.content))])]),R.uploadIng>0?le("Spin",{attrs:{fix:""}},[le("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),le("div",[R._v(R._s(R.$L("\u6B63\u5728\u4E0A\u4F20\u6587\u4EF6...")))])],1):R._e()],1)],1)},s2=[];const f2={name:"TEditor",components:{ImgUpload:o2},props:{id:{type:String,default:()=>"tinymce_"+Math.round(Math.random()*1e4)},value:{default:""},height:{default:360},minHeight:{type:Number,default:0},htmlClass:{default:"",type:String},plugins:{type:Array,default:()=>["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample"]},toolbar:{type:String,default:" undo redo | styleselect | uploadImages | uploadFiles | bold italic underline forecolor backcolor | alignleft aligncenter alignright | bullist numlist outdent indent | link image emoticons media codesample | preview screenload"},options:{type:Object,default:()=>({})},optionFull:{type:Object,default:()=>({})},inline:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1},placeholder:{type:String,default:""},placeholderFull:{type:String,default:""},scrollHideOperateClassName:{type:String}},data(){return{content:"",editor:null,editorT:null,cTinyMce:null,checkerTimeout:null,isTyping:!1,spinShow:!0,transfer:!1,uploadIng:0,uploadFormat:["jpg","jpeg","webp","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"],actionUrl:$A.apiUrl("system/fileupload"),maxSize:10240,operateStyles:{},operateVisible:!1,operateLink:null,operateImg:null,timer:null,listener:null}},mounted(){if(this.content=this.value,this.init(),this.scrollHideOperateClassName){let R=this.$parent.$el.parentNode;for(;R;){if(R.classList.contains(this.scrollHideOperateClassName)){this.listener=R,R.addEventListener("scroll",this.onTouchstart);break}R=R.parentNode}}},activated(){this.content=this.value,this.init()},deactivated(){this.destroy()},beforeDestroy(){var R;(R=this.listener)==null||R.removeEventListener("scroll",this.onTouchstart)},destroyed(){this.destroy()},computed:{...a2(["themeIsDark"]),headers(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}}},watch:{value(R){R==null&&(R=""),this.isTyping||this.setContent(R)},readOnly(R){if(this.editor!==null){if(this.windowTouch)return;R?this.editor.setMode("readonly"):this.editor.setMode("design")}}},methods:{init(){this.timer&&clearTimeout(this.timer),this.$nextTick(()=>{LC.init(this.concatAssciativeArrays(this.option(!1),this.options))})},initTransfer(){this.$nextTick(()=>{LC.init(this.concatAssciativeArrays(this.option(!0),this.optionFull))})},destroy(){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(R=>{this.editor!==null&&(this.editor.destroy(),this.editor=null),this.editorT!==null&&(this.editorT.destroy(),this.editorT=null),this.spinShow=!0,this.operateVisible=!1,$A(this.$refs.myTextarea).show()},500)},plugin(R){return R?this.plugins.filter(ye=>ye!="autoresize"):this.plugins},option(R){let ye=IC;switch(IC){case"zh":ye="zh_CN";break;case"zh-CHT":ye="zh-TW";break;case"fr":ye="fr_FR";break;case"ko":ye="ko_KR";break}const le={inline:R?!1:this.inline,selector:(R?"#T_":"#")+this.id,base_url:$A.originUrl("js/tinymce"),language:ye,toolbar:this.toolbar,plugins:this.plugin(R),placeholder:R&&this.placeholderFull?this.placeholderFull:this.placeholder,save_onsavecallback:ce=>{this.$emit("editorSave",ce)},paste_data_images:!0,menu:{view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen screenload | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime | uploadImages | uploadFiles"}},codesample_languages:[{text:"HTML/VUE/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],height:R?"100%":$A.rightExists(this.height,"%")?this.height:$A.runNum(this.height)||360,resize:!R,convert_urls:!1,toolbar_mode:"sliding",content_css:this.themeIsDark?"dark":"default",setup:ce=>{ce.ui.registry.addMenuButton("uploadImages",{text:this.$L("\u56FE\u7247"),tooltip:this.$L("\u4E0A\u4F20/\u6D4F\u89C8 \u56FE\u7247"),fetch:ze=>{let gt=[{type:"menuitem",text:this.$L("\u4E0A\u4F20\u672C\u5730\u56FE\u7247"),onAction:()=>{this.$refs.myUpload.handleClick()}},{type:"menuitem",text:this.$L("\u6D4F\u89C8\u5DF2\u4E0A\u4F20\u56FE\u7247"),onAction:()=>{this.$refs.myUpload.browsePicture()}}];ze(gt)}}),ce.ui.registry.addNestedMenuItem("uploadImages",{icon:"image",text:this.$L("\u4E0A\u4F20\u56FE\u7247"),getSubmenuItems:()=>[{type:"menuitem",text:this.$L("\u4E0A\u4F20\u672C\u5730\u56FE\u7247"),onAction:()=>{this.$refs.myUpload.handleClick()}},{type:"menuitem",text:this.$L("\u6D4F\u89C8\u5DF2\u4E0A\u4F20\u56FE\u7247"),onAction:()=>{this.$refs.myUpload.browsePicture()}}]}),ce.ui.registry.addMenuItem("imagePreview",{text:this.$L("\u9884\u89C8\u56FE\u7247"),onAction:()=>{this.operateImg=null;const ze=ce.selection.getNode();ze&&ze.nodeName==="IMG"&&(this.operateImg=ze.getAttribute("src")),this.onImagePreview()},onSetup:ze=>{const gt=ce.selection.getNode();ze.setDisabled(!(gt&&gt.nodeName==="IMG"))}}),ce.ui.registry.addButton("uploadFiles",{text:this.$L("\u6587\u4EF6"),tooltip:this.$L("\u4E0A\u4F20\u6587\u4EF6"),onAction:()=>{this.handleBeforeUpload()&&this.$refs.fileUpload.handleClick()}}),ce.ui.registry.addMenuItem("uploadFiles",{text:this.$L("\u4E0A\u4F20\u6587\u4EF6"),onAction:()=>{this.handleBeforeUpload()&&this.$refs.fileUpload.handleClick()}}),R?(ce.ui.registry.addButton("screenload",{icon:"fullscreen",tooltip:this.$L("\u9000\u51FA\u5168\u5C4F"),onAction:()=>{this.closeFull()}}),ce.ui.registry.addMenuItem("screenload",{text:this.$L("\u9000\u51FA\u5168\u5C4F"),onAction:()=>{this.closeFull()}}),ce.on("Init",ze=>{this.editorT=ce,this.editorT.setContent(this.content),this.readOnly?this.editorT.setMode("readonly"):this.editorT.setMode("design")})):(ce.ui.registry.addButton("screenload",{icon:"fullscreen",tooltip:this.$L("\u5168\u5C4F"),onAction:()=>{this.onFull()}}),ce.ui.registry.addMenuItem("screenload",{text:this.$L("\u5168\u5C4F"),onAction:()=>{this.onFull()}}),ce.on("Init",ze=>{this.spinShow=!1,this.editor=ce,this.editor.setContent(this.content),this.readOnly||this.windowTouch?(this.editor.setMode("readonly"),this.updateTouchContent()):this.editor.setMode("design"),this.$emit("editorInit",this.editor)}),ce.on("KeyUp",ze=>{this.editor!==null&&this.submitNewContent()}),ce.on("KeyDown",ze=>{(ze.metaKey||ze.ctrlKey)&&ze.keyCode===83&&(ze.preventDefault(),this.$emit("editorSave",ze))}),ce.on("Change",ze=>{this.editor!==null&&(this.getContent()!==this.value&&this.submitNewContent(),this.$emit("editorChange",ze))}),ce.on("focus",()=>{this.$emit("on-focus")}),ce.on("blur",()=>{this.$emit("on-blur")}))}};return this.autoSize&&le.plugins.push("autoresize"),this.minHeight>0&&(le.min_height=this.minHeight),le},onFull(){this.content=this.getContent(),this.transfer=!0,this.initTransfer()},closeFull(){this.content=this.getContent(),this.$emit("input",this.content),this.$emit("on-blur"),this.transfer=!1,this.editorT!=null&&(this.editorT.destroy(),this.editorT=null)},transferChange(R){!R&&this.editorT!=null&&(this.content=this.editorT.getContent(),this.$emit("input",this.content),this.editorT.destroy(),this.editorT=null,this.windowTouch&&this.$nextTick(()=>{this.updateTouchContent(),this.$emit("on-blur")}))},getEditor(){return this.transfer?this.editorT:this.editor},concatAssciativeArrays(R,ye){if(ye.length===0)return R;if(R.length===0)return ye;let le=[];for(let ce in R)R.hasOwnProperty(ce)&&(le[ce]=R[ce]);for(let ce in ye)ye.hasOwnProperty(ce)&&(le[ce]=ye[ce]);return le},submitNewContent(){this.isTyping=!0,this.checkerTimeout!==null&&clearTimeout(this.checkerTimeout),this.checkerTimeout=setTimeout(()=>{this.isTyping=!1},300),this.$emit("input",this.getContent())},insertContent(R){this.getEditor()!==null?this.getEditor().insertContent(R):this.content+=R},getContent(){return this.getEditor()===null?"":this.getEditor().getContent()},setContent(R){this.getEditor()===null?this.content=R:R!=this.getEditor().getContent()&&this.getEditor().setContent(R)},focus(){return this.getEditor()===null?"":this.getEditor().focus()},insertImage(R){this.insertContent('<img src="'+R+'">')},editorImage(R){for(let ye=0;ye<R.length;ye++){let le=R[ye];typeof le=="object"&&typeof le.url=="string"&&this.insertImage(le.url)}},getValueImages(){const R=[],ye=/<img.*?(?:>|\/>)/gi,le=new RegExp(`src=(["'])([^'"]*)\\1`),ce=new RegExp('original-width="(\\d+)"'),ze=new RegExp('original-height="(\\d+)"'),gt=(this.getContent()+"").match(ye);if(gt)for(let yr=0;yr<gt.length;yr++){const Hi=gt[yr].match(le),ja=gt[yr].match(ce),Vi=gt[yr].match(ze);Hi&&R.push({src:Hi[2],width:ja?ja[1]:-1,height:Vi?Vi[1]:-1})}return R},onLinkPreview(){this.operateLink&&window.open(this.operateLink)},onImagePreview(){const R=this.getValueImages();if(R.length===0){$A.messageWarning("\u6CA1\u6709\u53EF\u9884\u89C8\u7684\u56FE\u7247");return}let ye=Math.max(0,R.findIndex(le=>le.src===this.operateImg));this.$store.dispatch("previewImage",{index:ye,list:R})},onClickWrap(R){!this.windowTouch||(R.stopPropagation(),this.operateVisible=!1,this.operateLink=R.target.tagName==="A"?R.target.href:null,this.operateImg=R.target.tagName==="IMG"?R.target.src:null,this.$nextTick(()=>{const ye=this.$el.getBoundingClientRect();this.operateStyles={left:`${R.clientX-ye.left}px`,top:`${R.clientY-ye.top}px`},this.operateVisible=!0}))},onTouchstart(){!this.windowTouch||(this.operateVisible=!1)},updateTouchContent(){!this.windowTouch||this.$nextTick(R=>{!this.editor||(!this.placeholder||this.content?(this.editor.bodyElement.removeAttribute("data-mce-placeholder"),this.editor.bodyElement.removeAttribute("aria-placeholder")):(this.editor.bodyElement.setAttribute("data-mce-placeholder",this.placeholder),this.editor.bodyElement.setAttribute("aria-placeholder",this.placeholder)),this.updateTouchLink(0))})},updateTouchLink(R){!this.windowTouch||setTimeout(ye=>{!this.editor||(this.editor.bodyElement.querySelectorAll("a").forEach(le=>{le.__dataMceClick!==!0&&(le.__dataMceClick=!0,le.addEventListener("click",ce=>{ce.preventDefault(),ce.stopPropagation(),this.onClickWrap(ce)}))}),R<300&&this.updateTouchLink(R+100))},R)},handleProgress(R,ye){ye._uploadIng===void 0&&(ye._uploadIng=!0,this.uploadIng++)},handleSuccess(R,ye){this.uploadIng--,R.ret===1?this.insertContent(`<a href="${R.data.url}" target="_blank">${R.data.name} (${$A.bytesToSize(R.data.size*1024)})</a>`):$A.noticeWarning({title:this.$L("\u4E0A\u4F20\u5931\u8D25"),desc:this.$L("\u6587\u4EF6 "+ye.name+" \u4E0A\u4F20\u5931\u8D25\uFF0C"+R.msg)})},handleError(){this.uploadIng--},handleFormatError(R){$A.noticeWarning({title:this.$L("\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),desc:this.$L("\u6587\u4EF6 "+R.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u4E0A\u4F20\uFF1A"+this.uploadFormat.join(","))})},handleMaxSize(R){$A.noticeWarning({title:this.$L("\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),desc:this.$L("\u6587\u4EF6 "+R.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024))})},handleBeforeUpload(){return!0}}},$C={};var l2=i2(f2,u2,s2,!1,c2,null,null,null);function c2(R){for(let ye in $C)this[ye]=$C[ye]}var m2=function(){return l2.exports}();export{m2 as default};