/*
Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/
*/
(function(){function oa(c,k){var h=k.line,f=h+k.ch;for(i=0;i<h;i++)f+=c.getLine(i).length;return f}function ka(c,k){var h=0,f=0,a=0;for(i=0;i<c.lineCount();i++){len=c.getLine(i).length;if(k<a+len){h=i;f=k-a;break}len++;a+=len}return{line:h,ch:f}}function la(c){return null!=CKEDITOR.document.getHead().findOne('link[href\x3d"'+c+'"]')}window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var c=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,k={timestamp:"O8NC",version:"4.25.1-znuny DEV",
revision:"74bd6a5856",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:c},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),d=0;d<b.length;d++){var f=b[d].src.match(c);if(f){a=f[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';
return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);return a=this.appendTimestamp(a)},appendTimestamp:function(a){if(!this.timestamp||"/"===a.charAt(a.length-1)||/[&?]t=/.test(a))return a;var b=0<=a.indexOf("?")?"\x26":"?";return a+b+"t\x3d"+this.timestamp},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),window.removeEventListener("load",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&
(document.detachEvent("onreadystatechange",a),window.detachEvent("onload",a),b())}catch(d){}}function b(){for(var a;a=d.shift();)a()}var d=[];return function(b){function e(){try{document.documentElement.doScroll("left")}catch(g){setTimeout(e,1);return}a()}d.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==d.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",
a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(f){}document.documentElement.doScroll&&b&&e()}}}()},h=window.CKEDITOR_GETURL;if(h){var f=k.getUrl;k.getUrl=function(a){return h.call(k,a)||f.call(k,a)}}return k}()),function(){var c={};CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(c){var h=CKEDITOR.event.prototype,f;for(f in h)null==c[f]&&(c[f]=h[f])},CKEDITOR.event.prototype=function(){function k(a){var b=h(this);return b[a]||(b[a]=new f(a))}
var h=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},f=function(a){this.name=a;this.listeners=[]};f.prototype={getListenerIndex:function(a){for(var b=0,d=this.listeners;b<d.length;b++)if(d[b].fn==a)return b;return-1}};return{define:function(a,b){var d=k.call(this,a);CKEDITOR.tools.extend(d,b,!0)},on:function(a,b,d,f,e){function m(e,n,p,m){e={name:a,sender:this,editor:e,data:n,listenerData:f,stop:p,cancel:m,removeListener:g};return!1===b.call(d,e)?c:e.data}
function g(){n.removeListener(a,b)}var n=this,p=k.call(this,a);if(0>p.getListenerIndex(b)){p=p.listeners;d||(d=this);isNaN(e)&&(e=10);m.fn=b;m.priority=e;for(var h=p.length-1;0<=h;h--)if(p[h].priority<=e)return p.splice(h+1,0,m),{removeListener:g};p.unshift(m)}return{removeListener:g}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=
this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},d=0,f=function(){d=1};return function(e,m,g){var n=h(this)[e];e=a;var p=d;a=d=0;if(n){var k=n.listeners;if(k.length)for(var k=k.slice(0),r,q=0;q<k.length;q++){if(n.errorProof)try{r=k[q].call(this,g,m,b,f)}catch(t){}else r=k[q].call(this,g,m,b,f);r===c?d=1:"undefined"!=typeof r&&(m=r);if(a||d)break}}m=d?!1:"undefined"==typeof m?!0:m;a=e;d=p;return m}}(),fireOnce:function(a,b,d){b=this.fire(a,
b,d);delete h(this)[a];return b},removeListener:function(a,b){var d=h(this)[a];if(d){var f=d.getListenerIndex(b);0<=f&&d.listeners.splice(f,1)}},removeAllListeners:function(){var a=h(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=h(this)[a])&&0<a.listeners.length}}}())}(),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(c,k){c in{instanceReady:1,loaded:1}&&(this[c]=!0);return CKEDITOR.event.prototype.fire.call(this,
c,k,this)},CKEDITOR.editor.prototype.fireOnce=function(c,k){c in{instanceReady:1,loaded:1}&&(this[c]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,c,k,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var c=navigator.userAgent.toLowerCase(),k=c.match(/edge[ \/](\d+.?\d*)/),h=-1<c.indexOf("trident/"),h=!(!k&&!h),h={ie:h,edge:!!k,webkit:!h&&-1<c.indexOf(" applewebkit/"),air:-1<c.indexOf(" adobeair/"),mac:-1<c.indexOf("macintosh"),quirks:"BackCompat"==
document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<c.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(c),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};h.gecko="Gecko"==navigator.product&&!h.webkit&&!h.ie;h.webkit&&(-1<c.indexOf("chrome")?h.chrome=!0:h.safari=!0);var f=0;h.ie&&(f=k?parseFloat(k[1]):h.quirks||!document.documentMode?parseFloat(c.match(/msie (\d+)/)[1]):
document.documentMode,h.ie9Compat=9==f,h.ie8Compat=8==f,h.ie7Compat=7==f,h.ie6Compat=7>f||h.quirks);h.gecko&&(k=c.match(/rv:([\d\.]+)/))&&(k=k[1].split("."),f=1E4*k[0]+100*(k[1]||0)+1*(k[2]||0));h.air&&(f=parseFloat(c.match(/ adobeair\/(\d+)/)[1]));h.webkit&&(f=parseFloat(c.match(/ applewebkit\/(\d+)/)[1]));h.version=f;h.isCompatible=!(h.ie&&7>f)&&!(h.gecko&&4E4>f)&&!(h.webkit&&534>f);h.hidpi=2<=window.devicePixelRatio;h.needsBrFiller=h.gecko||h.webkit||h.ie&&10<f;h.needsNbspFiller=h.ie&&11>f;h.cssClass=
"cke_browser_"+(h.ie?"ie":h.gecko?"gecko":h.webkit?"webkit":"unknown");h.quirks&&(h.cssClass+=" cke_browser_quirks");h.ie&&(h.cssClass+=" cke_browser_ie"+(h.quirks?"6 cke_browser_iequirks":h.version));h.air&&(h.cssClass+=" cke_browser_air");h.iOS&&(h.cssClass+=" cke_browser_ios");h.hidpi&&(h.cssClass+=" cke_hidpi");return h}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=
1;else{delete CKEDITOR.loadFullCore;var c=document.createElement("script");c.type="text/javascript";c.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(c)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(c){(this._.pending||(this._.pending=[])).push(c)};(function(){CKEDITOR.domReady(function(){var c=CKEDITOR.loadFullCore,k=CKEDITOR.loadFullCoreTimeout;c&&(CKEDITOR.status="basic_ready",c&&c._load?c():k&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},
1E3*k))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(c,k){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:c,additionalData:k})},CKEDITOR.error=function(c,k){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:c,additionalData:k})},CKEDITOR.on("log",function(c){if(window.console&&
window.console.log){var k=console[c.data.type]?c.data.type:"log",h=c.data.errorCode;if(c=c.data.additionalData)console[k]("[CKEDITOR] Error code: "+h+".",c);else console[k]("[CKEDITOR] Error code: "+h+".");console[k]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+h)}},null,null,999),CKEDITOR.dom={},function(){function c(g,e,a){this._minInterval=g;this._context=a;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(e,
a||{});var b=this;this.input=function(){function g(){b._lastOutput=(new Date).getTime();b._scheduledTimer=0;b._call()}if(!b._scheduledTimer||!1!==b._reschedule()){var e=(new Date).getTime()-b._lastOutput;e<b._minInterval?b._scheduledTimer=setTimeout(g,b._minInterval-e):g()}}}function k(g,e,a){c.call(this,g,e,a);this._args=[];var b=this;this.input=CKEDITOR.tools.override(this.input,function(g){return function(){b._args=Array.prototype.slice.call(arguments);g.call(this)}})}var h=[],f=CKEDITOR.env.gecko?
"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",a=/&/g,b=/>/g,d=/</g,l=/"/g,e=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,m={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},g=function(g,e){return"#"==e[0]?String.fromCharCode(parseInt(e.slice(1),10)):m[e]};CKEDITOR.on("reset",function(){h=[]});CKEDITOR.tools={arrayCompare:function(g,e){if(!g&&!e)return!0;if(!g||!e||g.length!=e.length)return!1;for(var a=0;a<g.length;a++)if(g[a]!=e[a])return!1;return!0},getIndex:function(g,e){for(var a=
0;a<g.length;++a)if(e(g[a]))return a;return-1},clone:function(g){var e;if(g&&g instanceof Array){e=[];for(var a=0;a<g.length;a++)e[a]=CKEDITOR.tools.clone(g[a]);return e}if(null===g||"object"!=typeof g||g instanceof String||g instanceof Number||g instanceof Boolean||g instanceof Date||g instanceof RegExp||g.nodeType||g.window===g)return g;e=new g.constructor;for(a in g)e[a]=CKEDITOR.tools.clone(g[a]);return e},capitalize:function(g,e){return g.charAt(0).toUpperCase()+(e?g.slice(1):g.slice(1).toLowerCase())},
extend:function(g){var e=arguments.length,a,b;"boolean"==typeof(a=arguments[e-1])?e--:"boolean"==typeof(a=arguments[e-2])&&(b=arguments[e-1],e-=2);for(var d=1;d<e;d++){var f=arguments[d]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(f),function(e){if(!0===a||null==g[e])if(!b||e in b)g[e]=f[e]})}return g},prototypedCopy:function(g){var e=function(){};e.prototype=g;return new e},copy:function(g){var e={},a;for(a in g)e[a]=g[a];return e},isArray:function(g){return"[object Array]"==Object.prototype.toString.call(g)},
isEmpty:function(g){for(var e in g)if(g.hasOwnProperty(e))return!1;return!0},cssVendorPrefix:function(g,e,a){if(a)return f+g+":"+e+";"+g+":"+e;a={};a[g]=e;a[f+g]=e;return a},cssStyleToDomStyle:function(){var g=document.createElement("div").style,e="undefined"!=typeof g.cssFloat?"cssFloat":"undefined"!=typeof g.styleFloat?"styleFloat":"float";return function(g){return"float"==g?e:g.replace(/-./g,function(g){return g.substr(1).toUpperCase()})}}(),buildStyleHtml:function(g){g=[].concat(g);for(var e,
a=[],b=0;b<g.length;b++)if(e=g[b])/@import|[{}]/.test(e)?a.push("\x3cstyle\x3e"+e+"\x3c/style\x3e"):(e=CKEDITOR.appendTimestamp(e),a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+e+'"\x3e'));return a.join("")},htmlEncode:function(g){return void 0===g||null===g?"":String(g).replace(a,"\x26amp;").replace(b,"\x26gt;").replace(d,"\x26lt;")},htmlDecode:function(a){return a.replace(e,g)},htmlEncodeAttr:function(g){return CKEDITOR.tools.htmlEncode(g).replace(l,"\x26quot;")},htmlDecodeAttr:function(g){return CKEDITOR.tools.htmlDecode(g)},
transformPlainTextToHtml:function(g,e){var a=e==CKEDITOR.ENTER_BR,b=this.htmlEncode(g.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),d=e==CKEDITOR.ENTER_P?"p":"div";if(!a){var f=/\n{2}/g;if(f.test(b))var m="\x3c"+d+"\x3e",l="\x3c/"+d+"\x3e",b=m+b.replace(f,function(){return l+m})+l}b=b.replace(/\n/g,"\x3cbr\x3e");a||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+d+"\x3e)"),function(g){return CKEDITOR.tools.repeat(g,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,
function(g,e){return e+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var g=0;return function(){return++g}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var g="e",e=0;8>e;e++)g+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return g},override:function(g,e){var a=e(g);a.prototype=g.prototype;return a},setTimeout:function(g,e,a,b,d){d||(d=window);a||(a=d);return d.setTimeout(function(){b?g.apply(a,[].concat(b)):g.apply(a)},
e||0)},debounce:function(g,e){var a;return function(){var b=this,d=arguments;clearTimeout(a);a=setTimeout(function(){a=null;g.apply(b,d)},e)}},throttle:function(g,e,a){return new this.buffers.throttle(g,e,a)},trim:function(){var g=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(e){return e.replace(g,"")}}(),ltrim:function(){var g=/^[ \t\n\r]+/g;return function(e){return e.replace(g,"")}}(),rtrim:function(){var g=/[ \t\n\r]+$/g;return function(e){return e.replace(g,"")}}(),indexOf:function(g,e){if("function"==
typeof e)for(var a=0,b=g.length;a<b;a++){if(e(g[a]))return a}else{if(g.indexOf)return g.indexOf(e);a=0;for(b=g.length;a<b;a++)if(g[a]===e)return a}return-1},search:function(g,e){var a=CKEDITOR.tools.indexOf(g,e);return 0<=a?g[a]:null},bind:function(g,e){var a=Array.prototype.slice.call(arguments,2);return function(){return g.apply(e,a.concat(Array.prototype.slice.call(arguments)))}},createClass:function(g){var e=g.$,a=g.base,b=g.privates||g._,d=g.proto;g=g.statics;!e&&(e=function(){a&&this.base.apply(this,
arguments)});if(b)var f=e,e=function(){var g=this._||(this._={}),e;for(e in b){var a=b[e];g[e]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}f.apply(this,arguments)};a&&(e.prototype=this.prototypedCopy(a.prototype),e.prototype.constructor=e,e.base=a,e.baseProto=a.prototype,e.prototype.base=function u(){this.base=a.prototype.base;a.apply(this,arguments);this.base=u});d&&this.extend(e.prototype,d,!0);g&&this.extend(e,g,!0);return e},addFunction:function(g,e){return h.push(function(){return g.apply(e||
this,arguments)})-1},removeFunction:function(g){h[g]=null},callFunction:function(g){var e=h[g];return e&&e.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var g=/^-?\d+\.?\d*px$/,e;return function(a){e=CKEDITOR.tools.trim(a+"")+"px";return g.test(e)?e:a||""}}(),convertToPx:function(){var g,e;return function(a){if(!g||g.isDetached())g=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',
CKEDITOR.document),CKEDITOR.document.getBody().append(g);if(!/%$/.test(a)){var b=0>parseFloat(a);b&&(a=a.replace("-",""));g.setStyle("width",a);e=g.getClientRect();a=Math.round(e.width);return b?-a:a}return a}}(),repeat:function(g,e){return Array(e+1).join(g)},tryThese:function(){for(var g,e=0,a=arguments.length;e<a;e++){var b=arguments[e];try{g=b();break}catch(d){}}return g},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(g){return function(){var e=arguments,
a=this;window.setTimeout(function(){g.apply(a,e)},0)}},normalizeCssText:function(g,e){var a=[],b,d=CKEDITOR.tools.parseCssText(g,!0,e);for(b in d)a.push(b+":"+d[b]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(g){return g.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(g,e,a,b){g=[e,a,b];for(e=0;3>e;e++)g[e]=("0"+parseInt(g[e],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(g){return g.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,
function(g,e,a,b){g=e.toLowerCase();3==g.length&&(g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+b})},_isValidColorFormat:function(g){if(!g)return!1;g=g.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(g)},parseCssText:function(g,e,a){var b={};a&&(g=(new CKEDITOR.dom.element("span")).setAttribute("style",g).getAttribute("style")||"");g&&(g=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(g)));if(!g||";"==g)return b;g.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(g,a,d){e&&(a=a.toLowerCase(),"font-family"==a&&(d=d.replace(/\s*,\s*/g,",")),d=CKEDITOR.tools.trim(d));b[a]=d});return b},writeCssText:function(g,e){var a,b=[];for(a in g)b.push(a+":"+g[a]);e&&b.sort();return b.join("; ")},objectCompare:function(g,e,a){var b;if(!g&&!e)return!0;if(!g||!e)return!1;for(b in g)if(g[b]!=e[b])return!1;if(!a)for(b in e)if(g[b]!=e[b])return!1;return!0},objectKeys:function(g){return CKEDITOR.tools.object.keys(g)},convertArrayToObject:function(g,e){var a={};1==arguments.length&&
(e=!0);for(var b=0,d=g.length;b<d;++b)a[g[b]]=e;return a},getStyledSpans:function(g,e){var a=CKEDITOR.env.ie&&8==CKEDITOR.env.version?g.toUpperCase():g,a=e.find("span[style*\x3d"+a+"]").toArray();return CKEDITOR.tools.array.filter(a,function(e){return!!e.getStyle(g)})},fixDomain:function(){for(var g;;)try{g=window.parent.document.domain;break}catch(e){g=g?g.replace(/.+?(?:\.|$)/,""):document.domain;if(!g)break;document.domain=g}return!!g},eventsBuffer:function(g,e,a){return new this.buffers.event(g,
e,a)},enableHtml5Elements:function(g,e){for(var a="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),b=a.length,d;b--;)d=g.createElement(a[b]),e&&g.appendChild(d)},checkIfAnyArrayItemMatches:function(g,e){for(var a=0,b=g.length;a<b;++a)if(g[a].match(e))return!0;return!1},checkIfAnyObjectPropertyMatches:function(g,e){for(var a in g)if(a.match(e))return!0;return!1},keystrokeToString:function(g,
e){var a=this.keystrokeToArray(g,e);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(g,e){var a=e&16711680,b=e&65535,d=CKEDITOR.env.mac,f=[],m=[];a&CKEDITOR.CTRL&&(f.push(d?"⌘":g[17]),m.push(d?g[224]:g[17]));a&CKEDITOR.ALT&&(f.push(d?"⌥":g[18]),m.push(g[18]));a&CKEDITOR.SHIFT&&(f.push(d?"⇧":g[16]),m.push(g[16]));b&&(g[b]?(f.push(g[b]),m.push(g[b])):(f.push(String.fromCharCode(b)),m.push(String.fromCharCode(b))));return{display:f,aria:m}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",
getCookie:function(g){g=g.toLowerCase();for(var e=document.cookie.split(";"),a,b,d=0;d<e.length;d++)if(a=e[d].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),b===g)return decodeURIComponent(1<a.length?a[1]:"");return null},setCookie:function(g,e){document.cookie=encodeURIComponent(g)+"\x3d"+encodeURIComponent(e)+";path\x3d/"},getCsrfToken:function(){var g=CKEDITOR.tools.getCookie("ckCsrfToken");if(!g||40!=g.length){var g=[],e="";if(window.crypto&&window.crypto.getRandomValues)g=
new Uint8Array(40),window.crypto.getRandomValues(g);else for(var a=0;40>a;a++)g.push(Math.floor(256*Math.random()));for(a=0;a<g.length;a++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(g[a]%36),e=e+(.5<Math.random()?b.toUpperCase():b);g=e;CKEDITOR.tools.setCookie("ckCsrfToken",g)}return g},escapeCss:function(g){if(g)if(window.CSS&&CSS.escape)g=CSS.escape(g);else{g=String(g);for(var e=g.length,a=-1,b,d="",f=g.charCodeAt(0);++a<e;)b=g.charCodeAt(a),d=0==b?d+"�":127==b||1<=b&&31>=b||0==a&&48<=
b&&57>=b||1==a&&48<=b&&57>=b&&45==f?d+("\\"+b.toString(16)+" "):0==a&&1==e&&45==b?d+("\\"+g.charAt(a)):128<=b||45==b||95==b||48<=b&&57>=b||65<=b&&90>=b||97<=b&&122>=b?d+g.charAt(a):d+("\\"+g.charAt(a));g=d}else g="";return g},getMouseButton:function(g){return(g=g&&g.data?g.data.$:g)?CKEDITOR.tools.normalizeMouseButton(g.button):!1},normalizeMouseButton:function(g,e){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return g;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,
4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],b=0;b<a.length;b++){var d=a[b];if(d[0]===g&&e)return d[1];if(!e&&d[1]===g)return d[0]}},convertHexStringToBytes:function(g){var e=[],a=g.length/2,b;for(b=0;b<a;b++)e.push(parseInt(g.substr(2*b,2),16));return e},convertBytesToBase64:function(g){var e="",a=g.length,b;for(b=0;b<a;b+=3){var d=g.slice(b,b+3),f=d.length,m=[],l;if(3>f)for(l=f;3>l;l++)d[l]=0;m[0]=(d[0]&252)>>2;m[1]=(d[0]&3)<<4|d[1]>>4;m[2]=(d[1]&15)<<2|(d[2]&192)>>6;m[3]=d[2]&63;for(l=0;4>l;l++)e=l<=f?
e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m[l]):e+"\x3d"}return e},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(g){var e={},a=this._findColor(g);
a.length&&(e.color=a[0],CKEDITOR.tools.array.forEach(a,function(e){g=g.replace(e,"")}));if(g=CKEDITOR.tools.trim(g))e.unprocessed=g;return e},margin:function(g){return CKEDITOR.tools.style.parse.sideShorthand(g,function(g){return g.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(g,e){function a(g){b.top=d[g[0]];b.right=d[g[1]];b.bottom=d[g[2]];b.left=d[g[3]]}var b={},d=e?e(g):g.split(/\s+/);switch(d.length){case 1:a([0,0,0,0]);break;case 2:a([0,
1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return b},border:function(g){return CKEDITOR.tools.style.border.fromCssRule(g)},_findColor:function(g){var e=[],a=CKEDITOR.tools.array,e=e.concat(g.match(this._rgbaRegExp)||[]),e=e.concat(g.match(this._hslaRegExp)||[]);return e=e.concat(a.filter(g.split(/\s+/),function(g){return g.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:g.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(g,e,a){var b=[];this.forEach(g,
function(d,f){e.call(a,d,f,g)&&b.push(d)});return b},find:function(g,e,a){for(var b=g.length,d=0;d<b;){if(e.call(a,g[d],d,g))return g[d];d++}},forEach:function(g,e,a){var b=g.length,d;for(d=0;d<b;d++)e.call(a,g[d],d,g)},map:function(g,e,a){for(var b=[],d=0;d<g.length;d++)b.push(e.call(a,g[d],d,g));return b},reduce:function(g,e,a,b){for(var d=0;d<g.length;d++)a=e.call(b,a,g[d],d,g);return a},every:function(g,e,a){if(!g.length)return!0;e=this.filter(g,e,a);return g.length===e.length},some:function(g,
e,a){for(var b=0;b<g.length;b++)if(e.call(a,g[b],b,g))return!0;return!1},zip:function(g,e){return CKEDITOR.tools.array.map(g,function(g,a){return[g,e[a]]})},unique:function(g){return this.filter(g,function(e,a){return a===CKEDITOR.tools.array.indexOf(g,e)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),entries:function(g){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(g),function(e){return[e,g[e]]})},values:function(g){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(g),
function(e){return g[e]})},keys:function(g){var e=Object.prototype.hasOwnProperty,a=[],b=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!g||"object"!==typeof g)){e=[];if("string"===typeof g)for(a=0;a<g.length;a++)e.push(String(a));return e}for(var d in g)a.push(d);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)for(d=0;d<b.length;d++)e.call(g,b[d])&&a.push(b[d]);return a},findKey:function(g,e){if("object"!==typeof g)return null;for(var a in g)if(g[a]===e)return a;return null},
merge:function(g,e){var a=CKEDITOR.tools,b=a.clone(g),d=a.clone(e);a.array.forEach(a.object.keys(d),function(g){b[g]="object"===typeof d[g]&&"object"===typeof b[g]?a.object.merge(b[g],d[g]):d[g]});return b}},getAbsoluteRectPosition:function(g,e){function a(g){if(g){var e=g.getClientRect();b.top+=e.top;b.left+=e.left;"x"in b&&"y"in b&&(b.x+=e.x,b.y+=e.y);a(g.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(e);a(g.getFrame());var d=CKEDITOR.document.getWindow().getScrollPosition();b.top+=d.y;b.left+=
d.x;"x"in b&&"y"in b&&(b.y+=d.y,b.x+=d.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};c.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);this._scheduledTimer=0}};k.prototype=CKEDITOR.tools.prototypedCopy(c.prototype);k.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};k.prototype._call=function(){this._output.apply(this._context,
this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=c;CKEDITOR.tools.buffers.throttle=k;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(g){g=g||{};this.width=g.width;this.style=g.style;this.color=g.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,"black"]]},normalize:function(){for(var g in this._.normalizeMap){var e=this[g];e&&(this[g]=CKEDITOR.tools.array.reduce(this._.normalizeMap[g],function(g,e){return g.replace(e[0],e[1])},e))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,
this.style,this.color],function(g){return!!g}).join(" ")}},statics:{fromCssRule:function(g){var e={},a=g.split(/\s+/g);g=CKEDITOR.tools.style.parse._findColor(g);g.length&&(e.color=g[0]);CKEDITOR.tools.array.forEach(a,function(g){e.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,g)?!e.width&&CKEDITOR.tools.style.parse._widthRegExp.test(g)&&(e.width=g):e.style=g});return new CKEDITOR.tools.style.border(e)},splitCssValues:function(g,e){e=e||{};var a=CKEDITOR.tools.array.reduce(["width",
"style","color"],function(a,b){var d=g["border-"+b]||e[b];a[b]=d?CKEDITOR.tools.style.parse.sideShorthand(d):null;return a},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(e,b){var d={},f;for(f in a){var m=g["border-"+b+"-"+f];d[f]=m?m:a[f]&&a[f][b]}e["border-"+b]=new CKEDITOR.tools.style.border(d);return e},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=
1;CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),CKEDITOR.dtd=function(){var c=CKEDITOR.tools.extend,k=function(e,g){for(var a=CKEDITOR.tools.clone(e),b=1;b<arguments.length;b++){g=arguments[b];for(var d in g)delete a[d]}return a},h={},f={},a={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},b={command:1,link:1,meta:1,noscript:1,script:1,style:1},d={},
l={"#":1},e={center:1,dir:1,noframes:1};c(h,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},l,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});c(f,a,h,e);k=
{a:k(h,{a:1,button:1}),abbr:h,address:f,area:d,article:f,aside:f,audio:c({source:1,track:1},f),b:h,base:d,bdi:h,bdo:h,blockquote:f,body:f,br:d,button:k(h,{a:1,button:1}),canvas:h,caption:f,cite:h,code:h,col:d,colgroup:{col:1},command:d,datalist:c({option:1},h),dd:f,del:h,details:c({summary:1},f),dfn:h,div:f,dl:{dt:1,dd:1},dt:f,em:h,embed:d,fieldset:c({legend:1},f),figcaption:f,figure:c({figcaption:1},f),footer:f,form:f,h1:h,h2:h,h3:h,h4:h,h5:h,h6:h,head:c({title:1,base:1},b),header:f,hgroup:{h1:1,
h2:1,h3:1,h4:1,h5:1,h6:1},hr:d,html:c({head:1,body:1},f,b),i:h,iframe:l,img:d,input:d,ins:h,kbd:h,keygen:d,label:h,legend:h,li:f,link:d,main:f,map:f,mark:h,menu:c({li:1},f),meta:d,meter:k(h,{meter:1}),nav:f,noscript:c({link:1,meta:1,style:1},h),object:c({param:1},h),ol:{li:1},optgroup:{option:1},option:l,output:h,p:h,param:d,pre:h,progress:k(h,{progress:1}),q:h,rp:h,rt:h,ruby:c({rp:1,rt:1},h),s:h,samp:h,script:l,section:f,select:{optgroup:1,option:1},small:h,source:d,span:h,strong:h,style:l,sub:h,
summary:c({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},h),sup:h,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:f,textarea:l,tfoot:{tr:1},th:f,thead:{tr:1},time:k(h,{time:1}),title:l,tr:{th:1,td:1},track:d,u:h,ul:{li:1},"var":h,video:c({source:1,track:1},f),wbr:d,acronym:h,applet:c({param:1},f),basefont:d,big:h,center:f,dialog:d,dir:{li:1},font:h,isindex:d,noframes:f,strike:h,tt:h};c(k,{$block:c({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},a,e),$blockLimit:{article:1,aside:1,audio:1,
body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,
keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:h,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:c({body:1,head:1,html:1},k.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,
mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});
return k}(),CKEDITOR.dom.event=function(c){this.$=c},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var c=this.getKey();if(this.$.ctrlKey||this.$.metaKey)c+=CKEDITOR.CTRL;this.$.shiftKey&&(c+=CKEDITOR.SHIFT);this.$.altKey&&(c+=CKEDITOR.ALT);return c},preventDefault:function(c){var k=this.$;k.preventDefault?k.preventDefault():k.returnValue=!1;c&&this.stopPropagation()},stopPropagation:function(){var c=this.$;c.stopPropagation?c.stopPropagation():
c.cancelBubble=!0},getTarget:function(){var c=this.$.target||this.$.srcElement;return c?new CKEDITOR.dom.node(c):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var c=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(c.documentElement.scrollLeft||c.body.scrollLeft),y:this.$.pageY||this.$.clientY+(c.documentElement.scrollTop||c.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,
CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.HISTORY_NATIVE=1,CKEDITOR.HISTORY_HASH=2,CKEDITOR.HISTORY_OFF=0,CKEDITOR.dom.domObject=function(c){c&&(this.$=c)},CKEDITOR.dom.domObject.prototype=function(){var c=function(c,h){return function(f){"undefined"!=typeof CKEDITOR&&c.fire(h,new CKEDITOR.dom.event(f))}};return{getPrivate:function(){var c;(c=this.getCustomData("_"))||this.setCustomData("_",c={});return c},on:function(k){var h=this.getCustomData("_cke_nativeListeners");
h||(h={},this.setCustomData("_cke_nativeListeners",h));h[k]||(h=h[k]=c(this,k),this.$.addEventListener?this.$.addEventListener(k,h,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+k,h));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(c){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(c)){var h=this.getCustomData("_cke_nativeListeners"),f=h&&h[c];f&&(this.$.removeEventListener?this.$.removeEventListener(c,
f,!1):this.$.detachEvent&&this.$.detachEvent("on"+c,f),delete h[c])}},removeAllListeners:function(){try{var c=this.getCustomData("_cke_nativeListeners"),h;for(h in c){var f=c[h];this.$.detachEvent?this.$.detachEvent("on"+h,f):this.$.removeEventListener&&this.$.removeEventListener(h,f,!1);delete c[h]}}catch(a){if(!CKEDITOR.env.edge||-2146828218!==a.number)throw a;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(c){var k={};CKEDITOR.on("reset",function(){k={}});c.equals=function(c){try{return c&&
c.$===this.$}catch(f){return!1}};c.setCustomData=function(c,f){var a=this.getUniqueId();(k[a]||(k[a]={}))[c]=f;return this};c.getCustomData=function(c){var f=this.$["data-cke-expando"];return(f=f&&k[f])&&c in f?f[c]:null};c.removeCustomData=function(c){var f=this.$["data-cke-expando"],f=f&&k[f],a,b;f&&(a=f[c],b=c in f,delete f[c]);return b?a:null};c.clearCustomData=function(){this.removeAllListeners();var c=this.getUniqueId();c&&delete k[c]};c.getUniqueId=function(){return this.$["data-cke-expando"]||
(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(c)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(c){return c?new CKEDITOR.dom[c.nodeType==CKEDITOR.NODE_DOCUMENT?"document":c.nodeType==CKEDITOR.NODE_ELEMENT?"element":c.nodeType==CKEDITOR.NODE_TEXT?"text":c.nodeType==CKEDITOR.NODE_COMMENT?"comment":c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](c):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=
1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(c,k){c.append(this,k);return c},clone:function(c,k){function h(a){a["data-cke-expando"]&&(a["data-cke-expando"]=!1);if(a.nodeType==CKEDITOR.NODE_ELEMENT||
a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(k||a.nodeType!=CKEDITOR.NODE_ELEMENT||a.removeAttribute("id",!1),c){a=a.childNodes;for(var d=0;d<a.length;d++)h(a[d])}}function f(a){if(a.type==CKEDITOR.NODE_ELEMENT||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(a.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=a.getName();":"==d[0]&&a.renameNode(d.substring(1))}if(c)for(d=0;d<a.getChildCount();d++)f(a.getChild(d))}}var a=this.$.cloneNode(c);h(a);a=new CKEDITOR.dom.node(a);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&
(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&f(a);return a},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(c){c.$.parentNode.insertBefore(this.$,c.$.nextSibling);return c},insertBefore:function(c){c.$.parentNode.insertBefore(this.$,c.$);return c},insertBeforeMe:function(c){this.$.parentNode.insertBefore(c.$,this.$);return c},getAddress:function(c){for(var k=[],h=this.getDocument().$.documentElement,
f=this;f&&f!=h;){var a=f.getParent();a&&k.unshift(this.getIndex.call(f,c));f=a}return k},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(c){function k(a,d){var f=d?a.getNext():a.getPrevious();return f&&f.type==CKEDITOR.NODE_TEXT?f.isEmpty()?k(f,d):f:null}var h=this,f=-1,a;if(!this.getParent()||c&&h.type==CKEDITOR.NODE_TEXT&&h.isEmpty()&&!k(h)&&!k(h,!0))return-1;do if(!c||h.equals(this)||h.type!=CKEDITOR.NODE_TEXT||!a&&
!h.isEmpty())f++,a=h.type==CKEDITOR.NODE_TEXT;while(h=h.getPrevious());return f},getNextSourceNode:function(c,k,h){if(h&&!h.call){var f=h;h=function(a){return!a.equals(f)}}c=!c&&this.getFirst&&this.getFirst();var a;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&h&&!1===h(this,!0))return null;c=this.getNext()}for(;!c&&(a=(a||this).getParent());){if(h&&!1===h(a,!0))return null;c=a.getNext()}return!c||h&&!1===h(c)?null:k&&k!=c.type?c.getNextSourceNode(!1,k,h):c},getPreviousSourceNode:function(c,k,h){if(h&&
!h.call){var f=h;h=function(a){return!a.equals(f)}}c=!c&&this.getLast&&this.getLast();var a;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&h&&!1===h(this,!0))return null;c=this.getPrevious()}for(;!c&&(a=(a||this).getParent());){if(h&&!1===h(a,!0))return null;c=a.getPrevious()}return!c||h&&!1===h(c)?null:k&&c.type!=k?c.getPreviousSourceNode(!1,k,h):c},getPrevious:function(c){var k=this.$,h;do h=(k=k.previousSibling)&&10!=k.nodeType&&new CKEDITOR.dom.node(k);while(h&&c&&!c(h));return h},getNext:function(c){var k=
this.$,h;do h=(k=k.nextSibling)&&new CKEDITOR.dom.node(k);while(h&&c&&!c(h));return h},getParent:function(c){var k=this.$.parentNode;return k&&(k.nodeType==CKEDITOR.NODE_ELEMENT||c&&k.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(k):null},getParents:function(c){var k=this,h=[];do h[c?"push":"unshift"](k);while(k=k.getParent());return h},getCommonAncestor:function(c){if(c.equals(this))return this;if(c.contains&&c.contains(this))return c;var k=this.contains?this:this.getParent();
do if(k.contains(c))return k;while(k=k.getParent());return null},getPosition:function(c){var k=this.$,h=c.$;if(k.compareDocumentPosition)return k.compareDocumentPosition(h);if(k==h)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&c.type==CKEDITOR.NODE_ELEMENT){if(k.contains){if(k.contains(h))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(h.contains(k))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in k)return 0>k.sourceIndex||
0>h.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:k.sourceIndex<h.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}k=this.getAddress();c=c.getAddress();for(var h=Math.min(k.length,c.length),f=0;f<h;f++)if(k[f]!=c[f])return k[f]<c[f]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return k.length<c.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(c,k){var h=this.$,f,a;k||(h=h.parentNode);
"function"==typeof c?(a=!0,f=c):(a=!1,f=function(a){a="string"==typeof a.nodeName?a.nodeName.toLowerCase():"";return"string"==typeof c?a==c:a in c});for(;h;){if(f(a?new CKEDITOR.dom.node(h):h))return new CKEDITOR.dom.node(h);try{h=h.parentNode}catch(b){h=null}}return null},hasAscendant:function(c,k){var h=this.$;k||(h=h.parentNode);for(;h;){if(h.nodeName&&h.nodeName.toLowerCase()==c)return!0;h=h.parentNode}return!1},move:function(c,k){c.append(this.remove(),k)},remove:function(c){var k=this.$,h=k.parentNode;
if(h){if(c)for(;c=k.firstChild;)h.insertBefore(k.removeChild(c),k);h.removeChild(k)}return this},replace:function(c){this.insertBefore(c);c.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var c;this.getFirst&&(c=this.getFirst());){if(c.type==CKEDITOR.NODE_TEXT){var k=CKEDITOR.tools.ltrim(c.getText()),h=c.getLength();if(k)k.length<h&&(c.split(h-k.length),this.$.removeChild(this.$.firstChild));else{c.remove();continue}}break}},rtrim:function(){for(var c;this.getLast&&(c=this.getLast());){if(c.type==
CKEDITOR.NODE_TEXT){var k=CKEDITOR.tools.rtrim(c.getText()),h=c.getLength();if(k)k.length<h&&(c.split(k.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{c.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(c=this.$.lastChild)&&1==c.type&&"br"==c.nodeName.toLowerCase()&&c.parentNode.removeChild(c)},isReadOnly:function(c){var k=this;this.type!=CKEDITOR.NODE_ELEMENT&&(k=this.getParent());CKEDITOR.env.edge&&k&&k.is("textarea","input")&&(c=!0);if(!c&&k&&"undefined"!=typeof k.$.isContentEditable)return!(k.$.isContentEditable||
k.data("cke-editable"));for(;k;){if(k.data("cke-editable"))return!1;if(k.hasAttribute("contenteditable"))return"false"==k.getAttribute("contenteditable");k=k.getParent()}return!0}}),CKEDITOR.dom.window=function(c){CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var c=this.$.document,k="CSS1Compat"==c.compatMode;return{width:(k?c.documentElement.clientWidth:
c.body.clientWidth)||0,height:(k?c.documentElement.clientHeight:c.body.clientHeight)||0}},getScrollPosition:function(){var c=this.$;if("pageXOffset"in c)return{x:c.pageXOffset||0,y:c.pageYOffset||0};c=c.document;return{x:c.documentElement.scrollLeft||c.body.scrollLeft||0,y:c.documentElement.scrollTop||c.body.scrollTop||0}},getFrame:function(){var c=this.$.frameElement;return c?new CKEDITOR.dom.element.get(c):null}}),CKEDITOR.dom.document=function(c){CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.document.prototype=
new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(c){c=CKEDITOR.appendTimestamp(c);if(this.$.createStyleSheet)this.$.createStyleSheet(c);else{var k=new CKEDITOR.dom.element("link");k.setAttributes({rel:"stylesheet",type:"text/css",href:c});this.getHead().append(k)}},appendStyleText:function(c){if(this.$.createStyleSheet){var k=this.$.createStyleSheet("");k.cssText=c}else{var h=new CKEDITOR.dom.element("style",this);
h.append(new CKEDITOR.dom.text(c,this));this.getHead().append(h)}return k||h.$.sheet},createElement:function(c,k){var h=new CKEDITOR.dom.element(c,this);k&&(k.attributes&&h.setAttributes(k.attributes),k.styles&&h.setStyles(k.styles));return h},createText:function(c){return new CKEDITOR.dom.text(c,this)},focus:function(){this.getWindow().focus()},getActive:function(){var c;try{c=this.$.activeElement}catch(k){return null}return new CKEDITOR.dom.element(c)},getById:function(c){return(c=this.$.getElementById(c))?
new CKEDITOR.dom.element(c):null},getByAddress:function(c,k){for(var h=this.$.documentElement,f=0;h&&f<c.length;f++){var a=c[f];if(k)for(var b=-1,d=0;d<h.childNodes.length;d++){var l=h.childNodes[d];if(!0!==k||3!=l.nodeType||!l.previousSibling||3!=l.previousSibling.nodeType)if(b++,b==a){h=l;break}}else h=h.childNodes[a]}return h?new CKEDITOR.dom.node(h):null},getElementsByTag:function(c,k){CKEDITOR.env.ie&&8>=document.documentMode||!k||(c=k+":"+c);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(c))},
getHead:function(){var c=this.$.getElementsByTagName("head")[0];return c=c?new CKEDITOR.dom.element(c):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(c){this.$.open("text/html","replace");CKEDITOR.env.ie&&(c=c.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,
'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(c);this.$.close()},find:function(c){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c))},findOne:function(c){return(c=this.$.querySelector(c))?new CKEDITOR.dom.element(c):null},_getHtml5ShivFrag:function(){var c=this.getCustomData("html5ShivFrag");c||(c=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(c,!0),this.setCustomData("html5ShivFrag",c));return c}}),CKEDITOR.dom.nodeList=
function(c){this.$=c},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(c){return 0>c||c>=this.$.length?null:(c=this.$[c])?new CKEDITOR.dom.node(c):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(c){return new CKEDITOR.dom.node(c)})}},CKEDITOR.dom.element=function(c,k){"string"==typeof c&&(c=(k?k.$:document).createElement(c));CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.element.get=function(c){return(c="string"==typeof c?document.getElementById(c)||
document.getElementsByName(c)[0]:c)&&(c.$?c:new CKEDITOR.dom.element(c))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(c,k){var h=new CKEDITOR.dom.element("div",k);h.setHtml(c);return h.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(c,k,h,f){var a=k.getCustomData("list_marker_id")||k.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),b=k.getCustomData("list_marker_names")||k.setCustomData("list_marker_names",
{}).getCustomData("list_marker_names");c[a]=k;b[h]=1;return k.setCustomData(h,f)},CKEDITOR.dom.element.clearAllMarkers=function(c){for(var k in c)CKEDITOR.dom.element.clearMarkers(c,c[k],1)},CKEDITOR.dom.element.clearMarkers=function(c,k,h){var f=k.getCustomData("list_marker_names"),a=k.getCustomData("list_marker_id"),b;for(b in f)k.removeCustomData(b);k.removeCustomData("list_marker_names");h&&(k.removeCustomData("list_marker_id"),delete c[a])},function(){function c(a,e){return-1<(" "+a+" ").replace(b,
" ").indexOf(" "+e+" ")}function k(a){var e=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),e=!1);return function(){e||a.removeAttribute("id")}}function h(a,e){var b=CKEDITOR.tools.escapeCss(a.$.id);return"#"+b+" "+e.split(/,\s*/).join(", #"+b+" ")}function f(a){for(var e=0,b=0,g=d[a].length;b<g;b++)e+=parseFloat(this.getComputedStyle(d[a][b])||0,10)||0;return e}var a=document.createElement("_").classList,a="undefined"!==typeof a&&null!==String(a.add).match(/\[Native code\]/gi),b=/[\n\t\r]/g;
CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:a?function(a){this.$.classList.add(a);return this}:function(a){var e=this.$.className;e&&(c(e,a)||(e+=" "+a));this.$.className=e||a;return this},removeClass:a?function(a){var e=this.$;e.classList.remove(a);e.className||e.removeAttribute("class");return this}:function(a){var e=this.getAttribute("class");e&&c(e,a)&&((e=e.replace(new RegExp("(?:^|\\s+)"+a+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",
e):this.removeAttribute("class"));return this},hasClass:function(a){return c(this.$.className,a)},append:function(a,e){"string"==typeof a&&(a=this.getDocument().createElement(a));e?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var e=new CKEDITOR.dom.element("div",this.getDocument());e.setHtml(a);e.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?
this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,e){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);var g=b.extractContents(!1,e||!1),d;b.insertNode(this.remove());
if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");d=g.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),b.append(d);b.insertAfter(this);b.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var e=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?e.contains(a.getParent().$):e!=a.$&&e.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(e){}}
return function(e){e?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(a){var e=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!e.width&&(e.width=e.right-e.left);!e.height&&
(e.height=e.bottom-e.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),e):e},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var e=this.$;if(this.getParent())return e.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(e);e.innerHTML=a;b.removeChild(e);return a}catch(g){this.$.innerHTML="";e=new CKEDITOR.dom.element("body",this.getDocument());e.$.innerHTML=a;for(e=e.getChildren();e.count();)this.append(e.getItem(0));return a}}:function(a){return this.$.innerHTML=
a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(e){this.$[a?"textContent":"innerText"]=e}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),
a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var e={},b=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g<b.length;g++)-1===
CKEDITOR.tools.indexOf(a,b[g].name)&&(e[b[g].name]=b[g].value);return e},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getClientSize:function(){return{width:this.$.clientWidth,height:this.$.clientHeight}},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var e=this.getWindow().$.getComputedStyle(this.$,null);return e?e.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=
CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||
null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var e=this.$.scopeName;"HTML"!=e&&(a=e.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var e=this.$.firstChild;(e=e&&new CKEDITOR.dom.node(e))&&a&&!a(e)&&(e=e.getNext(a));return e},getLast:function(a){var e=this.$.lastChild;(e=e&&new CKEDITOR.dom.node(e))&&a&&!a(e)&&(e=e.getPrevious(a));return e},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},
is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var e=0;e<arguments.length;e++)if(arguments[e]==a)return!0;return!1},isEditable:function(a){var e=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[e]||CKEDITOR.dtd.$empty[e]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[e]||
CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var e=this.clone(0,1);a=a.clone(0,1);e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(e.$.isEqualNode)return e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),e.$.isEqualNode(a.$);e=e.getOuterHtml();a=
a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var b=this.getParent();b.type==CKEDITOR.NODE_ELEMENT&&(b=b.clone(),b.setHtml(e),e=b.getHtml(),b.setHtml(a),a=b.getHtml())}return e==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),e,b;a&&CKEDITOR.env.webkit&&(e=this.getWindow(),!e.equals(CKEDITOR.document.getWindow())&&(b=e.$.frameElement)&&(a=(new CKEDITOR.dom.element(b)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;
for(var a=this.getChildren(),e=0,b=a.count();e<b;e++){var g=a.getItem(e);if(g.type!=CKEDITOR.NODE_ELEMENT||!g.data("cke-bookmark"))if(g.type==CKEDITOR.NODE_ELEMENT&&!g.isEmptyInlineRemoveable()||g.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(g.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,e=0;e<a.length;e++){var b=a[e];switch(b.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
default:if(b.specified)return!0}}return!1}:function(){var a=this.$.attributes,e=a.length,b={"data-cke-expando":1,_moz_dirty:1};return 0<e&&(2<e||!b[a[0].nodeName]||2==e&&!b[a[1].nodeName])},hasAttribute:function(){function a(e){var b=this.$.attributes.getNamedItem(e);if("input"==this.getName())switch(e){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return e=this.getAttribute("type"),"checkbox"==e||"radio"==e?"on"!=this.$.value:!!this.$.value}return b?
b.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(e){return"name"==e?!!this.$.name:a.call(this,e)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,e){var b=this.$;a=a.$;if(b!=a){var g;if(e)for(;g=b.lastChild;)a.insertBefore(b.removeChild(g),a.firstChild);else for(;g=b.firstChild;)a.appendChild(b.removeChild(g))}},mergeSiblings:function(){function a(e,b,g){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var d=
[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(d.push(b),b=g?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(b)){for(var f=g?e.getLast():e.getFirst();d.length;)d.shift().move(e,!g);b.moveChildren(e,!g);b.remove();f&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings()}}}return function(e){if(!1===e||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e,b){"class"==e?this.$.className=b:"style"==e?this.$.style.cssText=b:"tabindex"==e?this.$.tabIndex=b:"checked"==e?this.$.checked=b:"contenteditable"==e?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(e,b){if("src"==e&&b.match(/^http:\/\//))try{a.apply(this,
arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var e in a)this.setAttribute(e,a[e]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var e=
0;e<a.length;e++)this.removeAttribute(a[e]);else for(e in a=a||this.getAttributes(),a)a.hasOwnProperty(e)&&this.removeAttribute(e)},removeStyle:function(a){var e=this.$.style;if(e.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)e.removeProperty?e.removeProperty(a):e.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var b=["top","left","right","bottom"],g;"border"==a&&(g=["color","style","width"]);for(var e=[],d=0;d<b.length;d++)if(g)for(var f=
0;f<g.length;f++)e.push([a,b[d],g[f]].join("-"));else e.push([a,b[d]].join("-"));for(a=0;a<e.length;a++)this.removeStyle(e[a])}},setStyle:function(a,e){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=e;return this},setStyles:function(a){for(var e in a)this.setStyle(e,a[e]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select",
"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,e=this.getElementsByTag("*"),b=0,g=e.count();b<g;b++)a=e.getItem(b),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var e=0,b=0,g=this.getDocument(),d=g.getBody(),f="BackCompat"==g.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
8!==CKEDITOR.env.version:1)){var c=this.$.getBoundingClientRect(),h=g.$.documentElement,k=h.clientTop||d.$.clientTop||0,t=h.clientLeft||d.$.clientLeft||0,y=!0;CKEDITOR.env.ie&&(y=g.getDocumentElement().contains(this),g=g.getBody().contains(this),y=f&&g||!f&&y);y&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(e=d.$.scrollLeft||h.scrollLeft,b=d.$.scrollTop||h.scrollTop):(b=f?d.$:h,e=b.scrollLeft,b=b.scrollTop),e=c.left+e-t,b=c.top+b-k)}else for(k=this,t=null;k&&"body"!=k.getName()&&
"html"!=k.getName();){e+=k.$.offsetLeft-k.$.scrollLeft;b+=k.$.offsetTop-k.$.scrollTop;k.equals(this)||(e+=k.$.clientLeft||0,b+=k.$.clientTop||0);for(;t&&!t.equals(k);)e-=t.$.scrollLeft,b-=t.$.scrollTop,t=t.getParent();t=k;k=(c=k.$.offsetParent)?new CKEDITOR.dom.element(c):null}a&&(c=this.getWindow(),k=a.getWindow(),!c.equals(k)&&c.$.frameElement&&(a=(new CKEDITOR.dom.element(c.$.frameElement)).getDocumentPosition(a),e+=a.x,b+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
f||(e+=this.$.clientLeft?1:0,b+=this.$.clientTop?1:0);return{x:e,y:b}},scrollIntoView:function(a){var e=this.getParent();if(e){do if((e.$.clientWidth&&e.$.clientWidth<e.$.scrollWidth||e.$.clientHeight&&e.$.clientHeight<e.$.scrollHeight)&&!e.is("body")&&this.scrollIntoParent(e,a,1),e.is("html")){var b=e.getWindow();try{var g=b.$.frameElement;g&&(e=new CKEDITOR.dom.element(g))}catch(d){}}while(e=e.getParent())}},scrollIntoParent:function(a,b,d){var g,f,c,h;function k(g,b){/body|html/.test(a.getName())?
a.getWindow().$.scrollBy(g,b):(a.$.scrollLeft+=g,a.$.scrollTop+=b)}function q(a,g){var b={x:0,y:0};if(!a.is(y?"body":"html")){var e=a.$.getBoundingClientRect();b.x=e.left;b.y=e.top}e=a.getWindow();e.equals(g)||(e=q(CKEDITOR.dom.element.get(e.$.frameElement),g),b.x+=e.x,b.y+=e.y);return b}function t(a,g){return parseInt(a.getComputedStyle("margin-"+g)||0,10)||0}!a&&(a=this.getWindow());c=a.getDocument();var y="BackCompat"==c.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=y?c.getBody():c.getDocumentElement());
CKEDITOR.env.webkit&&(c=this.getEditor(!1))&&(c._.previousScrollTop=null);c=a.getWindow();f=q(this,c);var u=q(a,c),B=this.$.offsetHeight;g=this.$.offsetWidth;var z=a.$.clientHeight,x=a.$.clientWidth;c=f.x-t(this,"left")-u.x||0;h=f.y-t(this,"top")-u.y||0;g=f.x+g+t(this,"right")-(u.x+x)||0;f=f.y+B+t(this,"bottom")-(u.y+z)||0;(0>h||0<f)&&k(0,!0===b?h:!1===b?f:0>h?h:f);d&&(0>c||0<g)&&k(0>c?c:g,0)},setState:function(a,b,d){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
"_off");this.removeClass(b+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}},
getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var d=this.$.attributes;b=b||{};for(var g=0;g<d.length;g++){var f=d[g],c=f.nodeName.toLowerCase(),h;if(!(c in b))if("checked"==c&&(h=this.getAttribute(c)))a.setAttribute(c,h);else if(!CKEDITOR.env.ie||this.hasAttribute(c))h=this.getAttribute(c),null===h&&(h=f.nodeValue),a.setAttribute(c,h)}""!==this.$.style.cssText&&
(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,d){var g=b.childNodes;if(0<=d&&d<g.length)return g[d]}return function(b){var d=this.$;if(b.slice)for(b=b.slice();0<b.length&&d;)d=a(d,
b.shift());else d=a(d,b);return d?new CKEDITOR.dom.node(d):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,d,g,f;a=a||void 0===a;for(d in b)if(g=b[d],g.element.equals(this)&&g.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(f=g.editable())&&(f.equals(this)||f.contains(this)))return g;return null},find:function(a){var b=k(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(h(this,
a)));b();return a},findOne:function(a){var b=k(this);a=this.$.querySelector(h(this,a));b();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,d){if(!(d||b&&this.type!=b))var g=a(this);if(!1!==g){d=this.getChildren();for(var f=0;f<d.count();f++)g=d.getItem(f),g.type==CKEDITOR.NODE_ELEMENT?g.forEach(a,b):b&&g.type!=b||a(g)}},fireEventHandler:function(a,b){var d="on"+a,g=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var f=g.ownerDocument.createEventObject(),c;for(c in b)f[c]=b[c];g.fireEvent(d,
f)}else g[g[a]?a:d](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:!1:!0}});var d={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,b,d){"number"==typeof b&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||
(b-=f.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(d-=f.call(this,a));return d}}(),CKEDITOR.dom.documentFragment=function(c){c=c||CKEDITOR.document;this.$=c.type==CKEDITOR.NODE_DOCUMENT?c.$.createDocumentFragment():c},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,
insertAfterNode:function(c){c=c.$;c.parentNode.insertBefore(this.$,c.nextSibling)},getHtml:function(){var c=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(c);return c.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,
CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1}),function(){function c(a,g){var b=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(b.collapsed)return this.end(),null;b.optimize()}var e,d=b.startContainer;e=b.endContainer;var f=b.startOffset,c=b.endOffset,h,k=this.guard,m=this.type,n=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),D=e.type==CKEDITOR.NODE_ELEMENT?e.getChild(c):e.getNext();this._.guardLTR=
function(a,g){return(!g||!l.equals(a))&&(!D||!a.equals(D))&&(a.type!=CKEDITOR.NODE_ELEMENT||!g||!a.equals(b.root))}}if(a&&!this._.guardRTL){var C=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),E=d.type==CKEDITOR.NODE_ELEMENT?f?d.getChild(f-1):null:d.getPrevious();this._.guardRTL=function(a,g){return(!g||!C.equals(a))&&(!E||!a.equals(E))&&(a.type!=CKEDITOR.NODE_ELEMENT||!g||!a.equals(b.root))}}var I=a?this._.guardRTL:this._.guardLTR;h=k?function(a,g){return!1===I(a,g)?!1:k(a,g)}:I;this.current?e=this.current[n](!1,
m,h):(a?e.type==CKEDITOR.NODE_ELEMENT&&(e=0<c?e.getChild(c-1):!1===h(e,!0)?null:e.getPreviousSourceNode(!0,m,h)):(e=d,e.type==CKEDITOR.NODE_ELEMENT&&((e=e.getChild(f))||(e=!1===h(d,!0)?null:d.getNextSourceNode(!0,m,h)))),e&&!1===h(e)&&(e=null));for(;e&&!this._.end;){this.current=e;if(!this.evaluator||!1!==this.evaluator(e)){if(!g)return e}else if(g&&this.evaluator)return!1;e=e[n](!1,m,h)}this.end();return this.current=null}function k(a){for(var g,b=null;g=c.call(this,a);)b=g;return b}CKEDITOR.dom.walker=
CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return c.call(this)},previous:function(){return c.call(this,1)},checkForward:function(){return!1!==c.call(this,0,1)},checkBackward:function(){return!1!==c.call(this,1,1)},lastForward:function(){return k.call(this)},lastBackward:function(){return k.call(this,1)},reset:function(){delete this.current;this._={}}}});var h={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,
"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},f={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in f||!h[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(g){return!(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,g){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(e){var d,f;d=e&&e.type!=CKEDITOR.NODE_ELEMENT&&(f=e.getParent())&&b(f);d=a?d:d||b(e);return!!(g^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(g){var b;g&&g.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(g.getText())||CKEDITOR.env.webkit&&g.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
return!!(a^b)}};CKEDITOR.dom.walker.invisible=function(a){var g=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(e){g(e)?e=1:(e.type==CKEDITOR.NODE_TEXT&&(e=e.getParent()),e=e.$.offsetWidth<=b);return!!(a^e)}};CKEDITOR.dom.walker.nodeType=function(a,g){return function(b){return!!(g^b.type==a)}};CKEDITOR.dom.walker.bogus=function(g){function e(a){return!b(a)&&!d(a)}return function(b){var d=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&a.test(b.getText());d&&(d=b.getParent(),
b=b.getNext(e),d=d.isBlockBoundary()&&(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(g^d)}};CKEDITOR.dom.walker.temp=function(a){return function(g){g.type!=CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=g&&g.hasAttribute("data-cke-temp");return!!(a^g)}};var a=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp(),e=function(a){return d(a)||b(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
CKEDITOR.dom.walker.ignored=function(a){return function(g){g=b(g)||d(g)||l(g);return!!(a^g)}};var m=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(g){for(var b=0,e=g.getChildCount();b<e;++b)if(!m(g.getChild(b)))return!!a;return!a}};var g=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var g={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(g[b]=1);return g}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
function(a){return function(b){b=m(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&g(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var g=this;do g=g.getPreviousSourceNode();while(e(g));return g&&(CKEDITOR.env.needsBrFiller?g.is&&g.is("br"):g.getText&&a.test(g.getText()))?g:!1}}(),"use strict",CKEDITOR.dom.range=function(c){this.endOffset=
this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var k=c instanceof CKEDITOR.dom.document;this.document=k?c:c.getDocument();this.root=k?c.getBody():c},function(){function c(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function k(a,b,e,d,f){function c(a,g,b,e){var d=b?a.getPrevious():a.getNext();if(e&&m)return d;z||e?g.append(a.clone(!0,f),b):(a.remove(),l&&g.append(a,b));return d}function h(){var a,
g,b,e=Math.min(H.length,F.length);for(a=0;a<e;a++)if(g=H[a],b=F[a],!g.equals(b))return a;return a-1}function k(){var b=P-1,e=I&&K&&!x.equals(w);b<N-1||b<O-1||e?(e?a.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START):O==b+1&&E?a.moveToPosition(F[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(F[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=H[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(e=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',
a.document),e.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:e}))):a.collapse(!0)}a.optimizeBookmark();var m=0===b,l=1==b,z=2==b;b=z||l;var x=a.startContainer,w=a.endContainer,A=a.startOffset,D=a.endOffset,C,E,I,K,G,L;if(z&&w.type==CKEDITOR.NODE_TEXT&&(x.equals(w)||x.type===CKEDITOR.NODE_ELEMENT&&x.getFirst().equals(w)))e.append(a.document.createText(w.substring(A,D)));else{w.type==CKEDITOR.NODE_TEXT?z?L=!0:w=w.split(D):0<w.getChildCount()?D>=w.getChildCount()?(w=w.getChild(D-1),E=
!0):w=w.getChild(D):K=E=!0;x.type==CKEDITOR.NODE_TEXT?z?G=!0:x.split(A):0<x.getChildCount()?0===A?(x=x.getChild(A),C=!0):x=x.getChild(A-1):I=C=!0;for(var H=x.getParents(),F=w.getParents(),P=h(),N=H.length-1,O=F.length-1,M=e,W,S,U,ea=-1,T=P;T<=N;T++){S=H[T];U=S.getNext();for(T!=N||S.equals(F[T])&&N<O?b&&(W=M.append(S.clone(0,f))):C?c(S,M,!1,I):G&&M.append(a.document.createText(S.substring(A)));U;){if(U.equals(F[T])){ea=T;break}U=c(U,M)}M=W}M=e;for(T=P;T<=O;T++)if(e=F[T],U=e.getPrevious(),e.equals(H[T]))b&&
(M=M.getChild(0));else{T!=O||e.equals(H[T])&&O<N?b&&(W=M.append(e.clone(0,f))):E?c(e,M,!1,K):L&&M.append(a.document.createText(e.substring(0,D)));if(T>ea)for(;U;)U=c(U,M,!0);M=W}z||k()}}function h(){var a=!1,e=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),f=CKEDITOR.dom.walker.bogus();return function(c){return d(c)||e(c)?!0:f(c)&&!a?a=!0:c.type==CKEDITOR.NODE_TEXT&&(c.hasAscendant("pre")||CKEDITOR.tools.trim(c.getText()).length)||c.type==CKEDITOR.NODE_ELEMENT&&!c.is(b)?!1:!0}}
function f(a){var b=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(1);return function(f){return e(f)||b(f)?!0:!a&&d(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&m(a)&&(b=a);return e(a)&&!(d(a)&&a.equals(b))})}}var b={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,
sup:1,tt:1,u:1,"var":1},d=CKEDITOR.dom.walker.bogus(),l=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,e=CKEDITOR.dom.walker.editable(),m=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):
(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||k(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||k(this,0,null,a)},extractContents:function(a,b){var e=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||k(this,1,e,a,"undefined"==typeof b?!0:b);return e},equals:function(a){return this.startOffset===
a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var g;if(g=a.data&&a.data("cke-temp"))g=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return g},!0)}var e=this.startContainer,d=this.endContainer,f=this.collapsed,c,h,k,m;c=this.document.createElement("span");c.data("cke-bookmark",1);c.setStyle("display",
"none");c.setHtml("\x26nbsp;");a&&(k="cke_bm_"+CKEDITOR.tools.getNextNumber(),c.setAttribute("id",k+(f?"C":"S")));f||(h=c.clone(),h.setHtml("\x26nbsp;"),a&&h.setAttribute("id",k+"E"),m=this.clone(),b(d)&&(d=b(d),m.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),m.collapse(),m.insertNode(h));m=this.clone();b(e)&&(d=b(e),m.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));m.collapse(!0);m.insertNode(c);h?(this.setStartAfter(c),this.setEndBefore(h)):this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END);
return{startNode:a?k+(f?"C":"S"):c,endNode:a?k+"E":h,serializable:a,collapsed:f}},createBookmark2:function(){function a(g){var b=g.container,d=g.offset,f;f=b;var c=d;f=f.type!=CKEDITOR.NODE_ELEMENT||0===c||c==f.getChildCount()?0:f.getChild(c-1).type==CKEDITOR.NODE_TEXT&&f.getChild(c).type==CKEDITOR.NODE_TEXT;f&&(b=b.getChild(d-1),d=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(f=b;d--;)if(c=f.getChild(d).getIndex(!0),0<=c){d=c;break a}d=-1}d+=1}if(b.type==CKEDITOR.NODE_TEXT){f=b;for(c=
0;(f=f.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;)c+=f.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;f=c;b.isEmpty()?(c=b.getPrevious(e),f?(d=f,b=c?c.getNext():b.getParent().getFirst()):(b=b.getParent(),d=c?c.getIndex(!0)+1:0)):d+=f}g.container=b;g.offset=d}function b(a,g){var e=g.getCustomData("cke-fillingChar");if(e){var d=a.container;e.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}
var e=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(e){var d=this.collapsed,f={container:this.startContainer,offset:this.startOffset},c={container:this.endContainer,offset:this.endOffset};e&&(a(f),b(f,this.root),d||(a(c),b(c,this.root)));return{start:f.container.getAddress(e),end:d?null:c.container.getAddress(e),startOffset:f.offset,endOffset:c.offset,normalized:e,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),
e=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,e);d?this.setEnd(d,a):this.collapse(!0)}else b=(e=a.serializable)?this.document.getById(a.startNode):a.startNode,a=e?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,e=this.startOffset,d=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT)if(f=
a.getChildCount(),f>e)a=a.getChild(e);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>f)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var e=
this.startContainer,d=this.endContainer,e=e.equals(d)?a&&e.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?e.getChild(this.startOffset):e:e.getCommonAncestor(d);return b&&!e.is?e.getParent():e},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},
optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var e=this.startContainer,d=this.startOffset,f=this.collapsed;if((!a||f)&&e&&e.type==CKEDITOR.NODE_TEXT){if(d)if(d>=e.getLength())d=e.getIndex()+1,e=e.getParent();else{var c=e.split(d),d=e.getIndex()+1,e=e.getParent();this.startContainer.equals(this.endContainer)?
this.setEnd(c,this.endOffset-this.startOffset):e.equals(this.endContainer)&&(this.endOffset+=1)}else d=e.getIndex(),e=e.getParent();this.setStart(e,d);if(f){this.collapse(!0);return}}e=this.endContainer;d=this.endOffset;b||f||!e||e.type!=CKEDITOR.NODE_TEXT||(d?(d>=e.getLength()||e.split(d),d=e.getIndex()+1):d=e.getIndex(),e=e.getParent(),this.setEnd(e,d))},enlarge:function(a,b){function e(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}function d(a,b,g){var e=
new CKEDITOR.dom.range(g);e.setStart(a,b);e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);g=new CKEDITOR.dom.walker(e);for(g.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=g.next();){if(e.type!=CKEDITOR.NODE_TEXT)return!1;c=e!=a?e.getText():e.substring(b);if(f.test(c))return!1}return!0}var f=new RegExp(/[^\s\ufeff]/),c,h;switch(a){case CKEDITOR.ENLARGE_INLINE:var k=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var m=this.getCommonAncestor();h=this.root;var l,
z,x,w,A,D=!1,C;C=this.startContainer;var E=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(E&&(C=!CKEDITOR.tools.trim(C.substring(0,E)).length&&C,D=!!C),C&&((w=C.getPrevious())||(x=C.getParent()))):(E&&(w=C.getChild(E-1)||C.getLast()),w||(x=C));for(x=e(x);x||w;){if(x&&!w){!A&&x.equals(m)&&(A=!0);if(k?x.isBlockBoundary():!h.contains(x))break;D&&"inline"==x.getComputedStyle("display")||(D=!1,A?l=x:this.setStartBefore(x));w=x.getPrevious()}for(;w;)if(C=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();
else{if(w.type==CKEDITOR.NODE_TEXT)c=w.getText(),f.test(c)&&(w=null),C=/[\s\ufeff]$/.test(c);else if((w.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&w.is("br"))&&!w.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[w.getName()]){c=w.getText();if(f.test(c))w=null;else for(var E=w.$.getElementsByTagName("*"),I=0,K;K=E[I++];)if(!CKEDITOR.dtd.$removeEmpty[K.nodeName.toLowerCase()]){w=null;break}w&&(C=!!c.length)}else w=null;C&&(D?A?l=x:x&&this.setStartBefore(x):D=!0);if(w){C=w.getPrevious();if(!x&&
!C){x=w;w=null;break}w=C}else x=null}x&&(x=e(x.getParent()))}C=this.endContainer;E=this.endOffset;x=w=null;A=D=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(E)).length?D=!0:(D=!C.getLength(),E==C.getLength()?(w=C.getNext())||(x=C.getParent()):d(C,E,h)&&(x=C.getParent())):(w=C.getChild(E))||(x=C);for(;x||w;){if(x&&!w){!A&&x.equals(m)&&(A=!0);if(k?x.isBlockBoundary():!h.contains(x))break;D&&"inline"==x.getComputedStyle("display")||(D=!1,A?z=x:x&&this.setEndAfter(x));w=x.getNext()}for(;w;){C=
!1;if(w.type==CKEDITOR.NODE_TEXT)c=w.getText(),d(w,0,h)||(w=null),C=/^[\s\ufeff]/.test(c);else if(w.type==CKEDITOR.NODE_ELEMENT){if((0<w.$.offsetWidth||b&&w.is("br"))&&!w.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[w.getName()]){c=w.getText();if(f.test(c))w=null;else for(E=w.$.getElementsByTagName("*"),I=0;K=E[I++];)if(!CKEDITOR.dtd.$removeEmpty[K.nodeName.toLowerCase()]){w=null;break}w&&(C=!!c.length)}else w=null}else C=1;C&&D&&(A?z=x:this.setEndAfter(x));if(w){C=w.getNext();if(!x&&!C){x=
w;w=null;break}w=C}else x=null}x&&(x=e(x.getParent()))}l&&z&&(m=l.contains(z)?z:l,this.setStartBefore(m),this.setEndAfter(m));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:x=new CKEDITOR.dom.range(this.root);h=this.root;x.setStartAt(h,CKEDITOR.POSITION_AFTER_START);x.setEnd(this.startContainer,this.startOffset);x=new CKEDITOR.dom.walker(x);var G,L,H=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),F=null,P=function(a){if(a.type==
CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(F){if(F.equals(a)){F=null;return}}else F=a;else if(F)return;var b=H(a);b||(G=a);return b},k=function(a){var b=P(a);!b&&a.is&&a.is("br")&&(L=a);return b};x.guard=P;x=x.lastBackward();G=G||h;this.setStartAt(G,!G.is("br")&&(!x&&this.checkStartOfBlock()||x&&G.contains(x))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){x=this.clone();x=new CKEDITOR.dom.walker(x);var N=CKEDITOR.dom.walker.whitespaces(),
O=CKEDITOR.dom.walker.bookmark();x.evaluator=function(a){return!N(a)&&!O(a)};if((x=x.previous())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("br"))break}x=this.clone();x.collapse();x.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);x=new CKEDITOR.dom.walker(x);x.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?k:P;G=F=L=null;x=x.lastForward();G=G||h;this.setEndAt(G,!x&&this.checkEndOfBlock()||x&&G.contains(x)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);L&&this.setEndAfter(L)}},shrink:function(a,b,e){var d=
"boolean"===typeof e?e:e&&"boolean"===typeof e.shrinkOnBlockBoundary?e.shrinkOnBlockBoundary:!0,f=e&&e.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var c=this.clone(),h=this.startContainer,k=this.endContainer,m=this.startOffset,l=this.endOffset,z=e=1;h&&h.type==CKEDITOR.NODE_TEXT&&(m?m>=h.getLength()?c.setStartAfter(h):(c.setStartBefore(h),e=0):c.setStartBefore(h));k&&k.type==CKEDITOR.NODE_TEXT&&(l?l>=k.getLength()?c.setEndAfter(k):(c.setEndAfter(k),z=0):c.setEndBefore(k));var c=new CKEDITOR.dom.walker(c),
x=CKEDITOR.dom.walker.bookmark(),w=CKEDITOR.dom.walker.bogus();c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var A;c.guard=function(b,e){if(f&&w(b)||x(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||e&&b.equals(A)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;e||b.type!=CKEDITOR.NODE_ELEMENT||(A=b);return!0};e&&(h=c[a==CKEDITOR.SHRINK_ELEMENT?
"lastForward":"next"]())&&this.setStartAt(h,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);z&&(c.reset(),(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!e&&!z)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,e=b.getChild(this.startOffset);e?a.insertBefore(e):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;
this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||
(this._setEndContainer(a),this.endOffset=b);c(this)},setEnd:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a),this.startOffset=b);c(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},
setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}c(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,
0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}c(this)},fixBlock:function(a,b){var e=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var f=d.getBogus();f&&f.remove();
d.appendBogus();this.moveToBookmark(e);return d},splitBlock:function(a,b){var e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=e.block,c=d.block,h=null;if(!e.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(f||(f=this.fixBlock(!0,a),c=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),c||(c=this.fixBlock(!1,a)));e=f&&this.checkStartOfBlock();d=c&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(c)&&
(d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END),c=null):e?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f=null):(c=this.splitElement(f,b||!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:c,wasStartOfBlock:e,wasEndOfBlock:d,elementPath:h}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);
var e=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);e.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||g.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var e=this.createBookmark(),d=this[b?"endPath":"startPath"](),f=d.block||
d.blockLimit,c;f&&!f.equals(d.root)&&!f.getFirst(a(f));)c=f.getParent(),this[b?"setEndAt":"setStartAt"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=c;this.moveToBookmark(e)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var e=b==CKEDITOR.START,d=this.clone();d.collapse(e);d[e?"setStartAt":"setEndAt"](a,e?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=f(e);return d[e?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var b=this.startContainer,e=this.startOffset;CKEDITOR.env.ie&&e&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.ltrim(b.substring(0,e)),l.test(b)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);
a.evaluator=h();return a.checkBackward()},checkEndOfBlock:function(a){var b=this.endContainer,e=this.endOffset;CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.rtrim(b.substring(e)),l.test(b)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(b);a.evaluator=h();return a.checkForward()},getPreviousNode:function(a,b,e){var d=this.clone();
d.collapse(1);d.setStartAt(e||this.root,CKEDITOR.POSITION_AFTER_START);e=new CKEDITOR.dom.walker(d);e.evaluator=a;e.guard=b;return e.previous()},getNextNode:function(a,b,e){var d=this.clone();d.collapse();d.setEndAt(e||this.root,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(d);e.evaluator=a;e.guard=b;return e.next()},checkReadOnly:function(){function a(b,e){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||
"true"==b.getAttribute("contentEditable")&&(b.contains(e)||b.equals(e)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,e=this.endContainer;return!(a(b,e)&&a(e,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var e=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&l.test(a.getText())?this.moveToPosition(a,
CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);e=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),e=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),
!0;var d=a,f=e,c=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(c=d[b?"getLast":"getFirst"](m));f||c||(c=d[b?"getPrevious":"getNext"](m));a=c}return!!e},moveToClosestEditablePosition:function(a,b){var e,d=0,f,c,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(e=new CKEDITOR.dom.range(this.root),e.moveToPosition(a,h[b?0:1])):e=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(f=e[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(c=f.type==CKEDITOR.NODE_ELEMENT)&&
f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?(e.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),e.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&c&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(e.setEnd(f,0),e.collapse()):e.moveToPosition(f,h[b?1:0]);d&&this.moveToRange(e);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=
this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),e=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return e(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=
this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:a(),getPreviousEditableNode:a(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),e=this.getTouchedEndNode(),d=b.getAscendant("table",!0),e=e.getAscendant("table",!0);return d&&!this.root.contains(d)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&e&&(d.equals(e)||d.contains(e)||e.contains(d))?
b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,e,d,f=this.clone();f.optimize();(d=f.startContainer.type==CKEDITOR.NODE_TEXT)?(e=f.startContainer.getText(),b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView();d&&(f.startContainer.setText(e),b.remove());a.remove()},getClientRects:function(){function a(b,e){var d=CKEDITOR.tools.array.map(b,function(a){return a}),
g=new CKEDITOR.dom.range(e.root),f,c,h;e.startContainer instanceof CKEDITOR.dom.element&&(c=0===e.startOffset&&e.startContainer.hasAttribute("data-widget"));e.endContainer instanceof CKEDITOR.dom.element&&(h=(h=e.endOffset===(e.endContainer.getChildCount?e.endContainer.getChildCount():e.endContainer.length))&&e.endContainer.hasAttribute("data-widget"));c&&g.setStart(e.startContainer.getParent(),e.startContainer.getIndex());h&&g.setEnd(e.endContainer.getParent(),e.endContainer.getIndex()+1);if(c||
h)e=g;g=e.cloneContents().find("[data-cke-widget-id]").toArray();if(g=CKEDITOR.tools.array.map(g,function(a){var b=e.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return g=CKEDITOR.tools.array.map(g,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;f=this.root.getDocument().$.createRange();f.setStart(b.getParent().$,b.getIndex());f.setEnd(b.getParent().$,b.getIndex()+1);b=f.getClientRects();b.widgetRect=a.getClientRect();
return b},e),CKEDITOR.tools.array.forEach(g,function(a){function b(g){CKEDITOR.tools.array.forEach(d,function(b,f){var c=CKEDITOR.tools.objectCompare(a[g],b);c||(c=CKEDITOR.tools.objectCompare(a.widgetRect,b));c&&(Array.prototype.splice.call(d,f,a.length-g,a.widgetRect),e=!0)});e||(g<d.length-1?b(g+1):d.push(a.widgetRect))}var e;b(0)}),d}function b(a,e,g){var f;e.collapsed?g.startContainer instanceof CKEDITOR.dom.element?(a=g.checkStartOfBlock(),f=new CKEDITOR.dom.text("​"),a?g.startContainer.append(f,
!0):0===g.startOffset?f.insertBefore(g.startContainer.getFirst()):(g=g.startContainer.getChildren().getItem(g.startOffset-1),f.insertAfter(g)),e.setStart(f.$,0),e.setEnd(f.$,0),a=e.getClientRects(),f.remove()):g.startContainer instanceof CKEDITOR.dom.text&&(""===g.startContainer.getText()?(g.startContainer.setText("​"),a=e.getClientRects(),g.startContainer.setText("")):a=[d(g.createBookmark())]):a=[d(g.createBookmark())];return a}function e(a,b,d){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(d.document.getWindow(),
a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function d(a){var b=a.startNode;a=a.endNode;var e;b.setText("​");b.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),e=[b.getClientRect(),a.getClientRect()],a.remove()):e=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(e[0].right,e[1].right),bottom:Math.max(e[0].bottom,e[1].bottom),left:Math.min(e[0].left,e[1].left),top:Math.min(e[0].top,e[1].top),width:Math.abs(e[0].left-e[1].left),
height:Math.max(e[0].bottom,e[1].bottom)-Math.min(e[0].top,e[1].top)}}return void 0!==document.getSelection?function(d){var f=this.root.getDocument().$.createRange(),c;f.setStart(this.startContainer.$,this.startOffset);f.setEnd(this.endContainer.$,this.endOffset);c=f.getClientRects();c=a(c,this);c.length||(c=b(c,f,this));return CKEDITOR.tools.array.map(c,function(a){return e(a,d,this)},this)}:function(a){return[e(d(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=
a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var e=this.getCommonAncestor(),d=this.getBoundaryNodes(),f=[],c,h,k,m;if(e&&e.find)for(h=e.find(a),c=0;c<h.count();c++)if(e=h.getItem(c),b||!e.isReadOnly())k=e.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(e),m=e.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||d.endNode.equals(e),k&&m&&f.push(e);return f}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,
function(a,b){var e=a[a.length-1],d=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(e){var g=new CKEDITOR.dom.range(b.root),d=new CKEDITOR.dom.walker(g),f=CKEDITOR.dom.walker.whitespaces();g.setStart(e.endContainer,e.endOffset);g.setEnd(b.startContainer,b.startOffset);for(g=d.next();f(g)||b.endContainer.equals(g);)g=d.next();d=!g}d?e.setEnd(b.endContainer,b.endOffset):a.push(b);return a},[])}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,
CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function c(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function k(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},
CKEDITOR.NODE_ELEMENT,!0);return b}function h(a,b,e,d){a:{null==d&&(d=k(e));for(var f;f=d.shift();)if(f.getDtd().p){d={element:f,remaining:d};break a}d=null}if(!d)return 0;if((f=CKEDITOR.filter.instances[d.element.data("cke-filter")])&&!f.check(b))return h(a,b,e,d.remaining);b=new CKEDITOR.dom.range(d.element);b.selectNodeContents(d.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=f;a._.nestedEditable={element:d.element,container:e,
remaining:d.remaining,iterator:b};return 1}function f(a,b,e){if(!b)return!1;a=a.clone();a.collapse(!e);return a.checkBoundaryOfElement(b,e?CKEDITOR.START:CKEDITOR.END)}var a=/^[\r\n\t ]+$/,b=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0),l=function(a){return b(a)&&d(a)},e={dd:1,dt:1,li:1};c.prototype={getNextParagraph:function(d){var g,c,k,v,r;d=d||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(d))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,
g;this.activeFilter=this.filter;if(h(this,d,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(d);this._.nestedEditable=null}if(!this.range.root.getDtd()[d])return null;if(!this._.started){var q=this.range.clone();c=q.startPath();var t=q.endPath(),y=!q.collapsed&&f(q,c.block),u=!q.collapsed&&f(q,t.block,1);q.shrink(CKEDITOR.SHRINK_ELEMENT,!0);y&&q.setStartAt(c.block,CKEDITOR.POSITION_BEFORE_END);
u&&q.setEndAt(t.block,CKEDITOR.POSITION_AFTER_START);c=q.endContainer.hasAscendant("pre",!0)||q.startContainer.hasAscendant("pre",!0);q.enlarge(this.forceBrBreak&&!c||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);q.collapsed||(c=new CKEDITOR.dom.walker(q.clone()),t=CKEDITOR.dom.walker.bookmark(!0,!0),c.evaluator=t,this._.nextNode=c.next(),c=new CKEDITOR.dom.walker(q.clone()),c.evaluator=t,c=c.previous(),this._.lastNode=c.getNextSourceNode(!0,null,q.root),this._.lastNode&&
this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(t=this.range.clone(),t.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),t.checkEndOfBlock()&&(t=new CKEDITOR.dom.elementPath(t.endContainer,t.root),this._.lastNode=(t.block||t.blockLimit).getNextSourceNode(!0))),this._.lastNode&&q.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=q.document.createText(""),this._.lastNode.insertAfter(c)),
q=null);this._.started=1;c=q}t=this._.nextNode;q=this._.lastNode;for(this._.nextNode=null;t;){var y=0,u=t.hasAscendant("pre"),B=t.type!=CKEDITOR.NODE_ELEMENT,z=0;if(B)t.type==CKEDITOR.NODE_TEXT&&a.test(t.getText())&&(B=0);else{var x=t.getName();if(CKEDITOR.dtd.$block[x]&&"false"==t.getAttribute("contenteditable")){g=t;h(this,d,g);break}else if(t.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){if("br"==x)B=1;else if(!c&&!t.getChildCount()&&"hr"!=x){g=t;k=t.equals(q);break}c&&(c.setEndAt(t,CKEDITOR.POSITION_BEFORE_START),
"br"!=x&&(this._.nextNode=t));y=1}else{if(t.getFirst()){c||(c=this.range.clone(),c.setStartAt(t,CKEDITOR.POSITION_BEFORE_START));t=t.getFirst();continue}B=1}}B&&!c&&(c=this.range.clone(),c.setStartAt(t,CKEDITOR.POSITION_BEFORE_START));k=(!y||B)&&t.equals(q);if(c&&!y)for(;!t.getNext(l)&&!k;){x=t.getParent();if(x.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){y=1;B=0;k||x.equals(q);c.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);break}t=x;B=1;k=t.equals(q);z=1}B&&c.setEndAt(t,CKEDITOR.POSITION_AFTER_END);
t=this._getNextSourceNode(t,z,q);if((k=!t)||y&&c)break}if(!g){if(!c)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(c.startContainer,c.root);t=g.blockLimit;y={div:1,th:1,td:1};g=g.block;!g&&t&&!this.enforceRealBlocks&&y[t.getName()]&&c.checkStartOfBlock()&&c.checkEndOfBlock()&&!t.equals(c.root)?g=t:!g||this.enforceRealBlocks&&g.is(e)?(g=this.range.document.createElement(d),c.extractContents().appendTo(g),g.trim(),c.insertNode(g),v=r=!0):
"li"!=g.getName()?c.checkStartOfBlock()&&c.checkEndOfBlock()||(g=g.clone(!1),c.extractContents().appendTo(g),g.trim(),r=c.splitBlock(),v=!r.wasStartOfBlock,r=!r.wasEndOfBlock,c.insertNode(g)):k||(this._.nextNode=g.equals(q)?null:this._getNextSourceNode(c.getBoundaryNodes().endNode,1,q))}v&&(v=g.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());r&&(v=g.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&
"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(b)||v.getNext(b))&&v.remove();this._.nextNode||(this._.nextNode=k||g.equals(q)||!q?null:this._getNextSourceNode(g,1,q));return g},_getNextSourceNode:function(a,e,d){function f(a){return!(a.equals(d)||a.equals(c))}var c=this.range.root;for(a=a.getNextSourceNode(e,null,f);!b(a);)a=a.getNextSourceNode(e,null,f);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new c(this)}}(),CKEDITOR.command=function(c,k){this.uiItems=
[];this.exec=function(f){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&c.focus();return!1===this.fire("exec")?!0:!1!==k.exec.call(this,c,f)};this.refresh=function(f,a){if(!this.readOnly&&f.readOnly)return!0;if(this.context&&!a.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[f.mode]&&this.disable();return!1===this.fire("refresh",{editor:f,path:a})?!0:k.refresh&&!1!==k.refresh.apply(this,
arguments)};var h;this.checkAllowed=function(f){return f||"boolean"!=typeof h?h=c.activeFilter.checkFeature(this):h};CKEDITOR.tools.extend(this,k,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!k.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},
setState:function(c){if(this.state==c||c!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=c;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,
language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,useComputedState:!0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function c(a,b,e,g,f){var c,h;a=[];for(c in b){h=
b[c];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:I(h);"$"!=c.charAt(0)&&(h.elements=c);e&&(h.featureName=e.toLowerCase());var k=h;k.elements=d(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var m=/\s*,\s*/,l=void 0;for(l in L){k[l]=d(k[l],m)||null;var n=k,p=H[l],t=d(k[H[l]],m),u=k[l],O=[],J=!0,q=void 0;t?J=!1:t={};for(q in u)"!"==q.charAt(0)&&(q=q.slice(1),O.push(q),t[q]=!0,J=!1);for(;q=O.pop();)u[q]=u["!"+q],delete u["!"+q];n[p]=(J?!1:t)||null}k.match=k.match||
null;g.push(h);a.push(h)}b=f.elements;f=f.generic;var w;e=0;for(g=a.length;e<g;++e){c=I(a[e]);h=!0===c.classes||!0===c.styles||!0===c.attributes;k=c;l=p=m=void 0;for(m in L)k[m]=y(k[m]);n=!0;for(l in H){m=H[l];p=k[m];t=[];u=void 0;for(u in p)-1<u.indexOf("*")?t.push(new RegExp("^"+u.replace(/\*/g,".*")+"$")):t.push(u);p=t;p.length&&(k[m]=p,n=!1)}k.nothingRequired=n;k.noProperties=!(k.attributes||k.classes||k.styles);if(!0===c.elements||null===c.elements)f[h?"unshift":"push"](c);else for(w in k=c.elements,
delete c.elements,k)if(b[w])b[w][h?"unshift":"push"](c);else b[w]=[c]}}function k(a,b,e,d){if(!a.match||a.match(b))if(d||l(a,b))if(a.propertiesOnly||(e.valid=!0),e.allAttributes||(e.allAttributes=h(a.attributes,b.attributes,e.validAttributes)),e.allStyles||(e.allStyles=h(a.styles,b.styles,e.validStyles)),!e.allClasses){a=a.classes;b=b.classes;d=e.validClasses;if(a)if(!0===a)a=!0;else{for(var g=0,f=b.length,c;g<f;++g)c=b[g],d[c]||(d[c]=a(c));a=!1}else a=!1;e.allClasses=a}}function h(a,b,e){if(!a)return!1;
if(!0===a)return!0;for(var d in b)e[d]||(e[d]=a(d));return!1}function f(b,e,d){if(!b.match||b.match(e)){if(b.noProperties)return!1;d.hadInvalidAttribute=a(b.attributes,e.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=a(b.styles,e.styles)||d.hadInvalidStyle;b=b.classes;e=e.classes;if(b){for(var g=!1,f=!0===b,c=e.length;c--;)if(f||b(e[c]))e.splice(c,1),g=!0;b=g}else b=!1;d.hadInvalidClass=b||d.hadInvalidClass}}function a(a,b){if(!a)return!1;var e=!1,d=!0===a,g;for(g in b)if(d||a(g))delete b[g],
e=!0;return e}function b(a,b,e){if(a.disabled||a.customConfig&&!e||!b)return!1;a._.cachedChecks={};return!0}function d(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=K(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var e={},d=0,g;for(g in a)e[g]=a[g],d++;return d?e:!1}function l(a,b){if(a.nothingRequired)return!0;var d,g,f,c;if(f=a.requiredClasses)for(c=b.classes,d=0;d<f.length;++d)if(g=
f[d],"string"==typeof g){if(-1==CKEDITOR.tools.indexOf(c,g))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(c,g))return!1;return e(b.styles,a.requiredStyles)&&e(b.attributes,a.requiredAttributes)}function e(a,b){if(!b)return!0;for(var e=0,d;e<b.length;++e)if(d=b[e],"string"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function m(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";
return b}function g(a){var b,e,d,g,f={},c=1;for(a=K(a);b=a.match(F);)(e=b[2])?(d=n(e,"styles"),g=n(e,"attrs"),e=n(e,"classes")):d=g=e=null,f["$"+c++]={elements:b[1],classes:e,styles:d,attributes:g},a=a.slice(b[0].length);return f}function n(a,b){var e=a.match(P[b]);return e?K(e[1]):null}function p(a){var b=a.styleBackup=a.attributes.style,e=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=e?e.split(/\s+/):[])}function v(a,b,e,d){var g=
0,c;d.toHtml&&(b.name=b.name.replace(N,"$1"));if(d.doCallbacks&&a.elementCallbacks){a:{c=a.elementCallbacks;for(var h=0,m=c.length,l;h<m;++h)if(l=c[h](b)){c=l;break a}c=void 0}if(c)return c}if(d.doTransform&&(c=a._.transformations[b.name])){p(b);for(h=0;h<c.length;++h)x(a,b,c[h]);q(b)}if(d.doFilter){a:{h=b.name;m=a._;a=m.allowedRules.elements[h];c=m.allowedRules.generic;h=m.disallowedRules.elements[h];m=m.disallowedRules.generic;l=d.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},
validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},u,y;if(a||c){p(b);if(h)for(u=0,y=h.length;u<y;++u)if(!1===f(h[u],b,n)){a=null;break a}if(m)for(u=0,y=m.length;u<y;++u)f(m[u],b,n);if(a)for(u=0,y=a.length;u<y;++u)k(a[u],b,n,l);if(c)for(u=0,y=c.length;u<y;++u)k(c[u],b,n,l);a=n}else a=null}if(!a||!a.valid)return e.push(b),1;y=a.validAttributes;var w=a.validStyles;c=a.validClasses;var h=b.attributes,D=b.styles,m=b.classes;l=b.classBackup;
var z=b.styleBackup,J,E,r=[],n=[],I=/^data-cke-/;u=!1;delete h.style;delete h["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(J in h)y[J]||(I.test(J)?J==(E=J.replace(/^data-cke-saved-/,""))||y[E]||(delete h[J],u=!0):(delete h[J],u=!0));if(!a.allStyles||a.hadInvalidStyle){for(J in D)a.allStyles||w[J]?r.push(J+":"+D[J]):u=!0;r.length&&(h.style=r.sort().join("; "))}else z&&(h.style=z);if(!a.allClasses||a.hadInvalidClass){for(J=0;J<m.length;++J)(a.allClasses||c[m[J]])&&n.push(m[J]);
n.length&&(h["class"]=n.sort().join(" "));l&&n.length<l.split(/\s+/).length&&(u=!0)}else l&&(h["class"]=l);u&&(g=1);if(!d.skipFinalValidation&&!t(b))return e.push(b),1}d.toHtml&&(b.name=b.name.replace(O,"cke:$1"));return g}function r(a){var b=[],e;for(e in a)-1<e.indexOf("*")&&b.push(e.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function q(a){var b=a.attributes,e;delete b.style;delete b["class"];if(e=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=e;a.classes.length&&
(b["class"]=a.classes.sort().join(" "))}function t(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function y(a){if(!a)return!1;if(!0===a)return!0;var b=r(a);return function(e){return e in a||b&&e.match(b)}}function u(){return new CKEDITOR.htmlParser.element("br")}function B(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||E.$block[a.name])}function z(a,b,e){var d=a.name;if(E.$empty[d]||
!a.children.length)"hr"==d&&"br"==b?a.replaceWith(u()):(a.parent&&e.push({check:"it",el:a.parent}),a.remove());else if(E.$block[d]||"tr"==d)if("br"==b)a.previous&&!B(a.previous)&&(b=u(),b.insertBefore(a)),a.next&&!B(a.next)&&(b=u(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,g;b:{g=E[b];for(var f=0,c=d.length,h;f<c;++f)if(h=d[f],h.type==CKEDITOR.NODE_ELEMENT&&!g[h.name]){g=!1;break b}g=!0}if(g)a.name=b,a.attributes={},e.push({check:"parent-down",el:a});else{g=a.parent;for(var f=
g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==g.name,k,m,c=d.length;0<c;)h=d[--c],f&&(h.type==CKEDITOR.NODE_TEXT||h.type==CKEDITOR.NODE_ELEMENT&&E.$inline[h.name])?(k||(k=new CKEDITOR.htmlParser.element(b),k.insertAfter(a),e.push({check:"parent-down",el:k})),k.add(h,0)):(k=null,m=E[g.name]||E.span,h.insertAfter(a),g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||h.type!=CKEDITOR.NODE_ELEMENT||m[h.name]||e.push({check:"el-up",el:h}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&e.push({check:"it",
el:a.parent}),a.replaceWithChildren())}function x(a,b,e){var d,g;for(d=0;d<e.length;++d)if(g=e[d],!(g.check&&!a.check(g.check,!1)||g.left&&!g.left(b))){g.right(b,M);break}}function w(a,b){var e=b.getDefinition(),d=e.attributes,g=e.styles,f,c,h,k;if(a.name!=e.element)return!1;for(f in d)if("class"==f)for(e=d[f].split(/\s+/),h=a.classes.join("|");k=e.pop();){if(-1==h.indexOf(k))return!1}else if(a.attributes[f]!=d[f])return!1;for(c in g)if(a.styles[c]!=g[c])return!1;return!0}function A(a,b){var e,d;
"string"==typeof a?e=a:a instanceof CKEDITOR.style?d=a:(e=a[0],d=a[1]);return[{element:e,left:d,right:function(a,e){e.transform(a,b)}}]}function D(a){return function(b){return w(b,a)}}function C(a){return function(b,e){e[a](b)}}var E=CKEDITOR.dtd,I=CKEDITOR.tools.copy,K=CKEDITOR.tools.trim,G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,b){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();
this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}};CKEDITOR.filter.instances[this.id]=this;var e=this.editor=a instanceof CKEDITOR.editor?a:null;if(e&&!b){this.customConfig=!0;var d=e.config.allowedContent;!0===d?this.disabled=!0:(d||(this.customConfig=!1),this.allow(d,"config",1),this.allow(e.config.extraAllowedContent,"extra",1),this.allow(G[e.enterMode]+" "+G[e.shiftEnterMode],"default",1),this.disallow(e.config.disallowedContent))}else this.customConfig=
!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,e,d){if(!b(this,a,d))return!1;var f,h;if("string"==typeof a)a=g(a);else if(a instanceof CKEDITOR.style){if(a.toAllowedContentRules)return this.allow(a.toAllowedContentRules(this.editor),e,d);f=a.getDefinition();a={};d=f.attributes;a[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.object.keys(f.styles)};d&&(d=I(d),f.classes=d["class"]?d["class"].split(/\s+/):null,f.requiredClasses=
f.classes,delete d["class"],f.attributes=d,f.requiredAttributes=d&&CKEDITOR.tools.object.keys(d))}else if(CKEDITOR.tools.isArray(a)){for(f=0;f<a.length;++f)h=this.allow(a[f],e,d);return h}c(this,a,e,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,e,d){if(this.disabled)return!1;var g=this,f=[],c=this.editor&&this.editor.config.protectedSource,h,k=!1,m={doFilter:!e,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;
if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(h=v(g,a,f,m),h&1)k=!0;else if(h&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var e;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));e=[];var l,n,p;if(c)for(n=0;n<c.length;++n)if((p=d.match(c[n]))&&p[0].length==d.length){e=!0;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&
v(g,l,e,m);e=!e.length}e||f.push(a)}},null,!0);f.length&&(k=!0);var l;a=[];d=G[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;e=f.pop();)e.type==CKEDITOR.NODE_ELEMENT?z(e,d,a):e.remove();for(;l=a.pop();)if(e=l.el,e.parent)switch(n=E[e.parent.name]||E.span,l.check){case "it":E.$removeEmpty[e.name]&&!e.children.length?z(e,d,a):t(e)||z(e,d,a);break;case "el-up":e.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[e.name]||z(e,d,a);break;case "parent-down":e.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||
n[e.name]||z(e.parent,d,a)}return k},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(a){if(!b(this,a,!0))return!1;"string"==typeof a&&(a=g(a));c(this,a,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,e,d=[],g;for(b=0;b<a.length&&!g;++b)e=a[b],("string"==typeof e||e instanceof
CKEDITOR.style)&&this.check(e)&&(g=e);if(g){for(b=0;b<a.length;++b)d.push(A(a[b],g));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?
this.check(a.requiredContent):!0},addTransformations:function(a){var b,e;if(!this.disabled&&a){var d=this._.transformations,g;for(g=0;g<a.length;++g){b=a[g];var f=void 0,c=void 0,h=void 0,k=void 0,m=void 0,l=void 0;e=[];for(c=0;c<b.length;++c)h=b[c],"string"==typeof h?(h=h.split(/\s*:\s*/),k=h[0],m=null,l=h[1]):(k=h.check,m=h.left,l=h.right),f||(f=h,f=f.element?f.element:k?k.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element),m instanceof CKEDITOR.style&&(m=D(m)),e.push({check:k==f?null:k,left:m,
right:"string"==typeof l?C(l):l});b=f;d[b]||(d[b]=[]);d[b].push(e)}}},check:function(a,b,e){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,e))return!0;return!1}var f,c;if("string"==typeof a){c=a+"\x3c"+(!1===b?"0":"1")+(e?"1":"0")+"\x3e";if(c in this._.cachedChecks)return this._.cachedChecks[c];f=g(a).$1;var h=f.styles,d=f.classes;f.name=f.elements;f.classes=d=d?d.split(/\s*,\s*/):[];f.styles=m(h);f.attributes=m(f.attributes);f.children=[];d.length&&
(f.attributes["class"]=d.join(" "));h&&(f.attributes.style=CKEDITOR.tools.writeCssText(f.styles))}else f=a.getDefinition(),h=f.styles,d=f.attributes||{},h&&!CKEDITOR.tools.isEmpty(h)?(h=I(h),d.style=CKEDITOR.tools.writeCssText(h,!0)):h={},f={name:f.element,attributes:d,classes:d["class"]?d["class"].split(/\s+/):[],styles:h,children:[]};var h=CKEDITOR.tools.clone(f),k=[],l;if(!1!==b&&(l=this._.transformations[f.name])){for(d=0;d<l.length;++d)x(this,f,l[d]);q(f)}v(this,h,k,{doFilter:!0,doTransform:!1!==
b,skipRequired:!e,skipFinalValidation:!e});0<k.length?e=!1:((b=f.attributes["class"])&&(f.attributes["class"]=f.attributes["class"].split(" ").sort().join(" ")),e=CKEDITOR.tools.objectCompare(f.attributes,h.attributes,!0),b&&(f.attributes["class"]=b));"string"==typeof a&&(this._.cachedChecks[c]=e);return e},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(e,d){var g=a.slice(),f;if(this.check(G[e]))return e;for(d||
(g=g.reverse());f=g.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;
delete this.disallowedContent}};var L={styles:1,attributes:1,classes:1},H={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},F=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,P={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},N=/^cke:(object|embed|param)$/,O=/^(object|embed|param)$/,M;M=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,
"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,e){e=e||b;if(!(e in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[e]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,e){e=e||b;if(!(e in a.attributes)){var d=a.styles[b],g=d&&d.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[e]=g[1]:"cke-test"==d&&(a.attributes[e]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in
a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var b=CKEDITOR.tools.style.parse.border(a.styles.border);b.color&&(a.styles["border-color"]=b.color);b.style&&(a.styles["border-style"]=b.style);b.width&&(a.styles["border-width"]=b.width);
delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(d){a.styles["margin-top"]=
e[d[0]];a.styles["margin-right"]=e[d[1]];a.styles["margin-bottom"]=e[d[2]];a.styles["margin-left"]=e[d[3]]}if(a.styles.margin){var e=a.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||["0px"];switch(e.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:w,transform:function(a,b){if("string"==typeof b)a.name=b;else{var e=b.getDefinition(),d=e.styles,g=e.attributes,f,c,h,k;a.name=e.element;for(f in g)if("class"==
f)for(e=a.classes.join("|"),h=g[f].split(/\s+/);k=h.pop();)-1==e.indexOf(k)&&a.classes.push(k);else a.attributes[f]=g[f];for(c in d)a.styles[c]=d[c]}}}}(),function(){CKEDITOR.focusManager=function(c){if(c.focusManager)return c.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:c};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(c){this._.timer&&clearTimeout(this._.timer);c&&(this.currentActive=c);this.hasFocus||this._.locked||((c=
CKEDITOR.currentInstance)&&c.focusManager.blur(1),this.hasFocus=!0,(c=this._.editor.container)&&c.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(c){function k(){if(this.hasFocus){this.hasFocus=!1;var f=this._.editor.container;f&&f.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var h=CKEDITOR.focusManager._.blurDelay;c||!h?k.call(this):this._.timer=
CKEDITOR.tools.setTimeout(function(){delete this._.timer;k.call(this)},h,this)}},add:function(c,k){var h=c.getCustomData("focusmanager");if(!h||h!=this){h&&h.remove(c);var h="focus",f="blur";k&&(CKEDITOR.env.ie?(h="focusin",f="focusout"):CKEDITOR.event.useCapture=1);var a={blur:function(){c.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(c)}};c.on(h,a.focus,this);c.on(f,a.blur,this);k&&(CKEDITOR.event.useCapture=0);c.setCustomData("focusmanager",this);c.setCustomData("focusmanager_handlers",
a)}},remove:function(c){c.removeCustomData("focusmanager");var k=c.removeCustomData("focusmanager_handlers");c.removeListener("blur",k.blur);c.removeListener("focus",k.focus)}}}(),CKEDITOR.keystrokeHandler=function(c){if(c.keystrokeHandler)return c.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:c};return this},function(){var c,k=function(f){f=f.data;var a=f.getKeystroke(),b=this.keystrokes[a],d=this._.editor;c=!1===d.fire("key",{keyCode:a,domEvent:f});c||(b&&(c=!1!==
d.execCommand(b,{from:"keystrokeHandler"})),c||(c=!!this.blockedKeystrokes[a]));c&&f.preventDefault(!0);return!c},h=function(f){c&&(c=!1,f.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(f){f.on("keydown",k,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)f.on("keypress",h,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,
fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(c,k,h){c&&CKEDITOR.lang.languages[c]||(c=this.detect(k,c));var f=this;k=function(){f[c].dir=f.rtl[c]?"rtl":"ltr";h(c,f[c])};this[c]?k():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+c+".js"),k,this)},detect:function(c,
k){var h=this.languages;k=k||navigator.userLanguage||navigator.language||c;var f=k.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),a=f[1],f=f[2];h[a+"-"+f]?a=a+"-"+f:h[a]||(a=null);CKEDITOR.lang.detect=a?function(){return a}:function(a){return a};return a||c}}}(),CKEDITOR.scriptLoader=function(){var c={},k={};return{load:function(h,f,a,b){var d="string"==typeof h;d&&(h=[h]);a||(a=CKEDITOR);var l=h.length,e=l,m=[],g=[],n=function(b){f&&(d?f.call(a,b):f.call(a,m,g))};if(0===e)n(!0);else{var p=function(a,
d){(d?m:g).push(a);0>=--e&&(b&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(d))},v=function(a,b){c[a]=1;var e=k[a];delete k[a];for(var d=0;d<e.length;d++)e[d](a,b)},r=function(a){if(c[a])p(a,!0);else{var b=k[a]||(k[a]=[]);b.push(p);if(!(1<b.length)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:a});f&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==
e.$.readyState)e.$.onreadystatechange=null,v(a,!0)}:(e.$.onload=function(){setTimeout(function(){e.$.onload=null;e.$.onerror=null;v(a,!0)},0)},e.$.onerror=function(){e.$.onload=null;e.$.onerror=null;v(a,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};b&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var q=0;q<l;q++)r(h[q])}},queue:function(){function c(){var a;(a=f[0])&&this.load(a.scriptUrl,a.callback,CKEDITOR,0)}var f=[];return function(a,b){var d=this;f.push({scriptUrl:a,
callback:function(){b&&b.apply(this,arguments);f.shift();c.call(d)}});1==f.length&&c.call(this)}}()}}(),CKEDITOR.resourceManager=function(c,k){this.basePath=c;this.fileName=k;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(c,k){if(this.registered[c])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+c+'" is already registered.');var h=this.registered[c]=k||{};h.name=c;h.path=this.getPath(c);CKEDITOR.fire(c+
CKEDITOR.tools.capitalize(this.fileName)+"Ready",h);return this.get(c)},get:function(c){return this.registered[c]||null},getPath:function(c){var k=this.externals[c];return CKEDITOR.getUrl(k&&k.dir||this.basePath+c+"/")},getFilePath:function(c){var k=this.externals[c];return CKEDITOR.getUrl(this.getPath(c)+(k?k.file:this.fileName+".js"))},addExternal:function(c,k,h){h||(k=k.replace(/[^\/]+$/,function(a){h=a;return""}));h=h||this.fileName+".js";c=c.split(",");for(var f=0;f<c.length;f++)this.externals[c[f]]=
{dir:k,file:h}},load:function(c,k,h){CKEDITOR.tools.isArray(c)||(c=c?[c]:[]);for(var f=this.loaded,a=this.registered,b=[],d={},l={},e=0;e<c.length;e++){var m=c[e];if(m)if(f[m]||a[m])l[m]=this.get(m);else{var g=this.getFilePath(m);b.push(g);g in d||(d[g]=[]);d[g].push(m)}}CKEDITOR.scriptLoader.load(b,function(a,b){if(b.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+d[b[0]].join(",")+'" was not found at "'+b[0]+'".');for(var e=0;e<a.length;e++)for(var g=d[a[e]],c=0;c<g.length;c++){var m=
g[c];l[m]=this.get(m);f[m]=1}k.call(h,l)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(c){var k={};return function(h,f,a){var b={},d=function(h){c.call(this,h,function(e){CKEDITOR.tools.extend(b,e);var c=[],g;for(g in e){var h=e[g],l=h&&h.requires;if(!k[g]){if(h.icons)for(var v=h.icons.split(","),r=v.length;r--;)CKEDITOR.skin.addIcon(v[r],h.path+"icons/"+(CKEDITOR.env.hidpi&&h.hidpi?"hidpi/":
"")+v[r]+".png");h.isSupportedEnvironment=h.isSupportedEnvironment||function(){return!0};k[g]=1}if(l)for(l.split&&(l=l.split(",")),h=0;h<l.length;h++)b[l[h]]||c.push(l[h])}if(c.length)d.call(this,c);else{for(g in b)h=b[g],h.onLoad&&!h.onLoad._called&&(!1===h.onLoad()&&delete b[g],h.onLoad._called=1);f&&f.call(a||window,b)}},this)};d.call(this,h)}}),CKEDITOR.plugins.setLang=function(c,k,h){var f=this.get(c);c=f.langEntries||(f.langEntries={});f=f.lang||(f.lang=[]);f.split&&(f=f.split(","));-1==CKEDITOR.tools.indexOf(f,
k)&&f.push(k);c[k]=h},CKEDITOR.ui=function(c){if(c.ui)return c.ui;this.items={};this.instances={};this.editor=c;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(c,k,h){h.name=c.toLowerCase();var f=this.items[c]={type:k,command:h.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(f,h)},get:function(c){return this.instances[c]},create:function(c){var k=this.items[c],h=k&&this._.handlers[k.type],f=k&&k.command&&this.editor.getCommand(k.command),h=h&&
h.create.apply(this,k.args);this.instances[c]=h;f&&f.uiItems.push(h);h&&!h.type&&(h.type=k.type);return h},addHandler:function(c,k){this._.handlers[c]=k},space:function(c){return CKEDITOR.document.getById(this.spaceId(c))},spaceId:function(c){return this.editor.id+"_"+c}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function c(a,e,d){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==e){if(!(e instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");
if(!d)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&d==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!h(e,d))throw Error('The specified element mode is not supported on element: "'+e.getName()+'".');this.element=e;this.elementMode=d;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(e.getId()||e.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};
this.templates={};this.name=this.name||k();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",f);this.on("selectionChange",function(a){b(this,a.data.path)});this.on("activeFilterChange",function(){b(this,this.elementPath(),!0)});this.on("mode",f);CKEDITOR.dom.selection.setupEditorOptimization(this);
this.on("instanceReady",function(){if(this.config.startupFocus){if("end"===this.config.startupFocus){var a=this.createRange();a.selectNodeContents(this.editable());a.shrink(CKEDITOR.SHRINK_ELEMENT,!0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||this.isDetached()||l(this,a)},0,this)}function k(){do var a="editor"+ ++r;while(CKEDITOR.instances[a]);return a}function h(a,
b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function f(){var b=this.commands,e;for(e in b)a(this,b[e])}function a(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function b(a,b,e){if(b){var d,g,f=a.commands;for(g in f)d=f[g],(e||d.contextSensitive)&&d.refresh(a,b)}}function d(a){var b=a.config.customConfig;if(!b)return!1;var b=
CKEDITOR.getUrl(b),e=q[b]||(q[b]={});e.fn?(e.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&d(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){e.fn=e.fn||CKEDITOR.editorConfig||function(){};d(a)});return!0}function l(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var d in b.on)a.on(d,b.on[d]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}d=a.config;a.readOnly=d.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?
a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=d.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:d.enterMode;a.activeShiftEnterMode=
a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:d.shiftEnterMode;d.skin&&(CKEDITOR.skinName=d.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);e(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);d(a)||a.fireOnce("customConfigLoaded")}function e(a){CKEDITOR.skin.loadPart("editor",function(){m(a)})}function m(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,e){var d=a.config.title,
f=a.config.applicationTitle;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(e);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.applicationTitle="string"==typeof f||!1===f?f:[a.lang.application,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");g(a)})}function g(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},
null,null,1);n(a)})}function n(a){function b(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var e=a.config,d=b(e.plugins),g=b(e.extraPlugins),f=b(e.removePlugins);if(g)var c=new RegExp("(?:^|,)(?:"+g.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(c,""),d=d+(","+g);if(f)var h=new RegExp("(?:^|,)(?:"+f.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(h,"");CKEDITOR.env.air&&(d+=",adobeair");CKEDITOR.plugins.load(d.split(","),function(b){var d=[],g=[],f=[];
a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var c in b){var k=b[c],m=k.lang,l=null,n=k.requires,p;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(p=n.match(h)))for(;n=p.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:c});m&&!a.lang[c]&&(m.split&&(m=m.split(",")),0<=CKEDITOR.tools.indexOf(m,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(m,l)?l:0<=CKEDITOR.tools.indexOf(m,"en")?"en":m[0]),k.langEntries&&
k.langEntries[l]?(a.lang[c]=k.langEntries[l],l=null):f.push(CKEDITOR.getUrl(k.path+"lang/"+l+".js")));g.push(l);d.push(k)}CKEDITOR.scriptLoader.load(f,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],f=0;f<b.length;f++)for(var c=0;c<d.length;c++){var h=d[c];0===f&&g[c]&&h.lang&&h.langEntries&&(a.lang[h.name]=h.langEntries[g[c]]);if(h[b[f]])h[b[f]](a)}a.fireOnce("pluginsLoaded");e.keystrokes&&a.setKeystroke(a.config.keystrokes);for(c=0;c<a.config.blockedKeystrokes.length;c++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[c]]=
1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function p(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function v(a,b){function e(a){var b=a.startContainer,d=a.endContainer,g=b.is&&b.is("tr"),f=b.is&&b.is("td");a=f&&b.equals(d)&&a.endOffset===b.getChildCount();b=f&&1===b.getChildCount()&&
"img"===b.getChildren().getItem(0).getName();return g||a&&!b?!0:!1}function d(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var g=new CKEDITOR.dom.documentFragment,f,c,h,k=0;k<a.length;k++){var m=a[k],l=m.startContainer.getAscendant("tr",!0);e(m)?(f||(f=l.getAscendant("table").clone(),f.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),g.append(f),f=f.findOne("thead, tbody, tfoot")),c&&c.equals(l)||(c=l,h=l.clone(),f.append(h)),h.append(d(m))):g.append(m.cloneContents())}return f?
g:b.getHtmlFromRange(a[0])}c.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=c;var r=0,q={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var e=0;e<b.length;e++){var d=b[e];if(this[d])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:d}),!0}return!1}},addCommand:function(b,e){e.name=b.toLowerCase();var d=e instanceof CKEDITOR.command?e:new CKEDITOR.command(this,e);this.mode&&a(this,d);return this.commands[b]=d},_attachToForm:function(){function a(b){e.updateElement();
e._.required&&!d.getValue()&&!1===e.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var e=this,d=e.element,g=new CKEDITOR.dom.element(d.$.form);d.is("textarea")&&g&&(g.on("submit",a),b(g.$.submit)&&(g.$.submit=CKEDITOR.tools.override(g.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),e.on("destroy",function(){g.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,e=this;this.fire("beforeDestroy");!a&&p.call(this);
this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];e===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=
this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var e=this.getCommand(a),d={name:a,commandData:b||{},command:e};return e&&e.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",d)&&(d.returnValue=e.exec(d.commandData),!e.async&&!1!==this.fire("afterCommandExec",d))?d.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==
CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,e){var d=!0,g=b;b&&"object"==typeof b&&(e=b.internal,g=b.callback,d=!b.noSnapshot);!e&&d&&
this.fire("saveSnapshot");if(g||!e)this.once("dataReady",function(a){!e&&d&&this.fire("saveSnapshot");g&&g.call(a.editor)});a={dataValue:a};!e&&this.fire("setData",a);this._.data=a.dataValue;!e&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,e){this.fire("insertHtml",{dataValue:a,mode:b,range:e})},insertText:function(a){this.fire("insertText",
a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),e=this.getSelection(),e=e&&e.getRanges();if(!b||!e||0===e.length)return null;b=v(e,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var e=this.editable(),d=this.getSelection().getRanges(),g=new CKEDITOR.dom.documentFragment,f;if(!e||0===d.length)return null;for(f=0;f<d.length;f++)g.append(e.extractHtmlFromRange(d[f],b));b||this.getSelection().selectRanges([d[0]]);return a?g.getHtml():
g},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return p.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],e,d,g=b.length;g--;)e=b[g],d=0,CKEDITOR.tools.isArray(e)&&(d=e[1],e=e[0]),d?a[e]=d:delete a[e]},getCommandKeystroke:function(a,
b){var e="string"===typeof a?this.getCommand(a):a,d=[];if(e){var g=CKEDITOR.tools.object.findKey(this.commands,e),f=this.keystrokeHandler.keystrokes;if(e.fakeKeystroke)d.push(e.fakeKeystroke);else for(var c in f)f[c]===g&&d.push(c)}return b?d:d[0]||null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),
a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)},isDetached:function(){return!!this.container&&this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}});
CKEDITOR.editor._getEditorElement=function(a){if(!CKEDITOR.env.isCompatible)return null;var b=CKEDITOR.dom.element.get(a);return b?b.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:b.getEditor().name}),null):b:(CKEDITOR.error("editor-incorrect-element",{element:a}),null)};CKEDITOR.editor.initializeDelayedEditorCreation=function(a,b,e){if(b.delayIfDetached_callback)return CKEDITOR.warn("editor-delayed-creation",{method:"callback"}),b.delayIfDetached_callback(function(){CKEDITOR[e](a,
b);CKEDITOR.warn("editor-delayed-creation-success",{method:"callback"})}),null;var d=void 0===b.delayIfDetached_interval?CKEDITOR.config.delayIfDetached_interval:b.delayIfDetached_interval;CKEDITOR.warn("editor-delayed-creation",{method:"interval - "+d+" ms"});var g=setInterval(function(){a.isDetached()||(clearInterval(g),CKEDITOR[e](a,b),CKEDITOR.warn("editor-delayed-creation-success",{method:"interval - "+d+" ms"}))},d);return function(){clearInterval(g)}};CKEDITOR.editor.shouldDelayEditorCreation=
function(a,b){CKEDITOR.editor.mergeDelayedCreationConfigs(b);return b&&b.delayIfDetached&&a.isDetached()};CKEDITOR.editor.mergeDelayedCreationConfigs=function(a){a&&(a.delayIfDetached="boolean"===typeof a.delayIfDetached?a.delayIfDetached:CKEDITOR.config.delayIfDetached,a.delayIfDetached_interval=isNaN(a.delayIfDetached_interval)?CKEDITOR.config.delayIfDetached_interval:a.delayIfDetached_interval,a.delayIfDetached_callback=a.delayIfDetached_callback||CKEDITOR.config.delayIfDetached_callback)}}(),
CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.config.delayIfDetached=!1,CKEDITOR.config.delayIfDetached_callback=void 0,CKEDITOR.config.delayIfDetached_interval=50,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var c=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
k={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(h){for(var f,a,b=0,d;f=this._.htmlPartsRegex.exec(h);){a=f.index;a>b&&(b=h.substring(b,a),this.onText(b));b=this._.htmlPartsRegex.lastIndex;if(a=f[1])if(a=a.toLowerCase(),d&&CKEDITOR.dtd.$cdata[a]&&(this.onCDATA(d),
d=null),!d){this.onTagClose(a);continue}if(a=f[3]){if(a=a.toLowerCase(),!/="/.test(a)){var l={},e,m=f[4];f=!!f[5];if(m)for(;e=c.exec(m);){var g=e[1].toLowerCase();e=e[2]||e[3]||e[4]||"";l[g]=!e&&k[g]?g:CKEDITOR.tools.htmlDecodeAttr(e)}this.onTagOpen(a,l,f);CKEDITOR.dtd.$cdata[a]&&(a=new RegExp("\x3c/"+a+"\x3e","i"),d=h.substring(b),a=d.search(a),-1===a&&(a=d.length),d=d.substring(0,a),this._.htmlPartsRegex.lastIndex=b+d.length,b=this._.htmlPartsRegex.lastIndex)}}else if(a=f[2])this.onComment(a)}if(h.length>
b)this.onText(h.substring(b,h.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(c){this._.output.push("\x3c",c)},openTagClose:function(c,k){k?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(c,k){"string"==typeof k&&(k=CKEDITOR.tools.htmlEncodeAttr(k));this._.output.push(" ",c,'\x3d"',k,'"')},closeTag:function(c){this._.output.push("\x3c/",c,"\x3e")},text:function(c){this._.output.push(c)},
comment:function(c){this._.output.push("\x3c!--",c,"--\x3e")},write:function(c){this._.output.push(c)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(c){var k=this._.output.join("");c&&this.reset();return k}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var c=this.parent.children,k=CKEDITOR.tools.indexOf(c,this),h=this.previous,f=this.next;h&&(h.next=f);f&&(f.previous=h);c.splice(k,1);this.parent=null},
replaceWith:function(c){var k=this.parent.children,h=CKEDITOR.tools.indexOf(k,this),f=c.previous=this.previous,a=c.next=this.next;f&&(f.next=c);a&&(a.previous=c);k[h]=c;c.parent=this.parent;this.parent=null},insertAfter:function(c){var k=c.parent.children,h=CKEDITOR.tools.indexOf(k,c),f=c.next;k.splice(h+1,0,this);this.next=c.next;this.previous=c;c.next=this;f&&(f.previous=this);this.parent=c.parent},insertBefore:function(c){var k=c.parent.children,h=CKEDITOR.tools.indexOf(k,c);k.splice(h,0,this);
this.next=c;(this.previous=c.previous)&&(c.previous.next=this);c.previous=this;this.parent=c.parent},getAscendant:function(c){var k="function"==typeof c?c:"string"==typeof c?function(f){return f.name==c}:function(f){return f.name in c},h=this.parent;for(;h&&h.type==CKEDITOR.NODE_ELEMENT;){if(k(h))return h;h=h.parent}return null},wrapWith:function(c){this.replaceWith(c);c.add(this);return c},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(c){return c||
{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(c){this.value=c;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(c,k){var h=this.value;if(!(h=c.onComment(k,h,this)))return this.remove(),!1;if("string"!=typeof h)return this.replaceWith(h),!1;this.value=h;return!0},writeHtml:function(c,k){k&&this.filter(k);c.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(c){this.value=
c;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(c,k){if(!(this.value=c.onText(k,this.value,this)))return this.remove(),!1},writeHtml:function(c,k){k&&this.filter(k);c.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(c){this.value=c};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(c){var k=
this.getAscendant("style");if(k&&k.getAscendant({math:1,svg:1})){var k=CKEDITOR.htmlParser.fragment.fromHtml(this.value),h=new CKEDITOR.htmlParser.basicWriter;c.applyTo(k);k.writeHtml(h);this.value=h.getHtml()}},writeHtml:function(c){c.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function c(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}
var k=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),h={ol:1,ul:1},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),a={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(b,d,l){function e(a){var b;if(0<t.length)for(var e=0;e<t.length;e++){var d=t[e],g=d.name,f=CKEDITOR.dtd[g],c=u.name&&CKEDITOR.dtd[u.name];
c&&!c[g]||a&&f&&!f[a]&&CKEDITOR.dtd[a]?g==u.name&&(n(u,u.parent,1),e--):(b||(m(),b=1),d=d.clone(),d.parent=u,u=d,t.splice(e,1),e--)}}function m(){for(;y.length;)n(y.shift(),u)}function g(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,e=a.children[b-1],d;e&&e.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(e.value))?e.value=d:a.children.length=b-1)}}function n(a,b,e){b=b||u||q;var d=u;void 0===a.previous&&(p(b,a)&&(u=b,r.onTagOpen(l,{}),a.returnPoint=b=u),g(a),
c(a)&&!a.children.length||b.add(a),"pre"==a.name&&(z=!1),"textarea"==a.name&&(B=!1));a.returnPoint?(u=a.returnPoint,delete a.returnPoint):u=e?b:d}function p(a,b){if((a==q||"body"==a.name)&&l&&(!a.name||CKEDITOR.dtd[a.name][l])){var e,d;return(e=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&e in CKEDITOR.dtd.$inline&&!(e in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function v(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||
"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var r=new CKEDITOR.htmlParser,q=d instanceof CKEDITOR.htmlParser.element?d:"string"==typeof d?new CKEDITOR.htmlParser.element(d):new CKEDITOR.htmlParser.fragment,t=[],y=[],u=q,B="textarea"==q.name,z="pre"==q.name;r.onTagOpen=function(a,b,d,g){b=new CKEDITOR.htmlParser.element(a,b);b.isUnknown&&d&&(b.isEmpty=!0);b.isOptionalClose=g;if(c(b))t.push(b);else{if("pre"==a)z=!0;else{if("br"==a&&z){u.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==a&&(B=!0)}if("br"==
a)y.push(b);else{for(;!(g=(d=u.name)?CKEDITOR.dtd[d]||(u._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):f,b.isUnknown||u.isUnknown||g[a]);)if(u.isOptionalClose)r.onTagClose(d);else if(a in h&&d in h)d=u.children,(d=d[d.length-1])&&"li"==d.name||n(d=new CKEDITOR.htmlParser.element("li"),u),!b.returnPoint&&(b.returnPoint=u),u=d;else if(a in CKEDITOR.dtd.$listItem&&!v(a,d))r.onTagOpen("li"==a?"ul":"dl",{},0,1);else if(d in k&&!v(a,d))!b.returnPoint&&(b.returnPoint=u),u=u.parent;else if(d in CKEDITOR.dtd.$inline&&
t.unshift(u),u.parent)n(u,u.parent,1);else{b.isOrphan=1;break}e(a);m();b.parent=u;b.isEmpty?n(b):u=b}}};r.onTagClose=function(a){for(var b=t.length-1;0<=b;b--)if(a==t[b].name){t.splice(b,1);return}for(var e=[],d=[],g=u;g!=q&&g.name!=a;)g._.isBlockLike||d.unshift(g),e.push(g),g=g.returnPoint||g.parent;if(g!=q){for(b=0;b<e.length;b++){var f=e[b];n(f,f.parent)}u=g;g._.isBlockLike?m():(b=CKEDITOR.config.shiftLineBreaks,!0!==b&&y.length&&("function"!==typeof b?m():(b=b(y[y.length-1]),!0!==b&&(m(),b instanceof
CKEDITOR.htmlParser.text&&u.add(b),b instanceof CKEDITOR.htmlParser.element&&n(b,u)))));n(g,g.parent);g==u&&(u=u.parent);t=t.concat(d)}"body"==a&&(l=!1)};r.onText=function(b){if(!(u._.hasInlineStarted&&!y.length||z||B)&&(b=CKEDITOR.tools.ltrim(b),0===b.length))return;var d=u.name,g=d?CKEDITOR.dtd[d]||(u._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):f;if(!B&&!g["#"]&&d in k)r.onTagOpen(a[d]||""),r.onText(b);else{m();e();z||B||(b=b.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));b=new CKEDITOR.htmlParser.text(b);
if(p(u,b))this.onTagOpen(l,{},0,1);u.add(b)}};r.onCDATA=function(a){u.add(new CKEDITOR.htmlParser.cdata(a))};r.onComment=function(a){m();e();u.add(new CKEDITOR.htmlParser.comment(a))};r.parse(b);for(m();u!=q;)n(u,u.parent,1);g(q);return q};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,d){isNaN(d)&&(d=this.children.length);var f=0<d?this.children[d-1]:null;if(f){if(a._.isBlockLike&&f.type==CKEDITOR.NODE_TEXT&&(f.value=CKEDITOR.tools.rtrim(f.value),0===
f.value.length)){this.children.pop();this.add(a);return}f.next=a}a.previous=f;a.parent=this;this.children.splice(d,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,d){d=this.getFilterContext(d);a.onRoot(d,this);this.filterChildren(a,!1,d)},filterChildren:function(a,d,f){if(this.childrenFilteredBy!=a.id){f=this.getFilterContext(f);if(d&&!this.parent)a.onRoot(f,this);this.childrenFilteredBy=a.id;for(d=
0;d<this.children.length;d++)!1===this.children[d].filter(a,f)&&d--}},writeHtml:function(a,d){d&&this.filter(d);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,d,f){var e=this.getFilterContext();if(f&&!this.parent&&d)d.onRoot(e,this);d&&this.filterChildren(d,!1,e);d=0;f=this.children;for(e=f.length;d<e;d++)f[d].writeHtml(a)},forEach:function(a,d,f){if(!(f||d&&this.type!=d))var e=a(this);if(!1!==e){f=this.children;for(var c=0;c<f.length;c++)e=f[c],e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,
d):d&&e.type!=d||a(e)}},getFilterContext:function(a){return a||{}}};CKEDITOR.config.shiftLineBreaks=!0}(),"use strict",function(){function c(){this.rules=[]}function k(h,f,a,b){var d,k;for(d in f)(k=h[d])||(k=h[d]=new c),k.add(f[d],a,b)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(h){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new c;this.attributeNameRules=new c;this.elementsRules={};this.attributesRules={};this.textRules=new c;this.commentRules=new c;this.rootRules=
new c;h&&this.addRules(h,10)},proto:{addRules:function(c,f){var a;"number"==typeof f?a=f:f&&"priority"in f&&(a=f.priority);"number"!=typeof a&&(a=10);"object"!=typeof f&&(f={});c.elementNames&&this.elementNameRules.addMany(c.elementNames,a,f);c.attributeNames&&this.attributeNameRules.addMany(c.attributeNames,a,f);c.elements&&k(this.elementsRules,c.elements,a,f);c.attributes&&k(this.attributesRules,c.attributes,a,f);c.text&&this.textRules.add(c.text,a,f);c.comment&&this.commentRules.add(c.comment,
a,f);c.root&&this.rootRules.add(c.root,a,f)},applyTo:function(c){c.filter(this)},onElementName:function(c,f){return this.elementNameRules.execOnName(c,f)},onAttributeName:function(c,f){return this.attributeNameRules.execOnName(c,f)},onText:function(c,f,a){return this.textRules.exec(c,f,a)},onComment:function(c,f,a){return this.commentRules.exec(c,f,a)},onRoot:function(c,f){return this.rootRules.exec(c,f)},onElement:function(c,f){for(var a=[this.elementsRules["^"],this.elementsRules[f.name],this.elementsRules.$],
b,d=0;3>d;d++)if(b=a[d]){b=b.exec(c,f,this);if(!1===b)return null;if(b&&b!=f)return this.onNode(c,b);if(f.parent&&!f.name)break}return f},onNode:function(c,f){var a=f.type;return a==CKEDITOR.NODE_ELEMENT?this.onElement(c,f):a==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(c,f.value,f)):a==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(c,f.value,f)):null},onAttribute:function(c,f,a,b){return(a=this.attributesRules[a])?a.exec(c,b,f,this):b}}});CKEDITOR.htmlParser.filterRulesGroup=
c;c.prototype={add:function(c,f,a){this.rules.splice(this.findIndex(f),0,{value:c,priority:f,options:a})},addMany:function(c,f,a){for(var b=[this.findIndex(f),0],d=0,k=c.length;d<k;d++)b.push({value:c[d],priority:f,options:a});this.rules.splice.apply(this.rules,b)},findIndex:function(c){for(var f=this.rules,a=f.length-1;0<=a&&c<f[a].priority;)a--;return a+1},exec:function(c,f){var a=f instanceof CKEDITOR.htmlParser.node||f instanceof CKEDITOR.htmlParser.fragment,b=Array.prototype.slice.call(arguments,
1),d=this.rules,k=d.length,e,m,g,n;for(n=0;n<k;n++)if(a&&(e=f.type,m=f.name),g=d[n],!(c.nonEditable&&!g.options.applyToAll||c.nestedEditable&&g.options.excludeNestedEditable)){g=g.value.apply(null,b);if(!1===g||a&&g&&(g.name!=m||g.type!=e))return g;null!=g&&(b[0]=f=g)}return f},execOnName:function(c,f){for(var a=0,b=this.rules,d=b.length,k;f&&a<d;a++)k=b[a],c.nonEditable&&!k.options.applyToAll||c.nestedEditable&&k.options.excludeNestedEditable||(f=f.replace(k.value[0],k.value[1]));return f}}}(),function(){function c(e,
g){function c(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function k(a,e){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],k=h(d),l,p;if(k)for(m(k,1)&&g.push(k);k;)b(k)&&(l=f(k))&&m(l)&&((p=f(l))&&!b(p)?g.push(l):(c(n).insertAfter(l),l.remove())),k=k.previous;for(k=0;k<g.length;k++)g[k].remove();if(g=!a||!1!==("function"==typeof e?e(d):e))n||CKEDITOR.env.needsBrFiller||d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?
n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem)?(g=h(d),g=!g||"form"==d.name&&"input"==g.name):g=!1:g=!1;g&&d.add(c(a))}}}function m(a,e){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var d;return a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(y))&&(d.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,d.index))).insertBefore(a),a.value=d[0]),!CKEDITOR.env.needsBrFiller&&
n&&(!e||a.parent.name in p)||!n&&((d=a.previous)&&"br"==d.name||!d||b(d)))?!0:!1}var l={elements:{}},n="html"==g,p=CKEDITOR.tools.extend({},x),u;for(u in p)"#"in B[u]||delete p[u];for(u in p)l.elements[u]=k(n,e.config.fillEmptyBlocks);l.root=k(n,!1);l.elements.br=function(e){return function(g){if(g.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=g.attributes;if("data-cke-bogus"in h||"data-cke-eol"in h)delete h["data-cke-bogus"];else{for(h=g.next;h&&a(h);)h=h.next;var k=f(g);!h&&b(g.parent)?d(g.parent,
c(e)):b(h)&&k&&!b(k)&&c(e).insertBefore(h)}}}}(n);return l}function k(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function h(b){for(b=b.children[b.children.length-1];b&&a(b);)b=b.previous;return b}function f(b){for(b=b.previous;b&&a(b);)b=b.previous;return b}function a(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function b(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
x||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function d(a,b){var e=a.children[a.children.length-1];a.children.push(b);b.parent=a;e&&(e.next=b,b.previous=e)}function l(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function e(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function m(a,b){return a.replace(E,function(a,e,d){return"\x3c"+e+d.replace(I,
function(a,e){return K.test(e)&&-1==d.indexOf("data-cke-saved-"+e)?" data-cke-saved-"+a+" data-cke-"+b+"-"+a:a})+"\x3e"})}function g(a,b){return a.replace(b,function(a,b,e){0===a.indexOf("\x3ctextarea")&&(a=b+v(e).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(H,function(a,b){return decodeURIComponent(b)})}function p(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
function(a){return"\x3c!--"+u+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function r(a,b){var e=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return e&&e[b]||""})}function q(a,b,e){var d=[],g=b.config.protectedSource,f=b._.dataStore||
(b._.dataStore={id:1}),c=new RegExp("\x3c\\!--\\{cke_temp_"+e+"(comment)?\\}(\\d*?)--\x3e","g"),g=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(g);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_temp_"+e+"comment}"+(d.push(a)-1)+"--\x3e"});for(var h=0;h<g.length;h++)a=a.replace(g[h],function(a){a=a.replace(c,function(a,b,e){return d[e]});return c.test(a)?a:"\x3c!--{cke_temp_"+e+"}"+(d.push(a)-1)+"--\x3e"});a=a.replace(c,function(a,
b,e){return"\x3c!--"+u+(b?"{C}":"")+encodeURIComponent(d[e]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,e,d,g){return"\x3c"+e+d+"\x3e"+r(v(g),b)+"\x3c/"+e+"\x3e"})}var t;CKEDITOR.htmlDataProcessor=
function(a){var b,e,d=this;this.editor=a;this.dataFilter=b=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;b.addRules(w);b.addRules(A,{applyToAll:!0});b.addRules(c(a,"data"),{applyToAll:!0});e.addRules(D);e.addRules(C,{applyToAll:!0});e.addRules(c(a,"html"),{applyToAll:!0});a.on("toHtml",function(b){var e;var d=window.crypto||window.msCrypto;e=d?d.getRandomValues(new Uint32Array(1))[0]:Math.floor(9E9*Math.random()+1E9);
b=b.data;var d=b.dataValue,d=t(d),d=q(d,a,e),d=g(d,L),d=m(d,e),d=g(d,G),d=d.replace(F,"$1cke:$2"),d=d.replace(N,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),d=d.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),d=d.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+e+"-$2"),f=b.context||a.editable().getName(),c;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",d="\x3cpre\x3e"+d+"\x3c/pre\x3e",c=1);f=a.document.createElement(f);f.setHtml("a"+d);d=f.getHtml().substr(1);d=d.replace(new RegExp("data-cke-"+
e+"-","ig"),"");c&&(d=d.replace(/^<pre>|<\/pre>$/gi,""));d=d.replace(P,"$1$2");d=n(d);d=v(d);e=!1===b.fixForBody?!1:k(b.enterMode,a.config.autoParagraph);d=CKEDITOR.htmlParser.fragment.fromHtml(d,b.context,e);e&&(c=d,!c.children.length&&CKEDITOR.dtd[c.name][e]&&(e=new CKEDITOR.htmlParser.element(e),c.add(e)));b.dataValue=d},null,null,5);a.on("toHtml",function(b){b.data.filter.applyTo(b.data.dataValue,!0,b.data.dontFilter,b.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(d.dataFilter,
!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var b=a.dataValue,e=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(e);b=e.getHtml(!0);a.dataValue=p(b)},null,null,15);a.on("toDataFormat",function(b){var e=b.data.dataValue;b.data.enterMode!=CKEDITOR.ENTER_BR&&(e=e.replace(/^<br *\/?>/i,""));b.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(e,b.data.context,k(b.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(d.htmlFilter,
!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);a.on("toDataFormat",function(b){var e=b.data.dataValue,g=d.writer;g.reset();e.writeChildrenHtml(g);e=g.getHtml(!0);e=v(e);e=r(e,a);b.data.dataValue=e},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,e,d){var g=this.editor,f,c,h,k;b&&"object"==typeof b?(f=b.context,e=b.fixForBody,d=b.dontFilter,c=b.filter,h=b.enterMode,k=b.protectedWhitespaces):f=b;f||null===f||(f=
g.editable().getName());return g.fire("toHtml",{dataValue:a,context:f,fixForBody:e,dontFilter:d,filter:c||g.filter,enterMode:h||g.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var e,d,g;b&&(e=b.context,d=b.filter,g=b.enterMode);e||null===e||(e=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:e,enterMode:g||this.editor.enterMode}).dataValue},protectSource:function(a){return q(a,this.editor)},unprotectSource:function(a){return r(a,
this.editor)},unprotectRealComments:function(a){return v(a)}};var y=/(?:&nbsp;|\xa0)$/,u="{cke_protected}",B=CKEDITOR.dtd,z="caption colgroup col thead tfoot tbody".split(" "),x=CKEDITOR.tools.extend({},B.$blockLimit,B.$block),w={elements:{input:l,textarea:l}},A={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||
0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},D={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var e=b.attributes.width,b=b.attributes.height;e&&(a.attributes.width=e);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},C={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,
""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var e=["name","href","src"],d,g=0;g<e.length;g++)d="data-cke-saved-"+e[g],d in b&&delete b[e[g]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var e,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(e=CKEDITOR.tools.indexOf(z,a.name),d=CKEDITOR.tools.indexOf(z,b.name));-1<e&&-1<d&&e!=d||(e=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return e>d?1:-1})},param:function(a){a.children=
[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&d(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||
""},input:e,textarea:e},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var E=/<(a|area|img|input|source)\b([^>]*)>/gi,I=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,K=/^(href|src|name)$/i,G=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,L=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,
H=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,P=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,N=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;t=function(){function a(b,e){for(var d=0;d<b.length;d++){var g=b[d];g.lastIndex=0;if(g.test(e))return!0}return!1}function b(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,b){var d=b.toLowerCase(),g=b.toUpperCase(),f=e(d);d!==g&&(f+="|"+e(g));return a+("("+f+")")},"")}function e(a){var b;
b=a.charCodeAt(0);var d=b.toString(16);b={htmlCode:"\x26#"+b+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var g in b)b[g]&&(a+="|"+b[g]);return a}var d=[new RegExp("("+b("\x3ccke:encoded\x3e")+"(.*?)"+b("\x3c/cke:encoded\x3e")+")|("+b("\x3c")+b("/")+"?"+b("cke:encoded\x3e")+")","gi"),new RegExp("(("+b("{cke_protected")+")(_[0-9]*)?"+b("}")+")","gi"),/<!(?:\s*-\s*){2,3}!?\s*>/g];return function(b){for(;a(d,b);)for(var e=d,g=0;g<e.length;g++)b=b.replace(e[g],
"");return b}}()}(),"use strict",CKEDITOR.htmlParser.element=function(c,k){this.name=c;this.attributes=k||{};this.children=[];var h=c||"",f=h.match(/^cke:(.*)/);f&&(h=f[1]);h=!!(CKEDITOR.dtd.$nonBodyContent[h]||CKEDITOR.dtd.$block[h]||CKEDITOR.dtd.$listItem[h]||CKEDITOR.dtd.$tableContent[h]||CKEDITOR.dtd.$nonEditable[h]||"br"==h);this.isEmpty=!!CKEDITOR.dtd.$empty[c];this.isUnknown=!CKEDITOR.dtd[c];this._={isBlockLike:h,hasInlineStarted:this.isEmpty||!h}},CKEDITOR.htmlParser.cssStyle=function(c){var k=
{};((c instanceof CKEDITOR.htmlParser.element?c.attributes.style:c)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,f,a){"font-family"==f&&(a=a.replace(/["']/g,""));k[f.toLowerCase()]=a});return{rules:k,populate:function(c){var f=this.toString();f&&(c instanceof CKEDITOR.dom.element?c.setAttribute("style",f):c instanceof CKEDITOR.htmlParser.element?c.attributes.style=f:c.style=f)},toString:function(){var c=[],f;for(f in k)k[f]&&c.push(f,":",k[f],";");return c.join("")}}},
function(){function c(f){return function(a){return a.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof f?a.name==f:a.name in f)}}var k=function(f,a){f=f[0];a=a[0];return f<a?-1:f>a?1:0},h=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:h.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(f,a){var b=this,d,c;a=b.getFilterContext(a);if(!b.parent)f.onRoot(a,
b);for(;;){d=b.name;if(!(c=f.onElementName(a,d)))return this.remove(),!1;b.name=c;if(!(b=f.onElement(a,b)))return this.remove(),!1;if(b!==this)return this.replaceWith(b),!1;if(b.name==d)break;if(b.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(b),!1;if(!b.name)return this.replaceWithChildren(),!1}d=b.attributes;var e,h;for(e in d){for(c=d[e];;)if(h=f.onAttributeName(a,e))if(h!=e)delete d[e],e=h;else break;else{delete d[e];break}h&&(!1===(c=f.onAttribute(a,b,h,c))?delete d[h]:d[h]=c)}b.isEmpty||
this.filterChildren(f,!1,a);return!0},filterChildren:h.filterChildren,writeHtml:function(f,a){a&&this.filter(a);var b=this.name,d=[],c=this.attributes,e,h;f.openTag(b,c);for(e in c)d.push([e,c[e]]);f.sortAttributes&&d.sort(k);e=0;for(h=d.length;e<h;e++)c=d[e],f.attribute(c[0],c[1]);f.openTagClose(b,this.isEmpty);this.writeChildrenHtml(f);this.isEmpty||f.closeTag(b)},writeChildrenHtml:h.writeChildrenHtml,replaceWithChildren:function(){for(var f=this.children,a=f.length;a;)f[--a].insertAfter(this);
this.remove()},forEach:h.forEach,getFirst:function(f){if(!f)return this.children.length?this.children[0]:null;"function"!=typeof f&&(f=c(f));for(var a=0,b=this.children.length;a<b;++a)if(f(this.children[a]))return this.children[a];return null},getHtml:function(){var f=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(f);return f.getHtml()},setHtml:function(f){f=this.children=CKEDITOR.htmlParser.fragment.fromHtml(f).children;for(var a=0,b=f.length;a<b;++a)f[a].parent=this},getOuterHtml:function(){var f=
new CKEDITOR.htmlParser.basicWriter;this.writeHtml(f);return f.getHtml()},split:function(f){for(var a=this.children.splice(f,this.children.length-f),b=this.clone(),d=0;d<a.length;++d)a[d].parent=b;b.children=a;a[0]&&(a[0].previous=null);0<f&&(this.children[f-1].next=null);this.parent.add(b,this.getIndex()+1);return b},find:function(f,a){void 0===a&&(a=!1);var b=[],d;for(d=0;d<this.children.length;d++){var c=this.children[d];"function"==typeof f&&f(c)?b.push(c):"string"==typeof f&&c.name===f&&b.push(c);
a&&c.find&&(b=b.concat(c.find(f,a)))}return b},findOne:function(f,a){var b=null,d=CKEDITOR.tools.array.find(this.children,function(d){var e="function"===typeof f?f(d):d.name===f;if(e||!a)return e;d.children&&d.findOne&&(b=d.findOne(f,!0));return!!b});return b||d||null},addClass:function(f){if(!this.hasClass(f)){var a=this.attributes["class"]||"";this.attributes["class"]=a+(a?" ":"")+f}},removeClass:function(f){var a=this.attributes["class"];a&&((a=CKEDITOR.tools.trim(a.replace(new RegExp("(?:\\s+|^)"+
f+"(?:\\s+|$)")," ")))?this.attributes["class"]=a:delete this.attributes["class"])},hasClass:function(f){var a=this.attributes["class"];return a?(new RegExp("(?:^|\\s)"+f+"(?\x3d\\s|$)")).test(a):!1},getFilterContext:function(f){var a=[];f||(f={nonEditable:!1,nestedEditable:!1});f.nonEditable||"false"!=this.attributes.contenteditable?f.nonEditable&&!f.nestedEditable&&"true"==this.attributes.contenteditable&&a.push("nestedEditable",!0):a.push("nonEditable",!0);if(a.length){f=CKEDITOR.tools.copy(f);
for(var b=0;b<a.length;b+=2)f[a[b]]=a[b+1]}return f}},!0)}(),function(){var c=/{([^}]+)}/g;CKEDITOR.template=function(c){this.source="function"===typeof c?c:String(c)};CKEDITOR.template.prototype.output=function(k,h){var f=("function"===typeof this.source?this.source(k):this.source).replace(c,function(a,b){return void 0!==k[b]?k[b]:a});return h?h.push(f):f}}(),function(){function c(a){if(d.secure&&d.latest)return a();try{var b=new XMLHttpRequest,f="https://cke4.ckeditor.com/ckeditor4-secure-version/versions.json?v\x3d"+
encodeURIComponent(d.current.name);b.onreadystatechange=function(){if(4===b.readyState&&200===b.status)try{var g=JSON.parse(b.responseText);d.latest=h(g.latestVersion);d.secure=h(g.secureVersion);d.isLatest=k(d.current,d.latest);d.isSecure=k(d.current,d.secure);a()}catch(f){}};b.open("GET",f);b.responseType="text";b.send()}catch(g){}}function k(a,b){return a.minor>b.minor||a.minor===b.minor&&a.patch>=b.patch?!0:!1}function h(a){var b=a.match(f);if(!b)return null;a=parseInt(b[1]);var d=parseInt(b[2]),
b=!!b[3];return{name:"4."+a+"."+d+(b?"-lts":""),major:4,minor:a,patch:d,isLts:b}}var f=/^4\.(\d+)\.(\d+)(-lts)?(?: \(?.+?\)?)?$/,a="Drupal"in window,b=!1,d={current:h(CKEDITOR.version)};!a&&d.current&&(CKEDITOR.config.versionCheck=d.current.isLts?!1:!0,CKEDITOR.on("instanceReady",function(a){var e=a.editor;e.config.versionCheck&&(e.on("dialogShow",function(a){var b=a.data;"about"===b._.name&&c(function(){var a=b.getElement().findOne(".cke_about_version-check"),f;f=e.lang.versionCheck;var c="";d.isLatest||
(c=f.aboutDialogUpgradeMessage);d.isSecure||(c=f.aboutDialogInsecureMessage);f=c.replace("%current",d.current.name).replace("%latest",d.latest.name).replace(/%link/g,"https://ckeditor.com/ckeditor-4-support/");a.setHtml("");e.config.versionCheck&&(a.setStyle("color",d.isSecure?"":"#C83939"),a.setHtml(f))})}),c(function(){if(!d.isSecure){var a=e.lang.versionCheck.notificationMessage.replace("%current",d.current.name).replace("%latest",d.latest.name).replace(/%link/g,"https://ckeditor.com/ckeditor-4-support/"),
g="notification"in e.plugins;if(window.console&&window.console.error&&!b){b=!0;var f=e.lang.versionCheck.consoleMessage.replace("%current",d.current.name).replace("%latest",d.latest.name).replace(/%link/g,"https://ckeditor.com/ckeditor-4-support/");console.error(f)}g&&e.showNotification(a,"warning")}}))}))}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(c){function k(){CKEDITOR.currentInstance==c&&(CKEDITOR.currentInstance=
null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[c.name]=c;c.on("focus",function(){CKEDITOR.currentInstance!=c&&(CKEDITOR.currentInstance=c,CKEDITOR.fire("currentInstance"))});c.on("blur",k);c.on("destroy",k);CKEDITOR.fire("instance",null,c)},CKEDITOR.remove=function(c){delete CKEDITOR.instances[c.name]},function(){var c={};CKEDITOR.addTemplate=function(k,h){var f=c[k];if(f)return f;f={name:k,source:h};CKEDITOR.fire("template",f);return c[k]=new CKEDITOR.template(f.source)};CKEDITOR.getTemplate=
function(k){return c[k]}}(),function(){var c=[];CKEDITOR.addCss=function(k){c.push(k)};CKEDITOR.getCss=function(){return c.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(c,k){c=CKEDITOR.editor._getEditorElement(c);if(!c)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(c,k))return CKEDITOR.editor.initializeDelayedEditorCreation(c,
k,"inline");var h=c.is("textarea")?c:null,f=h?h.getValue():c.getHtml(),a=new CKEDITOR.editor(k,c,CKEDITOR.ELEMENT_MODE_INLINE);h?(a.setData(f,null,!0),c=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!a.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+h.getValue()+"\x3c/div\x3e",CKEDITOR.document),c.insertAfter(h),h.hide(),h.$.form&&a._attachToForm()):(k&&"undefined"!==typeof k.readOnly&&!k.readOnly&&c.setAttribute("contenteditable","true"),a.setData(f,null,!0));a.on("loaded",
function(){a.fire("uiReady");a.editable(c);a.container=c;a.ui.contentsElement=c;a.setData(a.getData(1));a.resetDirty();a.fire("contentDom");a.mode="wysiwyg";a.fire("mode");a.status="ready";a.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,a)},null,null,1E4);a.on("destroy",function(){var b=a.container;h&&b&&(b.clearCustomData(),b.remove());h&&h.show();a.element.clearCustomData();delete a.element});return a};CKEDITOR.inlineAll=function(){var c,k,h;for(h in CKEDITOR.dtd.$editable)for(var f=
CKEDITOR.document.getElementsByTag(h),a=0,b=f.count();a<b;a++)c=f.getItem(a),"true"!=c.getAttribute("contenteditable")||c.getEditor()||(k={element:c,config:{}},!1!==CKEDITOR.fire("inline",k)&&CKEDITOR.inline(c,k.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function c(f,a,b,d){f=CKEDITOR.editor._getEditorElement(f);if(!f)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(f,a))return CKEDITOR.editor.initializeDelayedEditorCreation(f,
a,"replace");var c=new CKEDITOR.editor(a,f,d);d==CKEDITOR.ELEMENT_MODE_REPLACE&&(f.setStyle("visibility","hidden"),c._.required=f.hasAttribute("required"),f.removeAttribute("required"));b&&c.setData(b,null,!0);c.on("loaded",function(){c.isDestroyed()||c.isDetached()||(h(c),d==CKEDITOR.ELEMENT_MODE_REPLACE&&c.config.autoUpdateElement&&f.$.form&&c._attachToForm(),c.setMode(c.config.startupMode,function(){c.resetDirty();c.status="ready";c.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,
c)}))});c.on("destroy",k);return c}function k(){var f=this.container,a=this.element;f&&(f.clearCustomData(),f.remove());a&&(a.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.show(),this._.required&&a.setAttribute("required","required")),delete this.element)}function h(f){var a=f.name,b=f.element,d=f.elementMode,c=f.fire("uiSpace",{space:"top",html:""}).html,e=f.fire("uiSpace",{space:"bottom",html:""}).html,h=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+
CKEDITOR.env.cssClass+'"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(f.applicationTitle?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(f.applicationTitle?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
a=CKEDITOR.dom.element.createFromHtml(h.output({id:f.id,name:a,langDir:f.lang.dir,langCode:f.langCode,voiceLabel:f.applicationTitle,topHtml:c?'\x3cspan id\x3d"'+f.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+c+"\x3c/span\x3e":"",contentId:f.ui.spaceId("contents"),bottomHtml:e?'\x3cspan id\x3d"'+f.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+e+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));
d==CKEDITOR.ELEMENT_MODE_REPLACE?(b.hide(),a.insertAfter(b)):b.append(a);f.container=a;f.ui.contentsElement=f.ui.space("contents");c&&f.ui.space("top").unselectable();e&&f.ui.space("bottom").unselectable();b=f.config.width;d=f.config.height;b&&a.setStyle("width",CKEDITOR.tools.cssLength(b));d&&f.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(d));a.disableContextMenu();CKEDITOR.env.webkit&&a.on("focus",function(){f.focus()});f.fireOnce("uiReady")}CKEDITOR.replace=function(f,a){return c(f,
a,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(f,a,b){return c(f,a,b,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var f=document.getElementsByTagName("textarea"),a=0;a<f.length;a++){var b=null,d=f[a];if(d.name||d.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(d.className))continue}else if("function"==typeof arguments[0]&&(b={},!1===arguments[0](d,b)))continue;this.replace(d,b)}}};CKEDITOR.editor.prototype.addMode=
function(f,a){(this._.modes||(this._.modes={}))[f]=a};CKEDITOR.editor.prototype.setMode=function(f,a){var b=this,d=this._.modes;if(f!=b.mode&&d&&d[f]){b.fire("beforeSetMode",f);if(b.mode){var c=b.checkDirty(),d=b._.previousModeData,e,h=0;b.fire("beforeModeUnload");b.editable(0);b._.previousMode=b.mode;b._.previousModeData=e=b.getData(1);"source"==b.mode&&d==e&&(b.fire("lockSnapshot",{forceUpdate:!0}),h=1);b.ui.space("contents").setHtml("");b.mode=""}else b._.previousModeData=b.getData(1);this._.modes[f](function(){b.mode=
f;void 0!==c&&!c&&b.resetDirty();h?b.fire("unlockSnapshot"):"wysiwyg"==f&&b.fire("saveSnapshot");setTimeout(function(){b.isDestroyed()||b.isDetached()||(b.fire("mode"),a&&a.call(b))},0)})}};CKEDITOR.editor.prototype.resize=function(f,a,b,d){var c=this.container,e=this.ui.space("contents"),h=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;d=d?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):c;if(f||0===f)f=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(f));
d.setSize("width",f,!0);h&&(h.style.width="1%");a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));var g=(d.$.offsetHeight||0)-(e.$.clientHeight||0),c=Math.max(a-(b?0:g),0);a=b?a+g:a;e.setStyle("height",CKEDITOR.tools.cssLength(c));h&&(h.style.width="100%");this.fire("resize",{outerHeight:a,contentsHeight:c,outerWidth:f||d.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(f){return f?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&
CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function c(a){var b=a.editor,d=a.data.path,g=d.blockLimit,c=a.data.selection,h=c.getRanges()[0],m;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(c=k(c,d))c.appendBogus(),m=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&b._.previousActive;e(b,d.block,g)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(d=h.clone(),d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),g=new CKEDITOR.dom.walker(d),
g.guard=function(a){return!f(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!g.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock())&&(b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(f))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),m=1,a.cancel());m&&h.select()}function k(a,b){if(a.isFake)return 0;var e=b.block||b.blockLimit,d=e&&e.getLast(f);if(!(!e||!e.isBlockBoundary()||
d&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||e.is("pre")||e.getBogus()))return e}function h(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function f(a){return v(a)&&r(a)}function a(a,b){return function(e){var d=e.data.$.toElement||e.data.$.fromElement||e.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,e)}}function b(a){return!!a.getRanges()[0].startPath().contains({table:1,
ul:1,ol:1,dl:1})}function d(a){function e(a){var b={table:1,ul:1,ol:1,dl:1};return function(e,g){g&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(b)&&(d=e);if(!(g||!f(e)||a&&t(e)))return!1}}var d,g=a.getRanges()[0],c=a.root;return b(a)&&(a=g.clone(),a.collapse(1),a.setStartAt(c,CKEDITOR.POSITION_AFTER_START),c=new CKEDITOR.dom.walker(a),c.guard=e(),c.checkBackward(),d)?(a=g.clone(),a.collapse(),a.setEndAt(d,CKEDITOR.POSITION_AFTER_END),c=new CKEDITOR.dom.walker(a),c.guard=e(!0),d=!1,c.checkForward(),d):null}
function l(a){return a.block.getParent().getChildCount()}function e(a,b,e){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(e)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function m(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function n(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},
0)}function p(a,b,e){var d=a.getCommonAncestor(b);for(b=a=e?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var v,r,q,t,y,u,B,z,x,w,A={ul:1,ol:1,dl:1};CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();
return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var b=this.$.scrollTop;this.$.focus();this.$.scrollTop=b}else this.$.focus();else this.$.setActive()}catch(e){if(!CKEDITOR.env.ie)throw e;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),
a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(b,e){var d=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(b)&&(b="focus"==b?"focusin":"focusout",e=a(e,this),d[0]=b,d[1]=e);return CKEDITOR.dom.element.prototype.on.apply(this,d)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;
try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,e;for(e in a)a.hasOwnProperty(e)&&(b=a[e],null!==b?this.setAttribute(e,b):this.removeAttribute(e))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,b){var e=this.getAttribute(a);b!==e&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=
e),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,e){var d=this.editor;d.focus();d.fire("saveSnapshot");e||(e=d.getSelection().getRanges()[0]);u(this,b||"html",a,e);e.select();n(this);this.editor.fire("afterInsertHtml",
{})},insertHtmlIntoRange:function(a,b,e){u(this,e||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,b){var e=this.editor;e.focus();e.fire("saveSnapshot");var d=e.activeEnterMode,e=e.getSelection(),g=a.getName(),g=CKEDITOR.dtd.$block[g];b||(b=e.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),g&&((g=a.getNext(function(a){return f(a)&&!t(a)}))&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$block)?g.getDtd()["#"]?
b.moveToElementEditStart(g):b.moveToElementEditEnd(a):g||d==CKEDITOR.ENTER_BR||(g=b.fixBlock(!0,d==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(g))));e.selectRanges([b]);n(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var e=this.editor,d=e.config.enterMode,f=a.getName(),c=CKEDITOR.dtd.$block[f];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,
thead:1,tfoot:1})?B(b):b.startContainer.is(CKEDITOR.dtd.$list)&&z(b));var h,k;if(c)for(;(h=b.getCommonAncestor(0,1))&&(k=CKEDITOR.dtd[h.getName()])&&(!k||!k[f]);)if(h.getName()in CKEDITOR.dtd.span){var c=b.splitElement(h),m=b.createBookmark();g(h);g(c);b.moveToBookmark(m)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(h),b.collapse(!0),h.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",e.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));
this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",String(!a));this.setAttribute("aria-readonly",String(a))},detach:function(){this.status="detached";this.editor.setData(this.editor.getData(),{internal:!0});this.clearListeners();try{this._.cleanCustomData()}catch(a){if(!CKEDITOR.env.ie||
-2146828218!==a.number)throw a;}this.editor.fire("contentDomUnload");delete this.editor.document;delete this.editor.window;delete this.editor},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=e.getDocument().$,d=b.getSelection(),g;a:if(d.anchorNode&&d.anchorNode==e.$)g=!0;else{if(CKEDITOR.env.webkit&&(g=e.getDocument().getActive())&&g.equals(e)&&!d.anchorNode){g=!0;break a}g=void 0}g&&(g=new CKEDITOR.dom.range(e),g.moveToElementEditStart(e),
b=b.createRange(),b.setStart(g.startContainer.$,g.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=e.getDocument().$,d=a.selection,g=e.getDocument().getActive();"None"==d.type&&g.equals(e)&&(d=new CKEDITOR.dom.range(e),a=a.body.createTextRange(),d.moveToElementEditStart(e),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var e=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&
(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};x.eol.detect(a,this);x.bogus.exclude(a);x.cell.shrink(a);a.fragment=a.range.cloneContents();x.tree.rebuild(a,this);x.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var e=w,d={range:a,doc:a.document},
g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);e.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var f=this.editor.createRange();f.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=f.createBookmark();e.list.detectMerge(d,this);e.table.detectRanges(d,this);e.block.detectMerge(d,this);d.tableContentsRanges?(e.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),
d.range=a,a.extractContents(e.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();e.fixUneditableRangePosition(a);e.list.merge(d,this);e.table.purge(d,this);e.block.merge(d,this);if(b){e=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&e.block&&!a.root.equals(e.block)){a:{var d=e.block.getElementsByTag("span"),f=0,c;if(d)for(;c=d.getItem(f++);)if(!r(c)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(e.block,CKEDITOR.POSITION_BEFORE_START),e.block.remove())}else e.autoParagraph(this.editor,
a),q(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return g},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(y,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,
"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");
a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",
function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var e=function(){var b=a.editable();null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",e))};this.on("scroll",e)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&
this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var g=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var c=a.config.contentsLangDirection;this.getDirection(1)!=c&&this.changeAttr("dir",c);var k=CKEDITOR.getCss();if(k){var c=g.getHead(),m=c.getCustomData("stylesheet");m?k!=m.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?m.$.styleSheet.cssText=k:m.setText(k)):(k=g.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||
k.owningElement),c.setCustomData("stylesheet",k),k.data("cke-temp",1))}c=g.getCustomData("stylesheet_ref")||0;g.setCustomData("stylesheet_ref",c+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a,"key",function(e){if(a.readOnly)return!0;var g=e.data.domEvent.getKey(),
c,f=a.getSelection();if(0!==f.getRanges().length){if(g in n){var h;e=f.getRanges()[0];var k=e.startPath(),m,p,u,g=8==g,q=!1;if(CKEDITOR.env.ie&&11>CKEDITOR.env.version&&f.getSelectedElement())h=f.getSelectedElement();else if(b(f)){var t=new CKEDITOR.dom.walker(e),w=e.collapsed?e.startContainer:t.next(),q=!1,y;if(e.checkStartOfBlock()){y=e.startPath().block||e.startPath().blockLimit;var r=y.getName();y=-1!==CKEDITOR.tools.array.indexOf(["dd","dt","li"],r)&&null===y.getPrevious()}else y=!1;if(y){for(;w&&
!q;)q=w.$.nodeName.toLowerCase(),q=!!A[q],w=t.next();t=l(e.startPath());w=l(e.endPath());q=q||t!==w}else q=void 0;q||(h=d(f))}h||q?(a.fire("saveSnapshot"),q?((c=e.startContainer.getAscendant(A,!0))?(e.setStart(c,0),e.enlarge(CKEDITOR.ENLARGE_ELEMENT),h=e):h=null,h.deleteContents()):(e.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START),h.remove()),e.select(),a.fire("saveSnapshot"),c=1):e.collapsed&&((m=k.block)&&(u=m[g?"getPrevious":"getNext"](v))&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("table")&&e[g?"checkStartOfBlock":
"checkEndOfBlock"]()?(a.fire("saveSnapshot"),e[g?"checkEndOfBlock":"checkStartOfBlock"]()&&m.remove(),e["moveToElementEdit"+(g?"End":"Start")](u),e.select(),a.fire("saveSnapshot"),c=1):k.blockLimit&&k.blockLimit.is("td")&&(p=k.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(p,g?CKEDITOR.START:CKEDITOR.END)&&(u=p[g?"getPrevious":"getNext"](v))?(a.fire("saveSnapshot"),e["moveToElementEdit"+(g?"End":"Start")](u),e.checkStartOfBlock()&&e.checkEndOfBlock()?u.remove():e.select(),a.fire("saveSnapshot"),
c=1):(p=k.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(p,g?CKEDITOR.START:CKEDITOR.END)&&(c=1))}return!c}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in n&&!this.getFirst(f)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});
CKEDITOR.env.ie&&this.attachListener(this,"click",h);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var e=b.data.getTarget();e.is("img","hr","input","textarea","select")&&!e.isReadOnly()&&(a.getSelection().selectElement(e),e.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&!b.isReadOnly()&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,
"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getAscendant("table")&&!b.getOuterHtml().replace(y,""))){var e=a.createRange();e.moveToElementEditStart(b);e.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;
var e=b.data.domEvent.getKey();if(e in n&&(b=a.getSelection(),0!==b.getRanges().length)){var e=8==e,d=b.getRanges()[0];b=d.startPath();if(d.collapsed)a:{var g=b.block;if(g&&d[e?"checkStartOfBlock":"checkEndOfBlock"](!0)&&d.moveToClosestEditablePosition(g,!e)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var c=d.startContainer.getChild(d.startOffset-(e?1:0));if(c&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("hr")){a.fire("saveSnapshot");c.remove();b=!0;break a}}d=d.startPath().block;if(!d||
d&&d.contains(g))b=void 0;else{a.fire("saveSnapshot");var f;(f=(e?d:g).getBogus())&&f.remove();f=a.getSelection();c=f.createBookmarks();(e?g:d).moveChildren(e?d:g,!1);b.lastElement.mergeSiblings();p(g,d,!e);f.selectBookmarks(c);b=!0}}else b=!1}else e=d,f=b.block,d=e.endPath().block,f&&d&&!f.equals(d)?(a.fire("saveSnapshot"),(g=f.getBogus())&&g.remove(),e.enlarge(CKEDITOR.ENLARGE_INLINE),e.deleteContents(),d.getParent()&&(d.moveChildren(f,!1),b.lastElement.mergeSiblings(),p(f,d,!0)),e=a.getSelection().getRanges()[0],
e.collapse(1),e.optimize(),""===e.startContainer.getHtml()&&e.startContainer.appendBogus(),e.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&
a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),b=a.getHead();if(b.getCustomData("stylesheet")){var e=a.getCustomData("stylesheet_ref");--e?a.setCustomData("stylesheet_ref",e):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=
null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});b.on("selectionChange",function(a){if(!b.readOnly){var e=b.getSelection();e&&!e.isLocked&&(e=b.checkDirty(),b.fire("lockSnapshot"),c(a),b.fire("unlockSnapshot"),
!e&&b.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var e=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");e&&a.changeAttr("aria-label",e);e&&a.changeAttr("title",e);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(e=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var g=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+
g+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");e.append(d);a.changeAttr("aria-describedby",g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");v=CKEDITOR.dom.walker.whitespaces(!0);r=CKEDITOR.dom.walker.bookmark(!1,!0);q=CKEDITOR.dom.walker.empty();t=CKEDITOR.dom.walker.bogus();y=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;u=
function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(e,d){var g,c,f,h,k=[],m=d.range.startContainer;g=d.range.startPath();for(var m=n[m.getName()],l=0,p=e.getChildren(),u=p.count(),q=-1,t=-1,y=0,w=g.contains(n.$list);l<u;++l)g=p.getItem(l),a(g)?(f=g.getName(),w&&f in CKEDITOR.dtd.$list?k=k.concat(b(g,d)):(h=!!m[f],"br"!=f||!g.data("cke-eol")||l&&l!=u-1||(y=(c=l?k[l-1].node:p.getItem(l+1))&&(!a(c)||!c.is("br")),c=c&&a(c)&&n.$block[c.getName()]),-1!=q||h||(q=l),h||(t=l),k.push({isElement:1,
isLineBreak:y,isBlock:g.isBlockBoundary(),hasBlockSibling:c,node:g,name:f,allowed:h}),c=y=0)):k.push({isElement:0,node:g,allowed:1});-1<q&&(k[q].firstNotAllowed=1);-1<t&&(k[t].lastNotAllowed=1);return k}function d(b,e){var g=[],c=b.getChildren(),f=c.count(),h,k=0,m=n[e],l=!b.is(n.$inline)||b.is("br");for(l&&g.push(" ");k<f;k++)h=c.getItem(k),a(h)&&!h.is(m)?g=g.concat(d(h,e)):g.push(h);l&&g.push(" ");return g}function c(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function h(b){return b&&
a(b)&&(b.is(n.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function k(b,e,d,g){var c=b.clone(),f,h;c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);(f=(new CKEDITOR.dom.walker(c)).next())&&a(f)&&p[f.getName()]&&(h=f.getPrevious())&&a(h)&&!h.getParent().equals(b.startContainer)&&d.contains(h)&&g.contains(f)&&f.isIdentical(h)&&(f.moveChildren(h),f.remove(),k(b,e,d,g))}function l(b,e){function d(b,e){if(e.isBlock&&e.isElement&&!e.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var g=e.endContainer.getChild(e.endOffset),
c=e.endContainer.getChild(e.endOffset-1);g&&d(g,b[b.length-1]);c&&d(c,b[0])&&(e.setEnd(e.endContainer,e.endOffset-1),e.collapse())}var n=CKEDITOR.dtd,p={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},u={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},q=CKEDITOR.tools.extend({},n.$inline);delete q.br;return function(p,t,w,r){var z=p.editor,v=!1,x;"unfiltered_html"==t&&(t="html",v=!0);if(!r.checkReadOnly()){var B=(new CKEDITOR.dom.elementPath(r.startContainer,r.root)).blockLimit||
r.root;t={type:t,dontFilter:v,editable:p,editor:z,range:r,blockLimit:B,mergeCandidates:[],zombies:[]};var v=t.range,B=t.mergeCandidates,A="html"===t.type,F,V,X,aa,ba;"text"==t.type&&v.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(V=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",v.document),v.insertNode(V),v.setStartAfter(V));X=new CKEDITOR.dom.elementPath(v.startContainer);t.endPath=aa=new CKEDITOR.dom.elementPath(v.endContainer);if(!v.collapsed){F=aa.block||aa.blockLimit;var da=
v.getCommonAncestor();F&&!F.equals(da)&&!F.contains(da)&&v.checkEndOfBlock()&&t.zombies.push(F);v.deleteContents()}for(;(ba=c(v))&&a(ba)&&ba.isBlockBoundary()&&X.contains(ba);)v.moveToPosition(ba,CKEDITOR.POSITION_BEFORE_END);k(v,t.blockLimit,X,aa);V&&(v.setEndBefore(V),v.collapse(),V.remove());V=v.startPath();if(F=V.contains(h,!1,1))x=v.splitElement(F),t.inlineStylesRoot=F,t.inlineStylesPeak=V.lastElement;V=v.createBookmark();A&&(g(F),g(x));(F=V.startNode.getPrevious(f))&&a(F)&&h(F)&&B.push(F);(F=
V.startNode.getNext(f))&&a(F)&&h(F)&&B.push(F);for(F=V.startNode;(F=F.getParent())&&h(F);)B.push(F);v.moveToBookmark(V);x=p.getHtml();x=""===x||x.match(y);z.enterMode===CKEDITOR.ENTER_DIV&&x&&((z=p.getFirst())&&z.remove(),r.setStartAt(p,CKEDITOR.POSITION_AFTER_START),r.collapse(!0));if(p=w){p=t.range;if("text"==t.type&&t.inlineStylesRoot){r=t.inlineStylesPeak;z=r.getDocument().createText("{cke-peak}");for(x=t.inlineStylesRoot.getParent();!r.equals(x);)z=z.appendTo(r.clone()),r=r.getParent();w=z.getOuterHtml().split("{cke-peak}").join(w)}r=
t.blockLimit.getName();if(/^\s+|\s+$/.test(w)&&"span"in CKEDITOR.dtd[r]){var Y='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';w=Y+w+Y}w=t.editor.dataProcessor.toHtml(w,{context:null,fixForBody:!1,protectedWhitespaces:!!Y,dontFilter:t.dontFilter,filter:t.editor.activeFilter,enterMode:t.editor.activeEnterMode});r=p.document.createElement("body");r.setHtml(w);Y&&(r.getFirst().remove(),r.getLast().remove());if((Y=p.startPath().block)&&(1!=Y.getChildCount()||!Y.getBogus()))a:{var Q;if(1==
r.getChildCount()&&a(Q=r.getFirst())&&Q.is(u)&&!Q.hasAttribute("contenteditable")){Y=Q.getElementsByTag("*");p=0;for(x=Y.count();p<x;p++)if(z=Y.getItem(p),!z.is(q))break a;Q.moveChildren(Q.getParent(1));Q.remove()}}t.dataWrapper=r;p=w}if(p){Q=t.range;p=Q.document;r=t.blockLimit;x=0;var J,Y=[],ha,R;w=V=0;var ca,z=Q.startContainer;ba=t.endPath.elements[0];var Z,v=ba.getPosition(z),B=!!ba.getCommonAncestor(z)&&v!=CKEDITOR.POSITION_IDENTICAL&&!(v&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),
z=b(t.dataWrapper,t);for(t.editor.enterMode!==CKEDITOR.ENTER_BR&&l(z,Q);x<z.length;x++){v=z[x];if(A=v.isLineBreak)A=Q,F=r,aa=X=void 0,v.hasBlockSibling?A=1:(X=A.startContainer.getAscendant(n.$block,1))&&X.is({div:1,p:1})?(aa=X.getPosition(F),aa==CKEDITOR.POSITION_IDENTICAL||aa==CKEDITOR.POSITION_CONTAINS?A=0:(F=A.splitElement(X),A.moveToPosition(F,CKEDITOR.POSITION_AFTER_START),A=1)):A=0;if(A)w=0<x;else{A=Q.startPath();!v.isBlock&&e(t.editor,A.block,A.blockLimit)&&(R=m(t.editor))&&(R=p.createElement(R),
R.appendBogus(),Q.insertNode(R),CKEDITOR.env.needsBrFiller&&(J=R.getBogus())&&J.remove(),Q.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END));if((A=Q.startPath().block)&&!A.equals(ha)){if(J=A.getBogus())J.remove(),Y.push(A);ha=A}v.firstNotAllowed&&(V=1);if(V&&v.isElement){A=Q.startContainer;for(F=null;A&&!n[A.getName()][v.name];){if(A.equals(r)){A=null;break}F=A;A=A.getParent()}if(A)F&&(ca=Q.splitElement(F),t.zombies.push(ca),t.zombies.push(F));else{F=r.getName();Z=!x;A=x==z.length-1;F=d(v.node,F);X=
[];aa=F.length;for(var da=0,ma=void 0,na=0,pa=-1;da<aa;da++)ma=F[da]," "==ma?(na||Z&&!da||(X.push(new CKEDITOR.dom.text(" ")),pa=X.length),na=1):(X.push(ma),na=0);A&&pa==X.length&&X.pop();Z=X}}if(Z){for(;A=Z.pop();)Q.insertNode(A);Z=0}else Q.insertNode(v.node);v.lastNotAllowed&&x<z.length-1&&((ca=B?ba:ca)&&Q.setEndAt(ca,CKEDITOR.POSITION_AFTER_START),V=0);Q.collapse()}}1!=z.length?J=!1:(J=z[0],J=J.isElement&&"false"==J.node.getAttribute("contenteditable"));J&&(w=!0,A=z[0].node,Q.setStartAt(A,CKEDITOR.POSITION_BEFORE_START),
Q.setEndAt(A,CKEDITOR.POSITION_AFTER_END));t.dontMoveCaret=w;t.bogusNeededBlocks=Y}J=t.range;var ja;Z=t.bogusNeededBlocks;for(ha=J.createBookmark();R=t.zombies.pop();)R.getParent()&&(ca=J.clone(),ca.moveToElementEditStart(R),ca.removeEmptyBlocksAtEnd());if(Z)for(;R=Z.pop();)CKEDITOR.env.needsBrFiller?R.appendBogus():R.append(J.document.createText(" "));for(;R=t.mergeCandidates.pop();)R.mergeSiblings();CKEDITOR.env.webkit&&J.startPath()&&(R=J.startPath(),R.block?R.block.$.normalize():R.blockLimit&&
R.blockLimit.$.normalize());J.moveToBookmark(ha);if(!t.dontMoveCaret){for(R=c(J);R&&a(R)&&!R.is(n.$empty);){if(R.isBlockBoundary())J.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END);else{if(h(R)&&R.getHtml().match(/(\s|&nbsp;)$/g)){ja=null;break}ja=J.clone();ja.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END)}R=R.getLast(f)}ja&&J.moveToRange(ja)}}}}();B=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};
b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,e,d){e=a.getDocument().createElement(e);a.append(e,d);return e}function e(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var g=d.startContainer,c=g.getAscendant("table",1),f=!1;e(c.getElementsByTag("td"));e(c.getElementsByTag("th"));c=d.clone();c.setStart(g,0);c=
a(c).lastBackward();c||(c=d.clone(),c.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),c=a(c).lastForward(),f=!0);c||(c=g);c.is("table")?(d.setStartAt(c,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),c.remove()):(c.is({tbody:1,thead:1,tfoot:1})&&(c=b(c,"tr",f)),c.is("tr")&&(c=b(c,c.getParent().is("thead")?"th":"td",f)),(g=c.getBogus())&&g.remove(),d.moveToPosition(c,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();z=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,
b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var e=b.startContainer,d=!1,g;g=b.clone();g.setStart(e,0);g=a(g).lastBackward();g||(g=b.clone(),g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),d=!0);g||(g=e);g.is(CKEDITOR.dtd.$list)?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),g.remove()):
((e=g.getBogus())&&e.remove(),b.moveToPosition(g,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();x={eol:{detect:function(a,b){var e=a.range,d=e.clone(),g=e.clone(),c=new CKEDITOR.dom.elementPath(e.startContainer,b),f=new CKEDITOR.dom.elementPath(e.endContainer,b);d.collapse(1);g.collapse();c.block&&d.checkBoundaryOfElement(c.block,CKEDITOR.END)&&(e.setStartAfter(c.block),a.prependEolBr=1);f.block&&g.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(e.setEndBefore(f.block),
a.appendEolBr=1)},fix:function(a,b){var e=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(e),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(e),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),e=b.startNode,b=b.endNode;!b||!t(b)||e&&e.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var e=a.range,d=e.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(d,
b),c=new CKEDITOR.dom.elementPath(e.startContainer,b),e=new CKEDITOR.dom.elementPath(e.endContainer,b),f;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(g.blockLimit.is({tr:1,table:1})){var h=g.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(g.block&&g.block.is(CKEDITOR.dtd.$listItem)&&(c=c.contains(CKEDITOR.dtd.$list),e=e.contains(CKEDITOR.dtd.$list),!c.equals(e))){var k=g.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(k)}}f||(f=function(a){return!a.equals(g.block)&&
!a.equals(g.blockLimit)});this.rebuildFragment(a,b,d,f)},rebuildFragment:function(a,b,e,d){for(var g;e&&!e.equals(b)&&d(e);)g=e.clone(0,1),a.fragment.appendTo(g),a.fragment=g,e=e.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,e=a.endContainer,d=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(e)&&b.is("tr")&&++d==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};w=function(){function a(b,e){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[e?"insertBefore":"insertAfter"](d)}
function b(e,d,g){a(d);a(g,1);for(var c;c=g.getNext();)c.insertAfter(d),d=c;q(e)&&e.remove()}function d(a,b){var e=new CKEDITOR.dom.range(a);e.setStartAfter(b.startNode);e.setEndBefore(b.endNode);return e}return{list:{detectMerge:function(a,b){var e=d(b,a.bookmark),g=e.startPath(),c=e.endPath(),f=g.contains(CKEDITOR.dtd.$list),h=c.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=g.block&&c.block&&g.block.is(CKEDITOR.dtd.$listItem)&&
c.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)e=e.clone(),e.setStartBefore(a.bookmark.startNode),e.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=e.createBookmark()},merge:function(a,e){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,g=a.mergeListBookmark.endNode,c=new CKEDITOR.dom.elementPath(d,e),f=new CKEDITOR.dom.elementPath(g,e);if(a.mergeList){var h=c.contains(CKEDITOR.dtd.$list),k=f.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&
(c=c.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),c.equals(f)||b(f,d,g));d.remove();g.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var e=new CKEDITOR.dom.range(b);e.setStartBefore(a.bookmark.startNode);e.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=e.createBookmark()}},merge:function(a,e){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,c=new CKEDITOR.dom.elementPath(d,
e),f=new CKEDITOR.dom.elementPath(g,e),c=c.block,f=f.block;c&&f&&!c.equals(f)&&b(f,d,g);d.remove();g.remove()}}},table:function(){function a(d){var g=[],c,f=new CKEDITOR.dom.walker(d),h=d.startPath().contains(e),k=d.endPath().contains(e),m={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(m,a,l,1)}if(f&&h&&a.equals(h))c=d.clone(),c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),g.push(c);else if(!f&&k&&
a.equals(k))c=d.clone(),c.setStartAt(k,CKEDITOR.POSITION_AFTER_START),g.push(c);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(e)&&(!h||b(a,h))&&(!k||b(a,k));if(!l&&(l=f))if(a.is(e))var l=h&&h.getAscendant("table",!0),n=k&&k.getAscendant("table",!0),p=a.getAscendant("table",!0),l=l&&l.contains(p)||n&&n.contains(p);else l=void 0;l&&(c=d.clone(),c.selectNodeContents(a),g.push(c))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(m);return g}function b(a,e){var d=CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(e);return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&d)}var e={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),g=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(e)&&++g};d.checkForward();if(1<g){var d=b.startPath().contains("table"),c=b.endPath().contains("table");d&&c&&b.checkBoundaryOfElement(d,CKEDITOR.START)&&b.checkBoundaryOfElement(c,
CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(d),b.setEndAfter(c),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(g,c){var f=d(c,g.bookmark),h=f.clone(),k,m,l=f.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(e)&&(l=l.getAscendant("table",!0));m=l;l=new CKEDITOR.dom.elementPath(f.startContainer,m);m=new CKEDITOR.dom.elementPath(f.endContainer,m);l=l.contains("table");m=m.contains("table");if(l||m)l&&m&&b(l,m)?(g.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),
h.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),h=f.clone(),h.setEndAt(l,CKEDITOR.POSITION_AFTER_END),k=f.clone(),k.setStartAt(m,CKEDITOR.POSITION_BEFORE_START),k=a(h).concat(a(k))):l?m||(g.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),f.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(g.tableSurroundingRange=h,h.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(m,CKEDITOR.POSITION_AFTER_START)),g.tableContentsRanges=k?k:a(f)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),
q(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,e=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);e.moveToBookmark(a.purgeTableBookmark);e.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},
fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var d=b.startPath(),g;e(a,d.block,d.blockLimit)&&(g=m(a))&&(g=b.document.createElement(g),g.appendBogus(),b.insertNode(g),b.moveToPosition(g,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function c(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function k(a,b){if(0===a.length||c(a[0].getEnclosedNode()))return!1;var e,d;if((e=!b&&
1===a.length)&&!(e=a[0].collapsed)){var g=a[0];e=g.startContainer.getAscendant({td:1,th:1},!0);var f=g.endContainer.getAscendant({td:1,th:1},!0);d=CKEDITOR.tools.trim;e&&e.equals(f)&&!e.findOne("td, th, tr, tbody, table")?(g=g.cloneContents(),e=g.getFirst()?d(g.getFirst().getText())!==d(e.getText()):!0):e=!1}if(e)return!1;for(d=0;d<a.length;d++)if(e=a[d]._getTableElement(),!e)return!1;return!0}function h(a){function b(a){a=a.find("td, th");var e=[],d;for(d=0;d<a.count();d++)e.push(a.getItem(d));return e}
var e=[],d,g;for(g=0;g<a.length;g++)d=a[g]._getTableElement(),d.is&&d.is({td:1,th:1})?e.push(d):e=e.concat(b(d));return e}function f(a){a=h(a);var b="",e=[],d,g;for(g=0;g<a.length;g++)d&&!d.equals(a[g].getAscendant("tr"))?(b+=e.join("\t")+"\n",d=a[g].getAscendant("tr"),e=[]):0===g&&(d=a[g].getAscendant("tr")),e.push(a[g].getText());return b+=e.join("\t")}function a(a){var b=this.root.editor,e=b.getSelection(1);this.reset();z=!0;e.root.once("selectionchange",function(a){a.cancel()},null,null,0);e.selectRanges([a[0]]);
e=this._.cache;e.ranges=new CKEDITOR.dom.rangeList(a);e.type=CKEDITOR.SELECTION_TEXT;e.selectedElement=a[0]._getTableElement();e.selectedText=f(a);e.nativeSel=null;this.isFake=1;this.rev=y++;b._.fakeSelection=this;z=!1;this.root.fire("selectionchange")}function b(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);var e;if(!(e=!b)&&(e=!b.isHidden())){e=a;var d=b.getRanges(),g=e.getRanges(),f=d.length&&d[0]._getTableElement()&&d[0]._getTableElement().getAscendant("table",!0),h=g.length&&g[0]._getTableElement()&&
g[0]._getTableElement().getAscendant("table",!0),m=1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table"),l=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table");if(c(e.getSelectedElement()))e=!1;else{var n=1===d.length&&d[0].collapsed,g=k(d,!!CKEDITOR.env.webkit)&&k(g);f=f&&h?f.equals(h)||h.contains(f):!1;f&&(n||g)?(m&&!l&&e.selectRanges(d),e=!0):e=!1}e=!e}e&&(a.reset(),a=0)}if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(e=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||e||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:a,path:b}))}function d(){w=!0;x||(l.call(this),x=CKEDITOR.tools.setTimeout(l,200,this))}function l(){x=null;w&&(CKEDITOR.tools.setTimeout(b,0,this),w=
!1)}function e(a){return A(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function m(a){function b(e,d){return e&&e.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](e):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,g=a.getPreviousNode(e,null,d),c=a.getNextNode(e,null,d);return b(g)||b(c,1)||!(g||c||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function g(a){n(a,!1);var b=a.getDocument().createText(u);
a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var e=a&&a.removeCustomData("cke-fillingChar");if(e){if(!1!==b){var d=a.getDocument().getSelection().getNative(),g=d&&"None"!=d.type&&d.getRangeAt(0),c=u.length;if(e.getLength()>c&&g&&g.intersectsNode(e.$)){var f=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==e.$&&d.anchorOffset>c&&(f[0].offset-=c);d.focusNode==e.$&&d.focusOffset>c&&(f[1].offset-=c)}}e.setText(p(e.getText(),1));f&&(e=a.getDocument().$,
d=e.getSelection(),e=e.createRange(),e.setStart(f[0].node,f[0].offset),e.collapse(!0),d.removeAllRanges(),d.addRange(e),d.extend(f[1].node,f[1].offset))}}function p(a,b){return b?a.replace(B,function(a,b){return b?" ":""}):a.replace(u,"")}function v(a,b){var e=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",e=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+
'"\x3e'+e+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(e);var d=a.getSelection(1),g=a.createRange(),c=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);g.setStartAt(e,CKEDITOR.POSITION_AFTER_START);g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([g]);c.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=e}function r(a){var b={37:1,39:1,8:1,46:1};return function(e){var d=e.data.getKeystroke();if(b[d]){var g=a.getSelection(),f=g.getRanges()[0];
g.isCollapsed()&&(f=f[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&f.type==CKEDITOR.NODE_ELEMENT&&"false"==f.getAttribute("contenteditable")&&(g=g.getStartElement(),!g.isBlockBoundary()||""!==(void 0===g.$.textContent?g.$.innerText:g.$.textContent)||c(g.getFirst())||8!==d&&46!==d||(g.remove(),a.fire("saveSnapshot")),a.getSelection().fake(f),e.data.preventDefault(),e.cancel())}}}function q(a){for(var b=0;b<a.length;b++){var e=a[b];e.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!e.collapsed){if(e.startContainer.isReadOnly())for(var d=
e.startContainer,g;d&&!((g=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)g&&"false"==d.getAttribute("contentEditable")&&e.setStartAfter(d),d=d.getParent();d=e.startContainer;g=e.endContainer;var c=e.startOffset,f=e.endOffset,h=e.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(c>=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));g&&g.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(g):h.setEndBefore(g));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&
d.isReadOnly()){var g=e.clone();e.setEndBefore(d);e.collapsed&&a.splice(b--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(d),g.collapsed||a.splice(b+1,0,g));return!0}return!1};d.next()}}return a}var t="function"!=typeof window.getSelection,y=1,u=CKEDITOR.tools.repeat("​",7),B=new RegExp(u+"( )?","g"),z,x,w,A=CKEDITOR.dom.walker.invisible(1),D=function(){function a(b){return function(a){var e=a.editor.createRange();e.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([e]);
return!1}}function b(a){return function(b){var e=b.editor,d=e.createRange(),g;if(!e.readOnly)return(g=d.moveToClosestEditablePosition(b.selected,a))||(g=d.moveToClosestEditablePosition(b.selected,!a)),g&&e.getSelection().selectRanges([d]),e.fire("saveSnapshot"),b.selected.remove(),g||(d.moveToElementEditablePosition(e.editable()),e.getSelection().selectRanges([d])),e.fire("saveSnapshot"),!1}}var e=a(),d=a(1);return{37:e,38:e,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function e(){var a=
g.getSelection();a&&a.removeAllRanges()}var g=a.editor;g.on("contentDom",function(){function a(){w=new CKEDITOR.dom.selection(g.getSelection());w.lock()}function e(){k.removeListener("mouseup",e);p.removeListener("mouseup",e);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement()&&b.parentElement().ownerDocument==h.$&&b.select()}function c(a){var b,e;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(e=f(b))&&
!e.equals(m)&&(b.selectElement(e),a.data.preventDefault()))}function f(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var h=g.document,k=CKEDITOR.document,m=g.editable(),l=h.getBody(),p=h.getDocumentElement(),u=m.isInline(),q,w;CKEDITOR.env.gecko&&m.attachListener(m,"focus",function(a){a.removeListener();0!==q&&(a=g.getSelection().getNative())&&
a.isCollapsed&&a.anchorNode==m.$&&(a=g.createRange(),a.moveToElementEditStart(m),a.select())},null,null,-2);m.attachListener(m,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(q&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){q=g._.previousActive&&g._.previousActive.equals(h.getActive());var a=null!=g._.previousScrollTop&&g._.previousScrollTop!=m.$.scrollTop;CKEDITOR.env.webkit&&q&&a&&(m.$.scrollTop=g._.previousScrollTop)}g.unlockSelection(q);q=0},null,null,-1);m.attachListener(m,
"mousedown",function(){q=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||u)t?m.attachListener(m,"beforedeactivate",a,null,null,-1):m.attachListener(g,"selectionCheck",a,null,null,-1),m.attachListener(m,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=w&&(w.isFake||2>w.getRanges().length);CKEDITOR.env.gecko&&!u&&a||(g.lockSelection(w),q=1)},null,null,-1),m.attachListener(m,"mousedown",function(){q=0});if(CKEDITOR.env.ie&&!u){var y;m.attachListener(m,"mousedown",function(a){2==
a.data.$.button&&((a=g.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(y=g.window.getScrollPosition()))});m.attachListener(m,"mouseup",function(a){2==a.data.$.button&&y&&(g.document.$.documentElement.scrollLeft=y.x,g.document.$.documentElement.scrollTop=y.y);y=null});if("BackCompat"!=h.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var z,v;p.on("mousedown",function(a){function b(a){a=a.data.$;if(z){var e=l.$.createTextRange();try{e.moveToPoint(a.clientX,a.clientY)}catch(d){}z.setEndPoint(0>
v.compareEndPoints("StartToStart",e)?"EndToEnd":"StartToStart",e);z.select()}}function e(){p.removeListener("mousemove",b);k.removeListener("mouseup",e);p.removeListener("mouseup",e);z.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<p.$.clientHeight&&a.$.x<p.$.clientWidth){z=l.$.createTextRange();try{z.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}v=z.duplicate();p.on("mousemove",b);k.on("mouseup",e);p.on("mouseup",e)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)p.on("mousedown",function(a){a.data.getTarget().is("html")&&
(k.on("mouseup",e),p.on("mouseup",e))})}}m.attachListener(m,"selectionchange",b,g);m.attachListener(m,"keyup",d,g);m.attachListener(m,"touchstart",d,g);m.attachListener(m,"touchend",d,g);CKEDITOR.env.ie&&m.attachListener(m,"keydown",c,g);m.attachListener(m,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){g.forceNextSelectionCheck();g.selectionChange(1)});if(u&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var x;m.attachListener(m,"mousedown",function(){x=1});m.attachListener(h.getDocumentElement(),
"mouseup",function(){x&&d.call(g);x=0})}else m.attachListener(CKEDITOR.env.ie?m:h.getDocumentElement(),"mouseup",d,g);CKEDITOR.env.webkit&&m.attachListener(h,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:m.hasFocus&&n(m)}},null,null,-1);m.attachListener(m,"keydown",r(g),null,null,-1)});g.on("setData",function(){g.unlockSelection();CKEDITOR.env.webkit&&e()});g.on("contentDomUnload",function(){g.unlockSelection()});if(CKEDITOR.env.ie9Compat)g.on("beforeDestroy",
e,null,null,9);g.on("dataReady",function(){delete g._.fakeSelection;delete g._.hiddenSelectionContainer;g.selectionChange(1)});g.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=g.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=g.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);g.on("key",function(a){if("wysiwyg"==g.mode){var b=g.getSelection();if(b.isFake){var e=
D[a.data.keyCode];if(e)return e({editor:g,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),e=a.getCustomData("cke-fillingChar");e&&(e.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):e.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=p(a.data))},
b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=p(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?b:d).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode&&"recreating"!==this.status?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();
return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};
CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var e=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:y++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=
e?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,g;if(a)if(a.getRangeAt)d=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer);else{try{g=a.createRange()}catch(c){}d=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=
CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var C={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:p,_createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:u});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==
this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=t?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:t?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var e=this.getNative(),d=e.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);e.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(g){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=
CKEDITOR.SELECTION_TEXT,e=this.getNative();if(!e||!e.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==e.rangeCount){var e=e.getRangeAt(0),d=e.startContainer;d==e.endContainer&&1==d.nodeType&&1==e.endOffset-e.startOffset&&C[d.childNodes[e.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=t?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,e){b=b.duplicate();b.collapse(e);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,
offset:0};for(var g=d.children,c,f,h=b.duplicate(),k=0,m=g.length-1,l=-1,n,p;k<=m;)if(l=Math.floor((k+m)/2),c=g[l],h.moveToElementText(c),n=h.compareEndPoints("StartToStart",b),0<n)m=l-1;else if(0>n)k=l+1;else return{container:d,offset:a(c)};if(-1==l||l==g.length-1&&0>n){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;g=d.childNodes;if(!h)return c=g[g.length-1],c.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:g.length}:{container:c,offset:c.nodeValue.length};
for(d=g.length;0<h&&0<d;)f=g[--d],f.nodeType==CKEDITOR.NODE_TEXT&&(p=f,h-=f.nodeValue.length);return{container:p,offset:-h}}h.collapse(0<n?!0:!1);h.setEndPoint(0<n?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(c)+(0<n?0:1)};for(;0<h;)try{f=c[0<n?"previousSibling":"nextSibling"],f.nodeType==CKEDITOR.NODE_TEXT&&(h-=f.nodeValue.length,p=f),c=f}catch(u){return{container:d,offset:a(c)}}return{container:p,offset:0<n?-h:p.nodeValue.length+h}};
return function(){var a=this.getNative(),e=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(e,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(e),a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],g=0;g<e.length;g++){for(var c=
e.item(g),f=c.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<f.childNodes.length&&f.childNodes[h]!=c;h++);a.setStart(new CKEDITOR.dom.node(f),h);a.setEnd(new CKEDITOR.dom.node(f),h+1);d.push(a)}return d}return[]}}():function(){var a=[],b,e=this.getNative();if(!e)return a;for(var d=0;d<e.rangeCount;d++){var g=e.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(g.startContainer),g.startOffset);b.setEnd(new CKEDITOR.dom.node(g.endContainer),g.endOffset);a.push(b)}return a};
return function(b){var e=this._.cache,d=e.ranges;d||(e.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?q(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var e=this.getRanges()[0];if(e){if(e.collapsed)b=e.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(e.optimize();b=
e.startContainer,e.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)e.setStartAfter(b);b=e.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(e.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(e=b.getFirst();e&&e.type==CKEDITOR.NODE_ELEMENT;)b=e,e=e.getFirst();else b=e.startContainer}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;
var b=this,e=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),e,d,g=2;g&&!((e=a.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&C[e.getName()]&&(d=e));g--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=e?new CKEDITOR.dom.element(e):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=t?"Control"==b.type?"":b.createRange().text:
b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(b){if(this.isLocked){if(b)var e=this.getSelectedElement(),d=this.getRanges(),g=this.isFake;this.isLocked=0;this.reset();b&&(b=e||d[0]&&d[0].getCommonAncestor())&&b.getAscendant("body",1)&&((b=this.root.editor)&&b.plugins.tableselection&&b.plugins.tableselection.isSupportedEnvironment(b)&&k(d)?a.call(this,
d):g?this.fake(e):e&&2>d.length?this.selectElement(e):this.selectRanges(d))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var e=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!e&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=y++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);
b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(b){var e=this.root.editor,d=e&&e._.hiddenSelectionContainer;this.reset();if(d)for(var d=this.root,c,f=0;f<b.length;++f)c=b[f],c.endContainer.equals(d)&&(c.endOffset=Math.min(c.endOffset,d.getChildCount()));if(b.length)if(this.isLocked){var h=CKEDITOR.document.getActive();this.unlock();this.selectRanges(b);this.lock();h&&!h.equals(this.root)&&h.focus()}else{var l;a:{var p,u;if(1==b.length&&!(u=b[0]).collapsed&&(l=u.getEnclosedNode())&&
l.type==CKEDITOR.NODE_ELEMENT&&(u=u.clone(),u.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(p=u.getEnclosedNode())&&p.type==CKEDITOR.NODE_ELEMENT&&(l=p),"false"==l.getAttribute("contenteditable")))break a;l=void 0}if(l)this.fake(l);else if(e&&e.plugins.tableselection&&e.plugins.tableselection.isSupportedEnvironment(e)&&k(b)&&!z&&!b[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))a.call(this,b);else{if(t){p=CKEDITOR.dom.walker.whitespaces(!0);l=/\ufeff|\u00a0/;u={table:1,tbody:1,
tr:1};1<b.length&&(e=b[b.length-1],b[0].setEnd(e.endContainer,e.endOffset));e=b[0];b=e.collapsed;var q,w,r;if((d=e.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in C&&(!d.is("a")||!d.getText()))try{r=d.$.createControlRange();r.addElement(d.$);r.select();return}catch(y){}if(e.startContainer.type==CKEDITOR.NODE_ELEMENT&&e.startContainer.getName()in u||e.endContainer.type==CKEDITOR.NODE_ELEMENT&&e.endContainer.getName()in u)e.shrink(CKEDITOR.NODE_ELEMENT,!0),b=e.collapsed;r=e.createBookmark();
u=r.startNode;b||(h=r.endNode);r=e.document.$.body.createTextRange();r.moveToElementText(u.$);r.moveStart("character",1);h?(l=e.document.$.body.createTextRange(),l.moveToElementText(h.$),r.setEndPoint("EndToEnd",l),r.moveEnd("character",-1)):(q=u.getNext(p),w=u.hasAscendant("pre"),q=!(q&&q.getText&&q.getText().match(l))&&(w||!u.hasPrevious()||u.getPrevious().is&&u.getPrevious().is("br")),w=e.document.createElement("span"),w.setHtml("\x26#65279;"),w.insertBefore(u),q&&e.document.createText("﻿").insertBefore(u));
e.setStartBefore(u);u.remove();b?(q?(r.moveStart("character",-1),r.select(),e.document.$.selection.clear()):r.select(),e.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START),w.remove()):(e.setEndBefore(h),h.remove(),r.select())}else{h=this.getNative();if(!h)return;this.removeAllRanges();for(r=0;r<b.length;r++){if(r<b.length-1&&(q=b[r],w=b[r+1],l=q.clone(),l.setStart(q.endContainer,q.endOffset),l.setEnd(w.startContainer,w.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),e=l.getCommonAncestor(),
l=l.getEnclosedNode(),e.isReadOnly()||l&&l.isReadOnly()))){w.setStart(q.startContainer,q.startOffset);b.splice(r--,1);continue}e=b[r];w=this.document.$.createRange();e.collapsed&&CKEDITOR.env.webkit&&m(e)&&(l=g(this.root),e.insertNode(l),(q=l.getNext())&&!l.getPrevious()&&q.type==CKEDITOR.NODE_ELEMENT&&"br"==q.getName()?(n(this.root),e.moveToPosition(q,CKEDITOR.POSITION_BEFORE_START)):e.moveToPosition(l,CKEDITOR.POSITION_AFTER_END));w.setStart(e.startContainer.$,e.startOffset);try{w.setEnd(e.endContainer.$,
e.endOffset)}catch(v){if(0<=v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))e.collapse(1),w.setEnd(e.endContainer.$,e.endOffset);else throw v;}h.addRange(w)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,b){var e=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();v(e,b);var d=this._.cache,g=new CKEDITOR.dom.range(this.root);g.setStartBefore(a);g.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(g);d.selectedElement=d.startElement=
a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=y++;e._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return k(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&
(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],e,d=0;d<a.length;d++){var g=new CKEDITOR.dom.range(this.root);g.moveToBookmark(a[d]);b.push(g)}a.isFake&&(e=k(b)?b[0]._getTableElement():b[0].getEnclosedNode(),e&&e.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!k(b)?this.fake(e):this.selectRanges(b);return this},getCommonAncestor:function(){var a=
this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.getType()!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[t?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function c(a,b){for(var e,d;(a=a.getParent())&&
!a.equals(b);)if(a.getAttribute("data-nostyle"))e=a;else if(!d){var g=a.getAttribute("contentEditable");"false"==g?e=a:"true"==g&&(d=1)}return e}function k(a,b,e,d){return(a.getPosition(b)|d)==d&&(!e.childRule||e.childRule(a))}function h(b){var e=b.document;if(b.collapsed)e=y(this,e),b.insertNode(e),b.moveToPosition(e,CKEDITOR.POSITION_BEFORE_END);else{var d=this.element,g=this._.definition,f,m=g.ignoreReadonly,l=m||g.includeReadonly;null==l&&(l=b.root.getCustomData("cke_includeReadonly"));var n=
CKEDITOR.dtd[d];n||(f=!0,n=CKEDITOR.dtd.span);b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var p=b.createBookmark(),u=p.startNode,q=p.endNode,t=u,w;if(!m){var z=b.getCommonAncestor(),m=c(u,z),z=c(q,z);m&&(t=m.getNextSourceNode(!0));z&&(q=z)}for(t.getPosition(q)==CKEDITOR.POSITION_FOLLOWING&&(t=0);t;){m=!1;if(t.equals(q))t=null,m=!0;else{var v=t.type==CKEDITOR.NODE_ELEMENT?t.getName():null,z=v&&"false"==t.getAttribute("contentEditable"),x=v&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,
v),x=v&&(t.getAttribute("data-nostyle")||x);if(v&&t.data("cke-bookmark")||t.type===CKEDITOR.NODE_COMMENT){t=t.getNextSourceNode(!0);continue}if(z&&l&&CKEDITOR.dtd.$block[v])for(var B=t,A=a(B),C=void 0,D=A.length,J=0,B=D&&new CKEDITOR.dom.range(B.getDocument());J<D;++J){var C=A[J],ha=CKEDITOR.filter.instances[C.data("cke-filter")];if(ha?ha.check(this):1)B.selectNodeContents(C),h.call(this,B)}A=v?!n[v]||x?0:z&&!l?0:k(t,q,g,L):1;if(A)if(C=t.getParent(),A=g,D=d,J=f,!C||!(C.getDtd()||CKEDITOR.dtd.span)[D]&&
!J||A.parentRule&&!A.parentRule(C))m=!0;else{if(w||v&&CKEDITOR.dtd.$removeEmpty[v]&&(t.getPosition(q)|L)!=L||(w=b.clone(),w.setStartBefore(t)),v=t.type,v==CKEDITOR.NODE_TEXT||z||v==CKEDITOR.NODE_ELEMENT&&!t.getChildCount()){for(var v=t,R;(m=!v.getNext(K))&&(R=v.getParent(),n[R.getName()])&&k(R,u,g,H);)v=R;w.setEndAfter(v)}}else m=!0;t=t.getNextSourceNode(x||z)}if(m&&w&&!w.collapsed){for(var m=y(this,e),z=m.hasAttributes(),x=w.getCommonAncestor(),v={},A={},C={},D={},ca,Z,E;m&&x;){if(x.getName()==d){for(ca in g.attributes)!D[ca]&&
(E=x.getAttribute(Z))&&(m.getAttribute(ca)==E?A[ca]=1:D[ca]=1);for(Z in g.styles)!C[Z]&&(E=x.getStyle(Z))&&(m.getStyle(Z)==E?v[Z]=1:C[Z]=1)}x=x.getParent()}for(ca in A)m.removeAttribute(ca);for(Z in v)m.removeStyle(Z);z&&!m.hasAttributes()&&(m=null);m?(w.extractContents().appendTo(m),w.insertNode(m),r.call(this,m),m.mergeSiblings(),CKEDITOR.env.ie||m.$.normalize()):(m=new CKEDITOR.dom.element("span"),w.extractContents().appendTo(m),w.insertNode(m),r.call(this,m),m.remove(!0));w=null}}b.moveToBookmark(p);
b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function f(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),e=new CKEDITOR.dom.elementPath(l.getParent()),g=null,c=null,f=0;f<a.elements.length;f++){var h=a.elements[f];if(h==a.block||h==a.blockLimit)break;n.checkElementRemovable(h,!0)&&(g=h)}for(f=0;f<e.elements.length;f++){h=e.elements[f];if(h==e.block||h==e.blockLimit)break;n.checkElementRemovable(h,!0)&&(c=h)}c&&l.breakParent(c);g&&d.breakParent(g)}a.enlarge(CKEDITOR.ENLARGE_INLINE,
1);var e=a.createBookmark(),d=e.startNode,g=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var c=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,h=0,k;h<c.elements.length&&(k=c.elements[h])&&k!=c.block&&k!=c.blockLimit;h++)if(this.checkElementRemovable(k)){var m;!g&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(m=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(f=k,f.match=m?"start":"end"):(k.mergeSiblings(),k.is(this.element)?v.call(this,k):q(k,z(this)[k.getName()]))}if(f){g=
d;for(h=0;;h++){k=c.elements[h];if(k.equals(f))break;else if(k.match)continue;else k=k.clone();k.append(g);g=k}g["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var l=e.endNode,n=this;b();for(c=d;!c.equals(l);)f=c.getNextSourceNode(),c.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(c)&&(c.getName()==this.element?v.call(this,c):q(c,z(this)[c.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(b(),f=d.getNext())),c=f}a.moveToBookmark(e);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function a(a){var b=
[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&u(a,this)}function d(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,e=b.attributes;if(e)for(var d in e)a.removeAttribute(d,e[d]);if(b.styles)for(var g in b.styles)b.styles.hasOwnProperty(g)&&
a.removeStyle(g)}}function l(a){var b=a.createBookmark(!0),e=a.createIterator();e.enforceRealBlocks=!0;this._.enterMode&&(e.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,g=a.document,c;d=e.getNextParagraph();)!d.isReadOnly()&&(e.activeFilter?e.activeFilter.check(this):1)&&(c=y(this,g,d),m(d,c));a.moveToBookmark(b)}function e(a){var b=a.createBookmark(1),e=a.createIterator();e.enforceRealBlocks=!0;e.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,g;d=e.getNextParagraph();)this.checkElementRemovable(d)&&
(d.is("pre")?((g=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(g),m(d,g)):v.call(this,d));a.moveToBookmark(b)}function m(a,b){var e=!b;e&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),c=a.is("pre"),f=!d&&c;if(d&&!c){c=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=n(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+|&nbsp;)/g,
" ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(c);c.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";c.copyAttributes(h.getFirst());c=h.getFirst().remove()}else c.setHtml(f);b=c}else f?b=p(e?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(d){var e=b,k;(k=e.getPrevious(G))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=n(k.getHtml(),/\n$/,"")+"\n\n"+n(e.getHtml(),/^\n/,""),CKEDITOR.env.ie?e.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":
e.setHtml(d),k.remove())}else e&&t(b)}function g(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,e){return b+"\x3c/pre\x3e"+e+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,e){b.push(e)});return b}function n(a,b,e){var d="",g="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,e){b&&(d=b);e&&(g=e);return""});return d+a.replace(b,e)+g}function p(a,b){var e;
1<a.length&&(e=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var g=a[d],g=g.replace(/(\r\n|\r)/g,"\n"),g=n(g,/^[ \t]*\n/,""),g=n(g,/\n$/,""),g=n(g,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),g=g.replace(/\n/g,"\x3cbr\x3e"),g=g.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(e){var c=b.clone();c.setHtml(g);
e.append(c)}else b.setHtml(g)}return e||b}function v(a,b){var e=this._.definition,d=e.attributes,e=e.styles,g=z(this)[a.getName()],c=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(e),f;for(f in d)if("class"!=f&&!this._.definition.fullMatch||a.getAttribute(f)==x(f,d[f]))b&&"data-"==f.slice(0,5)||(c=a.hasAttribute(f),a.removeAttribute(f));for(var h in e)this._.definition.fullMatch&&a.getStyle(h)!=x(h,e[h],!0)||(c=c||!!a.getStyle(h),a.removeStyle(h));q(a,g,D[a.getName()]);c&&(this._.definition.alwaysRemoveElement?
t(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?t(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function r(a){for(var b=z(this),e=a.getElementsByTag(this.element),d,g=e.count();0<=--g;)d=e.getItem(g),d.isReadOnly()||v.call(this,d,!0);for(var c in b)if(c!=this.element)for(e=a.getElementsByTag(c),g=e.count()-1;0<=g;g--)d=e.getItem(g),d.isReadOnly()||q(d,b[c])}function q(a,b,e){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var g=b[d][0],
c;if(c=a.getAttribute(g)){var f=b[d][1];(null===f||f.test&&f.test(c)||"string"==typeof f&&c==f)&&a.removeAttribute(g)}}e||t(a)}function t(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var e=a.getPrevious(G),d=a.getNext(G);!e||e.type!=CKEDITOR.NODE_TEXT&&e.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else e=a.getFirst(),d=a.getLast(),a.remove(!0),e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings(),
d&&!e.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function y(a,b,e){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);e&&e.copyAttributes(d);d=u(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function u(a,b){var e=b._.definition,d=e.attributes,e=CKEDITOR.style.getStyleText(e);if(d)for(var g in d)a.setAttribute(g,d[g]);e&&a.setAttribute("style",e);a.getDocument().removeCustomData("doc_processing_style");
return a}function B(a,b){for(var e in a)a[e]=a[e].replace(I,function(a,e){return b[e]})}function z(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},e=a._.definition.overrides;if(e){CKEDITOR.tools.isArray(e)||(e=[e]);for(var d=0;d<e.length;d++){var g=e[d],c,f;"string"==typeof g?c=g.toLowerCase():(c=g.element?g.element.toLowerCase():a.element,f=g.attributes);g=b[c]||(b[c]={});if(f){var g=g.attributes=g.attributes||[],h;for(h in f)g.push([h.toLowerCase(),f[h]])}}}return b}function x(a,
b,e){var d=new CKEDITOR.dom.element("span");d[e?"setStyle":"setAttribute"](a,b);return d[e?"getStyle":"getAttribute"](a)}function w(a,b){function e(a,b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var d in a)if(!(d in b)||e(b[d],d)!=e(a[d],d)&&"inherit"!=a[d]&&"inherit"!=b[d])return!1;return!0}function A(a,b,e){var d=a.getRanges();b=b?this.removeFromRange:this.applyToRange;
for(var g,c=d.createIterator();g=c.getNextRange();)b.call(this,g,e);a.selectRanges(d)}var D={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},C={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},E=/\s*(?:;\s*|$)/,I=/#\((.+?)\)/g,K=CKEDITOR.dom.walker.bookmark(0,
1),G=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var e=a.attributes;e&&e.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(e.style)),delete e.style);b&&(a=CKEDITOR.tools.clone(a),B(a.attributes,b),B(a.styles,b));e=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(D[e]?CKEDITOR.STYLE_BLOCK:C[e]?CKEDITOR.STYLE_OBJECT:
CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return A.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);A.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return A.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),
a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);A.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?h:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?b:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?f:this.type==CKEDITOR.STYLE_BLOCK?e:this.type==CKEDITOR.STYLE_OBJECT?d:null;return this.removeFromRange(a)},applyToObject:function(a){u(a,
this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var e=a.elements,d=0,g;d<e.length;d++)if(g=e[d],this.type!=CKEDITOR.STYLE_INLINE||g!=a.block&&g!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var c=g.getName();if(!("string"==typeof this.element?c==this.element:c in this.element))continue}if(this.checkElementRemovable(g,!0,b))return!0}}return!1},checkApplicable:function(a,
b,e){b&&b instanceof CKEDITOR.filter&&(e=b);if(e&&!e.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,b){var e=this._.definition;if(!a||!e.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=e._AC)e=d;else{var d={},g=0,c=e.attributes;
if(c)for(var f in c)g++,d[f]=c[f];if(f=CKEDITOR.style.getStyleText(e))d.style||g++,d.style=f;d._length=g;e=e._AC=d}if(e._length){for(var h in e)if("_length"!=h)if(d=a.getAttribute(h)||"","style"==h?w(e[h],d):e[h]==d){if(!b)return!0}else if(b)return!1;if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,e){if(this.checkElementMatch(a,b,e))return!0;if(b=z(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(e=0;e<b.length;e++)if(d=b[e][0],d=a.getAttribute(d)){var g=b[e][1];
if(null===g)return!0;if("string"==typeof g){if(d==g)return!0}else if(g.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,e=[],d=b.element;"bdo"==d&&(d="span");var e=["\x3c",d],g=b.attributes;if(g)for(var c in g)e.push(" ",c,'\x3d"',g[c],'"');(g=CKEDITOR.style.getStyleText(b))&&e.push(' style\x3d"',g,'"');e.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return e.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;
var b=a.styles,e=a.attributes&&a.attributes.style||"",d="";e.length&&(e=e.replace(E,";"));for(var g in b){var c=b[g],f=(g+":"+c).replace(E,";");"inherit"==c?d+=f:e+=f}e.length&&(e=CKEDITOR.tools.normalizeCssText(e,!0));return a._ST=e+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.unstylableElements=[];CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),
{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,H=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(c,k){this.requiredContent=this.allowedContent=this.style=c;CKEDITOR.tools.extend(this,k,!0)},CKEDITOR.styleCommand.prototype.exec=function(c){c.focus();this.state==CKEDITOR.TRISTATE_OFF?c.applyStyle(this.style):
this.state==CKEDITOR.TRISTATE_ON&&c.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(c,k,h){CKEDITOR.stylesSet.addExternal(c,k,"");CKEDITOR.stylesSet.load(c,h)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(c,k){var h=this._.styleStateChangeCallbacks;h||(h=this._.styleStateChangeCallbacks=[],this.on("selectionChange",
function(c){for(var a=0;a<h.length;a++){var b=h[a],d=b.style.checkActive(c.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;b.fn.call(this,d)}}));h.push({style:c,fn:k})},applyStyle:function(c){c.apply(this)},removeStyle:function(c){c.remove(this)},getStylesSet:function(c){if(this._.stylesDefinitions)c(this._.stylesDefinitions);else{var k=this,h=k.config.stylesCombo_stylesSet||k.config.stylesSet;if(!1===h)c(null);else if(h instanceof Array)k._.stylesDefinitions=h,c(h);else{h||(h="default");
var h=h.split(":"),f=h[0];CKEDITOR.stylesSet.addExternal(f,h[1]?h.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(f,function(a){k._.stylesDefinitions=a[f];c(k._.stylesDefinitions)})}}}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var c=CKEDITOR.getUrl("vendor/promise.js");if("function"===typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([c],function(c){CKEDITOR.tools.promise=c});CKEDITOR.scriptLoader.load(c,
function(k){if(!k)return CKEDITOR.error("no-vendor-lib",{path:c});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}}(),function(){function c(c,a,b){c.once("selectionCheck",function(d){if(!k){var c=d.data.getRanges()[0];b.equals(c)?d.cancel():a.equals(c)&&(h=!0)}},null,null,-1)}var k=!0,h=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(c){c.on("selectionCheck",function(a){a.data&&!h&&a.data.optimizeInElementEnds();h=!1});c.on("contentDom",function(){var a=
c.editable();a&&(a.attachListener(a,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),a.attachListener(a,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var f=this.getRanges()[0],a=this.root.editor,b;if(this.root.editor._.shiftPressed||this.isFake||f.isCollapsed||f.startContainer.equals(f.endContainer)||(f.endContainer.is?f.endContainer.is("li"):f.endContainer.getParent().is&&f.endContainer.getParent().is("li")))b=
!1;else if(0===f.endOffset)b=!0;else{b=f.startContainer.type===CKEDITOR.NODE_TEXT;var d=f.endContainer.type===CKEDITOR.NODE_TEXT,h=b?f.startContainer.getLength():f.startContainer.getChildCount();b=f.startOffset===h||b^d}b&&(b=f.clone(),f.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),k=!1,c(a,f,b),f.select(),k=!0)}}(),function(){function c(a,d){if(h(a))a=Math.round(d*(parseFloat(a)/100));else if("string"===typeof a&&a.match(/^\d+$/gm)||"string"===typeof a&&a.match(/^\d+(?:deg)?$/gm))a=
parseInt(a,10);return a}function k(a,d){h(a)?a=d*(parseFloat(a)/100):"string"===typeof a&&a.match(/^\d?\.\d+/gm)&&(a=parseFloat(a));return a}function h(a){return"string"===typeof a&&a.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function f(a,d,c){return!isNaN(a)&&a>=d&&a<=c}function a(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,d){this._.initialColorCode=a;this._.defaultValue=d;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;
var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",
a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]));return this._.formatHslString("hsl",
a[0],a[1],a[2])},getHsla:function(){var a;if(!this._.isValidColor)return this._.defaultValue;a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]:this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,d,
c,e){return CKEDITOR.tools.array.map([a,d,c],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-e*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(b,d,c,e){b="#"+a(b)+a(d)+a(c);void 0!==e&&(b+=a(e));return b.toUpperCase()},formatRgbString:function(a,d,c,e,f){d=[d,c,e];void 0!==f&&d.push(f);return a+"("+d.join(",")+")"},formatHslString:function(a,d,c,e,f){return a+"("+d+","+c+"%,"+e+"%"+(void 0!==f?","+f:"")+")"},parseInput:function(a){if("string"!==
typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var d=this._.matchStringToNamedColor(a);d&&(a=d);var d=this._.extractColorChannelsFromHex(a),c=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=d||c||a)?(this._.type=a.type,this._.red=a.red,this._.green=a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||
null},extractColorChannelsFromHex:function(a){-1===a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var d=1;a[7]&&a[8]&&(d=parseInt(a[7]+a[8],16),d/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,d=Number(d.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB,
red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4],16),blue:parseInt(a[5]+a[6],16),alpha:d}},extractColorChannelsFromRgba:function(a){var d=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!d||3>d.length||4<d.length)return null;var f=4===d.length;a=c(d[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);var e=c(d[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),h=c(d[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),g=1;f&&(g=k(d[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));d=
{type:CKEDITOR.tools.color.TYPE_RGB,red:a,green:e,blue:h,alpha:g};return this._.areColorChannelsValid(a,e,h,g)?d:null},extractColorChannelsFromHsla:function(a){var d=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.hslRegExp);if(!d||3>d.length||4<d.length)return null;var f=4===d.length,e=c(d[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),h=k(d[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),g=k(d[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),n=1;a=this._.hslToRgb(e,
h,g);f&&(n=k(d[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));a.push(n);d={type:CKEDITOR.tools.color.TYPE_HSL,red:a[0],green:a[1],blue:a[2],alpha:a[3],hue:e,saturation:Math.round(100*h),lightness:Math.round(100*g)};return this._.areColorChannelsValid(a[0],a[1],a[2],a[3])?d:null},hex3ToHex6:function(a){a=a.split("");return"#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]},hex4ToHex8:function(a){return this._.hex3ToHex6(a.substr(0,4))+CKEDITOR.tools.repeat(a[4],2)},extractColorChannelsByPattern:function(a,d){var c=
a.match(d);if(!c)return null;var e=-1===c[1].indexOf(",")?/\s/:",",e=c[1].split(e),e=CKEDITOR.tools.array.reduce(e,function(a,b){var e=CKEDITOR.tools.trim(b);return 0===e.length?a:a.concat([e])},[]);c[2]&&(c=CKEDITOR.tools.trim(c[2].replace(/[\/,]/,"")),e.push(c));return e},areColorChannelsValid:function(a,d,c,e){return f(a,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&f(d,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&f(c,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&f(e,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},
hslToRgb:function(a,d,c){var e=function(e){var g=(e+a/30)%12;e=d*Math.min(c,1-c);g=Math.min(g-3,9-g,1);g=Math.max(-1,g);return Math.round((c-e*g)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[e(0),e(8),e(4)]},rgbToHsl:function(a,d,c){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;d/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var e=c/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,f=Math.max(a,d,e),g=Math.min(a,d,e);c=f-g;var h=0;switch(f){case a:h=(d-e)/c%6;break;case d:h=(e-a)/c+2;break;case e:h=
(a-d)/c+4}a=0===c?0:60*h;d=(f+g)/2;f=0;1!==d&&0!==d&&(f=c/(1-Math.abs(2*d-1)));a=Math.round(a);f=Math.round(100*f);d=Math.round(100*d);return[a,f,d]}},statics:{TYPE_RGB:1,TYPE_HSL:2,MAX_RGB_CHANNEL_VALUE:255,MAX_ALPHA_CHANNEL_VALUE:1,MAX_HUE_CHANNEL_VALUE:360,MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE:1,hex3CharsRegExp:/#([0-9a-f]{3}$)/gim,hex4CharsRegExp:/#([0-9a-f]{4}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/rgba?\(([.,\d\s%]*)(\s*\/\s*[\d.%]+)?\s*\)/i,
hslRegExp:/hsla?\((\s*(?:[.\d]+(?:deg)?)(?:\s*,?\s*[.\d]+%){2})((?:(?:\s*\/\s*)|(?:\s*,\s*))[\d.]+%?)?\s*\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",
cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",
firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",
lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",
mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",
red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",
yellowgreen:"#9ACD32"}}});CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors}(),CKEDITOR.dom.comment=function(c,k){"string"==typeof c&&(c=(k?k.$:document).createComment(c));CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),"use strict",function(){var c={},k={},h;for(h in CKEDITOR.dtd.$blockLimit)h in
CKEDITOR.dtd.$list||(c[h]=1);for(h in CKEDITOR.dtd.$block)h in CKEDITOR.dtd.$blockLimit||h in CKEDITOR.dtd.$empty||(k[h]=1);CKEDITOR.dom.elementPath=function(f,a){var b=null,d=null,h=[],e=f,m;a=a||f.getDocument().getBody();e||(e=a);do if(e.type==CKEDITOR.NODE_ELEMENT){h.push(e);if(!this.lastElement&&(this.lastElement=e,e.is(CKEDITOR.dtd.$object)||"false"==e.getAttribute("contenteditable")))continue;if(e.equals(a))break;if(!d&&(m=e.getName(),"true"==e.getAttribute("contenteditable")?d=e:!b&&k[m]&&
(b=e),c[m])){if(m=!b&&"div"==m){a:{m=e.getChildren();for(var g=0,n=m.count();g<n;g++){var p=m.getItem(g);if(p.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[p.getName()]){m=!0;break a}}m=!1}m=!m}m?b=e:d=e}}while(e=e.getParent());d||(d=a);this.block=b;this.blockLimit=d;this.root=a;this.elements=h}}(),CKEDITOR.dom.elementPath.prototype={compare:function(c){var k=this.elements;c=c&&c.elements;if(!c||k.length!=c.length)return!1;for(var h=0;h<k.length;h++)if(!k[h].equals(c[h]))return!1;return!0},contains:function(c,
k,h){var f=0,a;"string"==typeof c&&(a=function(a){return a.getName()==c});c instanceof CKEDITOR.dom.element?a=function(a){return a.equals(c)}:CKEDITOR.tools.isArray(c)?a=function(a){return-1<CKEDITOR.tools.indexOf(c,a.getName())}:"function"==typeof c?a=c:"object"==typeof c&&(a=function(a){return a.getName()in c});var b=this.elements,d=b.length;k&&(h?f+=1:--d);h&&(b=Array.prototype.slice.call(b,0),b.reverse());for(;f<d;f++)if(a(b[f]))return b[f];return null},isContextFor:function(c){var k;return c in
CKEDITOR.dtd.$block?(k=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!k.getDtd()[c]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(c,k){"string"==typeof c&&(c=(k?k.$:document).createTextNode(c));this.$=c},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},
getText:function(){return this.$.nodeValue},setText:function(c){this.$.nodeValue=c},isEmpty:function(c){var k=this.getText();c&&(k=CKEDITOR.tools.trim(k));return!k||k===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(c){var k=this.$.parentNode,h=k.childNodes.length,f=this.getLength(),a=this.getDocument(),b=new CKEDITOR.dom.text(this.$.splitText(c),a);k.childNodes.length==h&&(c>=f?(b=a.createText(""),b.insertAfter(this)):(c=a.createText(""),c.insertAfter(b),c.remove()));return b},substring:function(c,
k){return"number"!=typeof k?this.$.nodeValue.substr(c):this.$.nodeValue.substring(c,k)}}),function(){function c(c,f,a){var b=c.serializable,d=f[a?"endContainer":"startContainer"],k=a?"endOffset":"startOffset",e=b?f.document.getById(c.startNode):c.startNode;c=b?f.document.getById(c.endNode):c.endNode;d.equals(e.getPrevious())?(f.startOffset=f.startOffset-d.getLength()-c.getPrevious().getLength(),d=c.getNext()):d.equals(c.getPrevious())&&(f.startOffset-=d.getLength(),d=c.getNext());d.equals(e.getParent())&&
f[k]++;d.equals(c.getParent())&&f[k]++;f[a?"endContainer":"startContainer"]=d;return f}CKEDITOR.dom.rangeList=function(c){if(c instanceof CKEDITOR.dom.rangeList)return c;c?c instanceof CKEDITOR.dom.range&&(c=[c]):c=[];return CKEDITOR.tools.extend(c,k)};var k={createIterator:function(){var c=this,f=CKEDITOR.dom.walker.bookmark(),a=[],b;return{getNextRange:function(d){b=void 0===b?0:b+1;var k=c[b];if(k&&1<c.length){if(!b)for(var e=c.length-1;0<=e;e--)a.unshift(c[e].createBookmark(!0));if(d)for(var m=
0;c[b+m+1];){var g=k.document;d=0;e=g.getById(a[m].endNode);for(g=g.getById(a[m+1].startNode);;){e=e.getNextSourceNode(!1);if(g.equals(e))d=1;else if(f(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())continue;break}if(!d)break;m++}for(k.moveToBookmark(a.shift());m--;)e=c[++b],e.moveToBookmark(a.shift()),k.setEnd(e.endContainer,e.endOffset)}return k}}},createBookmarks:function(h){for(var f=[],a,b=0;b<this.length;b++){f.push(a=this[b].createBookmark(h,!0));for(var d=b+1;d<this.length;d++)this[d]=
c(a,this[d]),this[d]=c(a,this[d],!0)}return f},createBookmarks2:function(c){for(var f=[],a=0;a<this.length;a++)f.push(this[a].createBookmark2(c));return f},moveToBookmarks:function(c){for(var f=0;f<this.length;f++)this[f].moveToBookmark(c[f])}}}(),function(){function c(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function k(a){var b=CKEDITOR.skin["ua_"+a],e=CKEDITOR.env;if(b)for(var b=b.split(",").sort(function(a,b){return a>b?-1:1}),d=0,
f;d<b.length;d++)if(f=b[d],e.ie&&(f.replace(/^ie/,"")==e.version||e.quirks&&"iequirks"==f)&&(f="ie"),e[f]){a+="_"+b[d];break}return CKEDITOR.getUrl(c()+a+".css")}function h(a,e){b[a]||(CKEDITOR.document.appendStyleSheet(k(a)),b[a]=1);e&&e()}function f(a){var b=a.getById(d);b||(b=a.getHead().append("style"),b.setAttribute("id",d),b.setAttribute("type","text/css"));return b}function a(a,b,e){var d,c,f;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),c=0;c<b.length;c++)b[c]=b[c].split("{");for(var h=
0;h<a.length;h++)if(CKEDITOR.env.webkit)for(c=0;c<b.length;c++){f=b[c][1];for(d=0;d<e.length;d++)f=f.replace(e[d][0],e[d][1]);a[h].$.sheet.addRule(b[c][0],f)}else{f=b;for(d=0;d<e.length;d++)f=f.replace(e[d][0],e[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[h].$.styleSheet.cssText+=f:a[h].$.innerHTML+=f}}var b={};CKEDITOR.skin={path:c,loadPart:function(a,b){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c()+"skin.js"),function(){h(a,b)}):h(a,b)},
getPath:function(a){return CKEDITOR.getUrl(k(a))},icons:{},addIcon:function(a,b,e,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:e||0,bgsize:d||"16px"})},getIconStyle:function(a,b,e,d,c){var f;a&&(a=a.toLowerCase(),b&&(f=this.icons[a+"-rtl"]),f||(f=this.icons[a]));a=e||f&&f.path||"";d=d||f&&f.offset;c=c||f&&f.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+c+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{getUiColor:function(){return this.uiColor},setUiColor:function(b){var d=f(CKEDITOR.document);return(this.setUiColor=function(b){this.uiColor=b;var c=CKEDITOR.skin.chameleon,f="",h="";"function"==typeof c&&(f=c(this,"editor"),h=c(this,"panel"));b=[[e,b]];a([d],f,b);a(l,h,b)}).call(this,b)}});var d="cke_ui_color",l=[],e=/\$color/g;CKEDITOR.on("instanceLoaded",function(b){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var d=b.editor;b=function(b){b=(b.data[0]||b.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
if(!b.getById("cke_ui_color")){var c=f(b);l.push(c);d.on("destroy",function(){l=CKEDITOR.tools.array.filter(l,function(a){return c!==a})});(b=d.getUiColor())&&a([c],CKEDITOR.skin.chameleon(d,"panel"),[[e,b]])}};d.on("panelShow",b);d.on("menuShow",b);d.config.uiColor&&d.setUiColor(d.config.uiColor)}})}(),function(){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);
c.appendTo(CKEDITOR.document.getHead());try{var k=c.getComputedStyle("border-top-color"),h=c.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!k||k!=h)}catch(f){CKEDITOR.env.hc=!1}c.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(c=CKEDITOR._.pending)for(delete CKEDITOR._.pending,k=0;k<c.length;k++)CKEDITOR.editor.prototype.constructor.apply(c[k][0],c[k][1]),CKEDITOR.add(c[k][0])}(),
CKEDITOR.skin.name="moono-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var c=function(){return function(c,f){for(var a=c.match(/[^#]./g),b=0;3>b;b++){var d=b,k;k=parseInt(a[b],16);k=("0"+(0>f?0|k*(1+f):0|k+(255-k)*f).toString(16)).slice(-2);a[d]=k}return"#"+a.join("")}}(),k={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(h,f){var a=c(h.uiColor,.4),a={id:"."+h.id,defaultBorder:c(a,-.2),toolbarElementsBorder:c(a,-.25),defaultBackground:a,lightBackground:c(a,.8),darkBackground:c(a,-.15),ckeButtonOn:c(a,.4),ckeResizer:c(a,-.4),ckeColorauto:c(a,.8),dialogBody:c(a,.7),dialogTab:c(a,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:c(a,-.6),menubuttonHover:c(a,.1),menubuttonIcon:c(a,.5),menubuttonIconHover:c(a,.3)};return k[f].output(a).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var c=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],d=1;d<arguments.length;d++)b.push(arguments[d]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},k={build:function(a,b,d){return new CKEDITOR.ui.dialog.textInput(a,b,d)}},h={build:function(a,b,d){return new CKEDITOR.ui.dialog[b.type](a,b,d)}},f={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},a=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},!0),b=/^on([A-Z]\w+)/,d=function(a){for(var d in a)(b.test(d)||"title"==d||"type"==d)&&delete a[d];return a},l=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(a,b,d,f){if(!(4>arguments.length)){var h=c.call(this,b);h.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var k={role:b.role||"presentation"};b.includeLabel&&(k["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,b,d,"div",null,k,function(){var d=[],g=b.required?" cke_required":"";"horizontal"!=b.labelLayout?d.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e",b.required?b.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e':
b.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',b.controlStyle?' style\x3d"'+b.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,a,b),"\x3c/div\x3e"):(g={type:"hbox",widths:b.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(b.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+
(b.controlStyle?' style\x3d"'+b.controlStyle+'"':"")+"\x3e"+f.call(this,a,b)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,g,d));return d.join("")})}},textInput:function(a,b,d){if(!(3>arguments.length)){c.call(this,b);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+b.type,id:f,type:b.type};b.validate&&(this.validate=b.validate);b.maxLength&&(h.maxlength=b.maxLength);b.size&&(h.size=b.size);b.inputStyle&&(h.style=b.inputStyle);var k=
this,r=!1;a.on("load",function(){k.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(r=!0)});k.getInputElement().on("keyup",function(b){13==b.data.getKeystroke()&&r&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),r=!1);k.bidi&&l.call(k,b)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,b,d,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',b.type,'" role\x3d"presentation"'];b.width&&a.push('style\x3d"width:'+b.width+'" ');a.push("\x3e\x3cinput ");
h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);for(var e in h)a.push(e+'\x3d"'+h[e]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,b,d){if(!(3>arguments.length)){c.call(this,b);var f=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};b.validate&&(this.validate=b.validate);k.rows=b.rows||5;k.cols=b.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(b["class"]||"");"undefined"!=typeof b.inputStyle&&(k.style=b.inputStyle);
b.dir&&(k.dir=b.dir);if(f.bidi)a.on("load",function(){f.getInputElement().on("keyup",l)},f);CKEDITOR.ui.dialog.labeledElement.call(this,a,b,d,function(){k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],b;for(b in k)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(k[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");
return a.join("")})}},checkbox:function(a,b,g){if(!(3>arguments.length)){var f=c.call(this,b,{"default":!!b["default"]});b.validate&&(this.validate=b.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,b,g,"span",null,null,function(){var g=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],h=CKEDITOR.tools.getNextId()+"_label",k={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};d(g);b["default"]&&(k.checked="checked");"undefined"!=
typeof g.inputStyle&&(g.style=g.inputStyle);f.checkbox=new CKEDITOR.ui.dialog.uiElement(a,g,c,"input",null,k);c.push(' \x3clabel id\x3d"',h,'" for\x3d"',k.id,'"'+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(b.label),"\x3c/label\x3e");return c.join("")})}},radio:function(a,b,g){if(!(3>arguments.length)){c.call(this,b);this._["default"]||(this._["default"]=this._.initValue=b.items[0][1]);b.validate&&(this.validate=b.validate);var f=[],h=this;b.role="radiogroup";
b.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,a,b,g,function(){for(var g=[],c=[],k=(b.id?b.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<b.items.length;l++){var y=b.items[l],u=void 0!==y[2]?y[2]:y[0],B=void 0!==y[1]?y[1]:y[0],z=CKEDITOR.tools.getNextId()+"_radio_input",x=z+"_label",z=CKEDITOR.tools.extend({},b,{id:z,title:null,type:null},!0),u=CKEDITOR.tools.extend({},z,{title:u},!0),w={type:"radio","class":"cke_dialog_ui_radio_input",name:k,value:B,"aria-labelledby":x},A=[];h._["default"]==
B&&(w.checked="checked");d(z);d(u);"undefined"!=typeof z.inputStyle&&(z.style=z.inputStyle);B=new CKEDITOR.ui.dialog.uiElement(a,z,A,"input",null,w);B.on("focus",function(){h.click()});f.push(B);A.push(" ");new CKEDITOR.ui.dialog.uiElement(a,u,A,"label",null,{id:x,"for":w.id},y[0]);g.push(A.join(""))}new CKEDITOR.ui.dialog.hbox(a,f,g,c);return c.join("")});this._.children=f}},button:function(a,b,d){if(arguments.length){"function"==typeof b&&(b=b(a.getParentEditor()));c.call(this,b,{disabled:b.disabled||
!1});CKEDITOR.event.implementOn(this);var f=this;a.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var h=CKEDITOR.tools.extend({},b);delete h.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,h,d,"a",null,{style:b.style,href:"javascript:void(0)",title:b.label,hidefocus:"true",
"class":b["class"],role:"button","aria-labelledby":k},'\x3cspan id\x3d"'+k+'" class\x3d"cke_dialog_ui_button"\x3e'+CKEDITOR.tools.htmlEncode(b.label)+"\x3c/span\x3e")}},select:function(a,b,g){if(!(3>arguments.length)){var f=c.call(this,b);b.validate&&(this.validate=b.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,b,g,function(){var g=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],h=[],k={id:f.inputId,
"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_',b.type,'" role\x3d"presentation"');b.width&&c.push('style\x3d"width:'+b.width+'" ');c.push("\x3e");void 0!==b.size&&(k.size=b.size);void 0!==b.multiple&&(k.multiple=b.multiple);d(g);for(var l=0,y;l<b.items.length&&(y=b.items[l]);l++)h.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==y[1]?y[1]:y[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(y[0]));
"undefined"!=typeof g.inputStyle&&(g.style=g.inputStyle);f.select=new CKEDITOR.ui.dialog.uiElement(a,g,c,"select",null,k,h.join(""));c.push("\x3c/div\x3e");return c.join("")})}},file:function(a,b,d){if(!(3>arguments.length)){void 0===b["default"]&&(b["default"]="");var f=CKEDITOR.tools.extend(c.call(this,b),{definition:b,buttons:[]});b.validate&&(this.validate=b.validate);a.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,
a,b,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',f.frameId,'" title\x3d"',b.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(a,b,d){var f=this;if(!(3>arguments.length)){c.call(this,
b);b.validate&&(this.validate=b.validate);var h=CKEDITOR.tools.extend({},b),k=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(d){var g=b["for"];d=k?k.call(this,d):!1;!1!==d&&("xhr"!==d&&a.getContentElement(g[0],g[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(b["for"][0],b["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,a,h,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
d=/\/$/;return function(c,f,h){if(!(3>arguments.length)){var k=[],l=f.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var t=f.focus;if(t){var y=this.focus;this.focus=function(){("function"==typeof t?t:y).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,c,f,k,"span",null,null,"");k=k.join("").match(a);l=l.match(b)||["","",""];d.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);h.push([l[1],
" ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,d,c,f){var h=f.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,c,"fieldset",null,null,function(){var a=[];h&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var b=0;b<d.length;b++)a.push(d[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:a},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},
enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},
accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},
setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):
this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,d){var c=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),
f=this.getInputElement().$;c.$.text=a;c.$.value=void 0===b||null===b?a:b;void 0===d||null===d?CKEDITOR.env.ie?f.add(c.$):f.add(c.$,null):f.add(c.$,d);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},
setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return a.onChange.apply(this,arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},
this)},this);this.on("change",d);return null}},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{focus:function(){var a=this._.children,b=a[0],d=this._.dialog._,c=d.currentFocusIndex,f=c===d.focusList.length-1&&0===this.focusIndex;c>this.focusIndex&&!f&&(b=a[a.length-1]);d.currentFocusIndex=this.focusIndex;for(d=0;d<a.length;d++)if(c=a[d],c.getInputElement().$.checked){b=c;break}b.focus()},setValue:function(a,b){for(var d=this._.children,
c,f=0;f<d.length&&(c=d[f]);f++)c.getElement().$.checked=c.getValue()==a;!b&&this.fire("change",{value:a});return this},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},click:function(){this._.dialog._.currentFocusIndex=this.focusIndex},eventProcessors:{onChange:function(b,
d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return a.onChange.apply(this,arguments);b.on("load",function(){for(var a=this._.children,b=this,e=0;e<a.length;e++)a[e].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",d);return null}},keyboardFocusable:!0},f,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,f,{getInputElement:function(){var a=
CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,d,c=function(a,b,e,d){a.on("formLoaded",function(){a.getInputElement().on(e,d,a)})},f;for(f in a)if(d=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,
this._.dialog,a[f]):c(this,this._.dialog,d[1].toLowerCase(),a[f]);return this},reset:function(){function a(){d.$.open();var e="";c.size&&(e=c.size-(CKEDITOR.env.ie?7:0));var u=b.frameId+"_input";d.$.write(['\x3chtml dir\x3d"'+l+'" lang\x3d"'+t+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+l+'" lang\x3d"'+t+'" action\x3d"',CKEDITOR.tools.htmlEncode(c.action),
'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',u,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(c.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',u,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(c.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<e?e:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+h+");",
"window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join(""));d.$.close();for(e=0;e<f.length;e++)f[e].enable()}var b=this._,d=CKEDITOR.document.getById(b.frameId).getFrameDocument(),c=b.definition,f=b.buttons,h=this.formLoadedNumber,k=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,t=b.dialog._.editor.langCode;h||(h=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),k=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},
this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(h);CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=
!0);this.on("change",b)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",k);CKEDITOR.dialog.addUIElement("password",k);CKEDITOR.dialog.addUIElement("tel",k);CKEDITOR.dialog.addUIElement("textarea",h);CKEDITOR.dialog.addUIElement("checkbox",h);CKEDITOR.dialog.addUIElement("radio",h);CKEDITOR.dialog.addUIElement("button",h);
CKEDITOR.dialog.addUIElement("select",h);CKEDITOR.dialog.addUIElement("file",h);CKEDITOR.dialog.addUIElement("fileButton",h);CKEDITOR.dialog.addUIElement("html",h);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,d){for(var c=b.children,f,h=[],k=[],l=0;l<c.length&&(f=c[l]);l++){var t=[];h.push(t);k.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,t))}return new CKEDITOR.ui.dialog[b.type](a,k,h,d,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=
2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function c(a){a._.tabBarMode=!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function k(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,e=b-1;e>b-a;e--)if(this._.tabs[this._.tabIdList[e%a]][0].$.offsetHeight)return this._.tabIdList[e%a];return null}function h(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,
this._.currentTabId),e=b+1;e<b+a;e++)if(this._.tabs[this._.tabIdList[e%a]][0].$.offsetHeight)return this._.tabIdList[e%a];return null}function f(a,b){for(var e=a.$.getElementsByTagName("input"),d=0,g=e.length;d<g;d++){var c=new CKEDITOR.dom.element(e[d]);"text"==c.getAttribute("type").toLowerCase()&&(b?(c.setAttribute("value",c.getCustomData("fake_value")||""),c.removeCustomData("fake_value")):(c.setCustomData("fake_value",c.getAttribute("value")),c.setAttribute("value","")))}}function a(a,b){var e=
this.getInputElement();e&&(a?e.removeAttribute("aria-invalid"):e.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function b(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function d(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",K).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,
"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),e=b.getChild([0,0,0,0,0]),d=e.getChild(0),g=e.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(e);!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+
a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(e.getParent()));d.unselectable();g.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:g,tabs:e.getChild(2),contents:e.getChild([3,0,0,0]),footer:e.getChild([3,0,1,0])}}}function l(a,b,e){this.element=b;this.focusIndex=e;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in
{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function e(a){function b(){a.layout()}var e=CKEDITOR.document.getWindow();e.on("resize",b);a.on("hide",function(){e.removeListener("resize",b)})}function m(a,b){this.dialog=a;for(var e=b.contents,d=0,c;c=e[d];d++)e[d]=c&&new g(a,c);CKEDITOR.tools.extend(this,b)}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function n(a){function b(e){var k=a.getSize(),
m=a.parts.dialog.getParent().getClientSize(),l=e.data.$.screenX,n=e.data.$.screenY,p=l-d.x,u=n-d.y;d={x:l,y:n};g.x+=p;g.y+=u;l=g.x+h[3]<f?-h[3]:g.x-h[1]>m.width-k.width-f?m.width-k.width+("rtl"==c.lang.dir?0:h[1]):g.x;k=g.y+h[0]<f?-h[0]:g.y-h[2]>m.height-k.height-f?m.height-k.height+h[2]:g.y;l=Math.floor(l);k=Math.floor(k);a.move(l,k,1);e.data.preventDefault()}function e(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",e);if(CKEDITOR.env.ie6Compat){var a=
C.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",e)}}var d=null,g=null,c=a.getParentEditor(),f=c.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(c){if(!a._.moved){var f=a._.element;f.getFirst().setStyle("position","absolute");f.removeStyle("display");a._.moved=!0;a.layout()}d={x:c.data.$.screenX,y:c.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",
e);g=a.getPosition();CKEDITOR.env.ie6Compat&&(f=C.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",e));c.data.preventDefault()},a)}function p(a){function b(e){var n="rtl"==c.lang.dir,p=l.width,u=l.height,t=p+(e.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),J=u+(e.data.$.screenY-m.y)*(a._.moved?1:2),q=a._.element.getFirst(),q=n&&parseInt(q.getComputedStyle("right"),10),w=a.getPosition();w.x=w.x||0;w.y=w.y||0;w.y+J>k.height&&(J=k.height-w.y);(n?q:w.x)+t>k.width&&(t=k.width-(n?q:w.x));
J=Math.floor(J);t=Math.floor(t);if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(d.minWidth||0,t-f);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)u=Math.max(d.minHeight||0,J-h);a.resize(p,u);a._.moved&&v(a,a._.position.x,a._.position.y);a._.moved||a.layout();e.data.preventDefault()}function e(){CKEDITOR.document.removeListener("mouseup",e);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=C.getChild(0).getFrameDocument();
a.removeListener("mouseup",e);a.removeListener("mousemove",b)}}var d=a.definition,g=d.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var c=a.getParentEditor(),f,h,k,m,l,n,p=CKEDITOR.tools.addFunction(function(d){function g(a){return a.isVisible()}l=a.getSize();var c=a.parts.contents,p=c.$.getElementsByTagName("iframe").length,u=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);p&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),
c.append(n));h=l.height-a.parts.contents.getFirst(g).getSize("height",u);f=l.width-a.parts.contents.getFirst(g).getSize("width",1);m={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",e);CKEDITOR.env.ie6Compat&&(c=C.getChild(0).getFrameDocument(),c.on("mousemove",b),c.on("mouseup",e));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";g==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":
g==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+c.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(c.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event )"\x3e'+("ltr"==c.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});c.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function v(a,b,e){var d=a.parts.dialog.getParent().getClientSize(),g=a.getSize(),
c=a._.viewportRatio,f=Math.max(d.width-g.width,0),d=Math.max(d.height-g.height,0);c.width=f?b/f:c.width;c.height=d?e/d:c.height;a._.viewportRatio=c}function r(a){a.data.preventDefault(1)}function q(a){var b=a.config,e=CKEDITOR.skinName||a.config.skin,d=b.dialog_backgroundCoverColor||("moono-lisa"==e?"black":"white"),e=b.dialog_backgroundCoverOpacity,g=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(d,e,g),c=F[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");c?c.show():(g=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',
CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",g,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",g.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),g.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),g.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),g.push("\x3c/div\x3e"),c=CKEDITOR.dom.element.createFromHtml(g.join("")),c.setOpacity(void 0!==e?e:.5),c.on("keydown",r),c.on("keypress",r),c.on("keyup",r),c.appendTo(CKEDITOR.document.getBody()),F[b]=c);a.focusManager.add(c);C=c;CKEDITOR.env.mac&&CKEDITOR.env.webkit||
c.focus()}function t(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");C&&(a.focusManager.remove(C),C.hide())}function y(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,e=a.data.$.altKey,d=a.data.$.shiftKey,g=String.fromCharCode(a.data.$.keyCode);(b=P[(b?"CTRL+":"")+(e?"ALT+":"")+(d?"SHIFT+":"")+g])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function u(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,e=a.data.$.altKey,d=a.data.$.shiftKey,
g=String.fromCharCode(a.data.$.keyCode);(b=P[(b?"CTRL+":"")+(e?"ALT+":"")+(d?"SHIFT+":"")+g])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function B(a,b,e,d,g){(P[e]||(P[e]=[])).push({uiElement:a,dialog:b,key:e,keyup:g||a.accessKeyUp,keydown:d||a.accessKeyDown})}function z(a){for(var b in P){for(var e=P[b],d=e.length-1;0<=d;d--)e[d].dialog!=a&&e[d].uiElement!=a||e.splice(d,1);0===e.length&&delete P[b]}}function x(a,b){a._.accessKeyMap[b]&&
a.selectPage(a._.accessKeyMap[b])}function w(){}var A=CKEDITOR.tools.cssLength,D,C,E=!1,I=!CKEDITOR.env.ie||CKEDITOR.env.edge,K='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(I?"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(I?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e';
CKEDITOR.dialog=function(e,g){function f(){var a=A._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,e=0;e<b;e++)a[e].focusIndex=e}function l(a){var b=A._.focusList;a=a||0;if(!(1>b.length)){var e=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(e=0);try{b[e].getInputElement().$.blur()}catch(d){}var g=e,c=1<A._.pageCount;do{g+=a;if(c&&!A._.tabBarMode&&(g==b.length||-1==g)){A._.tabBarMode=!0;A._.tabs[A._.currentTabId][0].focus();
A._.currentFocusIndex=-1;return}g=(g+b.length)%b.length;if(g==e)break}while(a&&!b[g].isFocusable());b[g].focus();"text"==b[g].type&&b[g].select()}}function u(a){if(A==CKEDITOR.dialog._.currentTop){var b=a.data.getKeystroke(),d="rtl"==e.lang.dir,g=[37,38,39,40];x=v=0;if(9==b||b==CKEDITOR.SHIFT+9)l(b==CKEDITOR.SHIFT+9?-1:1),x=1;else if(b==CKEDITOR.ALT+121&&!A._.tabBarMode&&1<A.getPageCount())c(A),x=1;else if(-1!=CKEDITOR.tools.indexOf(g,b)&&A._.tabBarMode)b=-1!=CKEDITOR.tools.indexOf([d?39:37,38],b)?
k.call(A):h.call(A),A.selectPage(b),A._.tabs[b][0].focus(),x=1;else if(13!=b&&32!=b||!A._.tabBarMode)if(13==b)b=a.data.getTarget(),b.is("a","button","select","textarea")||b.is("input")&&"button"==b.$.type||((b=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(b.click,0,b),x=1),v=1;else if(27==b)(b=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(b.click,0,b):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),v=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
-1,l(1),x=1;t(a)}}function t(a){x?a.data.preventDefault(1):v&&a.data.stopPropagation()}var q=CKEDITOR.dialog._.dialogDefinitions[g],w=CKEDITOR.tools.clone(D),z=e.config.dialog_buttonsOrder||"OS",y=e.lang.dir,r={},x,v;("OS"==z&&CKEDITOR.env.mac||"rtl"==z&&"ltr"==y||"ltr"==z&&"rtl"==y)&&w.buttons.reverse();q=CKEDITOR.tools.extend(q(e),w);q=CKEDITOR.tools.clone(q);q=new m(this,q);w=d(e);this._={editor:e,element:w.element,name:g,model:null,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},
buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=w.parts;CKEDITOR.tools.setTimeout(function(){e.fire("ariaWidget",this.parts.contents)},0,this);w={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(w.position="absolute");w["rtl"==y?"right":"left"]=0;this.parts.dialog.setStyles(w);CKEDITOR.event.call(this);this.definition=q=CKEDITOR.fire("dialogDefinition",
{name:g,definition:q,dialog:this},e).definition;if(!("removeDialogTabs"in e._)&&e.config.removeDialogTabs){w=e.config.removeDialogTabs.split(";");for(y=0;y<w.length;y++)if(z=w[y].split(":"),2==z.length){var B=z[0];r[B]||(r[B]=[]);r[B].push(z[1])}e._.removeDialogTabs=r}if(e._.removeDialogTabs&&(r=e._.removeDialogTabs[g]))for(y=0;y<r.length;y++)q.removeContents(r[y]);if(q.onLoad)this.on("load",q.onLoad);if(q.onShow)this.on("show",q.onShow);if(q.onHide)this.on("hide",q.onHide);if(q.onOk)this.on("ok",
function(a){e.fire("saveSnapshot");setTimeout(function(){e.fire("saveSnapshot")},0);!1===q.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(q.onCancel)this.on("cancel",function(a){!1===q.onCancel.call(this,a)&&(a.data.hide=!1)});var A=this,C=function(a){var b=A._.contents,e=!1,d;for(d in b)for(var g in b[d])if(e=a.call(this,b[d][g]))return};this.on("ok",function(b){C(function(e){if(e.validate){var d=e.validate(this),g="string"==typeof d||!1===d;g&&(b.data.hide=!1,b.stop());
a.call(e,!g,"string"==typeof d?d:void 0);return g}})},this,null,0);this.on("cancel",function(a){C(function(b){if(b.isChanged())return e.config.dialog_noConfirmCancel||confirm(e.lang.common.confirmCancel)||(a.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=l;var E=this._.element;e.focusManager.add(E,1);this.on("show",function(){E.on("keydown",u,this);if(CKEDITOR.env.gecko)E.on("keypress",
t,this)});this.on("hide",function(){E.removeListener("keydown",u);CKEDITOR.env.gecko&&E.removeListener("keypress",t);C(function(a){b.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",u,this,null,0)});this.on("show",function(){f();var a=1<A._.pageCount;e.config.dialog_startupFocusTab&&a?(A._.tabBarMode=!0,A._.tabs[A._.currentTabId][0].focus(),A._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-
1,q.onFocus?(a=q.onFocus.call(this))&&a.focus():l(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);n(this);p(this);(new CKEDITOR.dom.text(q.title,CKEDITOR.document)).appendTo(this.parts.title);for(y=0;y<q.contents.length;y++)(r=q.contents[y])&&this.addPage(r);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
c(this),a.data.preventDefault())},this);y=[];r=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:q.buttons},y).getChild();this.parts.footer.setHtml(y.join(""));for(y=0;y<r.length;y++)this._.buttons[r[y].id]=r[y]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,b){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=b){CKEDITOR.dialog.fire("resize",
{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var e=this.parts.dialog.getParent().getClientSize().width;this._.position.x=e-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:b}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
0}},move:function(a,b,e){var d=this._.element.getFirst(),g="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&d.setStyle("zoom","100%");var c=this.parts.dialog.getParent().getClientSize(),f=this.getSize(),h=this._.viewportRatio,k=Math.max(c.width-f.width,0),c=Math.max(c.height-f.height,0);this._.position&&this._.position.x==a&&this._.position.y==b?(a=Math.floor(k*h.width),b=Math.floor(c*h.height)):v(this,a,b);this._.position={x:a,y:b};g&&(a=k-a);b={top:(0<b?b:0)+"px"};b[g?"right":"left"]=(0<a?a:0)+"px";
d.setStyles(b);e&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition,d=CKEDITOR.document.getBody(),g=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(d)?a.setStyle("display",I?"flex":"block"):a.appendTo(d);this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();null===this._.currentTabId&&
this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=g);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);this.getElement().setStyle("z-index",CKEDITOR.dialog._.currentZIndex);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,q(this._.editor)):CKEDITOR.dialog._.currentTop!==this&&(this._.parentDialog=CKEDITOR.dialog._.currentTop,d=this._.parentDialog.getElement().getFirst(),
d.$.style.zIndex-=Math.floor(g/2),this._.parentDialog.getElement().setStyle("z-index",d.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",y);a.on("keyup",u);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],g=this._.tabs[a.id],d=a.requiredContent,f=0;if(g){for(var h in this._.contents[a.id]){var k=this._.contents[a.id][h];"hbox"!=k.type&&"vbox"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():
(k.enable(),f++))}!f||d&&!this._.editor.activeFilter.check(d)?g[0].addClass("cke_dialog_tab_disabled"):g[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();e(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=
this.parts.dialog;if(this._.moved||!I){var b=this.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize(),d;this._.moved&&this._.position?(d=this._.position.x,b=this._.position.y):(d=(e.width-b.width)/2,b=(e.height-b.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));d=Math.floor(d);b=Math.floor(b);this.move(d,b)}},foreach:function(a){for(var b in this._.contents)for(var e in this._.contents[b])a.call(this,this._.contents[b][e]);return this},reset:function(){var a=
function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);
var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(z(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst(),e=parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2);this._.parentDialog.getElement().setStyle("z-index",e);b.setStyle("z-index",e)}else t(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=
10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",y);a.removeListener("keyup",u);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],e=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),g=this._.contents[a.id]={},c=d.getChild(),f=0;d=c.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||f++,g[d.id]=d,"function"==typeof d.getChild&&c.push.apply(c,d.getChild());f||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height",
"100%");d=CKEDITOR.env;g="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();e=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",e,a.hidden?' style\x3d"display:none"':"",' id\x3d"',g,'"',d.gecko&&!d.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",g);this._.tabs[a.id]=[e,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=e;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);e.unselectable();this.parts.tabs.append(e);a.accessKey&&(B(this,this,"CTRL+"+a.accessKey,w,x),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var b in this._.tabs){var e=this._.tabs[b][0],d=this._.tabs[b][1];b!=a&&(e.removeClass("cke_dialog_tab_selected"),
e.removeAttribute("aria-selected"),d.hide());d.setAttribute("aria-hidden",b!=a)}var g=this._.tabs[a];g[0].addClass("cke_dialog_tab_selected");g[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(f(g[1]),g[1].show(),setTimeout(function(){f(g[1],1)},0)):g[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=
this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(k.call(this)),b.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var e=this._.contents[a];return e&&e[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},
setValueOf:function(a,b,e){return this.getContentElement(a,b).setValue(e)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,
b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new l(this,a,b));else{this._.focusList.splice(b,0,new l(this,a,b));for(var e=b+1;e<this._.focusList.length;e++)this._.focusList[e].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,e={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};e.styles["margin-"+("rtl"==b?"left":"right")]=
"8px";this.parts.spinner=CKEDITOR.document.createElement("div",e);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok")&&this.getButton("ok").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok")&&this.getButton("ok").enable());this.fire("state",a)}},getModel:function(a){return this._.model?this._.model:this.definition.getModel?this.definition.getModel(a):null},
setModel:function(a){this._.model=a},getMode:function(a){if(this.definition.getMode)return this.definition.getMode(a);a=this.getModel(a);return!a||a instanceof CKEDITOR.dom.element&&!a.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}};CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,add:function(a,b){this._.dialogDefinitions[a]&&"function"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
isTabEnabled:function(a,b,e){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+e+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(e){return a(e,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=
function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(e){return a(e,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};
CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);D={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var G=function(a,b,e){for(var d=0,g;g=a[d];d++)if(g.id==b||e&&g[e]&&(g=G(g[e],b,e)))return g;return null},L=function(a,b,e,d,g){if(e){for(var c=0,f;f=a[c];c++){if(f.id==e)return a.splice(c,0,b),b;if(d&&f[d]&&(f=L(f[d],b,e,d,!0)))return f}if(g)return null}a.push(b);return b},
H=function(a,b,e){for(var d=0,g;g=a[d];d++){if(g.id==b)return a.splice(d,1);if(e&&g[e]&&(g=H(g[e],b,e)))return g}return null};m.prototype={getContents:function(a){return G(this.contents,a)},getButton:function(a){return G(this.buttons,a)},addContents:function(a,b){return L(this.contents,a,b)},addButton:function(a,b){return L(this.buttons,a,b)},removeContents:function(a){H(this.contents,a)},removeButton:function(a){H(this.buttons,a)}};g.prototype={get:function(a){return G(this.elements,a,"children")},
add:function(a,b){return L(this.elements,a,b,"children")},remove:function(a){H(this.elements,a,"children")}};var F={},P={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,e,d,g,c,f){if(!(4>arguments.length)){var h=(d.call?d(b):d)||"div",k=["\x3c",h," "],m=(g&&g.call?g(b):g)||{},l=(c&&c.call?c(b):c)||{},n=(f&&f.call?f.call(this,a,b):f)||"",p=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=
!0);l.id=p;var u={};b.type&&(u["cke_dialog_ui_"+b.type]=1);b.className&&(u[b.className]=1);b.disabled&&(u.cke_disabled=1);for(var t=l["class"]&&l["class"].split?l["class"].split(" "):[],p=0;p<t.length;p++)t[p]&&(u[t[p]]=1);t=[];for(p in u)t.push(p);l["class"]=t.join(" ");b.title&&(l.title=b.title);u=(b.style||"").split(";");b.align&&(t=b.align,m["margin-left"]="left"==t?0:"auto",m["margin-right"]="right"==t?0:"auto");for(p in m)u.push(p+":"+m[p]);b.hidden&&u.push("display:none");for(p=u.length-1;0<=
p;p--)""===u[p]&&u.splice(p,1);0<u.length&&(l.style=(l.style?l.style+"; ":"")+u.join("; "));for(p in l)k.push(p+'\x3d"'+CKEDITOR.tools.htmlEncode(l[p])+'" ');k.push("\x3e",n,"\x3c/",h,"\x3e");e.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(e){a.call(this,
b.setValue.call(this,e))}}));"function"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&B(this,a,"CTRL+"+b.accessKey);var q=this;a.on("load",function(){var b=q.getInputElement();if(b){var e=q.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",
function(){a._.tabBarMode=!1;a._.hasFocus=!0;q.fire("focus");e&&this.addClass(e)});b.on("blur",function(){q.fire("blur");e&&this.removeClass(e)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=q.focusIndex}))}},hbox:function(a,b,e,d,g){if(!(4>arguments.length)){this._||(this._={});var c=this._.children=b,f=g&&g.widths||null,h=g&&g.height||null,k,m={role:"presentation"};
g&&g.align&&(m.align=g.align);CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"hbox"},d,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<e.length;k++){var b="cke_dialog_ui_hbox_child",d=[];0===k&&(b="cke_dialog_ui_hbox_first");k==e.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');f?f[k]&&d.push("width:"+A(f[k])):d.push("width:"+Math.floor(100/e.length)+"%");h&&d.push("height:"+A(h));g&&void 0!==g.padding&&
d.push("padding:"+A(g.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&c[k].align&&d.push("text-align:"+c[k].align);0<d.length&&a.push('style\x3d"'+d.join("; ")+'" ');a.push("\x3e",e[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,e,d,g){if(!(3>arguments.length)){this._||(this._={});var c=this._.children=b,f=g&&g.width||null,h=g&&g.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=
['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');g&&g.expand&&b.push("height:100%;");b.push("width:"+A(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(g&&g.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;d<e.length;d++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');f&&k.push("width:"+A(f||"100%"));h?k.push("height:"+
A(h[d])):g&&g.expand&&k.push("height:"+Math.floor(100/e.length)+"%");g&&void 0!==g.padding&&k.push("padding:"+A(g.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&c[d].align&&k.push("text-align:"+c[d].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',e[d],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},
getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=
a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,e,d=function(a,b,e,d){b.on("load",function(){a.getInputElement().on(e,d,a)})},g;for(g in a)if(e=g.match(b))this.eventProcessors[g]?this.eventProcessors[g].call(this,this._.dialog,a[g]):d(this,this._.dialog,e[1].toLowerCase(),a[g]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",
b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},
isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,
b,e){for(var d=b.children,g,c=[],f=[],h=0;h<d.length&&(g=d[h]);h++){var k=[];c.push(k);f.push(CKEDITOR.dialog._.uiElementBuilders[g.type].build(a,g,k))}return new CKEDITOR.ui.dialog[b.type](a,f,c,e,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},
canUndo:!1,editorFocus:1};(function(){var a=/^\d*$/,b=/^\d*(?:\.\d+)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,g=/^(--|-?([a-zA-Z_]|\\))(\\|[a-zA-Z0-9-_])*\s*?:\s*?[^:;]+$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(b){this&&this.getValue&&(b=this.getValue());var e,d=CKEDITOR.VALIDATE_AND,g=[],c;for(c=0;c<a.length;c++)if("function"==typeof a[c])g.push(a[c]);
else break;c<a.length&&"string"==typeof a[c]&&(e=a[c],c++);c<a.length&&"number"==typeof a[c]&&(d=a[c]);c=d==CKEDITOR.VALIDATE_AND;for(var f=0;f<g.length;f++){var h=!0===g[f](b);c=d==CKEDITOR.VALIDATE_AND?c&&h:c||h}return c?!0:e}},regex:function(a,b){return this.functions(function(b){return a.test(b)},b)},notEmpty:function(a){return this.functions(function(a){return 0<a.replace(RegExp("^[\\u0020\\u00a0\\u1680\\u202f\\u205f\\u3000\\u2000-\\u200a\\s]+|[\\u0020\\u00a0\\u1680\\u202f\\u205f\\u3000\\u2000-\\u200a\\s]+$",
"g"),"").length},a)},integer:function(b){return this.regex(a,b)},number:function(a){return this.regex(b,a)},cssLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){a=CKEDITOR.tools.trim(a).split(";");""===a[a.length-1]&&a.pop();return CKEDITOR.tools.array.every(a,function(a){return g.test(CKEDITOR.tools.trim(a))})},
a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var e in F)F[e].remove();F={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,e){var d=null,g=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&q(this);if("function"==typeof g)g=this._.storedDialogs||(this._.storedDialogs={}),d=g[a]||(g[a]=new CKEDITOR.dialog(this,a)),d.setModel(e),b&&b.call(d,d),d.show();else{if("failed"==g)throw t(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof g&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(g),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");
this.openDialog(a,b,e)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(d)d.once("hide",function(){d.setModel(null)},null,null,999);return d}});CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){E||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),E=!0);a.on("doubleclick",function(b){b.data.dialog&&a.openDialog(b.data.dialog)},null,null,999)}})}(),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,
"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(c){var k=this;c.addCommand("a11yHelp",{exec:function(){var h=c.langCode,h=k.availableLangs[h]?h:k.availableLangs[h.replace(/-.*/,"")]?h.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(k.path+
"dialogs/lang/"+h+".js"),function(){c.lang.a11yhelp=k.langEntries[h];c.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});c.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");c.on("ariaEditorHelpLabel",function(h){h.data.label=c.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(c){var k=c.addCommand("about",new CKEDITOR.dialogCommand("about"));k.modes={wysiwyg:1,source:1};k.canUndo=
!1;k.readOnly=1;c.ui.addButton&&c.ui.addButton("About",{label:c.lang.about.dlgTitle,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),"use strict",function(){function c(c,h,f){this.editor=c;this.lastMatched=null;this.ignoreNext=!1;this.callback=h;this.ignoredKeys=[16,17,18,91,35,36,37,38,39,40,33,34];this._listeners=[];this.throttle=f||0;this._buffer=CKEDITOR.tools.throttle(this.throttle,function(a){(a=this.callback(a))?a.text!=this.lastMatched&&(this.lastMatched=
a.text,this.fire("matched",a)):this.lastMatched&&this.unmatch()},this)}CKEDITOR.plugins.add("textwatcher",{});c.prototype={attach:function(){function c(){var b=a.editable();this._listeners.push(b.attachListener(b,"keyup",h,this))}function h(a){this.check(a)}function f(){this.unmatch()}var a=this.editor;this._listeners.push(a.on("contentDom",c,this));this._listeners.push(a.on("blur",f,this));this._listeners.push(a.on("beforeModeUnload",f,this));this._listeners.push(a.on("setData",f,this));this._listeners.push(a.on("afterCommandExec",
f,this));a.editable()&&c.call(this);return this},check:function(c){this.ignoreNext?this.ignoreNext=!1:c&&"keyup"==c.name&&-1!=CKEDITOR.tools.array.indexOf(this.ignoredKeys,c.data.getKey())||(c=this.editor.getSelection())&&(c=c.getRanges()[0])&&this._buffer.input(c)},consumeNext:function(){this.ignoreNext=!0;return this},unmatch:function(){this.lastMatched=null;this.fire("unmatched");return this},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(c){c.removeListener()});this._listeners=
[]}};CKEDITOR.event.implementOn(c.prototype);CKEDITOR.plugins.textWatcher=c}(),"use strict",function(){function c(a,d){var c=a.config.autocomplete_commitKeystrokes||CKEDITOR.config.autocomplete_commitKeystrokes;this.editor=a;this.throttle=void 0!==d.throttle?d.throttle:20;this.followingSpace=d.followingSpace;this.view=this.getView();this.model=this.getModel(d.dataCallback);this.model.itemsLimit=d.itemsLimit;this.textWatcher=this.getTextWatcher(d.textTestCallback);this.commitKeystrokes=CKEDITOR.tools.array.isArray(c)?
c.slice():[c];this._listeners=[];this.outputTemplate=void 0!==d.outputTemplate?new CKEDITOR.template(d.outputTemplate):null;d.itemTemplate&&(this.view.itemTemplate=new CKEDITOR.template(d.itemTemplate));if("ready"===this.editor.status)this.attach();else this.editor.on("instanceReady",function(){this.attach()},this);a.on("destroy",function(){this.destroy()},this)}function k(a){this.itemTemplate=new CKEDITOR.template('\x3cli data-id\x3d"{id}"\x3e{name}\x3c/li\x3e');this.editor=a}function h(a){this.dataCallback=
a;this.isActive=!1;this.itemsLimit=0}function f(a){return CKEDITOR.tools.array.reduce(CKEDITOR.tools.object.keys(a),function(d,c){d[c]=CKEDITOR.tools.htmlEncode(a[c]);return d},{})}function a(a){var d=a.getSelection().getRanges()[0].getNextNode(function(a){return Boolean(a.type==CKEDITOR.NODE_TEXT&&a.getText())});d&&d.getText().match(/^\s+/)&&(a=a.createRange(),a.setStart(d,0),a.setEnd(d,1),a.deleteContents())}CKEDITOR.plugins.add("autocomplete",{requires:"textwatcher",onLoad:function(){CKEDITOR.document.appendStyleSheet(this.path+
"skins/default.css")},isSupportedEnvironment:function(){return!CKEDITOR.env.ie||8<CKEDITOR.env.version}});c.prototype={attach:function(){var a=this.editor,d=CKEDITOR.document.getWindow(),c=a.editable(),e=c.isInline()?c:c.getDocument();CKEDITOR.env.iOS&&!c.isInline()&&(e=a.window.getFrame().getParent());this.view.append();this.view.attach();this.textWatcher.attach();this._listeners.push(this.textWatcher.on("matched",this.onTextMatched,this));this._listeners.push(this.textWatcher.on("unmatched",this.onTextUnmatched,
this));this._listeners.push(this.model.on("change-data",this.modelChangeListener,this));this._listeners.push(this.model.on("change-selectedItemId",this.onSelectedItemId,this));this._listeners.push(this.view.on("change-selectedItemId",this.onSelectedItemId,this));this._listeners.push(this.view.on("click-item",this.onItemClick,this));this._listeners.push(this.model.on("change-isActive",this.updateAriaAttributesOnEditable,this));this._listeners.push(d.on("scroll",function(){this.viewRepositionListener()},
this));this._listeners.push(e.on("scroll",function(){this.viewRepositionListener()},this));this._listeners.push(this.view.element.on("mousedown",function(a){a.data.preventDefault()},null,null,9999));c&&(this.registerPanelNavigation(),this.addAriaAttributesToEditable());a.on("contentDom",function(){this.registerPanelNavigation();this.addAriaAttributesToEditable()},this)},registerPanelNavigation:function(){var a=this.editor.editable();this._listeners.push(a.attachListener(a,"keydown",function(a){this.onKeyDown(a)},
this,null,5))},addAriaAttributesToEditable:function(){var a=this.editor.editable(),d=this.view.element.getAttribute("id");a.isInline()&&(a.setAttribute("aria-controls",d),a.setAttribute("aria-activedescendant",""),a.setAttribute("aria-autocomplete","list"),a.setAttribute("aria-expanded","false"))},updateAriaAttributesOnEditable:function(a){var d=this.editor.editable();a=a.data;d&&d.isInline()&&(d.setAttribute("aria-expanded",a?"true":"false"),a||d.setAttribute("aria-activedescendant",""))},updateAriaActiveDescendantAttributeOnEditable:function(a){var d=
this.editor.editable();d.isInline()&&d.setAttribute("aria-activedescendant",a)},removeAriaAttributesFromEditable:function(){var a=this.editor.editable();a&&a.isInline()&&(a.removeAttributes(["aria-controls","aria-expanded","aria-activedescendant"]),a.setAttribute("aria-autocomplete","none"))},close:function(){this.model.setActive(!1);this.view.close()},commit:function(b){if(this.model.isActive){this.close();if(null==b&&(b=this.model.selectedItemId,null==b))return;var d=this.model.getItemById(b);b=
this.editor;d=this.getHtmlToInsert(d);d+=this.followingSpace?"\x26nbsp;":"";b.fire("saveSnapshot");b.getSelection().selectRanges([this.model.range]);b.insertHtml(d,"text");this.followingSpace&&a(b);b.fire("saveSnapshot")}},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()});this._listeners=[];this.view.element&&this.view.element.remove();this.removeAriaAttributesFromEditable()},getHtmlToInsert:function(a){a=f(a);return this.outputTemplate?this.outputTemplate.output(a):
a.name},getModel:function(a){var d=this;return new h(function(c,e){return a.call(this,CKEDITOR.tools.extend({autocomplete:d},c),e)})},getTextWatcher:function(a){return new CKEDITOR.plugins.textWatcher(this.editor,a,this.throttle)},getView:function(){return new k(this.editor)},open:function(){this.model.hasData()&&(this.model.setActive(!0),this.view.open(),this.model.selectFirst(),this.view.updatePosition(this.model.range))},viewRepositionListener:function(){this.model.isActive&&this.view.updatePosition(this.model.range)},
modelChangeListener:function(a){this.model.hasData()?(this.view.updateItems(a.data),this.open()):this.close()},onItemClick:function(a){this.commit(a.data)},onKeyDown:function(a){if(this.model.isActive){var d=a.data.getKey(),c=!1;27==d?(this.close(),this.textWatcher.unmatch(),c=!0):40==d?(this.model.selectNext(),c=!0):38==d?(this.model.selectPrevious(),c=!0):-1!=CKEDITOR.tools.indexOf(this.commitKeystrokes,d)&&(this.commit(),this.textWatcher.unmatch(),c=!0);c&&(a.cancel(),a.data.preventDefault(),this.textWatcher.consumeNext())}},
onSelectedItemId:function(a){a=a.data;var d=this.view.getItemById(a);this.model.setItem(a);this.view.selectItem(a);this.updateAriaActiveDescendantAttributeOnEditable(d.getAttribute("id"))},onTextMatched:function(a){this.model.setActive(!1);this.model.setQuery(a.data.text,a.data.range)},onTextUnmatched:function(){this.model.query=null;this.model.lastRequestId=null;this.close()}};k.prototype={append:function(){this.document=CKEDITOR.document;this.element=this.createElement();this.document.getBody().append(this.element)},
appendItems:function(a){this.element.setHtml("");this.element.append(a)},attach:function(){this.element.on("click",function(a){(a=a.data.getTarget().getAscendant(this.isItemElement,!0))&&this.fire("click-item",a.data("id"))},this);this.element.on("mouseover",function(a){a=a.data.getTarget();this.element.contains(a)&&(a=a.getAscendant(function(a){return a.hasAttribute("data-id")},!0))&&(a=a.data("id"),this.fire("change-selectedItemId",a))},this)},close:function(){this.element.removeClass("cke_autocomplete_opened")},
createElement:function(){var a=new CKEDITOR.dom.element("ul",this.document),d=CKEDITOR.tools.getNextId();a.setAttribute("id",d);a.addClass("cke_autocomplete_panel");a.setStyle("z-index",this.editor.config.baseFloatZIndex-3);a.setAttribute("role","listbox");return a},createItem:function(a){a=f(a);a=CKEDITOR.dom.element.createFromHtml(this.itemTemplate.output(a),this.document);var d=CKEDITOR.tools.getNextId();a.setAttribute("id",d);a.setAttribute("role","option");return a},getViewPosition:function(a){a=
a.getClientRects();a=a[a.length-1];var d;d=this.editor.editable();d=d.isInline()?CKEDITOR.document.getWindow().getScrollPosition():d.getParent().getDocumentPosition(CKEDITOR.document);var c=CKEDITOR.document.getBody();"static"===c.getComputedStyle("position")&&(c=c.getParent());c=c.getDocumentPosition();d.x-=c.x;d.y-=c.y;return{top:a.top+d.y,bottom:a.top+a.height+d.y,left:a.left+d.x}},getItemById:function(a){return this.element.findOne('li[data-id\x3d"'+a+'"]')},isItemElement:function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&Boolean(a.data("id"))},open:function(){this.element.addClass("cke_autocomplete_opened")},selectItem:function(a){null!=this.selectedItemId&&this.getItemById(this.selectedItemId).removeClass("cke_autocomplete_selected");var d=this.getItemById(a);d.addClass("cke_autocomplete_selected");this.selectedItemId=a;this.scrollElementTo(d)},setPosition:function(a){var d=this.element.getWindow(),c=d.getViewPaneSize(),d=function(a){var b=a.editorViewportRect,d=a.caretRect,c=a.viewHeight,
f=a.scrollPositionY,h=a.windowHeight;if(b.bottom<d.bottom)return Math.min(d.top,b.bottom)-c;a=d.top-b.top;var k=b.bottom-d.bottom,l=d.top-c<f;if(c>k&&c<a&&!l)return d.top-c;if(b.top>d.top)return Math.max(d.bottom,b.top);f=d.bottom+c>h+f;return c>k&&c<a||!f?Math.min(b.bottom,d.bottom):d.top-c}({editorViewportRect:function(a){var b=a.editable();return CKEDITOR.env.iOS&&!b.isInline()?a.window.getFrame().getParent().getClientRect(!0):b.isInline()?b.getClientRect(!0):a.window.getFrame().getClientRect(!0)}(this.editor),
caretRect:a,viewHeight:this.element.getSize("height"),scrollPositionY:d.getScrollPosition().y,windowHeight:c.height});a=function(a){var b=a.leftPosition,d=a.viewWidth;a=a.windowWidth;return b+d>a?a-d:b}({leftPosition:a.left,viewWidth:this.element.getSize("width"),windowWidth:c.width});this.element.setStyles({left:a+"px",top:d+"px"})},scrollElementTo:function(a){a.scrollIntoParent(this.element)},updateItems:function(a){var d,c=new CKEDITOR.dom.documentFragment(this.document);for(d=0;d<a.length;++d)c.append(this.createItem(a[d]));
this.appendItems(c);this.selectedItemId=null},updatePosition:function(a){this.setPosition(this.getViewPosition(a))}};CKEDITOR.event.implementOn(k.prototype);h.prototype={getIndexById:function(a){if(!this.hasData())return-1;for(var d=this.data,c=0,e=d.length;c<e;c++)if(d[c].id==a)return c;return-1},getItemById:function(a){a=this.getIndexById(a);return~a&&this.data[a]||null},hasData:function(){return Boolean(this.data&&this.data.length)},setItem:function(a){if(0>this.getIndexById(a))throw Error("Item with given id does not exist");
this.selectedItemId=a},select:function(a){this.fire("change-selectedItemId",a)},selectFirst:function(){this.hasData()&&this.select(this.data[0].id)},selectLast:function(){this.hasData()&&this.select(this.data[this.data.length-1].id)},selectNext:function(){if(null==this.selectedItemId)this.selectFirst();else{var a=this.getIndexById(this.selectedItemId);0>a||a+1==this.data.length?this.selectFirst():this.select(this.data[a+1].id)}},selectPrevious:function(){if(null==this.selectedItemId)this.selectLast();
else{var a=this.getIndexById(this.selectedItemId);0>=a?this.selectLast():this.select(this.data[a-1].id)}},setActive:function(a){this.isActive=a;this.fire("change-isActive",a)},setQuery:function(a,d){var c=this,e=CKEDITOR.tools.getNextId();this.lastRequestId=e;this.query=a;this.range=d;this.selectedItemId=this.data=null;this.dataCallback({query:a,range:d},function(a){e==c.lastRequestId&&(c.data=c.itemsLimit?a.slice(0,c.itemsLimit):a,c.fire("change-data",c.data))})}};CKEDITOR.event.implementOn(h.prototype);
CKEDITOR.plugins.autocomplete=c;c.view=k;c.model=h;CKEDITOR.config.autocomplete_commitKeystrokes=[9,13]}(),"use strict",function(){function c(c,f){CKEDITOR.tools.extend(this,f,{editor:c,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:c._.notificationArea});f.type||(this.type="info");this.element=this._createElement();c.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function k(c){var f=this;this.editor=c;this.notifications=[];this.element=this._createElement();
this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);c.on("destroy",function(){f._removeListeners();f.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(c){function f(a){var b=new CKEDITOR.dom.element("div");b.setStyles({position:"fixed","margin-left":"-9999px"});b.setAttributes({"aria-live":"assertive","aria-atomic":"true"});b.setText(a);CKEDITOR.document.getBody().append(b);setTimeout(function(){b.remove()},
100)}c._.notificationArea=new k(c);c.showNotification=function(a,b,d){var f,e;"progress"==b?f=d:e=d;a=new CKEDITOR.plugins.notification(c,{message:a,type:b,progress:f,duration:e});a.show();return a};c.on("key",function(a){if(27==a.data.keyCode){var b=c._.notificationArea.notifications;b.length&&(f(c.lang.notification.closed),b[b.length-1].hide(),a.cancel())}})}});c.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},
update:function(c){var f=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:c})&&(f=!1);var a=this.element,b=a.findOne(".cke_notification_message"),d=a.findOne(".cke_notification_progress"),k=c.type;a.removeAttribute("role");c.progress&&"progress"!=this.type&&(k="progress");k&&(a.removeClass(this._getClass()),a.removeAttribute("aria-label"),this.type=k,a.addClass(this._getClass()),a.setAttribute("aria-label",this.type),"progress"!=this.type||d?"progress"!=this.type&&d&&d.remove():
(d=this._createProgressElement(),d.insertBefore(b)));void 0!==c.message&&(this.message=c.message,b.setHtml(this.message));void 0!==c.progress&&(this.progress=c.progress,d&&d.setStyle("width",this._getPercentageProgress()));f&&c.important&&(a.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=c.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,
this)},_createElement:function(){var c=this,f,a,b=this.editor.lang.common.close;f=new CKEDITOR.dom.element("div");f.addClass("cke_notification");f.addClass(this._getClass());f.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&f.append(this._createProgressElement());a=new CKEDITOR.dom.element("p");a.addClass("cke_notification_message");a.setHtml(this.message);f.append(a);a=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+
b+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');f.append(a);a.on("click",function(){c.editor.focus();c.hide()});return f},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var c=new CKEDITOR.dom.element("span");c.addClass("cke_notification_progress");c.setStyle("width",this._getPercentageProgress());return c},_getPercentageProgress:function(){return Math.round(100*
(this.progress||0))+"%"},_hideAfterTimeout:function(){var c=this,f;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)f=this.duration;else if("info"==this.type||"success"==this.type)f="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;f&&(c._hideTimeoutId=setTimeout(function(){c.hide()},f))}};k.prototype={add:function(c){this.notifications.push(c);this.element.append(c.element);1==this.element.getChildCount()&&
(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(c){var f=CKEDITOR.tools.indexOf(this.notifications,c);0>f||(this.notifications.splice(f,1),c.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var c=this.editor,f=c.config,a=new CKEDITOR.dom.element("div");a.addClass("cke_notifications_area");a.setAttribute("id","cke_notifications_area_"+c.name);a.setStyle("z-index",f.baseFloatZIndex-
2);return a},_attachListeners:function(){var c=CKEDITOR.document.getWindow(),f=this.editor;c.on("scroll",this._uiBuffer.input);c.on("resize",this._uiBuffer.input);f.on("change",this._changeBuffer.input);f.on("floatingSpaceLayout",this._layout,this,null,20);f.on("blur",this._layout,this,null,20)},_removeListeners:function(){var c=CKEDITOR.document.getWindow(),f=this.editor;c.removeListener("scroll",this._uiBuffer.input);c.removeListener("resize",this._uiBuffer.input);f.removeListener("change",this._changeBuffer.input);
f.removeListener("floatingSpaceLayout",this._layout);f.removeListener("blur",this._layout)},_layout:function(){function c(){f.setStyle("left",y(u+b.width-n-p))}var f=this.element,a=this.editor,b=a.ui.contentsElement.getClientRect(),d=a.ui.contentsElement.getDocumentPosition(),k,e,m=f.getClientRect(),g,n=this._notificationWidth,p=this._notificationMargin;g=CKEDITOR.document.getWindow();var v=g.getScrollPosition(),r=g.getViewPaneSize(),q=CKEDITOR.document.getBody(),t=q.getDocumentPosition(),y=CKEDITOR.tools.cssLength;
n&&p||(g=this.element.getChild(0),n=this._notificationWidth=g.getClientRect().width,p=this._notificationMargin=parseInt(g.getComputedStyle("margin-left"),10)+parseInt(g.getComputedStyle("margin-right"),10));a.toolbar&&(k=a.ui.space(a.config.toolbarLocation),e=k.getClientRect());k&&k.isVisible()&&e.bottom>b.top&&e.bottom<b.bottom-m.height?f.setStyles({position:"fixed",top:y(e.bottom)}):0<b.top?f.setStyles({position:"absolute",top:y(d.y)}):d.y+b.height-m.height>v.y?f.setStyles({position:"fixed",top:0}):
f.setStyles({position:"absolute",top:y(d.y+b.height-m.height)});var u="fixed"==f.getStyle("position")?b.left:"static"!=q.getComputedStyle("position")?d.x-t.x:d.x;b.width<n+p?d.x+n+p>v.x+r.width?c():f.setStyle("left",y(u)):d.x+n+p>v.x+r.width?f.setStyle("left",y(u)):d.x+b.width/2+n/2+p>v.x+r.width?f.setStyle("left",y(u-d.x+v.x+r.width-n-p)):0>b.left+b.width-n-p?c():0>b.left+b.width/2-n/2?f.setStyle("left",y(u-d.x+v.x)):f.setStyle("left",y(u+b.width/2-n/2-p/2))}};CKEDITOR.plugins.notification=c}(),
function(){var c='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"{hasArrowAriaHtml}{toggleAriaHtml}';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');
CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var k="";CKEDITOR.env.ie&&(k='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+k+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+
'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',h=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),f=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button",
{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{isToggle:a.isToggle||!1,title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,b){function d(){var b=a.mode;b&&(b=this.modes[b]?void 0!==c[b]?c[b]:CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var c=null,e=CKEDITOR.env,k=this._.id=CKEDITOR.tools.getNextId(),g="",n=this.command,p,v,r;this._.editor=a;var q={id:k,button:this,editor:a,focus:function(){CKEDITOR.document.getById(k).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},t=CKEDITOR.tools.addFunction(function(a){if(q.onkey)return a=new CKEDITOR.dom.event(a),!1!==
q.onkey(q,a.getKeystroke())}),y=CKEDITOR.tools.addFunction(function(a){var b;q.onfocus&&(b=!1!==q.onfocus(q,new CKEDITOR.dom.event(a)));return b}),u=0;q.clickFn=p=CKEDITOR.tools.addFunction(function(){u&&(a.unlockSelection(1),u=0);q.execute();e.iOS&&a.focus()});this.modes?(c={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(c[a.mode]=this._.state)},this),a.on("activeFilterChange",d,this),a.on("mode",d,this),!this.readOnly&&a.on("readOnly",d,this)):n&&(n=a.getCommand(n))&&
(n.on("state",function(){this.setState(n.state)},this),g+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var B;if(this.directional)a.on("contentDirChanged",function(b){var e=CKEDITOR.document.getById(this._.id),d=e.getFirst();b=b.data;b!=a.lang.dir?e.addClass("cke_"+b):e.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(B,"rtl"==b,this.icon,this.iconOffset))},this);n?(v=a.getCommandKeystroke(n))&&(r=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,
v)):g+="off";v=this.name||this.command;var z=null,x=this.icon;B=v;this.icon&&!/\./.test(this.icon)?(B=this.icon,x=null):(this.icon&&(z=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(z=this.iconHiDpi));z?(CKEDITOR.skin.addIcon(z,z),x=null):z=B;g={id:k,name:v,iconName:B,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:g,ariaDisabled:"disabled"==g?"true":"false",title:this.title+(r?" ("+r.display+")":""),ariaShortcutSpace:r?"\x26nbsp;":"",ariaShortcut:r?a.lang.common.keyboardShortcut+
" "+r.aria:"",titleJs:e.gecko&&!e.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:t,focusFn:y,clickFn:p,style:CKEDITOR.skin.getIconStyle(z,"rtl"==a.lang.dir,x,this.iconOffset),arrowHtml:this.hasArrow?h.output():"",hasArrowAriaHtml:this.hasArrow?' aria-expanded\x3d"false"':"",toggleAriaHtml:this.isToggle?'aria-pressed\x3d"false"':""};f.output(g,b);if(this.onRender)this.onRender();return q},setState:function(a){if(this._.state==
a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.isToggle&&!this.hasArrow&&b.setAttribute("aria-pressed",a===CKEDITOR.TRISTATE_ON),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=
function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function c(a){function b(){for(var b=d(),e=CKEDITOR.tools.clone(a.config.toolbarGroups)||k(a),g=0;g<e.length;g++){var f=e[g];if("/"!=f){"string"==typeof f&&(f=e[g]={name:f});var h,m=f.groups;if(m)for(var y=0;y<m.length;y++)h=m[y],(h=b[h])&&c(f,h);(h=b[f.name])&&c(f,h)}}return e}function d(){var b={},e,d,g;for(e in a.ui.items)d=a.ui.items[e],g=d.toolbar||"others",g=g.split(","),d=g[0],g=parseInt(g[1]||-1,10),b[d]||(b[d]=[]),b[d].push({name:e,
order:g});for(d in b)b[d]=b[d].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function c(b,e){if(e.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var d;d=e.shift();)d="string"==typeof d?d:d.name,f&&-1!=CKEDITOR.tools.indexOf(f,d)||(d=a.ui.create(d))&&a.addFeature(d)&&b.items.push(d)}}function e(a){var b=[],e,d,g;for(e=0;e<a.length;++e)d=a[e],g={},"/"==d?b.push(d):CKEDITOR.tools.isArray(d)?(c(g,CKEDITOR.tools.clone(d)),b.push(g)):
d.items&&(c(g,CKEDITOR.tools.clone(d.items)),g.name=d.name,b.push(g));return b}var f=function(a){return a&&"string"===typeof a?a.split(","):a}(a.config.removeButtons),g=a.config.toolbar;"string"==typeof g&&(g=a.config["toolbar_"+g]);return a.toolbar=g?e(g):b()}function k(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",
{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var h=function(){this.toolbars=[]};h.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var d=0,c;c=b.items[d++];)if(c.focus){c.focus();return}};var f={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){a.toolbox&&(CKEDITOR.env.ie||CKEDITOR.env.air?
setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(a){var b,d=function(c,e){var f,g="rtl"==a.lang.dir,h=a.config.toolbarGroupCycling,k=g?37:39,g=g?39:37,h=void 0===h||h;switch(e){case 9:case CKEDITOR.SHIFT+9:for(;!f||!f.items.length;)if(f=9==e?(f?f.next:c.toolbar.next)||a.toolbox.toolbars[0]:(f?f.previous:c.toolbar.previous)||a.toolbox.toolbars[a.toolbox.toolbars.length-1],f.items.length)for(c=f.items[b?f.items.length-
1:0];c&&!c.focus;)(c=b?c.previous:c.next)||(f=0);c&&c.focus();return!1;case k:f=c;do f=f.next,!f&&h&&(f=c.toolbar.items[0]);while(f&&!f.focus);f?f.focus():d(c,9);return!1;case 40:return c.button&&c.button.hasArrow?c.execute():d(c,40==e?k:g),!1;case g:case 38:f=c;do f=f.previous,!f&&h&&(f=c.toolbar.items[c.toolbar.items.length-1]);while(f&&!f.focus);f?f.focus():(b=1,d(c,CKEDITOR.SHIFT+9),b=0);return!1;case 27:return a.focus(),!1;case 13:case 32:return c.execute(),!1;case CKEDITOR.ALT+122:return a.execCommand("elementsPathFocus"),
!1}return!0};a.on("uiSpace",function(b){if(b.data.space==a.config.toolbarLocation){b.removeListener();a.toolbox=new h;var e=CKEDITOR.tools.getNextId(),f=['\x3cspan id\x3d"',e,'" class\x3d"cke_voice_label"\x3e',a.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+a.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',e,'" onmousedown\x3d"return false;"\x3e'],e=!1!==a.config.toolbarStartupExpanded,g,k;a.config.toolbarCanCollapse&&a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&
f.push('\x3cspan class\x3d"cke_toolbox_main"'+(e?"\x3e":' style\x3d"display:none"\x3e'));for(var p=a.toolbox.toolbars,v=c(a),r=v.length,q=0;q<r;q++){var t,y=0,u,B=v[q],z="/"!==B&&("/"===v[q+1]||q==r-1),x;if(B)if(g&&(f.push("\x3c/span\x3e"),k=g=0),"/"===B)f.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{x=B.items||B;for(var w=0;w<x.length;w++){var A=x[w],D;if(A){var C=function(b){b=b.render(a,f);E=y.items.push(b)-1;0<E&&(b.previous=y.items[E-1],b.previous.next=b);b.toolbar=y;b.onkey=
d};if(A.type==CKEDITOR.UI_SEPARATOR)k=g&&A;else{D=!1!==A.canGroup;if(!y){t=CKEDITOR.tools.getNextId();y={id:t,items:[]};u=B.name&&(a.lang.toolbar.toolbarGroups[B.name]||B.name);f.push('\x3cspan id\x3d"',t,'" class\x3d"cke_toolbar'+(z?' cke_toolbar_last"':'"'),u?' aria-labelledby\x3d"'+t+'_label"':"",' role\x3d"toolbar"\x3e');u&&f.push('\x3cspan id\x3d"',t,'_label" class\x3d"cke_voice_label"\x3e',u,"\x3c/span\x3e");f.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var E=p.push(y)-1;
0<E&&(y.previous=p[E-1],y.previous.next=y)}D?g||(f.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),g=1):g&&(f.push("\x3c/span\x3e"),g=0);k&&(C(k),k=0);C(A)}}}g&&(f.push("\x3c/span\x3e"),k=g=0);y&&f.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}a.config.toolbarCanCollapse&&f.push("\x3c/span\x3e");if(a.config.toolbarCanCollapse&&a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var I=CKEDITOR.tools.addFunction(function(){a.execCommand("toolbarCollapse")});
a.on("destroy",function(){CKEDITOR.tools.removeFunction(I)});a.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),e=b.getPrevious(),d=a.ui.space("contents"),g=e.getParent(),c=parseInt(d.$.style.height,10),f=g.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");h?(e.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(e.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));
b.getFirst().setText(h?"▲":"◀");d.setStyle("height",c-(g.$.offsetHeight-f)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});a.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");f.push('\x3ca title\x3d"'+(e?a.lang.toolbar.toolbarCollapse:a.lang.toolbar.toolbarExpand)+'" id\x3d"'+a.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
e||f.push(" cke_toolbox_collapser_min");f.push('" onclick\x3d"CKEDITOR.tools.callFunction('+I+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}f.push("\x3c/span\x3e");b.data.html+=f.join("")}});a.on("destroy",function(){if(this.toolbox){var a,b=0,d,g,c;for(a=this.toolbox.toolbars;b<a.length;b++)for(g=a[b].items,d=0;d<g.length;d++)c=g[d],c.clickFn&&CKEDITOR.tools.removeFunction(c.clickFn),c.keyDownFn&&CKEDITOR.tools.removeFunction(c.keyDownFn)}});a.on("uiReady",function(){var b=
a.ui.space("toolbox");b&&a.focusManager.add(b,1)});a.addCommand("toolbarFocus",f);a.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");a.ui.add("-",CKEDITOR.UI_SEPARATOR,{});a.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,d){var c=k(this.editor),e=0===b,f={name:a};if(d){if(d=CKEDITOR.tools.search(c,function(a){return a.name==
d})){!d.groups&&(d.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(d.groups,b),0<=b)){d.groups.splice(b+1,0,a);return}e?d.groups.splice(0,0,a):d.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(c,function(a){return a.name==b}));e?c.splice(0,0,a):"number"==typeof b?c.splice(b+1,0,f):c.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function c(a,b,e){b.type||(b.type="auto");if(e&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;
b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus();a.focus()});return a.fire("paste",b)}function k(a){function b(){var e=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||D.initPasteDataTransfer(b,a),b.data.preventDefault())};e.on("copy",d);e.on("cut",d);e.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}e.on(D.mainPasteEvent,
function(a){"beforepaste"==D.mainPasteEvent&&C||x(a)});"beforepaste"==D.mainPasteEvent&&(e.on("paste",function(a){E||(f(),a.data.preventDefault(),x(a),k("paste"))}),e.on("contextmenu",h,null,null,0),e.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));e.on("beforecut",function(){!C&&m(a)});var c;e.attachListener(CKEDITOR.env.ie?e:a.document.getDocumentElement(),"mouseup",function(){c=setTimeout(w,0)});a.on("destroy",function(){clearTimeout(c)});e.on("keyup",
w)}function e(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&m();var b;var e=this.type;if(CKEDITOR.env.ie)b=k(e);else try{b=a.document.$.execCommand(e,!1,null)}catch(d){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function d(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function e(b,f){f="undefined"!==typeof f?f:!0;b?(b.method="paste",b.dataTransfer||
(b.dataTransfer=D.initPasteDataTransfer()),c(a,b,f)):g&&!a._.forcePasteDialog&&a.showNotification(k,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var d=this,g="undefined"!==typeof b.notification?b.notification:!0,f=b.type,h=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),k="string"===typeof g?g:a.lang.clipboard.pasteNotification.replace(/%1/,
'\x3ckbd aria-label\x3d"'+h.aria+'"\x3e'+h.display+"\x3c/kbd\x3e"),h="string"===typeof b?b:b.dataValue;f&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=f:delete a._.nextPasteType;"string"===typeof h?e({dataValue:h}):a.getClipboardData(e)}}}function f(){E=1;setTimeout(function(){E=0},100)}function h(){C=1;setTimeout(function(){C=0},10)}function k(b){var e=a.document,d=e.getBody(),c=!1,f=function(){c=!0};d.on(b,f);7<CKEDITOR.env.version?e.$.execCommand(b):
e.$.selection.createRange().execCommand(b);d.removeListener(b,f);return c}function m(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),e,d,c;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(e=b.getSelectedElement())&&(d=b.getRanges()[0],c=a.document.createText(""),c.insertBefore(e),d.setStartBefore(c),d.setEndAfter(e),b.selectRanges([d]),setTimeout(function(){e.getParent()&&(c.remove(),b.selectElement(e))},0))}}function l(b,e){var d=a.document,c=a.editable(),f=function(a){a.cancel()},h;
if(!d.getById("cke_pastebin")){var k=a.getSelection(),m=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!c.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var p=0,d=d.getWindow();CKEDITOR.env.webkit?(c.append(n),n.addClass("cke_editable"),c.is("body")||(p="static"!=c.getComputedStyle("position")?c:CKEDITOR.dom.element.get(c.$.offsetParent),p=p.getDocumentPosition().y)):c.getAscendant(CKEDITOR.env.ie?
"body":"html",1).append(n);n.setStyles({position:"absolute",top:d.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(p=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)h=c.once("blur",f,null,null,-100);p&&n.focus();p=new CKEDITOR.dom.range(n);p.selectNodeContents(n);var u=p.select();CKEDITOR.env.ie&&(h=c.once("blur",function(){a.lockSelection(u)}));var t=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=t);h&&h.removeListener();CKEDITOR.env.ie&&c.focus();k.selectBookmarks(m);n.remove();var b;CKEDITOR.env.webkit&&(b=n.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&
(n=b);a.removeListener("selectionChange",f);e(n.getHtml())},0)}}function B(){if("paste"==D.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();f();var b=a.focusManager;b.lock();if(a.editable().fire(D.mainPasteEvent)&&!k("paste"))return b.unlock(),!1;b.unlock();return!0}function z(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();f();"paste"==D.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function x(b){var e={type:"auto",method:"paste",dataTransfer:D.initPasteDataTransfer(b)};e.dataTransfer.cacheData();var d=!1!==a.fire("beforePaste",e);d&&D.canClipboardApiBeTrusted(e.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){c(a,e)},0)):l(b,function(b){e.dataValue=b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&c(a,e)})}function w(){if("wysiwyg"==a.mode){var b=A("paste");a.getCommand("cut").setState(A("cut"));
a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function A(b){var e=a.getSelection(),e=e&&e.getRanges()[0];if((a.readOnly||e&&e.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();e=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==e.length&&e[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var D=CKEDITOR.plugins.clipboard,C=0,E=0;(function(){a.on("key",
z);a.on("contentDom",b);a.on("selectionChange",w);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:A("cut"),copy:A("copy"),paste:A("paste")}});var e=null;a.on("menuShow",function(){e&&(e.removeListener(),e=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(e=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=
CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(e,d,c,f,h){var k=a.lang.clipboard[d];a.addCommand(d,c);a.ui.addButton&&a.ui.addButton(e,{label:k,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:k,command:d,group:"clipboard",order:h})}b("Cut","cut",e("cut"),10,1);b("Copy","copy",e("copy"),20,4);b("Paste","paste",d(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=
function(b,e){function d(a){a.removeListener();a.cancel();e(a.data)}function c(a){a.removeListener();a.cancel();e({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,h="auto";e||(e=b,b=null);a.on("beforePaste",function(a){a.removeListener();f=!0;h=a.data.type},null,null,1E3);a.on("paste",d,null,null,0);!1===B()&&(a.removeListener("paste",d),a._.forcePasteDialog&&f&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",c),a.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",c);a.data._.committed||e(null)})):e(null))}}function h(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function f(a,b){function e(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return e(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return e(a.length/4)})+"\x3c/p\x3e"));return d(a,b)}function a(a){function b(){var a={},e;for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=
e&&(a[e]=1);return a}var e={};return{get:function(d){return"plain-text"==d?e.plainText||(e.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=e.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=e.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function b(a,b,e){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;e.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}
function d(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function l(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function e(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function e(b,d,f){d.select();c(a,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot");
f.sourceEditor.editable().extractHtmlFromRange(b);f.sourceEditor.getSelection().selectRanges([b]);f.sourceEditor.fire("saveSnapshot")}function d(e,f){e.select();c(a,{dataTransfer:f,method:"drop"},1);b.resetDragDataTransfer()}function f(b,e,d){var c={$:b.data.$,target:b.data.getTarget()};e&&(c.dragRange=e);d&&(c.dropRange=d);!1===a.fire(b.name,c)&&b.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=a.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(a),
l=a.ui.space("top"),B=a.ui.space("bottom");b.preventDefaultDropOnElement(l);b.preventDefaultDropOnElement(B);k.attachListener(m,"dragstart",f);k.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);k.attachListener(a,"dragstart",function(e){b.initDragDataTransfer(e,a)},null,null,2);k.attachListener(a,"dragstart",function(){var e=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=e?h(e.startContainer):null,b.dragEndContainerChildCount=
e?h(e.endContainer):null)},null,null,100);k.attachListener(m,"dragend",f);k.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);k.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);k.attachListener(m,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});
k.attachListener(m,"drop",function(e){if(!e.data.$.defaultPrevented&&(e.data.preventDefault(),!a.readOnly)){var d=e.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=b.getRangeAtDropPosition(e,a),c=b.dragRange;d&&f(e,c,d)}}},null,null,9999);k.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);k.attachListener(a,"drop",function(c){if(c=c.data){var f=c.dropRange,h=c.dragRange,k=c.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){b.internalDrop(h,
f,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?e(h,f,k):d(f,k)}},null,null,9999)})}var m;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",_supportedFileMatchers:[],init:function(d){function c(a){return d.config.clipboard_handleImages?-1!==CKEDITOR.tools.indexOf(["image/png","image/jpeg","image/gif"],a.type):!1}function m(a){return CKEDITOR.tools.array.some(d.plugins.clipboard._supportedFileMatchers,function(b){return b(a)})}function l(a){a.length&&(a=
CKEDITOR.tools.array.unique(a),a=CKEDITOR.tools.array.filter(a,function(a){return!!CKEDITOR.tools.trim(a)}),a=r(a.join(", ")),d.showNotification(a,"info",d.config.clipboard_notificationDuration))}function r(a){return a?d.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,"\x3cem\x3e"+a+"\x3c/em\x3e"):d.lang.clipboard.fileWithoutFormatNotSupportedNotification}function q(a,b){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||b&&B!==b.id)?!1:b.isFileTransfer()&&
1===b.getFilesCount()}var t,y=a(d);d.config.forcePasteAsPlainText?t="plain-text":d.config.pasteFilter?t=d.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in d.config||(t="semantic-content");d.pasteFilter=y.get(t);k(d);e(d);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));var u=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported,B;CKEDITOR.plugins.clipboard.addFileMatcher(d,c);d.on("paste",function(a){if(u){var b=a.data;
a=b.dataTransfer;if(!b.dataValue){for(var b=[],e=0;e<a.getFilesCount();e++){var d=a.getFile(e);m(d)||b.push(d.type)}l(b)}}},null,null,1);d.on("paste",function(a){if(u&&d.config.clipboard_handleImages){var b=a.data,e=b.dataTransfer;if(!b.dataValue&&q(a,e)&&(e=e.getFile(0),c(e))){var f=new FileReader;f.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+f.result+'" /\x3e';d.fire("paste",a.data)},!1);f.addEventListener("abort",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=
!0);d.fire("paste",a.data)},!1);f.addEventListener("error",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=!0);d.fire("paste",a.data)},!1);f.readAsDataURL(e);B=b.dataTransfer.id;a.stop()}}},null,null,1);d.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var b=a.data.dataTransfer,e=b.getData("text/html");if(e)a.data.dataValue=e,a.data.type="html";else if(e=b.getData("text/plain"))a.data.dataValue=d.editable().transformPlainTextToHtml(e),
a.data.type="text"}},null,null,1);d.on("paste",function(a){var b=a.data.dataValue,e=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,
"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,c,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(d=g.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)g=c=d;c&&(b=c.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in e?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,
function(b,d){return d in e?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);d.on("paste",function(a){a=a.data;var e=d._.nextPasteType||a.type,c=a.dataValue,k,m=d.config.clipboard_defaultContentType||"html",l=a.dataTransfer.getTransferType(d)==CKEDITOR.DATA_TRANSFER_EXTERNAL,p=!0===d.config.forcePasteAsPlainText;k="html"==e||"html"==a.preSniffing?"html":h(c);delete d._.nextPasteType;"htmlifiedtext"==k&&(c=f(d.config,c));
if("text"==e&&"html"==k)c=b(d,c,y.get("plain-text"));else if(l&&d.pasteFilter&&!a.dontFilter||p)c=b(d,c,d.pasteFilter);a.startsWithEOL&&(c='\x3cbr data-cke-eol\x3d"1"\x3e'+c);a.endsWithEOL&&(c+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==k||"html"==m?"html":"text");a.type=e;a.dataValue=c;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL},null,null,6);d.on("paste",function(a){a=a.data;a.dataValue&&(d.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){d.fire("afterPaste")},
0))},null,null,1E3);d.on("pasteDialog",function(a){setTimeout(function(){d.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={addFileMatcher:function(a,b){a.plugins.clipboard._supportedFileMatchers.push(b)},isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?
"beforepaste":"paste",addPasteButton:function(a,b,e){a.ui.addButton&&(a.ui.addButton(b,e),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?
!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,e,d){function c(a,e,d){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(e)&&d!=e.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),e=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&e&&e.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+e.getText()),e.remove(),b.setStart(a,
d),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof d&&"number"==typeof e&&f.type==CKEDITOR.NODE_ELEMENT&&(c(a.startContainer,f,e)||c(a.endContainer,f,d))},isDropRangeAffectedByDragRange:function(a,b){var e=b.startContainer,d=b.endOffset;return a.endContainer.equals(e)&&a.endOffset<=d||a.startContainer.getParent().equals(e)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(e)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(a,b,e,d){var f=CKEDITOR.plugins.clipboard,
h=d.editable(),k,m;d.fire("saveSnapshot");d.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(a,b))||(k=a.createBookmark(!1));f=b.clone().createBookmark(!1);m&&(k=a.createBookmark(!1));a=k.startNode;b=k.endNode;m=f.startNode;b&&a.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(a);a=d.createRange();
a.moveToBookmark(k);h.extractHtmlFromRange(a,1);b=d.createRange();f.startNode.getCommonAncestor(h)||(f=d.getSelection().createBookmarks()[0]);b.moveToBookmark(f);c(d,{dataTransfer:e,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var e=a.data.$,d=e.clientX,c=e.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,c))e=b.document.$.caretRangeFromPoint(d,
c),h.setStart(CKEDITOR.dom.node(e.startContainer),e.startOffset),h.collapse(!0);else if(e.rangeParent)h.setStart(CKEDITOR.dom.node(e.rangeParent),e.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&f&&b.editable().hasFocus)return f;if(document.body.createTextRange){b.focus();e=b.document.getBody().$.createTextRange();try{for(var k=!1,m=0;20>m&&!k;m++){if(!k)try{e.moveToPoint(d,c-m),k=!0}catch(l){}if(!k)try{e.moveToPoint(d,c+m),k=!0}catch(z){}}if(k){var x="cke-temp-"+(new Date).getTime();
e.pasteHTML('\x3cspan id\x3d"'+x+'"\x3e​\x3c/span\x3e');var w=b.document.getById(x);h.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START);w.remove()}else{var A=b.document.$.elementFromPoint(d,c),D=new CKEDITOR.dom.element(A),C;if(D.equals(b.editable())||"html"==D.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;C=D.getClientRect();d<C.left?h.setStartAt(D,CKEDITOR.POSITION_AFTER_START):h.setStartAt(D,CKEDITOR.POSITION_BEFORE_END);h.collapse(!0)}}catch(E){return null}}else return null}return h},
initDragDataTransfer:function(a,b){var e=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(e,b);"dragstart"===a.name&&d.storeId();e?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var e=a.data.$.clipboardData,d=new this.dataTransfer(e,b);"copy"!==a.name&&
"cut"!==a.name||d.storeId();this.copyCutData&&d.id==this.copyCutData.id?(d=this.copyCutData,d.$=e):this.copyCutData=d;return d}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",l)}};m=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,
types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(m);this.id||(this.id="Text"==m?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==m||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};
CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var e="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===e||null===e||""===e){if(this._.fallbackDataTransfer.isRequired())e=this._.fallbackDataTransfer.getData(a,b);else try{e=this.$.getData(a)||""}catch(d){e=""}"text/html"!=a||b||(e=this._stripHtml(e))}"Text"==a&&CKEDITOR.env.gecko&&
this.getFilesCount()&&"file://"==e.substring(0,7)&&(e="");if("string"===typeof e)var c=e.indexOf("\x3c/html\x3e"),e=-1!==c?e.substring(0,c+7):e;return e},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==m&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,
b)}catch(e){}},storeId:function(){"Text"!==m&&this.setData(m,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(e){e=b._.normalizeType(e);var d=b.getData(e);"text/html"==e&&(b._.nativeHtmlCache=b.getData(e,!0),d=b._stripHtml(d));d&&(b._.data[e]=d);b._.types.push(e)}if(this.$){var b=this,e,d,c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(e=
0;e<this.$.types.length;e++)a(this.$.types[e])}else a("Text"),a("URL");d=this._getImageFromClipboard();if((c=this.$&&this.$.files||null)||d){this._.files=[];if(c&&c.length)for(e=0;e<c.length;e++)this._.files.push(c[e]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){if(this._.files.length)return this._.files.length;var a=this.$&&this.$.files||null;return a&&a.length?a.length:this._getImageFromClipboard()?1:0},getFile:function(a){if(this._.files.length)return this._.files[a];
var b=this.$&&this.$.files||null;return b&&b.length?b[a]:0===a?this._getImageFromClipboard():void 0},isFileTransfer:function(){var a=this.getTypes(),a=CKEDITOR.tools.array.filter(a,function(a){return"application/x-moz-file"!==a});return 1===a.length&&"files"===a[0].toLowerCase()},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var e=
0;e<this.$.types.length;e++)a[this.$.types[e]]=1}else a.Text=1,a.URL=1;"Text"!=m&&(a[m]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},getTypes:function(){return 0<this._.types.length?this._.types:this.$&&this.$.types?[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var a;try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}},_stripHtml:function(a){function b(a){var e=new CKEDITOR.htmlParser,d,c;e.onTagOpen=function(a){"body"===
a&&(d=e._.htmlPartsRegex.lastIndex)};e.onTagClose=function(a){"body"===a&&(c=e._.htmlPartsRegex.lastIndex)};e.parse(a);return"number"!==typeof d||"number"!==typeof c?a:a.substring(d,c).replace(/<\/body\s*>$/gi,"")}a&&a.length&&(a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=
null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(e){}}else return!1;
return!a._isCustomMimeTypeSupported},getData:function(a,b){var e=this._getData(this._customDataFallbackType,!0);if(b)return e;var e=this._extractDataComment(e),d=null,d=a===this._customDataFallbackType?e.content:e.data&&e.data[a]?e.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var e=a===this._customDataFallbackType;e&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,c=this._dataTransfer.$;try{c.setData(a,d),e&&(this._dataTransfer._.nativeHtmlCache=d)}catch(f){if(this._isUnsupportedMimeTypeError(f)){e=
CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(e._customTypes,a)&&e._customTypes.push(a);var e=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=d;try{d=this._applyDataComment(e,h),c.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(k){d=""}}}return d},_getData:function(a,b){var e=this._dataTransfer._.data;if(!b&&e[a])return e[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a=
this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},e=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==e[a]?b[a]=e[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&
-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16<a.length){var e;(e=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&e[1]&&(b.data=JSON.parse(decodeURIComponent(e[1])),b.content=a.replace(e[0],""))}return b},_applyDataComment:function(a,b){var e="";b&&CKEDITOR.tools.object.keys(b).length&&(e="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return e+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=
1E4,CKEDITOR.config.clipboard_handleImages=!0,"use strict",function(){function c(c,f){for(var a=c.length,b=0,d=0;d<a;d+=1){var k=c[d];if(f>=b&&b+k.getText().length>=f)return{element:k,offset:f-b};b+=k.getText().length}return null}function k(c,f){for(var a=0;a<c.length;a++)if(f(c[a]))return a;return-1}CKEDITOR.plugins.add("textmatch",{});CKEDITOR.plugins.textMatch={};CKEDITOR.plugins.textMatch.match=function(c,f){var a=CKEDITOR.plugins.textMatch.getTextAndOffset(c),b=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,
d=0;if(a)return 0==a.text.indexOf(b)&&(d=b.length,a.text=a.text.replace(b,""),a.offset-=d),(b=f(a.text,a.offset))?{range:CKEDITOR.plugins.textMatch.getRangeInText(c,b.start,b.end+d),text:a.text.slice(b.start,b.end)}:null};CKEDITOR.plugins.textMatch.getTextAndOffset=function(c){if(!c.collapsed)return null;var f="",a=0,b=CKEDITOR.plugins.textMatch.getAdjacentTextNodes(c),d=!1,l,e=c.startContainer.type!=CKEDITOR.NODE_ELEMENT;l=e?k(b,function(a){return c.startContainer.equals(a)}):c.startOffset-(b[0]?
b[0].getIndex():0);for(var m=b.length,g=0;g<m;g+=1){var n=b[g],f=f+n.getText();d||(e?g==l?(d=!0,a+=c.startOffset):a+=n.getText().length:(g==l&&(d=!0),0<g&&(a+=b[g-1].getText().length),m==l&&g+1==m&&(a+=n.getText().length)))}return{text:f,offset:a}};CKEDITOR.plugins.textMatch.getRangeInText=function(h,f,a){var b=new CKEDITOR.dom.range(h.root);h=CKEDITOR.plugins.textMatch.getAdjacentTextNodes(h);f=c(h,f);a=c(h,a);b.setStart(f.element,f.offset);b.setEnd(a.element,a.offset);return b};CKEDITOR.plugins.textMatch.getAdjacentTextNodes=
function(c){if(!c.collapsed)return[];var f=[],a,b,d;c.startContainer.type!=CKEDITOR.NODE_ELEMENT?(a=c.startContainer.getParent().getChildren(),c=c.startContainer.getIndex()):(a=c.startContainer.getChildren(),c=c.startOffset);for(d=c;b=a.getItem(--d);)if(b.type==CKEDITOR.NODE_TEXT)f.unshift(b);else break;for(d=c;b=a.getItem(d++);)if(b.type==CKEDITOR.NODE_TEXT)f.push(b);else break;return f}}(),function(){function c(a,c){var e=b.exec(a),f=b.exec(c);if(e){if(!e[2]&&"px"==f[2])return f[1];if("px"==e[2]&&
!f[2])return f[1]+"px"}return c}function k(a){return{elements:{$:function(b){var e=b.attributes,e=e&&e["data-cke-realelement"],k=h(a,decodeURIComponent(e));if((e=(e=e&&new CKEDITOR.htmlParser.fragment.fromHtml(k))&&e.children[0])&&b.attributes["data-cke-resizable"]){var g=(new f(b)).rules;b=e.attributes;k=g.width;g=g.height;k&&(b.width=c(b.width,k));g&&(b.height=c(b.height,g))}return e}}}}function h(a,b){var e=[],c=/^cke:/i,f=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){c.test(a.name)&&
(a.name=a.name.replace(c,""),e.push(a))},iframe:function(a){a.children=[]}}}),h=a.activeFilter,k=new CKEDITOR.htmlParser.basicWriter,v=CKEDITOR.htmlParser.fragment.fromHtml(b);f.applyTo(v);h.applyTo(v);CKEDITOR.tools.array.forEach(e,function(a){a.name="cke:"+a.name});v.writeHtml(k);return k.getHtml()}var f=CKEDITOR.htmlParser.cssStyle,a=CKEDITOR.tools.cssLength,b=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}",
"fakeobjects")},afterInit:function(a){var b=a.dataProcessor;(b=b&&b.htmlFilter)&&b.addRules(k(a),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(b,c,e,h){var g=this.lang.fakeobjects,g=g[e]||g.unknown;c={"class":c,"data-cke-realelement":encodeURIComponent(b.getOuterHtml()),"data-cke-real-node-type":b.type,alt:g,title:g,align:b.getAttribute("align")||""};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);e&&(c["data-cke-real-element-type"]=e);h&&(c["data-cke-resizable"]=
h,e=new f,h=b.getAttribute("width"),b=b.getAttribute("height"),h&&(e.rules.width=a(h)),b&&(e.rules.height=a(b)),e.populate(c));return this.document.createElement("img",{attributes:c})};CKEDITOR.editor.prototype.createFakeParserElement=function(b,c,e,h){var g=this.lang.fakeobjects,g=g[e]||g.unknown,k;k=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(k);k=k.getHtml();c={"class":c,"data-cke-realelement":encodeURIComponent(k),"data-cke-real-node-type":b.type,alt:g,title:g,align:b.attributes.align||""};
CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);e&&(c["data-cke-real-element-type"]=e);h&&(c["data-cke-resizable"]=h,h=b.attributes,b=new f,e=h.width,h=h.height,void 0!==e&&(b.rules.width=a(e)),void 0!==h&&(b.rules.height=a(h)),b.populate(c));return new CKEDITOR.htmlParser.element("img",c)};CKEDITOR.editor.prototype.restoreRealElement=function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var b=decodeURIComponent(a.data("cke-realelement")),b=h(this,b),b=CKEDITOR.dom.element.createFromHtml(b,
this.document);if(a.data("cke-resizable")){var e=a.getStyle("width");a=a.getStyle("height");e&&b.setAttribute("width",c(b.getAttribute("width"),e));a&&b.setAttribute("height",c(b.getAttribute("height"),a))}return b}}(),"use strict",function(){function c(a){return a.replace(/'/g,"\\$\x26")}function k(a){for(var b=a.length,e=[],d,c=0;c<b;c++)d=a.charCodeAt(c),e.push(d);return"String.fromCharCode("+e.join(",")+")"}function h(a,b){for(var e=a.plugins.link,d=e.compiledProtectionFunction.params,e=[e.compiledProtectionFunction.name,
"("],f,g,h=0;h<d.length;h++)f=d[h].toLowerCase(),g=b[f],0<h&&e.push(","),e.push("'",g?c(encodeURIComponent(b[f])):"","'");e.push(")");return e.join("")}function f(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,e,d){b.name=e;b.params=[];d.replace(/[^,\s]+/g,function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return e.replace(/%1/g,"rtl"==b?"right":"left").replace(/%2/g,
"cke_contents_"+b)}var b="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",e=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(a){var b="a[!href]";
CKEDITOR.dialog.isTabEnabled(a,"link","advanced")&&(b=b.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(b=b.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:b,requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.addCommand("unlink",new CKEDITOR.unlinkCommand);
a.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,"link");a.setKeystroke(CKEDITOR.CTRL+75,"link");a.ui.addButton&&(a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"}),a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"}),a.ui.addButton("Anchor",{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",
this.path+"dialogs/anchor.js");a.on("doubleclick",function(b){var e=b.data.element.getAscendant({a:1,img:1},!0);e&&!e.isReadOnly()&&(e.is("a")?(b.data.dialog=!e.getAttribute("name")||e.getAttribute("href")&&e.getChildCount()?"link":"anchor",b.data.link=e):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,e)&&(b.data.dialog="anchor"))},null,null,0);a.on("doubleclick",function(b){b.data.dialog in{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},null,null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,
command:"anchor",group:"anchor",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var e={};b.getAttribute("href")&&
b.getChildCount()&&(e={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});b&&b.hasAttribute("name")&&(e.anchor=e.removeAnchor=CKEDITOR.TRISTATE_OFF);return e});this.compiledProtectionFunction=f(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,e){if("a"==e&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,
b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var a=/^javascript:/,b=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,d=/subject=([^;?:@&=$,\/]*)/i,l=/body=([^;?:@&=$,\/]*)/i,e=/^#(.*)$/,m=/^((?:http|https|ftp|news):\/\/)?(.*)$/,g=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,p=/^javascript:([^(]+)\(([^)]+)\)$/,v=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,
r=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,q=/^tel:(.*)$/,t={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(a,b){var e=a.getSelection(),d=e.getSelectedElement(),c=e.getRanges(),f=[],g;if(!b&&d&&d.is("a"))return d;for(d=0;d<c.length;d++)if(g=e.getRanges()[d],g.shrink(CKEDITOR.SHRINK_ELEMENT,
!0,{skipBogus:!0}),(g=a.elementPath(g.getCommonAncestor()).contains("a",1))&&b)f.push(g);else if(g)return g;return b?f:null},getEditorAnchors:function(a){for(var b=a.editable(),e=b.isInline()&&!a.plugins.divarea?a.document:b,b=e.getElementsByTag("a"),e=e.getElementsByTag("img"),d=[],c=0,f;f=b.getItem(c++);)(f.data("cke-saved-name")||f.hasAttribute("name"))&&d.push({name:f.data("cke-saved-name")||f.getAttribute("name"),id:f.getAttribute("id")});for(c=0;f=e.getItem(c++);)(f=this.tryRestoreFakeAnchor(a,
f))&&d.push({name:f.getAttribute("name"),id:f.getAttribute("id")});return d},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,b){if(b&&b.data("cke-real-element-type")&&"anchor"==b.data("cke-real-element-type")){var e=a.restoreRealElement(b);if(e.data("cke-saved-name"))return e}},parseLinkAttributes:function(c,f){var h=f&&(f.data("cke-saved-href")||f.getAttribute("href"))||"",k=c.plugins.link.compiledProtectionFunction,x=c.config.emailProtection,w={},A;h.match(a)&&("encode"==x?h=h.replace(n,function(a,
b,e){e=e||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+e.replace(/\\'/g,"'")}):x&&h.replace(p,function(a,b,e){if(b==k.name){w.type="email";a=w.email={};b=/(^')|('$)/g;e=e.match(/[^,\s]+/g);for(var d=e.length,c,f,g=0;g<d;g++)c=decodeURIComponent,f=e[g].replace(b,"").replace(/\\'/g,"'"),f=c(f),c=k.params[g].toLowerCase(),a[c]=f;a.address=[a.name,a.domain].join("@")}}));if(!w.type)if(x=h.match(e))w.type="anchor",w.anchor={},w.anchor.name=w.anchor.id=x[1];else if(x=h.match(q))w.type=
"tel",w.tel=x[1];else if(x=h.match(b)){A=h.match(d);var h=h.match(l),D=w.email={};w.type="email";D.address=x[0].replace("mailto:","");A&&(D.subject=decodeURIComponent(A[1]));h&&(D.body=decodeURIComponent(h[1]))}else h&&(A=h.match(m))&&(w.type="url",w.url={},w.url.protocol=A[1],w.url.url=A[2]);if(f){if(h=f.getAttribute("target"))w.target={type:h.match(g)?h:"frame",name:h};else if(h=(h=f.data("cke-pa-onclick")||f.getAttribute("onclick"))&&h.match(v))for(w.target={type:"popup",name:h[1]};x=r.exec(h[2]);)"yes"!=
x[2]&&"1"!=x[2]||x[1]in{height:1,width:1,top:1,left:1}?isFinite(x[2])&&(w.target[x[1]]=x[2]):w.target[x[1]]=!0;null!==f.getAttribute("download")&&(w.download=!0);var h={},C;for(C in t)(x=f.getAttribute(C))&&(h[t[C]]=x);if(C=f.data("cke-saved-name")||h.advName)h.advName=C;CKEDITOR.tools.isEmpty(h)||(w.advanced=h)}return w},getLinkAttributes:function(a,b){var e=a.config.emailProtection||"",d={};switch(b.type){case "url":var e=b.url&&void 0!==b.url.protocol?b.url.protocol:"http://",f=b.url&&CKEDITOR.tools.trim(b.url.url)||
"";d["data-cke-saved-href"]=0===f.indexOf("/")?f:e+f;break;case "anchor":e=b.anchor&&b.anchor.id;d["data-cke-saved-href"]="#"+(b.anchor&&b.anchor.name||e||"");break;case "email":var g=b.email,f=g.address;switch(e){case "":case "encode":var m=encodeURIComponent(g.subject||""),l=encodeURIComponent(g.body||""),g=[];m&&g.push("subject\x3d"+m);l&&g.push("body\x3d"+l);g=g.length?"?"+g.join("\x26"):"";"encode"==e?(e=["javascript:void(location.href\x3d'mailto:'+",k(f)],g&&e.push("+'",c(g),"'"),e.push(")")):
e=["mailto:",f,g];break;default:e=f.split("@",2),g.name=e[0],g.domain=e[1],e=["javascript:",h(a,g)]}d["data-cke-saved-href"]=e.join("");break;case "tel":d["data-cke-saved-href"]="tel:"+b.tel}if(b.target)if("popup"==b.target.type){for(var e=["window.open(this.href, '",b.target.name||"","', '"],p="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),f=p.length,m=function(a){b.target[a]&&p.push(a+"\x3d"+b.target[a])},g=0;g<f;g++)p[g]+=b.target[p[g]]?"\x3dyes":"\x3dno";
m("width");m("left");m("height");m("top");e.push(p.join(","),"'); return false;");d["data-cke-pa-onclick"]=e.join("")}else"notSet"!=b.target.type&&b.target.name&&(d.target=b.target.name);b.download&&(d.download="");if(b.advanced){for(var n in t)(e=b.advanced[t[n]])&&(d[n]=e);d.name&&(d["data-cke-saved-name"]=d.name)}d["data-cke-saved-href"]&&(d.href=d["data-cke-saved-href"]);n={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};b.advanced&&CKEDITOR.tools.extend(n,t);for(var q in d)delete n[q];
return{set:d,removed:CKEDITOR.tools.object.keys(n)}},showDisplayTextForElement:function(a,b){var e={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},d=b.getSelection();return b.widgets&&b.widgets.focused||d&&1<d.getRanges().length?!1:!a||!a.getName||!a.is(e)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var b=a.getSelection().getRanges()[0],e=b.getPreviousEditableNode()&&b.getPreviousEditableNode().getAscendant("a",!0)||
b.getNextEditableNode()&&b.getNextEditableNode().getAscendant("a",!0),d;b.collapsed&&e&&(d=b.createBookmark(),b.selectNodeContents(e),b.select())}e=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(e);d&&(b.moveToBookmark(d),b.select())},refresh:function(a,b){var e=b.lastElement&&b.lastElement.getAscendant("a",!0);e&&"a"==e.getName()&&e.getAttribute("href")&&e.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},
contextSensitive:1,startDisabled:1,requiredContent:"a[href]",editorFocus:1};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(a){var b=a.getSelection(),e=b.createBookmarks(),d;if(b&&(d=b.getSelectedElement())&&(d.getChildCount()?d.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))d.hasAttribute("href")?(d.removeAttributes({name:1,"data-cke-saved-name":1}),d.removeClass("cke_anchor")):
d.remove(1);b.selectBookmarks(e)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0,linkDefaultProtocol:"http://"})}(),function(){CKEDITOR.plugins.add("autolink",{requires:"clipboard,textmatch,link",isSupportedEnvironment:function(){return!CKEDITOR.env.ie||CKEDITOR.env.edge},init:function(c){function k(a){a=CKEDITOR.tools.htmlDecodeAttr(a);var b=new CKEDITOR.dom.element("a"),d=a.replace(/"/g,"%22"),d=d.match(c.config.autolink_urlRegex)?d:
"mailto:"+d;b.setText(a);b.setAttribute("href",d);a=CKEDITOR.plugins.link.parseLinkAttributes(c,b);a=CKEDITOR.plugins.link.getLinkAttributes(c,a);CKEDITOR.tools.isEmpty(a.set)||b.setAttributes(a.set);a.removed.length&&b.removeAttributes(a.removed);b.removeAttribute("data-cke-saved-href");return b.getOuterHtml()}function h(a,b){var d=a.slice(0,b).split(/\s+/);return(d=d[d.length-1])&&f(d)?{start:a.lastIndexOf(d),end:b}:null}function f(a){return a.match(c.config.autolink_urlRegex)||a.match(c.config.autolink_emailRegex)}
this.isSupportedEnvironment()&&(c.on("paste",function(a){if(a.data.dataTransfer.getTransferType(c)!=CKEDITOR.DATA_TRANSFER_INTERNAL){var b=a.data.dataValue;-1<b.indexOf("\x3c")||!f(b)||(a.data.dataValue=k(b),a.data.type="html")}}),c.on("key",function(a){if("wysiwyg"===c.mode&&-1!=CKEDITOR.tools.indexOf(c.config.autolink_commitKeystrokes,a.data.keyCode)){var b=CKEDITOR.plugins.textMatch.match(c.getSelection().getRanges()[0],h);if(b&&(a=c.getSelection(),!a.getRanges()[0].startContainer.getAscendant("a",
!0)&&(a.selectRanges([b.range]),c.insertHtml(k(b.text),"text"),!CKEDITOR.env.webkit))){var b=a.getRanges()[0],d=c.createRange();d.setStartAfter(b.startContainer);a.selectRanges([d])}}}))}});CKEDITOR.config.autolink_commitKeystrokes=[13,32];CKEDITOR.config.autolink_urlRegex=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#]\.?)+(\/[^\s]*)?[^\s\.,]$/i;CKEDITOR.config.autolink_emailRegex=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/}(),
"use strict",function(){function c(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var k=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],h={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function b(a){h.enabled&&!1!==a.data.command.canUndo&&h.save()}function c(){h.enabled=a.readOnly?!1:"wysiwyg"==a.mode;h.onChange()}var h=a.undoManager=new f(a),l=h.editingHandler=new d(h),v=a.addCommand("undo",{exec:function(){h.undo()&&(a.selectionChange(),this.fire("afterUndo"))},
startDisabled:!0,canUndo:!1}),r=a.addCommand("redo",{exec:function(){h.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[k[0],"undo"],[k[1],"redo"],[k[2],"redo"]]);h.onChange=function(){v.setState(h.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);r.setState(h.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",b);a.on("afterCommandExec",b);a.on("saveSnapshot",function(a){h.save(a.data&&a.data.contentOnly)});
a.on("contentDom",l.attachListeners,l);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&h.save(!0)});a.on("mode",c);a.on("readOnly",c);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){h.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){h.currentImage&&h.update()});a.on("lockSnapshot",
function(a){a=a.data;h.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",h.unlock,h)}});CKEDITOR.plugins.undo={};var f=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};f.prototype={type:function(a,b){var d=f.getKeyGroup(a),
c=this.strokesRecorded[d]+1;b=b||c>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());b?(c=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[d]=c;this.previousKeyGroup=d},keyGroupChanged:function(a){return f.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=
[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(b,d,c){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;d||(d=new a(f));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(b||d.equalsSelection(this.currentImage))return!1}else!1!==
c&&f.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(d)-1;this.currentImage=d;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,d;a.bookmarks&&(b.focus(),d=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?d.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(d=this.editor.document.getBody().$.createTextRange(),d.collapse(!0),d.select());this.locked=null;this.index=a.index;
this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,d=this.currentImage,c;if(d)if(a)for(c=this.index-1;0<=c;c--){if(a=b[c],!d.equalsContent(a))return a.index=c,a}else for(c=this.index+1;c<b.length;c++)if(a=b[c],!d.equalsContent(a))return a.index=c,a;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);
var a=this.getNextImage(!0);if(a)return this.restoreImage(a),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=this.getNextImage(!1);if(a)return this.restoreImage(a),!0}return!1},update:function(b){if(!this.locked){b||(b=new a(this.editor));for(var d=this.index,c=this.snapshots;0<d&&this.currentImage.equalsContent(c[d-1]);)--d;c.splice(d,this.index-d+1,b);this.index=d;this.currentImage=b}},updateSelection:function(a){if(!this.snapshots.length)return!1;var b=this.snapshots,
d=b[b.length-1];return d.equalsContent(a)&&!d.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(b,d){if(this.locked)this.locked.level++;else if(b)this.locked={level:1};else{var c=null;if(d)c=!0;else{var f=new a(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(f)&&(c=f)}this.locked={update:c,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var b=this.locked.update;this.locked=null;if(!0===b)this.update();else if(b){var d=new a(this.editor,
!0);b.equalsContent(d)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};f.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};f.keyGroups={PRINTABLE:0,FUNCTIONAL:1};f.isNavigationKey=function(a){return!!f.navigationKeyCodes[a]};f.getKeyGroup=function(a){var b=f.keyGroups;return h[a]?b.FUNCTIONAL:b.PRINTABLE};f.getOppositeKeyGroup=function(a){var b=f.keyGroups;return a==b.FUNCTIONAL?b.PRINTABLE:b.FUNCTIONAL};f.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&
f.getKeyGroup(a)==f.keyGroups.FUNCTIONAL};var a=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");var d=a.getSnapshot();d&&(this.contents=c(d,a.undoManager._filterRules));b||(this.bookmarks=(d=d&&a.getSelection())&&d.createBookmarks2(!0));a.fire("afterUndoImage")},b=/\b(?:href|src|name)="[^"]*?"/gi;a.prototype={equalsContent:function(a){var d=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(d=d.replace(b,""),a=a.replace(b,
""));return d!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var d=0;d<b.length;d++){var c=b[d],f=a[d];if(c.startOffset!=f.startOffset||c.endOffset!=f.endOffset||!CKEDITOR.tools.arrayCompare(c.start,f.start)||!CKEDITOR.tools.arrayCompare(c.end,f.end))return!1}}return!0}};var d=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new l;this.lastKeydownImage=
null};d.prototype={onKeydown:function(b){var d=b.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(k,b.data.getKeystroke()))b.data.preventDefault();else if(this.keyEventsStack.cleanUp(b),b=this.undoManager,this.keyEventsStack.getLast(d)||this.keyEventsStack.push(d),this.lastKeydownImage=new a(b.editor),f.isNavigationKey(d)||this.undoManager.keyGroupChanged(d))if(b.strokesRecorded[0]||b.strokesRecorded[1])b.save(!1,this.lastKeydownImage,!1),b.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=
!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var d=this.undoManager;b=b.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(f.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new a(d.editor,
!0))))if(0<c)d.type(b);else if(f.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(b){var d=this.undoManager;!b&&d.save(!0,null,!1)||d.updateSelection(new a(d.editor));d.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,b=a.editable(),d=this;b.attachListener(b,"keydown",function(a){d.onKeydown(a);if(f.ieFunctionalKeysBug(a.data.getKey()))d.onInput()},
null,null,999);b.attachListener(b,CKEDITOR.env.ie?"keypress":"input",d.onInput,d,null,999);b.attachListener(b,"keyup",d.onKeyup,d,null,999);b.attachListener(b,"paste",d.ignoreInputEventListener,d,null,999);b.attachListener(b,"drop",d.ignoreInputEventListener,d,null,999);a.on("afterPaste",d.activateInputEventListener,d,null,999);b.attachListener(b.isInline()?b:a.document.getDocumentElement(),"click",function(){d.onNavigationKey()},null,null,999);b.attachListener(this.undoManager.editor,"blur",function(){d.keyEventsStack.remove(9)},
null,null,999)}};var l=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};l.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=
a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),"use strict",function(){function c(c,f){var a=c.editable().findOne('a[data-cke-autoembed\x3d"'+f+'"]'),b=c.lang.autoembed,
d;if(a&&a.data("cke-saved-href")){var a=a.data("cke-saved-href"),k=CKEDITOR.plugins.autoEmbed.getWidgetDefinition(c,a);if(k){var e="function"==typeof k.defaults?k.defaults():k.defaults,e=CKEDITOR.dom.element.createFromHtml(k.template.output(e)),m,g=c.widgets.wrapElement(e,k.name),n=new CKEDITOR.dom.documentFragment(g.getDocument());n.append(g);(m=c.widgets.initOn(e,k))?(d=c.showNotification(b.embeddingInProgress,"info"),m.loadContent(a,{noNotifications:!0,callback:function(){var a=c.editable().findOne('a[data-cke-autoembed\x3d"'+
f+'"]');if(a){var b=c.getSelection(),e=c.createRange(),k=c.editable();c.fire("saveSnapshot");c.fire("lockSnapshot",{dontUpdate:!0});var l=b.createBookmarks(!1)[0],m=l.startNode,u=l.endNode||m;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&!l.endNode&&m.equals(a.getNext())&&a.append(m);e.setStartBefore(a);e.setEndAfter(a);k.insertElement(g,e);k.contains(m)&&k.contains(u)?b.selectBookmarks([l]):(m.remove(),u.remove());c.fire("unlockSnapshot")}d.hide();c.widgets.finalizeCreation(n)},errorCallback:function(){d.hide();
c.widgets.destroy(m,!0);c.showNotification(b.embeddingFailed,"info")}})):c.widgets.finalizeCreation(n)}else CKEDITOR.warn("autoembed-no-widget-def")}}var k=/^<a[^>]+href="([^"]+)"[^>]*>([^<]+)<\/a>$/i;CKEDITOR.plugins.add("autoembed",{requires:"autolink,undo",init:function(h){var f=1,a;h.on("paste",function(b){if(b.data.dataTransfer.getTransferType(h)==CKEDITOR.DATA_TRANSFER_INTERNAL)a=0;else{var d=b.data.dataValue.match(k);if(a=null!=d&&decodeURI(d[1])==decodeURI(d[2]))b.data.dataValue='\x3ca data-cke-autoembed\x3d"'+
++f+'"'+b.data.dataValue.substr(2)}},null,null,20);h.on("afterPaste",function(){a&&c(h,f)})}});CKEDITOR.plugins.autoEmbed={getWidgetDefinition:function(c,f){var a=c.config.autoEmbed_widget||"embed,embedSemantic",b,d=c.widgets.registered;if("string"==typeof a)for(a=a.split(",");b=a.shift();){if(d[b])return d[b]}else if("function"==typeof a)return d[a(f)];return null}}}(),"use strict",function(){function c(c){function h(){b=c.document;d=b[CKEDITOR.env.ie?"getBody":"getDocumentElement"]();l=CKEDITOR.env.quirks?
b.getBody():b.getDocumentElement();var a=CKEDITOR.env.quirks?l:l.findOne("body");a&&(a.setStyle("height","auto"),a.setStyle("min-height",CKEDITOR.env.safari?"0%":"auto"));e=CKEDITOR.dom.element.createFromHtml('\x3cspan style\x3d"margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;"\x3e'+(CKEDITOR.env.webkit?"\x26nbsp;":"")+"\x3c/span\x3e",b)}function f(){p&&l.setStyle("overflow-y","hidden");var f=c.window.getViewPaneSize().height,h;d.append(e);h=e.getDocumentPosition(b).y+e.$.offsetHeight;
e.remove();h+=m;h=Math.max(h,g);h=Math.min(h,n);h!=f&&a!=h&&(h=c.fire("autoGrow",{currentHeight:f,newHeight:h}).newHeight,c.resize(null,h,!0),a=h);p||(h<n&&l.$.scrollHeight>l.$.clientHeight?l.setStyle("overflow-y","hidden"):l.removeStyle("overflow-y"))}var a,b,d,l,e,m=c.config.autoGrow_bottomSpace||0,g=void 0!==c.config.autoGrow_minHeight?c.config.autoGrow_minHeight:200,n=c.config.autoGrow_maxHeight||Infinity,p=!c.config.autoGrow_maxHeight;c.addCommand("autogrow",{exec:f,modes:{wysiwyg:1},readOnly:1,
canUndo:!1,editorFocus:!1});var v={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},r;for(r in v)c.on(r,function(b){"wysiwyg"==b.editor.mode&&setTimeout(function(){var b=c.getCommand("maximize");!c.window||b&&b.state==CKEDITOR.TRISTATE_ON?a=null:(f(),p||f())},100)});c.on("afterCommandExec",function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?l.removeStyle("overflow-y"):f())});c.on("contentDom",h);h();c.config.autoGrow_onStartup&&c.editable().isVisible()&&
c.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(k){if(k.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)k.on("instanceReady",function(){k.editable().isInline()?k.ui.space("contents").setStyle("height","auto"):c(k)})}})}(),function(){var c=!1;CKEDITOR.plugins.add("balloonpanel",{init:function(){c||(CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/balloonpanel.css"),c=!0)}});CKEDITOR.ui.balloonPanel=function(c,h){this.editor=c;CKEDITOR.tools.extend(this,
{width:360,height:"auto",triangleWidth:20,triangleHeight:20,triangleMinDistance:40},h,!0);this.templates={};for(var f in this.templateDefinitions)this.templates[f]=new CKEDITOR.template(this.templateDefinitions[f]);this.parts={};this.focusables={};this.showListeners={};this.activeShowListeners={};this.rect={visible:!1};this.build();c.on("destroy",function(){this.destroy()},this)};CKEDITOR.ui.balloonPanel.prototype={templateDefinitions:{panel:'\x3cdiv class\x3d"cke {id} cke_reset_all cke_chrome cke_balloon cke_editor_{name} cke_{langDir} '+
CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"dialog" style\x3d"{style}" tabindex\x3d"-1" aria-labelledby\x3d"cke_{name}_arialbl"\x3e\x3c/div\x3e',content:'\x3cdiv class\x3d"cke_balloon_content"\x3e{content}\x3c/div\x3e',title:'\x3cdiv class\x3d"cke_balloon_title" role\x3d"presentation"\x3e{title}\x3c/div\x3e',close:'\x3ca class\x3d"cke_balloon_close_button" href\x3d"javascript:void(0)" title\x3d"Close" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e',
triangleOuter:'\x3cspan class\x3d"cke_balloon_triangle cke_balloon_triangle_outer"\x3e\x3c/span\x3e',triangleInner:'\x3cspan class\x3d"cke_balloon_triangle cke_balloon_triangle_inner"\x3e\x26#8203;\x3c/span\x3e'},build:function(){var c=this.editor;this.parts={title:CKEDITOR.dom.element.createFromHtml(this.templates.title.output({title:this.title})),close:CKEDITOR.dom.element.createFromHtml(this.templates.close.output()),panel:CKEDITOR.dom.element.createFromHtml(this.templates.panel.output({id:c.id,
langDir:c.lang.dir,langCode:c.langCode,name:c.name,style:"display:none;",voiceLabel:c.lang.editorPanel+", "+c.name})),content:CKEDITOR.dom.element.createFromHtml(this.templates.content.output({content:this.content||""})),triangleOuter:CKEDITOR.dom.element.createFromHtml(this.templates.triangleOuter.output()),triangleInner:CKEDITOR.dom.element.createFromHtml(this.templates.triangleInner.output())};this.parts.panel.append(this.parts.title,1);this.parts.panel.append(this.parts.close,1);this.parts.panel.append(this.parts.triangleOuter);
this.parts.panel.append(this.parts.content);this.parts.triangleOuter.append(this.parts.triangleInner);this.registerFocusable(this.parts.panel);this.registerFocusable(this.parts.close);this.parts.title.unselectable();this.parts.close.unselectable();CKEDITOR.document.getBody().append(this.parts.panel);this.resize(this.width,this.height);this.on("show",this.activateShowListeners,this);this.on("hide",this.deactivateShowListeners,this);this.parts.close.on("click",function(c){this.hide();c.data.preventDefault()},
this)},show:function(){this.rect.visible||(this.rect.visible=!0,this.parts.panel.show(),this.fire("show"))},hide:function(){this.rect.visible&&(this.rect.visible=!1,this.parts.panel.hide(),this.blur(),this.fire("hide"))},blur:function(){this.editor.focus()},move:function(c,h){this.rect.left=h;this.rect.top=c;this.parts.panel.setStyles({left:CKEDITOR.tools.cssLength(h),top:CKEDITOR.tools.cssLength(c)})},attach:function(){function c(a,b){var d=Math.max(0,Math.min(a.right,b.right)-Math.max(a.left,b.left)),
e=Math.max(0,Math.min(a.bottom,b.bottom)-Math.max(a.top,b.top));return d*e}function h(a,b,d,e){a={top:a,left:b};a.right=a.left+d;a.bottom=a.top+e;return a}function f(a,b){a.right=b.right;a.width=a.right-a.left;b.y&&(a.y=b.y);return a}function a(a){var d=b(a,!0);a=b(a);d=f(d[0],d.pop());a=f(a[0],a.pop());d.bottom=a.bottom;d.height=d.bottom-d.top;a.y&&(d.y=a.y);a.top=d.top;a.height=d.height;return[d,a]}function b(a,b){var d=b?a[0]:a[a.length-1],e=b?"top":"bottom";return CKEDITOR.tools.array.filter(a,
function(a){if(a[e]===d[e])return a})}var d,l,e,m,g={right:"left",top:"bottom",topLeft:"bottomLeft",topRight:"bottomRight",bottom:"top",bottomLeft:"topLeft",bottomRight:"topRight",left:"right"};return function(b,p){if(b instanceof CKEDITOR.dom.selection){var v=b.getRanges(),v=b.isFake&&b.isInTable()?CKEDITOR.tools.array.map(v,function(a){return a.getClientRects(!0)[0]}):v[v.length-1].getClientRects(!0),r=v[0],q=v[v.length-1],t;t=r===q?[r]:r.top===q.top?[f(r,q)]:a(v)}if(p instanceof CKEDITOR.dom.element||
!p)p={focusElement:p};p=CKEDITOR.tools.extend(p,{show:!0});!0===p.show&&this.show();this.fire("attach");d=CKEDITOR.document.getWindow();l=this.editor.window.getFrame();e=this.editor.editable();m=e.isInline();!m&&CKEDITOR.env.safari&&(l=l.getParent());var v=this.getWidth(),r=this.getHeight(),q=v*r,y,u,B;y=b.getClientRect&&b.getClientRect(!0);var z=m?e.getClientRect(!0):l.getClientRect(!0),x=d.getViewPaneSize(),w=d.getScrollPosition(),A={top:Math.max(z.top,w.y),left:Math.max(z.left,w.x),right:Math.min(z.right,
x.width+w.x),bottom:Math.min(z.bottom,x.height+w.y)};m&&this.editor.elementMode===CKEDITOR.ELEMENT_MODE_INLINE&&(A=this._getViewPaneRect(d),A.right+=this.triangleWidth,A.bottom+=this.triangleHeight);t?(CKEDITOR.tools.array.forEach(t,function(a){this._adjustElementRect(a,m?A:z)},this),y=this._getAlignments(t[0],v,r),1<t.length&&(y["bottom hcenter"]=this._getAlignments(t[1],v,r)["bottom hcenter"]),B={"top hcenter":!0,"bottom hcenter":!0}):(this._adjustElementRect(y,m?A:z),y=this._getAlignments(y,v,
r));for(var D in B||y){B=h(y[D].top,y[D].left,v,r);B=y[D].areaDifference=q-c(B,A);if(0===B){u=D;break}u||(u=D);B<y[u].areaDifference&&(u=D)}D=(B=this.parts.panel.getAscendant(function(a){return a instanceof CKEDITOR.dom.document?!1:"static"!==a.getComputedStyle("position")}))?parseInt(B.getComputedStyle("margin-left"),10):0;B=B?parseInt(B.getComputedStyle("margin-top"),10):0;this.move(y[u].top-B,y[u].left-D);u=u.split(" ");this.setTriangle(g[u[0]],u[1]);!1!==p.focusElement&&(p.focusElement||this.parts.panel).focus()}}(),
resize:function(c,h){this.rect.width=c;this.rect.height=h;this.parts.panel.setStyles({width:CKEDITOR.tools.cssLength(c),height:CKEDITOR.tools.cssLength(h)})},getWidth:function(){return"auto"===this.rect.width?this.parts.panel.getClientRect().width:this.rect.width},getHeight:function(){return"auto"===this.rect.height?this.parts.panel.getClientRect().height:this.rect.height},setTriangle:function(c,h){var f=this.parts.triangleOuter,a=this.parts.triangleInner;this.triangleSide&&(f.removeClass("cke_balloon_triangle_"+
this.triangleSide),f.removeClass("cke_balloon_triangle_align_"+this.triangleAlign),a.removeClass("cke_balloon_triangle_"+this.triangleSide));this.triangleSide=c;this.triangleAlign=h;f.addClass("cke_balloon_triangle_"+c);f.addClass("cke_balloon_triangle_align_"+h);a.addClass("cke_balloon_triangle_"+c)},registerFocusable:function(c){this.editor.focusManager.add(c);this.focusables[c.getUniqueId()]=c},deregisterFocusable:function(c){this.editor.focusManager.remove(c);delete this.focusables[c.getUniqueId()]},
addShowListener:function(c){var h=CKEDITOR.tools.getNextNumber();this.showListeners[h]=c;this.rect.visible&&this.activateShowListener(h);var f=this;return{removeListener:function(){f.removeShowListener(h)}}},removeShowListener:function(c){this.deactivateShowListener(c);delete this.showListeners[c]},activateShowListener:function(c){this.activeShowListeners[c]=this.showListeners[c].call(this)},deactivateShowListener:function(c){this.activeShowListeners[c]&&this.activeShowListeners[c].removeListener();
delete this.activeShowListeners[c]},activateShowListeners:function(){for(var c in this.showListeners)this.activateShowListener(c)},deactivateShowListeners:function(){for(var c in this.activeShowListeners)this.deactivateShowListener(c)},destroy:function(){this.deactivateShowListeners();this.parts.panel.remove()},setTitle:function(c){this.parts.title.setHtml(c)},_getAlignments:function(c,h,f){return{"right vcenter":{top:c.top+c.height/2-f/2,left:c.right+this.triangleWidth},"left vcenter":{top:c.top+
c.height/2-f/2,left:c.left-h-this.triangleWidth},"top hcenter":{top:c.top-f-this.triangleHeight,left:c.left+c.width/2-h/2},"top left":{top:c.top-f-this.triangleHeight,left:c.left+c.width/2-this.triangleMinDistance},"top right":{top:c.top-f-this.triangleHeight,left:c.right-c.width/2-h+this.triangleMinDistance},"bottom hcenter":{top:c.bottom+this.triangleHeight,left:c.left+c.width/2-h/2},"bottom left":{top:c.bottom+this.triangleHeight,left:c.left+c.width/2-this.triangleMinDistance},"bottom right":{top:c.bottom+
this.triangleHeight,left:c.right-c.width/2-h+this.triangleMinDistance}}},_adjustElementRect:function(c,h){c.left=Math.max(h.left,Math.min(h.right-1,c.left));c.right=Math.max(h.left,Math.min(h.right,c.right));c.top=Math.max(h.top,Math.min(h.bottom-1,c.top));c.bottom=Math.max(h.top,Math.min(h.bottom,c.bottom))},_getViewPaneRect:function(c){var h=c.getScrollPosition();c=c.getViewPaneSize();return{top:h.y,bottom:h.y+c.height,left:h.x,right:h.x+c.width}}};CKEDITOR.event.implementOn(CKEDITOR.ui.balloonPanel.prototype)}(),
function(){function c(a,d){this.editor=a;this.options=d;this.toolbar=new CKEDITOR.ui.balloonToolbar(a);this.options&&"undefined"===typeof this.options.priority&&(this.options.priority=CKEDITOR.plugins.balloontoolbar.PRIORITY.MEDIUM);this._loadButtons()}function k(a){this.editor=a;this._contexts=[];this._listeners=[];this._attachListeners()}var h=function(){return CKEDITOR.tools.array.filter(["matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector"],function(a){return window.HTMLElement?
a in HTMLElement.prototype:!1})[0]}();CKEDITOR.ui.balloonToolbarView=function(a,d){d=CKEDITOR.tools.extend(d||{},{width:"auto",triangleWidth:7,triangleHeight:7});CKEDITOR.ui.balloonPanel.call(this,a,d);this._listeners=[]};CKEDITOR.ui.balloonToolbar=function(a,d){this._view=new CKEDITOR.ui.balloonToolbarView(a,d);this._items={}};CKEDITOR.ui.balloonToolbar.prototype.attach=function(a,d){this._view.renderItems(this._items);this._view.attach(a,{focusElement:!1,show:!d})};CKEDITOR.ui.balloonToolbar.prototype.show=
function(){this._view.show()};CKEDITOR.ui.balloonToolbar.prototype.hide=function(){this._view.hide()};CKEDITOR.ui.balloonToolbar.prototype.reposition=function(){this._view.reposition()};CKEDITOR.ui.balloonToolbar.prototype.addItem=function(a,d){this._items[a]=d};CKEDITOR.ui.balloonToolbar.prototype.addItems=function(a){for(var d in a)this.addItem(d,a[d])};CKEDITOR.ui.balloonToolbar.prototype.getItem=function(a){return this._items[a]};CKEDITOR.ui.balloonToolbar.prototype.deleteItem=function(a){this._items[a]&&
(delete this._items[a],this._view.renderItems(this._items))};CKEDITOR.ui.balloonToolbar.prototype.destroy=function(){for(var a in this._items)this._items[a].destroy&&this._items[a].destroy(),this.deleteItem(a);this._pointedElement=null;this._view.destroy()};CKEDITOR.ui.balloonToolbar.prototype.refresh=function(){for(var a in this._items){var d=this._view.editor.getCommand(this._items[a].command);d&&d.refresh(this._view.editor,this._view.editor.elementPath())}};c.prototype={destroy:function(){this.toolbar&&
this.toolbar.destroy()},show:function(a){a&&this.toolbar.attach(a);this.toolbar.show()},hide:function(){this.toolbar.hide()},refresh:function(){this.toolbar.refresh()},_matchRefresh:function(a,d){var c=null;this.options.refresh&&(c=this.options.refresh(this.editor,a,d)||null)&&!1===c instanceof CKEDITOR.dom.element&&(c=a&&a.lastElement||this.editor.editable());return c},_matchWidget:function(){var a=this.options.widgets,d=null;if(a){var c=this.editor.widgets&&this.editor.widgets.focused&&this.editor.widgets.focused.name;
"string"===typeof a&&(a=a.split(","));-1!==CKEDITOR.tools.array.indexOf(a,c)&&(d=this.editor.widgets.focused.element)}return d},_matchElement:function(a){return this.options.cssSelector&&h&&a.$[h](this.options.cssSelector)?a:null},_loadButtons:function(){var a=this.options.buttons;a&&(a=a.split(","),CKEDITOR.tools.array.forEach(a,function(a){var b=this.editor.ui.create(a);b&&this.toolbar.addItem(a,b)},this))}};k.prototype={create:function(a){a=new CKEDITOR.plugins.balloontoolbar.context(this.editor,
a);this.add(a);return a},add:function(a){this._contexts.push(a)},check:function(a){function d(a,b,d){e(a,function(a){if(!k||k.options.priority>a.options.priority){var e=b(a,d);e instanceof CKEDITOR.dom.element&&(h=e,k=a)}})}function c(a,b){return a._matchElement(b)}a||(a=this.editor.getSelection(),CKEDITOR.tools.array.forEach(a.getRanges(),function(a){a.shrink(CKEDITOR.SHRINK_ELEMENT,!0)}));if(a){var e=CKEDITOR.tools.array.forEach,f=a.getRanges()[0],g=f&&f.startPath(),h,k;d(this._contexts,function(d){return d._matchRefresh(g,
a)});d(this._contexts,function(a){return a._matchWidget()});if(g)for((f=a.getSelectedElement())&&!f.isReadOnly()&&d(this._contexts,c,f),f=0;f<g.elements.length;f++){var v=g.elements[f];v.isReadOnly()||d(this._contexts,c,v)}this.hide();k&&k.show(h)}},hide:function(){CKEDITOR.tools.array.forEach(this._contexts,function(a){a.hide()})},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()});this._listeners.splice(0,this._listeners.length);this._clear()},_clear:function(){CKEDITOR.tools.array.forEach(this._contexts,
function(a){a.destroy()});this._contexts.splice(0,this._contexts.length)},_refresh:function(){CKEDITOR.tools.array.forEach(this._contexts,function(a){a.refresh()})},_attachListeners:function(){this._listeners.push(this.editor.on("destroy",function(){this.destroy()},this),this.editor.on("selectionChange",function(){this.check()},this),this.editor.on("mode",function(){this.hide()},this,null,9999),this.editor.on("blur",function(){this.hide()},this,null,9999),this.editor.on("afterInsertHtml",function(){this.check();
this._refresh()},this,null,9999))}};var f=!1,a=!1;CKEDITOR.plugins.add("balloontoolbar",{requires:"balloonpanel",isSupportedEnvironment:function(){return!CKEDITOR.env.ie||8<CKEDITOR.env.version},beforeInit:function(b){a||(CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css"),CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/balloontoolbar.css"),a=!0);b.balloonToolbars=new CKEDITOR.plugins.balloontoolbar.contextManager(b)},init:function(a){a.balloonToolbars=new CKEDITOR.plugins.balloontoolbar.contextManager(a);
f||(f=!0,CKEDITOR.ui.balloonToolbarView.prototype=CKEDITOR.tools.extend({},CKEDITOR.ui.balloonPanel.prototype),CKEDITOR.ui.balloonToolbarView.prototype.build=function(){CKEDITOR.ui.balloonPanel.prototype.build.call(this);this.parts.panel.addClass("cke_balloontoolbar");this.parts.title.remove();this.deregisterFocusable(this.parts.close);this.parts.close.remove()},CKEDITOR.ui.balloonToolbarView.prototype.show=function(){function a(){this.reposition()}if(!this.rect.visible){var b=this.editor,e=b.editable(),
c=e.isInline()?e:e.getDocument(),f=CKEDITOR.document.getWindow();CKEDITOR.env.iOS&&!e.isInline()&&(c=b.window.getFrame().getParent());this._detachListeners();this._listeners.push(b.on("change",a,this));this._listeners.push(b.on("resize",a,this));this._listeners.push(f.on("resize",a,this));this._listeners.push(f.on("scroll",a,this));this._listeners.push(c.on("scroll",a,this));CKEDITOR.ui.balloonPanel.prototype.show.call(this)}},CKEDITOR.ui.balloonToolbarView.prototype.reposition=function(){this.rect.visible&&
this.attach(this._pointedElement,{focusElement:!1})},CKEDITOR.ui.balloonToolbarView.prototype.hide=function(){this._detachListeners();CKEDITOR.ui.balloonPanel.prototype.hide.call(this)},CKEDITOR.ui.balloonToolbarView.prototype.blur=function(a){a&&this.editor.focus()},CKEDITOR.ui.balloonToolbarView.prototype._getAlignments=function(a,b,e){a=CKEDITOR.ui.balloonPanel.prototype._getAlignments.call(this,a,b,e);return{"bottom hcenter":a["bottom hcenter"],"top hcenter":a["top hcenter"]}},CKEDITOR.ui.balloonToolbarView.prototype._detachListeners=
function(){this._listeners.length&&(CKEDITOR.tools.array.forEach(this._listeners,function(a){a.removeListener()}),this._listeners=[])},CKEDITOR.ui.balloonToolbarView.prototype.destroy=function(){this._deregisterItemFocusables();CKEDITOR.ui.balloonPanel.prototype.destroy.call(this);this._detachListeners()},CKEDITOR.ui.balloonToolbarView.prototype.renderItems=function(a){var b=[],e=CKEDITOR.tools.object.keys(a),c=!1;this._deregisterItemFocusables();CKEDITOR.tools.array.forEach(e,function(e){CKEDITOR.ui.richCombo&&
a[e]instanceof CKEDITOR.ui.richCombo&&c?(c=!1,b.push("\x3c/span\x3e")):CKEDITOR.ui.richCombo&&a[e]instanceof CKEDITOR.ui.richCombo||c||(c=!0,b.push('\x3cspan class\x3d"cke_toolgroup"\x3e'));a[e].render(this.editor,b)},this);c&&b.push("\x3c/span\x3e");this.parts.content.setHtml(b.join(""));this.parts.content.unselectable();CKEDITOR.tools.array.forEach(this.parts.content.find("a").toArray(),function(a){a.setAttribute("draggable","false");this.registerFocusable(a)},this)},CKEDITOR.ui.balloonToolbarView.prototype.attach=
function(a,b){this._pointedElement=a;CKEDITOR.ui.balloonPanel.prototype.attach.call(this,a,b)},CKEDITOR.ui.balloonToolbarView.prototype._deregisterItemFocusables=function(){var a=this.focusables,b;for(b in a)this.parts.content.contains(a[b])&&this.deregisterFocusable(a[b])})}});CKEDITOR.plugins.balloontoolbar={context:c,contextManager:k,PRIORITY:{LOW:999,MEDIUM:500,HIGH:10}}}(),CKEDITOR.plugins.add("basicstyles",{init:function(c){var k=0,h=function(a,b,e,h){if(h){h=new CKEDITOR.style(h);var g=f[e];
g.unshift(h);c.attachStyleStateChange(h,function(a){!c.readOnly&&c.getCommand(e).setState(a)});c.addCommand(e,new CKEDITOR.styleCommand(h,{contentForms:g}));c.ui.addButton&&c.ui.addButton(a,{isToggle:!0,label:b,command:e,toolbar:"basicstyles,"+(k+=10)})}},f={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],
strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},a=c.config,b=c.lang.basicstyles;h("Bold",b.bold,"bold",a.coreStyles_bold);h("Italic",b.italic,"italic",a.coreStyles_italic);h("Underline",b.underline,"underline",a.coreStyles_underline);h("Strike",b.strike,"strike",a.coreStyles_strike);h("Subscript",b.subscript,"subscript",a.coreStyles_subscript);h("Superscript",b.superscript,"superscript",a.coreStyles_superscript);
c.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])},afterInit:function(c){if(c.config.coreStyles_toggleSubSup){var k=c.getCommand("subscript"),h=c.getCommand("superscript");if(k&&h)c.on("afterCommandExec",function(f){f=f.data.name;if("subscript"===f||"superscript"===f){var a="subscript"===f?h:k;("subscript"===f?k:h).state===CKEDITOR.TRISTATE_ON&&a.state===CKEDITOR.TRISTATE_ON&&(a.exec(c),c.fire("updateSnapshot"))}})}}}),CKEDITOR.config.coreStyles_bold=
{element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},CKEDITOR.config.coreStyles_toggleSubSup=!1,function(){function c(c,h){var f={},a=[],b={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};c=c.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,
function(e,d){var c=h?"\x26"+d+";":b[d];f[c]=h?b[d]:"\x26"+d+";";a.push(c);return""});c=c.replace(/,$/,"");if(!h&&c){c=c.split(",");var d=document.createElement("div"),l;d.innerHTML="\x26"+c.join(";\x26")+";";l=d.innerHTML;d=null;for(d=0;d<l.length;d++){var e=l.charAt(d);f[e]="\x26"+c[d]+";";a.push(e)}}f.regex=a.join(h?"|":"");return f}CKEDITOR.plugins.add("entities",{afterInit:function(k){function h(a){return e[a]}function f(b){return"force"!=a.entities_processNumerical&&d[b]?d[b]:"\x26#"+(CKEDITOR.env.ie?
b.charCodeAt(0):b.codePointAt(0))+";"}var a=k.config;if(k=(k=k.dataProcessor)&&k.htmlFilter){var b=[];!1!==a.basicEntities&&b.push("nbsp,gt,lt,amp");a.entities&&(b.length&&b.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
a.entities_latin&&b.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),a.entities_greek&&b.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),
a.entities_additional&&b.push(a.entities_additional));var d=c(b.join(",")),l=d.regex?"["+d.regex+"]":"a^";delete d.regex;a.entities&&a.entities_processNumerical&&(l="[^ -~]|"+l);var l=new RegExp(l,CKEDITOR.env.ie?"g":"gu"),e=c("nbsp,gt,lt,amp,shy",!0),m=new RegExp(e.regex,"g");k.addRules({text:function(a){return a.replace(m,h).replace(l,f)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=
!0,CKEDITOR.config.entities_additional="#39",function(){CKEDITOR.on("dialogDefinition",function(a){var b;b=a.data.name;a=a.data.definition;"link"==b?(a.removeContents("target"),a.removeContents("upload"),a.removeContents("advanced"),b=a.getContents("info"),b.remove("emailSubject"),b.remove("emailBody")):"image"==b&&(a.removeContents("advanced"),b=a.getContents("Link"),b.remove("cmbTarget"),b=a.getContents("info"),b.remove("txtAlt"),b.remove("basic"))});var c={b:"strong",u:"u",i:"em",s:"s",color:"span",
size:"span",left:"div",right:"div",center:"div",justify:"div",quote:"blockquote",code:"code",url:"a",email:"span",img:"span","*":"li",list:"ol"},k={strong:"b",b:"b",u:"u",em:"i",i:"i",s:"s",code:"code",li:"*"},h={strong:"b",em:"i",u:"u",s:"s",li:"*",ul:"list",ol:"list",code:"code",a:"link",img:"img",blockquote:"quote"},f={color:"color",size:"font-size",left:"text-align",center:"text-align",right:"text-align",justify:"text-align"},a={url:"href",email:"mailhref",quote:"cite",list:"listType"},b=CKEDITOR.dtd,
d=CKEDITOR.tools.extend({table:1},b.$block,b.$listItem,b.$tableContent,b.$list),l=/\s*(?:;\s*|$)/,e={smiley:":)",sad:":(",wink:";)",laugh:":D",cheeky:":P",blush:":*)",surprise:":-o",indecision:":|",angry:"\x3e:(",angel:"o:)",cool:"8-)",devil:"\x3e:-)",crying:";(",kiss:":-*"},m={},g=[],n;for(n in e)m[e[n]]=n,g.push(e[n].replace(/\(|\)|\:|\/|\*|\-|\|/g,function(a){return"\\"+a}));var g=new RegExp(g.join("|"),"g"),p=function(){var a=[],b={nbsp:" ",shy:"­"},e;for(e in b)a.push(e);a=new RegExp("\x26("+
a.join("|")+");","g");return function(e){return e.replace(a,function(a,e){return b[e]})}}();CKEDITOR.BBCodeParser=function(){this._={bbcPartsRegex:/(?:\[([^\/\]=]*?)(?:=([^\]]*?))?\])|(?:\[\/([a-z]{1,16})\])/ig}};CKEDITOR.BBCodeParser.prototype={parse:function(b){for(var e,d,g=0;e=this._.bbcPartsRegex.exec(b);)if(d=e.index,d>g&&(g=b.substring(g,d),this.onText(g,1)),g=this._.bbcPartsRegex.lastIndex,(d=(e[1]||e[3]||"").toLowerCase())&&!c[d])this.onText(e[0]);else if(e[1]){var h=c[d],k={},m={};e=e[2];
if("left"==d||"right"==d||"center"==d||"justify"==d)e=d;if(e)if("list"==d&&(isNaN(e)?/^[a-z]+$/.test(e)?e="lower-alpha":/^[A-Z]+$/.test(e)&&(e="upper-alpha"):e="decimal"),f[d]){"size"==d&&(e+="%");m[f[d]]=e;e=k;var p="",n=void 0;for(n in m)var v=(n+":"+m[n]).replace(l,";"),p=p+v;e.style=p}else a[d]&&(k[a[d]]=CKEDITOR.tools.htmlDecode(e));if("email"==d||"img"==d)k.bbcode=d;this.onTagOpen(h,k,CKEDITOR.dtd.$empty[h])}else if(e[3])this.onTagClose(c[d]);if(b.length>g)this.onText(b.substring(g,b.length),
1)}};CKEDITOR.htmlParser.fragment.fromBBCode=function(a){function b(a){if(0<l.length)for(var e=0;e<l.length;e++){var d=l[e],c=d.name,f=CKEDITOR.dtd[c],g=n.name&&CKEDITOR.dtd[n.name];g&&!g[c]||a&&f&&!f[a]&&CKEDITOR.dtd[a]||(d=d.clone(),d.parent=n,n=d,l.splice(e,1),e--)}}function e(a,b){var c=n.children.length,f=0<c&&n.children[c-1],c=!f&&v.getRule(h[n.name],"breakAfterOpen"),f=f&&f.type==CKEDITOR.NODE_ELEMENT&&v.getRule(h[f.name],"breakAfterClose"),g=a&&v.getRule(h[a],b?"breakBeforeClose":"breakBeforeOpen");
p&&(c||f||g)&&p--;p&&a in d&&p++;for(;p&&p--;)n.children.push(new CKEDITOR.htmlParser.element("br"))}function c(a,b){e(a.name,1);b=b||n||k;var d=b.children.length;a.previous=0<d&&b.children[d-1]||null;a.parent=b;b.children.push(a);a.returnPoint&&(n=a.returnPoint,delete a.returnPoint)}var f=new CKEDITOR.BBCodeParser,k=new CKEDITOR.htmlParser.fragment,l=[],p=0,n=k,A;f.onTagOpen=function(a,d){var g=new CKEDITOR.htmlParser.element(a,d);if(CKEDITOR.dtd.$removeEmpty[a])l.push(g);else{var h=n.name,k=h&&
(CKEDITOR.dtd[h]||(n._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span));if(k&&!k[a]){var k=!1,m;a==h?c(n,n.parent):(a in CKEDITOR.dtd.$listItem?(f.onTagOpen("ul",{}),m=n):(c(n,n.parent),l.unshift(n)),k=!0);n=m?m:n.returnPoint||n.parent;if(k){f.onTagOpen.apply(this,arguments);return}}b(a);e(a);g.parent=n;g.returnPoint=A;A=0;g.isEmpty?c(g):n=g}};f.onTagClose=function(a){for(var b=l.length-1;0<=b;b--)if(a==l[b].name){l.splice(b,1);return}for(var e=[],d=[],f=n;f.type&&f.name!=a;)f._.isBlockLike||d.unshift(f),
e.push(f),f=f.parent;if(f.type){for(b=0;b<e.length;b++)a=e[b],c(a,a.parent);n=f;c(f,f.parent);f==n&&(n=n.parent);l=l.concat(d)}};f.onText=function(a){var d=CKEDITOR.dtd[n.name];if(!d||d["#"])e(),b(),a.replace(/(\r\n|[\r\n])|[^\r\n]*/g,function(a,b){if(void 0!==b&&b.length)p++;else if(a.length){var e=0;a.replace(g,function(b,d){c(new CKEDITOR.htmlParser.text(a.substring(e,d)),n);c(new CKEDITOR.htmlParser.element("smiley",{desc:m[b]}),n);e=d+b.length});e!=a.length&&c(new CKEDITOR.htmlParser.text(a.substring(e,
a.length)),n)}})};for(f.parse(CKEDITOR.tools.htmlEncode(a));n.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT;)a=n.parent,c(n,a),n=a;return k};var v=new (CKEDITOR.tools.createClass({$:function(){this._={output:[],rules:[]};this.setRules("list",{breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:1,breakAfterClose:1});this.setRules("*",{breakBeforeOpen:1,breakAfterOpen:0,breakBeforeClose:1,breakAfterClose:0});this.setRules("quote",{breakBeforeOpen:1,breakAfterOpen:0,breakBeforeClose:0,breakAfterClose:1})},proto:{setRules:function(a,
b){var e=this._.rules[a];e?CKEDITOR.tools.extend(e,b,!0):this._.rules[a]=b},getRule:function(a,b){return this._.rules[a]&&this._.rules[a][b]},openTag:function(a){a in c&&(this.getRule(a,"breakBeforeOpen")&&this.lineBreak(1),this.write("[",a))},openTagClose:function(a){"br"==a?this._.output.push("\n"):a in c&&(this.write("]"),this.getRule(a,"breakAfterOpen")&&this.lineBreak(1))},attribute:function(a,b){"option"==a&&this.write("\x3d",b)},closeTag:function(a){a in c&&(this.getRule(a,"breakBeforeClose")&&
this.lineBreak(1),"*"!=a&&this.write("[/",a,"]"),this.getRule(a,"breakAfterClose")&&this.lineBreak(1))},text:function(a){this.write(a)},comment:function(){},lineBreak:function(){!this._.hasLineBreak&&this._.output.length&&(this.write("\n"),this._.hasLineBreak=1)},write:function(){this._.hasLineBreak=0;var a=Array.prototype.join.call(arguments,"");this._.output.push(a)},reset:function(){this._.output=[];this._.hasLineBreak=0},getHtml:function(a){var b=this._.output.join("");a&&this.reset();return p(b)}}}));
CKEDITOR.plugins.add("bbcode",{requires:"entities",beforeInit:function(a){CKEDITOR.tools.extend(a.config,{enterMode:CKEDITOR.ENTER_BR,basicEntities:!1,entities:!1,fillEmptyBlocks:!1},!0);a.filter.disable();a.activeEnterMode=a.enterMode=CKEDITOR.ENTER_BR},init:function(a){function b(a){var e=a.data;a=CKEDITOR.htmlParser.fragment.fromBBCode(a.data.dataValue);var d=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(d,f);a=d.getHtml(!0);e.dataValue=a}var c=a.config,f=new CKEDITOR.htmlParser.filter;f.addRules({elements:{blockquote:function(a){var b=
new CKEDITOR.htmlParser.element("div");b.children=a.children;a.children=[b];if(b=a.attributes.cite){var e=new CKEDITOR.htmlParser.element("cite");e.add(new CKEDITOR.htmlParser.text(b.replace(/^"|"$/g,"")));delete a.attributes.cite;a.children.unshift(e)}},span:function(a){var b;if(b=a.attributes.bbcode)"img"==b?(a.name="img",a.attributes.src=a.children[0].value,a.children=[]):"email"==b&&(a.name="a",a.attributes.href="mailto:"+a.children[0].value),delete a.attributes.bbcode},ol:function(a){a.attributes.listType?
"decimal"!=a.attributes.listType&&(a.attributes.style="list-style-type:"+a.attributes.listType):a.name="ul";delete a.attributes.listType},a:function(a){a.attributes.href||(a.attributes.href=a.children[0].value)},smiley:function(a){a.name="img";var b=a.attributes.desc,e=c.smiley_images[CKEDITOR.tools.indexOf(c.smiley_descriptions,b)],e=CKEDITOR.tools.htmlEncode(c.smiley_path+e);a.attributes={src:e,"data-cke-saved-src":e,title:b,alt:b}}}});a.dataProcessor.htmlFilter.addRules({elements:{$:function(b){var d=
b.attributes,c=CKEDITOR.tools.parseCssText(d.style,1),f,g=b.name;if(g in k)g=k[g];else if("span"==g)if(f=c.color)g="color",f=CKEDITOR.tools.convertRgbToHex(f);else{if(f=c["font-size"])if(d=f.match(/(\d+)%$/))f=d[1],g="size"}else if("ol"==g||"ul"==g){if(f=c["list-style-type"])switch(f){case "lower-alpha":f="a";break;case "upper-alpha":f="A"}else"ol"==g&&(f=1);g="list"}else if("blockquote"==g){try{var h=b.children[0],l=b.children[1],m="cite"==h.name&&h.children[0].value;m&&(f='"'+m+'"',b.children=l.children)}catch(p){}g=
"quote"}else if("a"==g){if(f=d.href)-1!==f.indexOf("mailto:")?(g="email",b.children=[new CKEDITOR.htmlParser.text(f.replace("mailto:",""))],f=""):((g=1==b.children.length&&b.children[0])&&g.type==CKEDITOR.NODE_TEXT&&g.value==f&&(f=""),g="url")}else if("img"==g){b.isEmpty=0;c=d["data-cke-saved-src"]||d.src;d=d.alt;if(c&&-1!=c.indexOf(a.config.smiley_path)&&d)return new CKEDITOR.htmlParser.text(e[d]);b.children=[new CKEDITOR.htmlParser.text(c)]}b.name=g;f&&(b.attributes.option=f);return null},div:function(a){var b=
CKEDITOR.tools.parseCssText(a.attributes.style,1)["text-align"]||"";if(b)return a.name=b,null},br:function(a){if((a=a.next)&&a.name in d)return!1}}},1);a.dataProcessor.writer=v;if(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE)a.once("contentDom",function(){a.on("setData",b)});else a.on("setData",b)},afterInit:function(a){var b;a._.elementsPath&&(b=a._.elementsPath.filters)&&b.push(function(b){var e=b.getName(),d=h[e]||!1;"link"==d&&0===b.getAttribute("href").indexOf("mailto:")?d="email":"span"==e?b.getStyle("font-size")?
d="size":b.getStyle("color")&&(d="color"):"div"==e&&b.getStyle("text-align")?d=b.getStyle("text-align"):"img"==d&&(b=b.data("cke-saved-src")||b.getAttribute("src"))&&0===b.indexOf(a.config.smiley_path)&&(d="smiley");return d})}})}(),function(){function c(a,b,e,d){if(!a.isReadOnly()&&!a.equals(e.editable())){CKEDITOR.dom.element.setMarker(d,a,"bidi_processed",1);d=a;for(var c=e.editable();(d=d.getParent())&&!d.equals(c);)if(d.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");
return}d=e.config.useComputedState;(d?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=b&&(a.removeStyle("direction"),d?(a.removeAttribute("dir"),b!=a.getComputedStyle("direction")&&a.setAttribute("dir",b)):a.setAttribute("dir",b),e.forceNextSelectionCheck())}}function k(a,b,e){var d=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(e==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(d,CKEDITOR.START)&&
a.checkBoundaryOfElement(d,CKEDITOR.END)){for(var c;d&&d.type==CKEDITOR.NODE_ELEMENT&&(c=d.getParent())&&1==c.getChildCount()&&!(d.getName()in b);)d=c;return d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in b&&d}}function h(e){return{context:"p",allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,b){var e=a.config.useComputedState,c;if(!e){c=b.lastElement;for(var f=a.editable();c&&!(c.getName()in
d||c.equals(f));){var g=c.getParent();if(!g)break;c=g}}c=c||b.block||b.blockLimit;c.equals(a.editable())&&(f=a.getSelection().getRanges()[0].getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&(c=f);c&&(e=e?c.getComputedStyle("direction"):c.getStyle("direction")||c.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==e?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==e?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));e=(b.block||b.blockLimit||a.editable()).getDirection(1);
e!=(a._.selDir||a.lang.dir)&&(a._.selDir=e,a.fire("contentDirChanged",e))},exec:function(d){var f=d.getSelection(),h=d.config.enterMode,l=f.getRanges();if(l&&l.length){for(var m={},t=f.createBookmarks(),l=l.createIterator(),y,u=0;y=l.getNextRange(1);){var B=y.getEnclosedNode();B&&(!B||B.type==CKEDITOR.NODE_ELEMENT&&B.getName()in b)||(B=k(y,a,h));B&&c(B,e,d,m);var z=new CKEDITOR.dom.walker(y),x=t[u].startNode,w=t[u++].endNode;z.evaluator=function(b){var e=h==CKEDITOR.ENTER_P?"p":"div",d;if(d=(b?b.type==
CKEDITOR.NODE_ELEMENT:!1)&&b.getName()in a){if(e=b.is(e))e=(e=b.getParent())?e.type==CKEDITOR.NODE_ELEMENT:!1;d=!(e&&b.getParent().is("blockquote"))}return!!(d&&b.getPosition(x)&CKEDITOR.POSITION_FOLLOWING&&(b.getPosition(w)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;B=z.next();)c(B,e,d,m);y=y.createIterator();for(y.enlargeBr=h!=CKEDITOR.ENTER_BR;B=y.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)c(B,e,d,m)}CKEDITOR.dom.element.clearAllMarkers(m);
d.forceNextSelectionCheck();f.selectBookmarks(t);d.focus()}}}}function f(a){var b=a==l.setAttribute,e=a==l.removeAttribute,d=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(c,f){if(!this.isReadOnly()){var h;if(h=c==(b||e?"dir":"direction")||"style"==c&&(e||d.test(f))){a:{h=this;for(var k=h.getDocument().getBody().getParent();h;){if(h.equals(k)){h=!1;break a}h=h.getParent()}h=!0}h=!h}if(h&&(h=this.getDirection(1),k=a.apply(this,arguments),h!=this.getDirection(1)))return this.getDocument().fire("dirChanged",
this),k}return a.apply(this,arguments)}}var a={table:1,ul:1,ol:1,blockquote:1,div:1},b={},d={};CKEDITOR.tools.extend(b,a,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(d,b,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function b(e,d,c,f,h){a.addCommand(c,new CKEDITOR.command(a,f));a.ui.addButton&&a.ui.addButton(e,{isToggle:!0,label:d,command:c,toolbar:"bidi,"+h})}if(!a.blockless){var e=a.lang.bidi;b("BidiLtr",e.ltr,"bidiltr",h("ltr"),10);b("BidiRtl",e.rtl,"bidirtl",h("rtl"),20);a.on("contentDom",
function(){a.document.on("dirChanged",function(b){a.fire("dirChanged",{node:b.data,dir:b.data.getDirection(1)})})});a.on("contentDirChanged",function(b){b=(a.lang.dir!=b.data?"add":"remove")+"Class";var e=a.ui.space(a.config.toolbarLocation);if(e)e[b]("cke_mixed_dir_content")})}}});for(var l=CKEDITOR.dom.element.prototype,e=["setStyle","removeStyle","setAttribute","removeAttribute"],m=0;m<e.length;m++)l[e[m]]=CKEDITOR.tools.override(l[e[m]],f)}(),function(){var c={exec:function(c){var h=c.getCommand("blockquote").state,
f=c.getSelection(),a=f&&f.getRanges()[0];if(a){var b=f.createBookmarks();if(CKEDITOR.env.ie){var d=b[0].startNode,l=b[0].endNode,e;if(d&&"blockquote"==d.getParent().getName())for(e=d;e=e.getNext();)if(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()){d.move(e,!0);break}if(l&&"blockquote"==l.getParent().getName())for(e=l;e=e.getPrevious();)if(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()){l.move(e);break}}var m=a.createIterator();m.enlargeBr=c.config.enterMode!=CKEDITOR.ENTER_BR;if(h==CKEDITOR.TRISTATE_OFF){for(d=
[];h=m.getNextParagraph();)d.push(h);1>d.length&&(h=c.document.createElement(c.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),l=b.shift(),a.insertNode(h),h.append(new CKEDITOR.dom.text("﻿",c.document)),a.moveToBookmark(l),a.selectNodeContents(h),a.collapse(!0),l=a.createBookmark(),d.push(h),b.unshift(l));e=d[0].getParent();a=[];for(l=0;l<d.length;l++)h=d[l],e=e.getCommonAncestor(h.getParent());for(h={table:1,tbody:1,tr:1,ol:1,ul:1};h[e.getName()];)e=e.getParent();for(l=null;0<d.length;){for(h=d.shift();!h.getParent().equals(e);)h=
h.getParent();h.equals(l)||a.push(h);l=h}for(;0<a.length;)if(h=a.shift(),"blockquote"==h.getName()){for(l=new CKEDITOR.dom.documentFragment(c.document);h.getFirst();)l.append(h.getFirst().remove()),d.push(l.getLast());l.replace(h)}else d.push(h);a=c.document.createElement("blockquote");for(a.insertBefore(d[0]);0<d.length;)h=d.shift(),a.append(h)}else if(h==CKEDITOR.TRISTATE_ON){l=[];for(e={};h=m.getNextParagraph();){for(d=a=null;h.getParent();){if("blockquote"==h.getParent().getName()){a=h.getParent();
d=h;break}h=h.getParent()}a&&d&&!d.getCustomData("blockquote_moveout")&&(l.push(d),CKEDITOR.dom.element.setMarker(e,d,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(e);h=[];d=[];for(e={};0<l.length;)m=l.shift(),a=m.getParent(),m.getPrevious()?m.getNext()?(m.breakParent(m.getParent()),d.push(m.getNext())):m.remove().insertAfter(a):m.remove().insertBefore(a),a.getCustomData("blockquote_processed")||(d.push(a),CKEDITOR.dom.element.setMarker(e,a,"blockquote_processed",!0)),h.push(m);CKEDITOR.dom.element.clearAllMarkers(e);
for(l=d.length-1;0<=l;l--){a=d[l];a:{e=a;for(var m=0,g=e.getChildCount(),n=void 0;m<g&&(n=e.getChild(m));m++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){e=!1;break a}e=!0}e&&a.remove()}if(c.config.enterMode==CKEDITOR.ENTER_BR)for(a=!0;h.length;)if(m=h.shift(),"div"==m.getName()){l=new CKEDITOR.dom.documentFragment(c.document);!a||!m.getPrevious()||m.getPrevious().type==CKEDITOR.NODE_ELEMENT&&m.getPrevious().isBlockBoundary()||l.append(c.document.createElement("br"));for(a=m.getNext()&&
!(m.getNext().type==CKEDITOR.NODE_ELEMENT&&m.getNext().isBlockBoundary());m.getFirst();)m.getFirst().remove().appendTo(l);a&&l.append(c.document.createElement("br"));l.replace(m);a=!1}}f.selectBookmarks(b);c.focus()}},refresh:function(c,h){this.setState(c.elementPath(h.block||h.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(k){k.blockless||
(k.addCommand("blockquote",c),k.ui.addButton&&k.ui.addButton("Blockquote",{isToggle:!0,label:k.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),function(){CKEDITOR.plugins.add("codemirror",{version:"1.18.8",init:function(k){function h(){var a=["core","addons"];switch(d.mode){case "bbcode":case "bbcodemixed":a.push("modeHtml");break;case "application/x-httpd-php":a.push("modePHP");break;case "text/javascript":a.push("modeJs");break;case "handlebars":a.push("modeHandlebars");
break;case "twig":a.push("modeTwig");break;default:a.push("modeHtml")}d.useBeautifyOnStart&&a.push("beautifyModule");d.enableSearchTools&&a.push("addonSearch");return a}function f(){var a=[b+"js/codemirror.addons.min.js"];switch(d.mode){case "handlebars":a.push(b+"js/codemirror.mode.handlebars.min.js");case "bbcode":a.push(b+"js/codemirror.mode.bbcode.min.js");break;case "bbcodemixed":a.push(b+"js/codemirror.mode.bbcodemixed.min.js");break;case "htmlmixed":a.push(b+"js/codemirror.mode.htmlmixed.min.js");
break;case "text/html":a.push(b+"js/codemirror.mode.htmlmixed.min.js");break;case "application/x-httpd-php":a.push(b+"js/codemirror.mode.php.min.js");break;case "text/javascript":a.push(b+"js/codemirror.mode.javascript.min.js");break;case "twig":a.push(b+"js/codemirror.mode.twig.min.js");break;case "twig":a.push(b+"js/codemirror.mode.twig.min.js");break;case "text/x-mssql":case "text/x-mysql":case "text/x-pgsql":case "text/x-sql":a.push(b+"js/codemirror.mode.sql.min.js");break;default:a.push(b+"js/codemirror.mode.htmlmixed.min.js")}d.useBeautifyOnStart&&
a.push(b+"js/beautify.min.js");d.enableSearchTools&&a.push(b+"js/codemirror.addons.search.min.js");return a}function a(a){function b(a){for(var e=[[CKEDITOR.SHIFT,"Shift-"],[CKEDITOR.CTRL,"Ctrl-"],[CKEDITOR.ALT,"Alt-"]],d="",c=0;c<e.length;c++)a&e[c][0]&&(a-=e[c][0],d+=e[c][1]);return CodeMirror.keyNames[a]?d+CodeMirror.keyNames[a]:null}var e=a.ui.space("contents").getDocument().createElement("textarea");e.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",
outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",a.config.sourceAreaTabSize||4)));var f=[a.lang.editor,a.name].join();e.setAttributes({dir:"ltr",tabIndex:CKEDITOR.env.webkit?-1:a.tabIndex,role:"textbox","aria-label":f});e.addClass("cke_source");e.addClass("cke_reset");e.addClass("cke_enable_context_menu");a.ui.space("contents").append(e);window["editable_"+a.id]=a.editable(new c(a,e));window["editable_"+a.id].setData(a.getData(1));window["editable_"+a.id].editorID=a.id;
a.fire("ariaWidget",this);e=window["editable_"+a.id];f=e.getParent();d.lineNumbers&&d.enableCodeFolding&&(window["foldFunc_"+a.id]=CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder));(function(e){var d=a.keystrokeHandler.keystrokes,c;for(c in d){var f=b(c);null!==f&&"Enter"!==f&&"Ctrl-B"!==f&&"Ctrl-I"!==f&&"Ctrl-U"!==f&&"Ctrl-Y"!==f&&"Ctrl-Z"!==f&&"Ctrl-C"!==f&&"Ctrl-V"!==f&&function(b){e[f]=function(){a.execCommand(b)}}(d[c])}})(d.extraKeys);var g=d.mode;"handlebars"==g?g={name:"handlebars",base:"text/html"}:
"twig"==d.mode&&(g={name:"twig",base:"text/html"});window["codemirror_"+a.id]=CodeMirror.fromTextArea(e.$,{direction:a.lang.dir,mode:g,matchBrackets:d.matchBrackets,maxHighlightLineLength:d.maxHighlightLineLength,matchTags:d.matchTags,workDelay:300,workTime:35,readOnly:a.readOnly,lineNumbers:d.lineNumbers,lineWrapping:!0,autoCloseTags:d.autoCloseTags,autoCloseBrackets:d.autoCloseBrackets,highlightSelectionMatches:d.highlightMatches,continueComments:d.continueComments,indentWithTabs:d.indentWithTabs,
theme:d.theme,showTrailingSpace:d.showTrailingSpace,showCursorWhenSelecting:!0,hintOptions:d.hintOptions,styleActiveLine:d.styleActiveLine,extraKeys:d.extraKeys,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]});window["codemirror_"+a.id].display.wrapper.classList.add("cke_enable_context_menu");e=0==f.$.clientHeight?a.ui.space("contents").getStyle("height"):f.$.clientHeight+"px";window["codemirror_"+a.id].config=d;d.autoFormatOnStart&&(d.useBeautifyOnStart?(f=window["codemirror_"+
a.id].getValue(),window["codemirror_"+a.id].setValue(html_beautify(f,4," ",120,"collapse"))):window["codemirror_"+a.id].autoFormatAll({line:0,ch:0},{line:window["codemirror_"+a.id].lineCount(),ch:0}));window["codemirror_"+a.id].on("change",function(){window["codemirror_"+a.id].save();a.fire("change",this)});window["codemirror_"+a.id].setSize(null,e);if(d.lineNumbers&&d.enableCodeFolding)window["codemirror_"+a.id].on("gutterClick",window["foldFunc_"+a.id]);if("function"===typeof d.onLoad)d.onLoad(window["codemirror_"+
a.id],a);window["codemirror_"+a.id].on("blur",function(){a.fire("blur",this)});window["codemirror_"+a.id].on("keypress",function(b,e){if(d.enableCodeFormatting){var c=window["codemirror_"+a.id].getCursor(!0),f=window["codemirror_"+a.id].getCursor(!1);"keydown"!==e.type||!e.ctrlKey||75!==e.keyCode||e.shiftKey||e.altKey?"keydown"===e.type&&e.ctrlKey&&75===e.keyCode&&e.shiftKey&&!e.altKey?(window["codemirror_"+a.id].commentRange(!1,c,f),d.autoFormatOnUncomment&&window["codemirror_"+a.id].autoFormatRange(c,
f)):"keydown"===e.type&&e.ctrlKey&&75===e.keyCode&&!e.shiftKey&&e.altKey&&window["codemirror_"+a.id].autoFormatRange(c,f):window["codemirror_"+a.id].commentRange(!0,c,f)}})}k.addCommand("codemirrorAbout",new CKEDITOR.dialogCommand("codemirrorAboutDialog")).modes={wysiwyg:1,source:1};CKEDITOR.dialog.add("codemirrorAboutDialog",this.path+"dialogs/codemirrorAbout.js");k.setKeystroke(CKEDITOR.ALT+83,"source");var b=this.path,d=CKEDITOR.tools.extend({autoCloseBrackets:!0,autoCloseTags:!0,autoFormatOnStart:!1,
autoFormatOnUncomment:!1,autoLoadCodeMirror:!0,continueComments:!0,enableCodeFolding:!0,enableCodeFormatting:!0,enableSearchTools:!0,highlightMatches:!0,indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"htmlmixed",matchBrackets:!0,maxHighlightLineLength:1E3,matchTags:!0,showAutoCompleteButton:!0,showCommentButton:!0,showFormatButton:!0,showSearchButton:!0,showTrailingSpace:!0,showUncommentButton:!0,styleActiveLine:!0,theme:"default",useBeautifyOnStart:!1,hintOptions:null,extraKeys:{"Ctrl-Space":"autocomplete",
"Ctrl-Q":function(a){if(d.enableCodeFolding)window["foldFunc_"+k.id](a,a.getCursor().line)}}},k.config.codemirror||{},!0),l=k.lang.codemirror;k.config.codemirror_theme&&(d.theme=k.config.codemirror_theme);k.config.codemirror_autoFormatOnStart&&(d.autoFormatOnStart=k.config.codemirror_autoFormatOnStart);k.plugins.bbcode&&0>=d.mode.indexOf("bbcode")&&(d.mode="bbcode");var e="function"===typeof require&&"function"===typeof require.config,m;if(e){var g=d.requireContext||"_",n=CKEDITOR.getUrl(CKEDITOR.plugins.getPath("codemirror")+
"js/"),n=n.substring(0,n.length-1);m=require.config({context:g,packages:[{name:"codemirror",location:n,main:"codemirror.min.js"},{name:"codemirror-mode-handlebars",location:n,main:"codemirror.mode.handlebars.min.js"},{name:"codemirror-mode-twig",location:n,main:"codemirror.mode.twig.min.js"},{name:"codemirror-mode-html",location:n,main:"codemirror.mode.htmlmixed.min.js"},{name:"codemirror-mode-php",location:n,main:"codemirror.mode.php.min.js"},{name:"codemirror-mode-js",location:n,main:"codemirror.mode.js.min.js"},
{name:"codemirror-addons",location:n,main:"codemirror.addons.min.js"},{name:"codemirror-addon-search",location:n,main:"codemirror.addons.search.min.js"},{name:"codemirror-beautify",location:n,main:"beautify.min.js"}],bundles:{codemirror:["core","codemirror.js"],"codemirror-mode-handlebars":["modeHandlebars"],"codemirror-mode-twig":["modeTwig"],"codemirror-mode-html":["modeHtml"],"codemirror-mode-php":["modePHP"],"codemirror-mode-js":["modeJS"],"codemirror-addons":["addons"],"codemirror-addon-search":["addonSearch"],
"codemirror-beautify":["beautifyModule"]},map:{"*":{"lib/codemirror":"codemirror.js"}}})}(k.elementMode===CKEDITOR.ELEMENT_MODE_INLINE||k.plugins.sourcedialog)&&CKEDITOR.dialog.add("sourcedialog",function(a){function c(a,b,e){var f=e.getSize();e=f.width;var f=f.height/1.5,g=d.mode;"handlebars"==g?g={name:"handlebars",base:"text/html"}:"twig"==g&&(g={name:"twig",base:"text/html"});window["codemirror_"+a.id]=CodeMirror.fromTextArea(b,{direction:a.lang.dir,mode:g,matchBrackets:d.matchBrackets,maxHighlightLineLength:d.maxHighlightLineLength,
matchTags:d.matchTags,workDelay:300,workTime:35,readOnly:a.readOnly,lineNumbers:d.lineNumbers,lineWrapping:d.lineWrapping,autoCloseTags:d.autoCloseTags,autoCloseBrackets:d.autoCloseBrackets,highlightSelectionMatches:d.highlightMatches,continueComments:d.continueComments,indentWithTabs:d.indentWithTabs,theme:d.theme,showTrailingSpace:d.showTrailingSpace,showCursorWhenSelecting:!0,styleActiveLine:d.styleActiveLine,hintOptions:d.hintOptions,viewportMargin:Infinity,extraKeys:d.extraKeys,foldGutter:!0,
gutters:["CodeMirror-linenumbbers","CodeMirror-foldgutter"]});window["codemirror_"+a.id].display.wrapper.classList.add("cke_enable_context_menu");b=f+"px";e+="px";window["codemirror_"+a.id].config=d;d.autoFormatOnStart&&(d.useBeautifyOnStart?(f=window["codemirror_"+a.id].getValue(),window["codemirror_"+a.id].setValue(html_beautify(f,4," ",120,"collapse"))):window["codemirror_"+a.id].autoFormatAll({line:0,ch:0},{line:window["codemirror_"+a.id].lineCount(),ch:0}));window["codemirror_"+a.id].on("change",
function(){window["codemirror_"+a.id].save();a.fire("change",this)});window["codemirror_"+a.id].setSize(e,b);if(d.lineNumbers&&d.enableCodeFolding)window["codemirror_"+a.id].on("gutterClick",window["foldFunc_"+a.id]);if("function"===typeof d.onLoad)d.onLoad(window["codemirror_"+a.id],a);window["codemirror_"+a.id].on("blur",function(){a.fire("blur",this)});window["codemirror_"+a.id].on("keypress",function(b,e){if(d.enableCodeFormatting){var c=window["codemirror_"+a.id].getCursor(!0),f=window["codemirror_"+
a.id].getCursor(!1);"keydown"!==e.type||!e.ctrlKey||75!==e.keyCode||e.shiftKey||e.altKey?"keydown"===e.type&&e.ctrlKey&&75===e.keyCode&&e.shiftKey&&!e.altKey?(window["codemirror_"+a.id].commentRange(!1,c,f),d.autoFormatOnUncomment&&window["codemirror_"+a.id].autoFormatRange(c,f)):"keydown"===e.type&&e.ctrlKey&&75===e.keyCode&&!e.shiftKey&&e.altKey&&window["codemirror_"+a.id].autoFormatRange(c,f):window["codemirror_"+a.id].commentRange(!0,c,f)}});a.plugins.textselection&&textRange&&!a.config.fullPage&&
(b=ka(window["codemirror_"+a.id],textRange.startOffset),"undefined"==typeof textRange.endOffset?(window["codemirror_"+a.id].focus(),window["codemirror_"+a.id].setCursor(b)):(window["codemirror_"+a.id].focus(),e=ka(window["codemirror_"+a.id],textRange.endOffset),window["codemirror_"+a.id].setSelection(b,e)))}var g=CKEDITOR.document.getWindow().getViewPaneSize(),k=Math.min(g.width-70,800),g=g.height/1.5,n;return{title:a.lang.sourcedialog.title,minWidth:k,minHeight:g,resizable:CKEDITOR.DIALOG_RESIZE_BOTH,
onLoad:function(){this.on("resize",function(b){var e=b.sender.parts;window["codemirror_"+a.id].setSize(b.data.width+"px",b.data.height-e.title.$.offsetHeight-e.footer.$.offsetHeight+"px")},this)},onShow:function(g){this.getContentElement("main","data").focus();this.getContentElement("main","AutoComplete").setValue(d.autoCloseTags,!0);var k=this.getContentElement("main","data").getInputElement().$;if(a.plugins.textselection&&(a._.previousModeData=a.getData(),a.getData())){if(CKEDITOR.env.gecko&&!a.focusManager.hasFocus)return;
var l=a.getSelection(),q;l&&(q=l.getRanges()[0])&&(wysiwygBookmark=q.createBookmark(a),"wysiwyg"===a.mode&&wysiwygBookmark&&(textRange=new CKEDITOR.dom.textRange(a.getData()),textRange.moveToBookmark(wysiwygBookmark,a),a.setData(textRange.content)))}this.setValueOf("main","data",n=a.getData());d.autoLoadCodeMirror&&(la(b+"css/codemirror.min.css")||CKEDITOR.document.appendStyleSheet(b+"css/codemirror.min.css"),d.theme.length&&"default"!=d.theme&&!la(b+"theme/"+d.theme+".css")&&CKEDITOR.document.appendStyleSheet(b+
"theme/"+d.theme+".css"),e?m(h(),function(b,e){c(a,k,g.sender)}):"undefined"==typeof CodeMirror?CKEDITOR.scriptLoader.load(b+"js/codemirror.min.js",function(){CKEDITOR.scriptLoader.load(f(),function(){c(a,k,g.sender)})}):CodeMirror.prototype.autoFormatAll?c(a,k,g.sender):CKEDITOR.scriptLoader.load(f(),function(){c(a,k,g.sender)}))},onCancel:function(b){b.data.hide&&(window["codemirror_"+a.id].toTextArea(),window["codemirror_"+a.id]=null,a.fire("blur",this),a.fire("focus",this))},onOk:function(){function b(e){var d=
this;a.setData(e,function(){d.hide();var b=a.createRange();b.moveToElementEditStart(a.editable());b.select()})}return function(){window["codemirror_"+a.id].toTextArea();window["codemirror_"+a.id]=null;var e=this.getValueOf("main","data").replace(/\r/g,"");if(e===n)return a.fire("blur",this),a.fire("focus",this),!0;CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(b,0,this,e):b.call(this,e);a.fire("blur",this);a.fire("focus",this);return!1}}(),contents:[{id:"main",label:a.lang.sourcedialog.title,elements:[{type:"hbox",
style:"width: 80px;margin:0;",widths:["20px","20px","20px","20px"],children:[{type:"button",id:"searchCode",label:"",title:l.searchCode,"class":"searchCodeButton cke_button_icon",onClick:function(){CodeMirror.commands.find(window["codemirror_"+a.id])}},{type:"button",id:"replaceCode",label:"",title:l.replaceCode,"class":"replaceCodeButton",onClick:function(){CodeMirror.commands.replace(window["codemirror_"+a.id])}},{type:"button",id:"autoFormat",label:"",title:l.autoFormat,"class":"autoFormat",onClick:function(){var b=
window["codemirror_"+a.id].getCursor(!0),e=window["codemirror_"+a.id].getCursor(!1);window["codemirror_"+a.id].autoFormatRange(b,e)}},{type:"button",id:"CommentSelectedRange",label:"",title:l.commentSelectedRange,"class":"CommentSelectedRange",onClick:function(){var b=window["codemirror_"+a.id].getCursor(!0),e=window["codemirror_"+a.id].getCursor(!1);window["codemirror_"+a.id].commentRange(!0,b,e)}},{type:"button",id:"UncommentSelectedRange",label:"",title:l.uncommentSelectedRange,"class":"UncommentSelectedRange",
onClick:function(){var b=window["codemirror_"+a.id].getCursor(!0),e=window["codemirror_"+a.id].getCursor(!1);window["codemirror_"+a.id].commentRange(!1,b,e);window["codemirror_"+a.id].config.autoFormatOnUncomment&&window["codemirror_"+a.id].autoFormatRange(b,e)}},{type:"button",id:"codemirrorAbout",label:"",title:l.dlgTitle,"class":"codemirrorAbout",onClick:function(){a.execCommand("codemirrorAbout")}}]},{type:"checkbox",id:"AutoComplete",label:l.autoCompleteToggle,title:l.autoCompleteToggle,onChange:function(){window["codemirror_"+
a.id].setOption("autoCloseTags",this.getValue())}},{type:"textarea",id:"data",dir:"ltr",inputStyle:"cursor:auto;width:"+k+"px;height:"+g+"px;tab-size:4;text-align:left;","class":"cke_source cke_enable_context_menu"}]}]}});k.commands.find&&(k.commands.find.modes={wysiwyg:1,source:1},k.commands.find.exec=function(){"wysiwyg"===k.mode?k.openDialog("find"):CodeMirror.commands.find(window["codemirror_"+k.id])});k.commands.replace&&(k.commands.replace.modes={wysiwyg:1,source:1},k.commands.replace.exec=
function(){"wysiwyg"===k.mode?k.openDialog("find",function(){this.selectPage("replace")}):CodeMirror.commands.replace(window["codemirror_"+k.id])});g=CKEDITOR.plugins.sourcearea;g.commands.searchCode||(CKEDITOR.plugins.sourcearea.commands={source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){"wysiwyg"===a.mode&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode("source"===a.mode?"wysiwyg":"source")},canUndo:!1},searchCode:{modes:{wysiwyg:0,
source:1},editorFocus:!1,readOnly:1,exec:function(a){CodeMirror.commands.find(window["codemirror_"+a.id])},canUndo:!0},autoFormat:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(a){var b=window["codemirror_"+a.id].getCursor(!0),e=window["codemirror_"+a.id].getCursor(!1);window["codemirror_"+a.id].autoFormatRange(b,e)},canUndo:!0},commentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(a){var b=window["codemirror_"+a.id].getCursor(!0),e=window["codemirror_"+
a.id].getCursor(!1);window["codemirror_"+a.id].commentRange(!0,b,e)},canUndo:!0},uncommentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(a){var b=window["codemirror_"+a.id].getCursor(!0),e=window["codemirror_"+a.id].getCursor(!1);window["codemirror_"+a.id].commentRange(!1,b,e);window["codemirror_"+a.id].config.autoFormatOnUncomment&&window["codemirror_"+a.id].autoFormatRange(b,e)},canUndo:!0},autoCompleteToggle:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,
exec:function(a){this.state==CKEDITOR.TRISTATE_ON?window["codemirror_"+a.id].setOption("autoCloseTags",!1):this.state==CKEDITOR.TRISTATE_OFF&&window["codemirror_"+a.id].setOption("autoCloseTags",!0);this.toggleState()},canUndo:!0}});k.addMode("source",function(c){d.autoLoadCodeMirror&&null!==k.ui.space("contents")&&(la(b+"css/codemirror.min.css")||CKEDITOR.document.appendStyleSheet(b+"css/codemirror.min.css"),d.theme.length&&"default"!=d.theme&&!la(b+"theme/"+d.theme+".css")&&CKEDITOR.document.appendStyleSheet(b+
"theme/"+d.theme+".css"),e?m(h(),function(){a(k);c()}):"undefined"==typeof CodeMirror?CKEDITOR.scriptLoader.load(b+"js/codemirror.min.js",function(){CKEDITOR.scriptLoader.load(f(),function(){a(k);c()})}):CodeMirror.prototype.autoFormatAll?(a(k),c()):CKEDITOR.scriptLoader.load(f(),function(){a(k);c()}))});k.addCommand("source",g.commands.source);k.ui.addButton&&null!=k.ui.space("contents")&&k.ui.addButton("Source",{label:k.lang.codemirror.toolbar,command:"source",toolbar:"mode,10"});d.enableCodeFormatting&&
(k.addCommand("searchCode",g.commands.searchCode),k.addCommand("autoFormat",g.commands.autoFormat),k.addCommand("commentSelectedRange",g.commands.commentSelectedRange),k.addCommand("uncommentSelectedRange",g.commands.uncommentSelectedRange),k.addCommand("autoCompleteToggle",g.commands.autoCompleteToggle),k.ui.addButton&&((d.showFormatButton||d.showCommentButton||d.showUncommentButton||d.showSearchButton)&&k.ui.add("-",CKEDITOR.UI_SEPARATOR,{toolbar:"mode,30"}),d.showFormatButton&&k.ui.addButton("autoFormat",
{icon:this.path+"images/autoformat.svg",label:l.autoFormat,command:"autoFormat",toolbar:"mode,50"}),d.showCommentButton&&k.ui.addButton("CommentSelectedRange",{icon:this.path+"images/commentselectedrange.svg",label:l.commentSelectedRange,command:"commentSelectedRange",toolbar:"mode,60"}),d.showUncommentButton&&k.ui.addButton("UncommentSelectedRange",{icon:this.path+"images/uncommentselectedrange.svg",label:l.uncommentSelectedRange,command:"uncommentSelectedRange",toolbar:"mode,70"}),d.showAutoCompleteButton&&
k.ui.addButton("AutoComplete",{icon:this.path+"images/autocomplete.svg",label:l.autoCompleteToggle,command:"autoCompleteToggle",toolbar:"mode,80"}),k.ui.addButton("codemirrorAbout",{icon:this.path+"images/codemirror.svg",label:l.dlgTitle,command:"codemirrorAbout",toolbar:"mode,90"})));k.on("beforeModeUnload",function(a){if("source"===k.mode&&k.plugins.textselection&&!k.config.fullPage){var b=k.getTextSelection();b.startOffset=oa(window["codemirror_"+k.id],window["codemirror_"+k.id].getCursor(!0));
b.endOffset=oa(window["codemirror_"+k.id],window["codemirror_"+k.id].getCursor(!1));delete b.element;b.createBookmark(k);sourceBookmark=!0;k.undoManager&&k.undoManager.unlock();a.data=b.content}});k.on("mode",function(){k.getCommand("source").setState("source"===k.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);if("source"===k.mode&&("autoCompleteToggle"in k.commands&&k.getCommand("autoCompleteToggle").setState(window["codemirror_"+k.id].config.autoCloseTags?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),
k.plugins.textselection&&textRange&&!k.config.fullPage)){var a,b;a=ka(window["codemirror_"+k.id],textRange.startOffset);"undefined"==typeof textRange.endOffset?(window["codemirror_"+k.id].focus(),window["codemirror_"+k.id].setCursor(a)):(window["codemirror_"+k.id].focus(),b=ka(window["codemirror_"+k.id],textRange.endOffset),window["codemirror_"+k.id].setSelection(a,b))}});k.on("resize",function(){if(window["editable_"+k.id]&&"source"===k.mode){var a=window["editable_"+k.id].getParent();window["codemirror_"+
k.id].setSize(a.$.clientWidth+"px",a.$.clientHeight+"px")}});k.on("beforeFocus",function(a){"source"===a.editor.mode&&(window["codemirror_"+k.id].hasFocus()||window["codemirror_"+k.id].focus())});k.on("readOnly",function(){window["editable_"+k.id]&&"source"===k.mode&&window["codemirror_"+k.id].setOption("readOnly",this.readOnly)});k.on("instanceReady",function(a){a=k.commands.selectAll;null!=a&&(a.exec=function(){if("source"===k.mode)window["codemirror_"+k.id].setSelection({line:0,ch:0},{line:window["codemirror_"+
k.id].lineCount(),ch:0});else{var a=k.editable();if(a.is("body"))k.document.$.execCommand("SelectAll",!1,null);else{var b=k.createRange();b.selectNodeContents(a);b.select()}k.forceNextSelectionCheck();k.selectionChange()}})});if("undefined"!=typeof jQuery&&jQuery('a[data-toggle\x3d"tab"]')&&window["codemirror_"+k.id])jQuery('a[data-toggle\x3d"tab"]').on("shown.bs.tab",function(){window["codemirror_"+k.id].refresh()});k.on("setData",function(a){window["editable_"+a.editor.id]&&"source"===a.editor.mode&&
window["codemirror_"+a.editor.id].setValue(a.data.dataValue)})}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(c){this.setValue(c);window["editable_"+this.editor.id]&&"source"===this.editor.mode&&window["codemirror_"+this.editor.id].setValue(c);this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(c){this[(c?"set":"remove")+"Attribute"]("readOnly",
"readonly")},editorID:null,detach:function(){window["codemirror_"+this.editorID].toTextArea();window["editable_"+this.editorID]=null;window["codemirror_"+this.editorID]=null;c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"===c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"===c.mode?"wysiwyg":
"source")},canUndo:!1},searchCode:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(c){CodeMirror.commands.find(window["codemirror_"+c.id])},canUndo:!0},autoFormat:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:0,exec:function(c){var k=window["codemirror_"+c.id].getCursor(!0),h=window["codemirror_"+c.id].getCursor(!1);window["codemirror_"+c.id].autoFormatRange(k,h)},canUndo:!0},commentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:0,exec:function(c){var k=
window["codemirror_"+c.id].getCursor(!0),h=window["codemirror_"+c.id].getCursor(!1);window["codemirror_"+c.id].commentRange(!0,k,h)},canUndo:!0},uncommentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:0,exec:function(c){var k=window["codemirror_"+c.id].getCursor(!0),h=window["codemirror_"+c.id].getCursor(!1);window["codemirror_"+c.id].commentRange(!1,k,h);window["codemirror_"+c.id].config.autoFormatOnUncomment&&window["codemirror_"+c.id].autoFormatRange(k,h)},canUndo:!0},autoCompleteToggle:{modes:{wysiwyg:0,
source:1},editorFocus:!1,readOnly:1,exec:function(c){this.state==CKEDITOR.TRISTATE_ON?window["codemirror_"+c.id].setOption("autoCloseTags",!1):this.state==CKEDITOR.TRISTATE_OFF&&window["codemirror_"+c.id].setOption("autoCloseTags",!0);this.toggleState()},canUndo:!0}}},"use strict",function(){function c(a,b){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),doc:a.document,win:a.window},b,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?
"editable":"doc"]}function k(a,b){CKEDITOR.tools.extend(this,b,{editor:a},!0)}function h(e,d){var c=e.editable();CKEDITOR.tools.extend(this,{editor:e,editable:c,inline:c.isInline(),doc:e.document,win:e.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},d,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var f=CKEDITOR.tools.bind(this.queryViewport,this),h=CKEDITOR.tools.bind(this.hideVisible,this),k=CKEDITOR.tools.bind(this.removeAll,
this);c.attachListener(this.winTop,"resize",f);c.attachListener(this.winTop,"scroll",f);c.attachListener(this.winTop,"resize",h);c.attachListener(this.win,"scroll",h);c.attachListener(this.inline?c:this.frame,"mouseout",function(a){var b=a.data.$.clientX;a=a.data.$.clientY;this.queryViewport();(b<=this.rect.left||b>=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);c.attachListener(e,
"resize",f);c.attachListener(e,"mode",k);e.on("destroy",k);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},b,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},a,{left:"0px","border-left-color":"red",
"border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},a,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function f(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(d[a.getComputedStyle("float")]||d[a.getAttribute("align")]);return b&&!l[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;
CKEDITOR.LINEUTILS_INSIDE=4;c.prototype={start:function(a){var b=this,d=this.editor,c=this.doc,f,h,k,l,t=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(b.relations={},(h=c.$.elementFromPoint(k,l))&&h.nodeType&&(f=new CKEDITOR.dom.element(h),b.traverseSearch(f),isNaN(k+l)||b.pixelSearch(f,k,l),a&&a(b.relations,k,l)))});this.listener=this.editable.attachListener(this.target,"mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;t.input()});this.editable.attachListener(this.inline?
this.editable:this.frame,"mouseout",function(){t.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var d=this.editor.createRange();d.moveToPosition(this.relations[b.uid].element,a[b.type]);return d}}(),store:function(){function a(b,e,d){var c=b.getUniqueId();
c in d?d[c].type|=e:d[c]={element:b,type:e}}return function(b,d){var c;d&CKEDITOR.LINEUTILS_AFTER&&f(c=b.getNext())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_AFTER);d&CKEDITOR.LINEUTILS_INSIDE&&f(c=b.getFirst())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_INSIDE);a(b,d,this.relations)}}(),traverseSearch:function(a){var b,d,c;do if(c=a.$["data-cke-expando"],!(c&&c in this.relations)){if(a.equals(this.editable))break;
if(f(a))for(b in this.lookups)(d=this.lookups[b](a))&&this.store(a,d)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(e,d,c,h,k){for(var l=0,t;k(c);){c+=h;if(25==++l)break;if(t=this.doc.$.elementFromPoint(d,c))if(t==e)l=0;else if(b(e,t)&&(l=0,f(t=new CKEDITOR.dom.element(t))))return t}}var b=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:function(a,b){return!!(a.compareDocumentPosition(b)&
16)};return function(b,d,c){var h=this.win.getViewPaneSize().height,k=a.call(this,b.$,d,c,-1,function(a){return 0<a});d=a.call(this,b.$,d,c,1,function(a){return a<h});if(k)for(this.traverseSearch(k);!k.getParent().equals(b);)k=k.getParent();if(d)for(this.traverseSearch(d);!d.getParent().equals(b);)d=d.getParent();for(;k||d;){k&&(k=k.getNext(f));if(!k||k.equals(d))break;this.traverseSearch(k);d&&(d=d.getPrevious(f));if(!d||d.equals(k))break;this.traverseSearch(d)}}}(),greedySearch:function(){this.relations=
{};for(var a=this.editable.getElementsByTag("*"),b=0,d,c,h;d=a.getItem(b++);)if(!d.equals(this.editable)&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasAttribute("contenteditable")||!d.isReadOnly())&&f(d)&&d.isVisible())for(h in this.lookups)(c=this.lookups[h](d))&&this.store(d,c);return this.relations}};k.prototype={locate:function(){function a(b,e){var d=b.element[e===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return d&&f(d)?(b.siblingRect=d.getClientRect(),e==CKEDITOR.LINEUTILS_BEFORE?(b.siblingRect.bottom+
b.elementRect.top)/2:(b.elementRect.bottom+b.siblingRect.top)/2):e==CKEDITOR.LINEUTILS_BEFORE?b.elementRect.top:b.elementRect.bottom}return function(b){var d;this.locations={};for(var c in b)d=b[c],d.elementRect=d.element.getClientRect(),d.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(c,CKEDITOR.LINEUTILS_BEFORE,a(d,CKEDITOR.LINEUTILS_BEFORE)),d.type&CKEDITOR.LINEUTILS_AFTER&&this.store(c,CKEDITOR.LINEUTILS_AFTER,a(d,CKEDITOR.LINEUTILS_AFTER)),d.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(c,CKEDITOR.LINEUTILS_INSIDE,
(d.elementRect.top+d.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,b,d,c;return function(f,h){a=this.locations;b=[];for(var k in a)for(var l in a[k])if(d=Math.abs(f-a[k][l]),b.length){for(c=0;c<b.length;c++)if(d<b[c].dist){b.splice(c,0,{uid:+k,type:l,dist:d});break}c==b.length&&b.push({uid:+k,type:l,dist:d})}else b.push({uid:+k,type:l,dist:d});return"undefined"!=typeof h?b.slice(0,h):b}}(),store:function(a,b,d){this.locations[a]||(this.locations[a]={});this.locations[a][b]=
d}};var a={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},b={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};h.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var b=a.getUniqueId();a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=
a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,b){var d,c,f;if(d=this.getStyle(a.uid,a.type)){for(f in this.visible)if(this.visible[f].getCustomData("hash")!==this.hash){c=this.visible[f];break}if(!c)for(f in this.hidden)if(this.hidden[f].getCustomData("hash")!==this.hash){this.showLine(c=this.hidden[f]);break}c||this.showLine(c=this.addLine());c.setCustomData("hash",this.hash);
this.visible[c.getUniqueId()]=c;c.setStyles(d);b&&b(c)}},getStyle:function(a,b){var d=this.relations[a],c=this.locations[a][b],f={};f.width=d.siblingRect?Math.max(d.siblingRect.width,d.elementRect.width):d.elementRect.width;f.top=this.inline?c+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+c;if(f.top-this.winTopScroll.y<this.rect.top||f.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?f.left=d.elementRect.left-this.rect.relativeX:(0<d.elementRect.left?f.left=
this.rect.left+d.elementRect.left:(f.width+=d.elementRect.left,f.left=this.rect.left),0<(d=f.left+f.width-(this.rect.left+this.winPane.width))&&(f.width-=d));f.left+=this.winTopScroll.x;for(var h in f)f[h]=CKEDITOR.tools.cssLength(f[h]);return f},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,b){this.relations=a;this.locations=b;this.hash=Math.random()},cleanup:function(){var a,b;for(b in this.visible)a=this.visible[b],
a.getCustomData("hash")!==this.hash&&this.hideLine(a)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(a){a=a.getClientRect();var b=this.container.getDocumentPosition(),d=this.container.getComputedStyle("position");a.relativeX=a.relativeY=0;"static"!=d&&(a.relativeY=b.y,a.relativeX=b.x,a.top-=a.relativeY,
a.bottom-=a.relativeY,a.left-=a.relativeX,a.right-=a.relativeX);return a}};var d={left:1,right:1,center:1},l={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:c,locator:k,liner:h}}(),function(){function c(c){return c.getName&&!c.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(c){if(CKEDITOR.env.webkit){var h=CKEDITOR.plugins.widgetselection;c.on("contentDom",function(c){c=c.editor;var a=c.editable();a.attachListener(a,"keydown",function(b){b.data.getKeystroke()==
CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){h.addFillers(a)||h.removeFillers(a)},0)},null,null,-1);c.on("selectionCheck",function(a){h.removeFillers(a.editor.editable())});c.on("paste",function(a){a.data.dataValue=h.cleanPasteData(a.data.dataValue)});"selectall"in c.plugins&&h.addSelectAllIntegration(c)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(k){var h=
k.editor;if(!this.isWholeContentSelected(k)&&0<k.getChildCount()){var f=k.getFirst(c),a=k.getLast(c);f&&f.type==CKEDITOR.NODE_ELEMENT&&!f.isEditable()&&(this.startFiller=this.createFiller(),k.append(this.startFiller,1));a&&a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable()&&(this.endFiller=this.createFiller(!0),k.append(this.endFiller,0));if(this.hasFiller(k))return h=h.createRange(),h.selectNodeContents(k),h.select(),!0}return!1},removeFillers:function(c){if(this.hasFiller(c)&&!this.isWholeContentSelected(c)){var h=
c.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),f=c.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&h&&this.startFiller.equals(h)?this.removeFiller(this.startFiller,c):this.startFiller=h;this.endFiller&&f&&this.endFiller.equals(f)?this.removeFiller(this.endFiller,c):this.endFiller=f}},cleanPasteData:function(c){c&&c.length&&(c=c.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));return c},isWholeContentSelected:function(c){var h=
c.editor.getSelection().getRanges()[0];return!h||h&&h.collapsed?!1:(h=h.clone(),h.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(h&&c&&h.startContainer&&h.endContainer&&0===h.startOffset&&h.endOffset===c.getChildCount()&&h.startContainer.equals(c)&&h.endContainer.equals(c)))},hasFiller:function(c){return 0<c.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(c){var h=new CKEDITOR.dom.element(this.fillerTagName);h.setHtml(this.fillerContent);h.setAttribute(this.fillerAttribute,
c?"end":"start");h.setAttribute("data-cke-temp",1);h.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return h},removeFiller:function(c,h){if(c){var f=h.editor,a=h.editor.getSelection().getRanges()[0].startPath(),b=f.createRange(),d,l;a.contains(c)&&(d=c.getHtml(),l=!0);a="start"==c.getAttribute(this.fillerAttribute);c.remove();d&&0<d.length&&d!=this.fillerContent?(h.insertHtmlIntoRange(d,f.getSelection().getRanges()[0]),
b.setStartAt(h.getChild(h.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),f.getSelection().selectRanges([b])):l&&(a?b.setStartAt(h.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):b.setEndAt(h.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),h.editor.getSelection().selectRanges([b]))}},createFillerRegex:function(c){var h=this.createFiller(c).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((c?"":"^")+h+(c?"$":""))},addSelectAllIntegration:function(c){var h=
this;c.editable().attachListener(c,"beforeCommandExec",function(f){var a=c.editable();"selectAll"==f.data.name&&a&&h.addFillers(a)},null,null,9999)}}}(),"use strict",function(){function c(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};C(this);D(this);this.on("checkWidgets",d);this.editor.on("contentDomInvalidated",this.checkWidgets,this);A(this);z(this);x(this);B(this);
w(this)}function k(a,b,d,e,c){var f=a.editor;CKEDITOR.tools.extend(this,e,{editor:f,id:b,inline:"span"==d.getParent().getName(),element:d,data:CKEDITOR.tools.extend({},"function"==typeof e.defaults?e.defaults():e.defaults),dataReady:!1,inited:!1,ready:!1,edit:k.prototype.edit,focusedEditable:null,definition:e,repository:a,draggable:!1!==e.draggable,_:{downcastFn:e.downcast&&"string"==typeof e.downcast?e.downcasts[e.downcast]:e.downcast}},!0);a.fire("instanceCreated",this);M(this,e);this.init&&this.init();
this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));c&&this.setData(c);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;aa(this);this.fire("data",this.data);this.isInited()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function h(a,b,d){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=d.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=b?b.getAllowedEnterMode(a.enterMode):
a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function f(a,b){a.addCommand(b.name,{exec:function(a,d){function e(){a.widgets.finalizeCreation(h)}var c=a.widgets.focused;if(c&&c.name==b.name)c.edit();else if(b.insert)b.insert({editor:a,commandData:d});else if(b.template){var c="function"==typeof b.defaults?b.defaults():b.defaults,c=CKEDITOR.tools.object.merge(c||{},d&&d.startupData||{}),c=CKEDITOR.dom.element.createFromHtml(b.template.output(c),
a.document),f,g=a.widgets.wrapElement(c,b.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(c,b,d&&d.startupData))?(c=f.once("edit",function(b){if(b.data.dialog)f.once("dialog",function(b){b=b.data;var d,c;d=b.once("ok",e,null,null,20);c=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(f,!0)});b.once("hide",function(){d.removeListener();c.removeListener()})});else e()},null,null,999),f.edit(),c.removeListener()):e()}},allowedContent:b.allowedContent,
requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function a(a,b){function d(a,e){var c=b.upcast.split(","),f,g;for(g=0;g<c.length;g++)if(f=c[g],f===a.name)return b.upcasts[f].call(this,a,e);return!1}function e(b,d,c){var f=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>c});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[CKEDITOR.tools.bind(b,d),d.name,c])}var c=b.upcast,f=b.upcastPriority||10;c&&("string"==typeof c?e(d,
b,f):e(c,b,f))}function b(a,b){a.focused=null;if(b.isInited()){var d=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!d&&b.editor.resetDirty()}}function d(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),d=this.instances,e,c,f,g;if(b){for(e in d)d[e].isReady()&&!b.contains(d[e].wrapper)&&this.destroy(d[e],!0);if(a&&a.initOnlyNew)d=this.initOnAll();else{var h=b.find(".cke_widget_wrapper"),d=[];e=0;for(c=h.count();e<c;e++){f=h.getItem(e);if(g=!this.getByElement(f,
!0)){a:{g=q;for(var l=f;l=l.getParent();)if(g(l)){g=!0;break a}g=!1}g=!g}g&&b.contains(f)&&(f.addClass("cke_widget_new"),d.push(this.initOn(f.getFirst(k.isDomWidgetElement))))}}a&&a.focusInited&&1==d.length&&d[0].focus()}}}function l(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=e(a),d=m(a),c=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=1,b.value=b.value.replace(/^\s/g,"\x26nbsp;"),c=!0);d&&d.value&&d.value.match(/\s$/g)&&(d.parent.attributes["data-cke-white-space-last"]=
1,d.value=d.value.replace(/\s$/g,"\x26nbsp;"),c=!0);c&&(a.attributes["data-cke-widget-white-space"]=1)}}function e(a){return a.find(function(a){return 3===a.type},!0).shift()}function m(a){return a.find(function(a){return 3===a.type},!0).pop()}function g(a,b,d){if(!d.allowedContent&&!d.disallowedContent)return null;var e=this._.filters[a];e||(this._.filters[a]=e={});a=e[b];a||(a=d.allowedContent?new CKEDITOR.filter(d.allowedContent):this.editor.filter.clone(),e[b]=a,d.disallowedContent&&a.disallow(d.disallowedContent));
return a}function n(a){var b=[],d=a._.upcasts,e=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var c,f,g,h,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(k.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=d.length){if(a.attributes["data-cke-widget-upcasted"])return!1;h=0;for(c=e.length;h<c;++h)if(!1===e[h](a))return;for(h=0;h<l;++h)if(c=d[h],g={},f=c[0](a,g))return f instanceof CKEDITOR.htmlParser.element&&(a=f),a.attributes["data-cke-widget-data"]=
encodeURIComponent(JSON.stringify(g)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,c[1]]),!1}}}}function p(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function v(a,b,d){if(a.type==CKEDITOR.NODE_ELEMENT){var e=CKEDITOR.dtd[a.name];if(e&&!e[d.name]){var e=a.split(b),c=a.parent;b=e.getIndex();a.children.length||(--b,a.remove());e.children.length||
e.remove();return v(c,b,d)}}a.add(d,b)}function r(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function q(a){return a.hasAttribute("data-cke-temp")}function t(a,b,d,e){var c=a.editor;c.fire("lockSnapshot");d?(e=d.data("cke-widget-editable"),e=b.editables[e],a.widgetHoldingFocusedEditable=b,b.focusedEditable=e,d.addClass("cke_widget_editable_focused"),e.filter&&c.setActiveFilter(e.filter),c.setActiveEnterMode(e.enterMode,e.shiftEnterMode)):(e||b.focusedEditable.removeClass("cke_widget_editable_focused"),
b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,c.setActiveFilter(null),c.setActiveEnterMode(null,null));c.fire("unlockSnapshot")}function y(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function u(a,b){return CKEDITOR.tools.trim(b)}function B(a){var b=a.editor,d=CKEDITOR.plugins.lineutils;b.on("dragstart",function(d){var e=d.data.target;k.isDomDragHandler(e)&&(e=a.getByElement(e),d.data.dataTransfer.setData("cke/widget-id",
e.id),b.focus(),e.focus())});b.on("drop",function(d){function e(a,b){return a&&b?a.wrapper.equals(b.wrapper)||a.wrapper.contains(b.wrapper):!1}var c=d.data.dataTransfer,f=c.getData("cke/widget-id"),g=c.getTransferType(b),c=b.createRange(),h=function(a){a=a.getBoundaryNodes().startNode;a.type!==CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return b.widgets.getByElement(a)}(d.data.dropRange);if(""!==f&&g===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS)d.cancel();else if(g==CKEDITOR.DATA_TRANSFER_INTERNAL)if(""===
f&&0<b.widgets.selected.length)d.data.dataTransfer.setData("text/html",O(b));else if(f=a.instances[f])e(f,h)?d.cancel():(c.setStartBefore(f.wrapper),c.setEndAfter(f.wrapper),d.data.dragRange=c,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,d.data.dataTransfer.setData("text/html",f.getClipboardHtml()),b.widgets.destroy(f,!0))});b.on("contentDom",function(){var e=b.editable();CKEDITOR.tools.extend(a,{finder:new d.finder(b,
{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!k.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var d=k.getNestedEditable(e,b);if(d){b=a._.draggedWidget;if(a.getByElement(d)==b)return;d=CKEDITOR.filter.instances[d.data("cke-filter")];b=b.requiredContent;if(d&&b&&!d.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new d.locator(b),liner:new d.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},
tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function z(a){var b=a.editor;b.on("contentDom",function(){var d=b.editable(),e=d.isInline()?d:b.document,c,f;d.attachListener(e,"mousedown",function(d){var e=d.data.getTarget();c=e instanceof CKEDITOR.dom.element?a.getByElement(e):null;f=0;c&&(c.inline&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=c&&b.getSelection().removeAllRanges()):k.getNestedEditable(c.wrapper,
e)?c=null:(d.data.preventDefault(),CKEDITOR.env.ie||c.focus()))});d.attachListener(e,"mouseup",function(){f&&c&&c.wrapper&&(f=0,c.focus())});CKEDITOR.env.ie&&d.attachListener(e,"mouseup",function(){setTimeout(function(){c&&c.wrapper&&d.contains(c.wrapper)&&(c.focus(),c=null)})})});b.on("doubleclick",function(b){var d=a.getByElement(b.data.element);if(d&&!k.getNestedEditable(d.wrapper,b.data.element))return d.fire("doubleclick",{element:b.data.element})},null,null,1)}function x(a){a.editor.on("key",
function(b){var d=a.focused,e=a.widgetHoldingFocusedEditable,c;d?c=d.fire("key",{keyCode:b.data.keyCode}):e&&(d=b.data.keyCode,b=e.focusedEditable,d==CKEDITOR.CTRL+65?(d=b.getBogus(),e=e.editor.createRange(),e.selectNodeContents(b),d&&e.setEndAt(d,CKEDITOR.POSITION_BEFORE_START),e.select(),c=!1):8==d||46==d?(c=e.editor.getSelection().getRanges(),e=c[0],c=!(1==c.length&&e.collapsed&&e.checkBoundaryOfElement(b,CKEDITOR[8==d?"START":"END"]))):c=void 0);return c},null,null,1)}function w(a){function b(e){1>
a.selected.length||H(d,"cut"===e.name)}var d=a.editor;d.on("contentDom",function(){var a=d.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function A(a){function d(){var a=f.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var b=e(a.startContainer),c=e(a.endContainer);!b&&c?(a.setEndBefore(c.wrapper),a.select()):b&&!c&&(a.setStartAfter(b.wrapper),a.select())}}function e(a){return a?a.type==CKEDITOR.NODE_TEXT?e(a.getParent()):f.widgets.getByElement(a):null}function c(){a.fire("checkSelection")}
var f=a.editor;f.on("selectionCheck",c);f.on("contentDom",function(){f.editable().attachListener(f,"key",function(){setTimeout(c,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",d);a.on("checkSelection",a.checkSelection,a);f.on("selectionChange",function(b){var d=(b=k.getNestedEditable(f.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),e=a.widgetHoldingFocusedEditable;e?e===d&&e.focusedEditable.equals(b)||(t(a,e,null),d&&b&&t(a,d,b)):d&&b&&t(a,d,b)});f.on("dataReady",function(){E(a).commit()});
f.on("blur",function(){var d;(d=a.focused)&&b(a,d);(d=a.widgetHoldingFocusedEditable)&&t(a,d,null)})}function D(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var c=CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=c;d[c]=f;b.data.dataValue.forEach(function(b){var d=b.attributes,c;if("data-cke-widget-white-space"in d){c=e(b);var g=m(b);c.parent.attributes["data-cke-white-space-first"]&&(c.value=c.value.replace(/^&nbsp;/g," "));g.parent.attributes["data-cke-white-space-last"]&&
(g.value=g.value.replace(/&nbsp;$/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])c=b.getFirst(k.isParserWidgetElement),f.push({wrapper:b,element:c,widget:d,editables:{}}),c&&"1"!=c.attributes["data-cke-widget-keep-attr"]&&delete c.attributes["data-widget"]}else if("data-cke-widget-editable"in d)return 0<f.length&&(f[f.length-1].editables[d["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=
d[a.data.downcastingSessionId],e,c,f,g,h,k;e=b.shift();){c=e.widget;f=e.element;g=c._.downcastFn&&c._.downcastFn.call(c,f);a.data.widgetsCopy&&c.getClipboardHtml&&(g=CKEDITOR.htmlParser.fragment.fromHtml(c.getClipboardHtml()),g=g.children[0]);for(k in e.editables)h=e.editables[k],delete h.attributes.contenteditable,h.setHtml(c.editables[k].getData());g||(g=f);g?e.wrapper.replaceWith(g):e.wrapper.remove()}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function C(a){var b=a.editor,
d,e;b.on("toHtml",function(b){var e=n(a),c;for(b.data.dataValue.forEach(e.iterator,CKEDITOR.NODE_ELEMENT,!0);c=e.toBeWrapped.pop();){var f=c[0],g=f.parent;g.type==CKEDITOR.NODE_ELEMENT&&g.attributes["data-cke-widget-wrapper"]&&g.replaceWith(f);a.wrapElement(c[0],c[1])}d=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&k.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&k.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",
function(){if(e)for(var d=b.editable().find(".cke_widget_wrapper"),c,f,g=0,h=d.count();g<h;++g)c=d.getItem(g),f=c.getFirst(k.isDomWidgetElement),f.type==CKEDITOR.NODE_ELEMENT&&f.data("widget")?(f.replace(c),a.wrapElement(f)):c.remove();e=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(e=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(da,u);a.range&&(a=k.getNestedEditable(b.editable(),a.range.startContainer))&&
(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(e){e.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:d}),b.fire("unlockSnapshot"))})}function E(a){var d=a.selected,e=[],c=d.slice(0),f=null;return{select:function(a){0>CKEDITOR.tools.indexOf(d,a)&&e.push(a);a=CKEDITOR.tools.indexOf(c,a);0<=a&&c.splice(a,1);return this},focus:function(a){f=a;return this},commit:function(){var g=
a.focused!==f,h,k;a.editor.fire("lockSnapshot");for(g&&(h=a.focused)&&b(a,h);h=c.pop();)d.splice(CKEDITOR.tools.indexOf(d,h),1),h.isInited()&&(k=h.editor.checkDirty(),h.setSelected(!1),!k&&h.editor.resetDirty());g&&f&&(k=a.editor.checkDirty(),a.focused=f,a.fire("widgetFocused",{widget:f}),f.setFocused(!0),!k&&a.editor.resetDirty());for(;h=e.pop();)d.push(h),h.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function I(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,
"")})}function K(a,b,d){var e=0;b=F(b);var c=a.data.classes||{},f;if(b){for(c=CKEDITOR.tools.clone(c);f=b.pop();)d?c[f]||(e=c[f]=1):c[f]&&(delete c[f],e=1);e&&a.setData("classes",c)}}function G(a){a.cancel()}function L(a,b){var d=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),e=new CKEDITOR.dom.element(d);"br"!==d&&e.appendBogus();"after"===b?e.insertAfter(a.wrapper):e.insertBefore(a.wrapper);(function(b){var d=a.editor.createRange();d.setStart(b,
0);a.editor.getSelection().selectRanges([d])})(e)}function H(a,b){var d=a.widgets.focused,e,c,f;Q.hasCopyBin(a)||(c=new Q(a,{beforeDestroy:function(){!b&&d&&d.focus();f&&a.getSelection().selectBookmarks(f);e&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(d?a.widgets.del(d):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),d||(e=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),
c.handle(O(a)))}function F(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function P(){var a=CKEDITOR.document.getActive(),b=this.editor,d=b.editable();(d.isInline()?d:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(d)}function N(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function O(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();
a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function M(a,b){var d=a.editor.config.widget_keystrokeInsertLineBefore,e=a.editor.config.widget_keystrokeInsertLineAfter;W(a);S(a);U(a);ea(a);ga(a);V(a);X(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var d=b.data.getTarget();k.getNestedEditable(a,d)||a.inline&&k.isDomDragHandler(d)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");
a.on("key",function(b){b=b.data.keyCode;if(b==d)L(a,"before"),a.editor.fire("saveSnapshot");else if(b==e)L(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){H(a.editor,b==CKEDITOR.CTRL+88);return}if(b in Y||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function W(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",
a.id)}function S(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var d={},e,c;for(c in a.partSelectors)b||!a.parts[c]||"string"==typeof a.parts[c]?(e=a.wrapper.findOne(a.partSelectors[c]),d[c]=e):d[c]=a.parts[c];a.parts=d}}function U(a){var b=a.editables,d,e;a.editables={};if(a.editables)for(d in b)e=b[d],a.initEditable(d,"string"==typeof e?{selector:e}:e)}function ea(a){if(!0===a.mask)T(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,fa,a),d=CKEDITOR.env.gecko?300:0,
e,c;a.on("focus",function(){b.input();e=a.editor.on("change",b.input);c=a.on("blur",function(){e.removeListener();c.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},d)});a.editor.on("mode",function(){setTimeout(function(){b.input()},d)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",
b.input);c&&c.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function T(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function fa(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");
b||(b=new CKEDITOR.dom.element("img",this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var d=b.$,e=a.$,c=!(d.offsetTop==e.offsetTop&&d.offsetLeft==e.offsetLeft);if(d.offsetWidth!=e.offsetWidth||d.offsetHeight!=e.offsetHeight||c)d=a.getParent(),e=CKEDITOR.plugins.widget.isDomWidget(d),b.setStyles({top:a.$.offsetTop+(e?0:d.$.offsetTop)+"px",left:a.$.offsetLeft+(e?0:d.$.offsetLeft)+"px",width:a.$.offsetWidth+
"px",height:a.$.offsetHeight+"px"})}}}function ga(a){if(a.draggable){var b=a.editor,d=a.wrapper.getLast(k.isDomDragHandlerContainer),e;d?e=d.findOne("img"):(d=new CKEDITOR.dom.element("span",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),e=new CKEDITOR.dom.element("img",b.document),e.setAttributes({"class":"cke_reset cke_widget_drag_handler",
"data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&e.setAttribute("draggable","true"),d.append(e),a.wrapper.append(d));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(e.on("mousedown",ia,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))e.on("dragstart",
function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=d}}function ia(a){function b(){var d;for(t.reset();d=h.pop();)d.removeListener();var e=k;d=a.sender;var c=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(e=c.getRange(e[0]),this.focus(),g.fire("drop",{dropRange:e,target:e.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:d})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var d=
this.repository.finder,e=this.repository.locator,c=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=d.greedySearch(),t=CKEDITOR.tools.eventsBuffer(50,function(){l=e.locate(n);k=e.sort(m,1);k.length&&(c.prepare(n,l),c.placeLine(k[0]),c.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;t.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()||
h.push(CKEDITOR.document.once("mouseup",b,this))}}function V(a){var b=null;a.on("data",function(){var a=this.data.classes,d;if(b!=a){for(d in b)a&&a[d]||this.removeClass(d);for(d in a)this.addClass(d);b=a}})}function X(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function aa(a){a.element.data("cke-widget-data",
encodeURIComponent(JSON.stringify(a.data)))}function ba(){function a(){}function b(a,d,e){return e&&this.checkElement(a)?(a=e.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function d(a){function b(a,d,e){for(var c=a.length,f=0;f<c;){if(d.call(e,a[f],f,a))return a[f];f++}}function c(a){function b(a,d){var e=CKEDITOR.tools.object.keys(a),c=CKEDITOR.tools.object.keys(d);if(e.length!==c.length)return!1;for(var f in a)if(("object"!==typeof a[f]||"object"!==typeof d[f]||!b(a[f],d[f]))&&a[f]!==
d[f])return!1;return!0}return function(d){return b(a.getDefinition(),d.getDefinition())}}var f=a.widget,g;e[f]||(e[f]={});for(var h=0,k=a.group.length;h<k;h++)g=a.group[h],e[f][g]||(e[f][g]=[]),g=e[f][g],b(g,c(a))||g.push(a)}var e={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget;(this.group="string"==typeof a.group?[a.group]:a.group)&&d(this)},apply:function(a){var b;a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&(b=a.widgets.focused,
this.group&&this.removeStylesFromSameGroup(a),b.applyStyle(this))},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(a){var b=!1,d,c;if(!(a instanceof CKEDITOR.editor))return!1;c=a.elementPath();if(this.checkApplicable(c,a))for(var f=0,g=this.group.length;f<g;f++){d=e[this.widget][this.group[f]];for(var h=0;h<d.length;h++)d[h]!==this&&d[h].checkActive(c,a)&&(a.widgets.focused.removeStyle(d[h]),
b=!0)}return b},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return k.isDomWidgetWrapper(a)?(a=a.getFirst(k.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];
var b,d={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;d[a.styleableElements]={classes:b,propertiesOnly:!0};return d}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",
onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss('.cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:block;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable\x3d"false"] .cke_widget_drag_handler_container{display:none;}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_widget_partial_mask{position:absolute;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}'),
ba())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new c(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,d,e,c;for(e in b)d=b[e],(c=d.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(d.name,!0),{label:c,command:d.name,toolbar:"insert,10"});y(a);I(a.undoManager)}}});c.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(b,d){var e=this.editor;d=CKEDITOR.tools.prototypedCopy(d);d.name=b;
d._=d._||{};e.fire("widgetDefinition",d);d.template&&(d.template=new CKEDITOR.template(d.template));f(e,d);a(this,d);this.registered[b]=d;if(d.dialog&&e.plugins.dialog)var c=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var b=a.dialog;a.getMode||b.getName()!==d.dialog||(a.getMode=function(){var a=b.getModel(e);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});c.removeListener()});return d},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},
checkSelection:function(){if(this.editor.getSelection()){var a=this.editor.getSelection(),b=a.getSelectedElement(),d=E(this),e;if(b&&(e=this.getByElement(b,!0)))return d.focus(e).select(e).commit();a=a.getRanges()[0];if(!a||a.collapsed)return d.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=k.isDomWidgetWrapper;b=a.next();)d.select(this.getByElement(b));d.commit()}},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,
d=b.createRange(),e;(e=d.moveToClosestEditablePosition(a.wrapper,!0))||(e=d.moveToClosestEditablePosition(a.wrapper,!1));e&&b.getSelection().selectRanges([d])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&t(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var d,e,c=this.instances;if(b&&!a){e=b.find(".cke_widget_wrapper");for(var c=e.count(),f=0;f<c;++f)(d=this.getByElement(e.getItem(f),
!0))&&this.destroy(d)}else for(e in c)d=c[e],this.destroy(d,a)},finalizeCreation:function(a){(a=a.getFirst())&&k.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(d){return d.is(b)&&d.data("cke-widget-id")}var b={div:1,span:1};return function(b,d){if(!b)return null;var e=a(b);if(!d&&!e){var c=this.editor.editable();do b=b.getParent();while(b&&!b.equals(c)&&!(e=a(b)))}return this.instances[e]||null}}(),
initOn:function(a,b,d){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var e=this.wrapElement(a,b.name);return e?e.hasClass("cke_widget_new")?(a=new k(this,this._.nextId++,a,b,d),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");for(var b=[],d,e=a.count();e--;)(d=this.initOn(a.getItem(e).getFirst(k.isDomWidgetElement)))&&b.push(d);return b},onWidget:function(a){var b=
Array.prototype.slice.call(arguments);b.shift();for(var d in this.instances){var e=this.instances[d];e.name==a&&e.on.apply(e,b)}this.on("instanceCreated",function(d){d=d.data;d.name==a&&d.on.apply(d,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,d={},e=0;b=a.pop();)-1==b.indexOf("cke_")&&(d[b]=e=1);return e?d:null},wrapElement:function(a,b){var d=null,e,c;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");e=this.registered[b];if(!e)return null;
if((d=a.getParent())&&d.type==CKEDITOR.NODE_ELEMENT&&d.data("cke-widget-wrapper"))return d;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);(c=r(e,a.getName()))&&l(a);d=new CKEDITOR.dom.element(c?"span":"div",a.getDocument());d.setAttributes(p(c,b));d.data("cke-display-name",e.pathName?e.pathName:a.getName());a.getParent(!0)&&d.replace(a);a.appendTo(d)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"];
e=this.registered[b];if(!e)return null;if((d=a.parent)&&d.type==CKEDITOR.NODE_ELEMENT&&d.attributes["data-cke-widget-wrapper"])return d;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);b&&(a.attributes["data-widget"]=b);(c=r(e,a.name))&&l(a);d=new CKEDITOR.htmlParser.element(c?"span":"div",p(c,b));d.attributes["data-cke-display-name"]=e.pathName?e.pathName:a.name;e=a.parent;var f;e&&(f=a.getIndex(),a.remove());d.add(a);e&&v(e,
f,d)}return d},_tests_createEditableFilter:g};CKEDITOR.event.implementOn(c.prototype);k.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(k.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){K(this,a,1)},checkStyleActive:function(a){a=F(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&&
this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(a,b){var d=this.editables[a],e=!0;d.removeListener("focus",N);d.removeListener("blur",P);this.editor.focusManager.remove(d);if(d.filter){for(var c in this.repository.instances){var f=this.repository.instances[c];f.editables&&(f=f.editables[a])&&f!==
d&&d.filter===f.filter&&(e=!1)}e&&(d.filter.destroy(),(e=this.repository._.filters[this.name])&&delete e[a])}b||(this.repository.destroyAll(!1,d),d.removeClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),d.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var d,e;!1!==b.fire("dialog",
a)&&(d=a.on("show",function(){a.setupContent(b)}),e=a.on("ok",function(){var d,e=b.on("data",function(a){d=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);e.removeListener();d&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){d.removeListener();e.removeListener()}))},b);return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var a=this.editor.createRange();
a.setStartBefore(this.wrapper);a.setEndAfter(this.wrapper);return this.editor.editable().getHtmlFromRange(a).getHtml()},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(a,b){var d=this._findOneNotNested(b.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new h(this.editor,d,{filter:g.call(this.repository,this.name,a,b)}),this.editables[a]=d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":d.enterMode}),d.filter&&d.data("cke-filter",
d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),b.pathName&&d.data("cke-display-name",b.pathName),this.editor.focusManager.add(d),d.on("focus",N,this),CKEDITOR.env.ie&&d.on("blur",P,this),d._.initialSetData=!0,d.setData(d.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,d,e=0;e<a.count();e++)if(b=a.getItem(e),d=b.getAscendant(k.isDomWidgetWrapper),this.wrapper.equals(d))return b;return null},isInited:function(){return!(!this.wrapper||
!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},refreshMask:function(){ea(this)},refreshParts:function(a){S(this,"undefined"!==typeof a?a:!0)},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(k.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){K(this,a,0)},setData:function(a,b){var d=this.data,
e=0;if("string"==typeof a)d[a]!==b&&(d[a]=b,e=1);else{var c=a;for(a in c)d[a]!==c[a]&&(e=1,d[a]=c[a])}e&&this.dataReady&&(aa(this),this.fire("data",d));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,d=this._.dragHandlerOffset,
b={x:b.offsetLeft,y:b.offsetTop-15};d&&b.x==d.x&&b.y==d.y||(d=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"),!d&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(k.prototype);k.getNestedEditable=function(a,b){return!b||b.equals(a)?null:k.isDomNestedEditable(b)?b:k.getNestedEditable(a,b.getParent())};k.isDomDragHandler=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};k.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};k.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};k.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};k.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};
k.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};k.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};k.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};k.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";h.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData||
this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.unprotectRealComments(a);a=this.editor.dataProcessor.unprotectSource(a);a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var da=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,
Y={37:1,38:1,39:1,40:1,8:1,46:1};Y[CKEDITOR.SHIFT+121]=1;var Q=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,d=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,e=!a.blockless&&!CKEDITOR.env.ie||d?"div":"span",d=b.createElement(e),b=b.createElement(e);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});d.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});d.setStyle("ltr"==a.config.contentsLangDirection?
"left":"right","-5000px");this.editor=a;this.copyBin=d;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,d=this.editor,e=this.container,c=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=d.document.getDocumentElement().$,g=d.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,
n,t,p;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');d.fire("lockSnapshot");e.append(b);d.editable().append(e);n=d.on("selectionChange",G,null,null,0);t=d.widgets.on("checkSelection",G,null,null,0);c&&(p=f.scrollTop);g.selectNodeContents(b);g.select();c&&(f.scrollTop=p);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();e.remove();n.removeListener();t.removeListener();d.fire("unlockSnapshot");
h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!Q.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=k;k.repository=c;k.nestedEditable=h}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,"use strict",function(){function c(c){CKEDITOR.tools.extend(this,c);this.queue=[];this.init?this.init(CKEDITOR.tools.bind(function(){for(var c;c=
this.queue.pop();)c.call(this);this.ready=!0},this)):this.ready=!0}function k(c){var f=c.config.codeSnippet_codeClass,a=/\r?\n/g,b=new CKEDITOR.dom.element("textarea");c.widgets.add("codeSnippet",{allowedContent:"pre; code(language-*)",requiredContent:"pre",styleableElements:"pre",template:'\x3cpre\x3e\x3ccode class\x3d"'+f+'"\x3e\x3c/code\x3e\x3c/pre\x3e',dialog:"codeSnippet",pathName:c.lang.codesnippet.pathName,mask:!0,parts:{pre:"pre",code:"code"},highlight:function(){var b=this,d=this.data,f=
function(d){b.parts.code.setHtml(c.plugins.codesnippet.isSupportedEnvironment()?d:d.replace(a,"\x3cbr\x3e"))};f(CKEDITOR.tools.htmlEncode(d.code));c._.codesnippet.highlighter.highlight(d.code,d.lang,function(a){c.fire("lockSnapshot");f(a);c.fire("unlockSnapshot")})},data:function(){var a=this.data,b=this.oldData;a.code&&this.parts.code.setHtml(CKEDITOR.tools.htmlEncode(a.code));b&&a.lang!=b.lang&&this.parts.code.removeClass("language-"+b.lang);a.lang&&(this.parts.code.addClass("language-"+a.lang),
this.highlight());this.oldData=CKEDITOR.tools.copy(a)},upcast:function(a,e){if("pre"==a.name){for(var k=[],g=a.children,n,p=g.length-1;0<=p;p--)n=g[p],n.type==CKEDITOR.NODE_TEXT&&n.value.match(d)||k.push(n);var v;if(1==k.length&&"code"==(v=k[0]).name&&1==v.children.length&&v.children[0].type==CKEDITOR.NODE_TEXT){if(k=c._.codesnippet.langsRegex.exec(v.attributes["class"]))e.lang=k[1];b.setHtml(v.getHtml());e.code=b.getValue();v.addClass(f);return a}}},downcast:function(a){var b=a.getFirst("code");
b.children.length=0;b.removeClass(f);b.add(new CKEDITOR.htmlParser.text(CKEDITOR.tools.htmlEncode(this.data.code)));return a}});var d=/^[\s\n\r]*$/}CKEDITOR.plugins.add("codesnippet",{requires:"widget,dialog",isSupportedEnvironment:function(){return!CKEDITOR.env.ie||8<CKEDITOR.env.version},beforeInit:function(c){c._.codesnippet={};this.setHighlighter=function(f){c._.codesnippet.highlighter=f;f=c._.codesnippet.langs=c.config.codeSnippet_languages||f.languages;c._.codesnippet.langsRegex=new RegExp("(?:^|\\s)language-("+
CKEDITOR.tools.object.keys(f).join("|")+")(?:\\s|$)")};c.once("pluginsLoaded",function(){this.setHighlighter=null},this)},onLoad:function(){CKEDITOR.dialog.add("codeSnippet",this.path+"dialogs/codesnippet.js")},init:function(c){c.ui.addButton&&c.ui.addButton("CodeSnippet",{label:c.lang.codesnippet.button,command:"codeSnippet",toolbar:"insert,10"})},afterInit:function(c){var f=this.path;k(c);if(!c._.codesnippet.highlighter){var a=new CKEDITOR.plugins.codesnippet.highlighter({languages:{apache:"Apache",
bash:"Bash",coffeescript:"CoffeeScript",cpp:"C++",cs:"C#",css:"CSS",diff:"Diff",html:"HTML",http:"HTTP",ini:"INI",java:"Java",javascript:"JavaScript",json:"JSON",makefile:"Makefile",markdown:"Markdown",nginx:"Nginx",objectivec:"Objective-C",perl:"Perl",php:"PHP",python:"Python",ruby:"Ruby",sql:"SQL",vbscript:"VBScript",xhtml:"XHTML",xml:"XML"},init:function(a){var d=this;c.plugins.codesnippet.isSupportedEnvironment()&&CKEDITOR.scriptLoader.load(f+"lib/highlight/highlight.pack.js",function(){d.hljs=
window.hljs;a()});c.addContentsCss&&c.addContentsCss(f+"lib/highlight/styles/"+c.config.codeSnippet_theme+".css")},highlighter:function(a,d,c){(a=this.hljs.highlightAuto(a,this.hljs.getLanguage(d)?[d]:void 0))&&c(a.value)}});this.setHighlighter(a)}}});CKEDITOR.plugins.codesnippet={highlighter:c};c.prototype.highlight=function(){var c=arguments;this.ready?this.highlighter.apply(this,c):this.queue.push(function(){this.highlighter.apply(this,c)})}}(),CKEDITOR.config.codeSnippet_codeClass="hljs",CKEDITOR.config.codeSnippet_theme=
"default",function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(c){var k=null;if("object"==typeof c)k=c;else if(c=(c||"").replace(/&nbsp;/g," "),"ActiveXObject"in window){try{k=new ActiveXObject("MSXML2.DOMDocument")}catch(h){try{k=new ActiveXObject("Microsoft.XmlDom")}catch(f){}}k&&(k.async=!1,k.resolveExternals=!1,k.validateOnParse=!1,k.loadXML(c))}else window.DOMParser&&(k=(new DOMParser).parseFromString(c,"text/xml"));this.baseXml=k};CKEDITOR.xml.prototype={selectSingleNode:function(c,
k){var h=this.baseXml;if(k||(k=h)){if("selectSingleNode"in k)return k.selectSingleNode(c);if(h.evaluate)return(h=h.evaluate(c,k,null,9,null))&&h.singleNodeValue||null}return null},selectNodes:function(c,k){var h=this.baseXml,f=[];if(k||(k=h)){if("selectNodes"in k)return k.selectNodes(c);if(h.evaluate&&(h=h.evaluate(c,k,null,5,null)))for(var a;a=h.iterateNext();)f.push(a)}return f},getInnerXml:function(c,k){var h=this.selectSingleNode(c,k),f=[];if(h)for(h=h.firstChild;h;)h.xml?f.push(h.xml):window.XMLSerializer&&
f.push((new XMLSerializer).serializeToString(h)),h=h.nextSibling;return f.length?f.join(""):null}}}(),function(){CKEDITOR.plugins.add("ajax",{requires:"xml"});CKEDITOR.ajax=function(){function c(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(d){}return null}function k(a,b){if(4!=a.readyState||!(200<=a.status&&300>a.status||304==a.status||0===a.status||
1223==a.status))return null;switch(b){case "text":return a.responseText;case "xml":var d=a.responseXML;return new CKEDITOR.xml(d&&d.firstChild?d:a.responseText);case "arraybuffer":return a.response;default:return null}}function h(a,b,d){var f=!!b,e=c();if(!e)return null;f&&"text"!==d&&"xml"!==d&&(e.responseType=d);e.open("GET",a,f);f&&(e.onreadystatechange=function(){4==e.readyState&&(b(k(e,d)),e=null)});e.send(null);return f?"":k(e,d)}function f(a,b,d,f,e){var h=c();if(!h)return null;h.open("POST",
a,!0);h.onreadystatechange=function(){4==h.readyState&&(f&&f(k(h,e)),h=null)};h.setRequestHeader("Content-type",d||"application/x-www-form-urlencoded; charset\x3dUTF-8");h.send(b)}return{load:function(a,b,d){return h(a,b,d||"text")},post:function(a,b,d,c){return f(a,b,d,c,"text")},loadXml:function(a,b){return h(a,b,"xml")},loadText:function(a,b){return h(a,b,"text")},loadBinary:function(a,b){return h(a,b,"arraybuffer")}}}()}(),"use strict",function(){CKEDITOR.plugins.add("codesnippetgeshi",{requires:"ajax,codesnippet",
init:function(k){var h=new CKEDITOR.htmlParser.basicWriter,f=new CKEDITOR.plugins.codesnippet.highlighter({languages:c,highlighter:function(a,b,d){a=JSON.stringify({lang:b,html:a});CKEDITOR.ajax.post(CKEDITOR.getUrl(k.config.codeSnippetGeshi_url||""),a,"application/json",function(a){a?(CKEDITOR.htmlParser.fragment.fromHtml(a||"").children[0].writeChildrenHtml(h),d(h.getHtml(!0))):d("")})}});k.plugins.codesnippet.setHighlighter(f)}});var c={abap:"ABAP",actionscript:"ActionScript",ada:"Ada",apache:"Apache Configuration",
applescript:"AppleScript",asm:"Assembly",asp:"Active Server Pages (ASP)",autoit:"AutoIt",bash:"Bash",basic4gl:"Basic4GL",bf:"Brainfuck",blitzbasic:"Blitz BASIC",bnf:"Backus-Naur Form",c:"C",c_mac:"C (Mac)",caddcl:"AutoCAD DCL",cadlisp:"AutoLISP",cfdg:"CFDG",cfm:"ColdFusion Markup Language",cil:"Common Intermediate Language (CIL)",cobol:"COBOL","cpp-qt":"C++ (Qt toolkit)",cpp:"C++",csharp:"C#",css:"Cascading Style Sheets (CSS)",d:"D",delphi:"Delphi",diff:"Diff",div:"DIV",dos:"DOS batch file",dot:"DOT",
eiffel:"Eiffel",fortran:"Fortran",freebasic:"FreeBASIC",gambas:"Gambas",genero:"Genero",gettext:"GNU internationalization (i18n) library",glsl:"OpenGL Shading Language (GLSL)",gml:"Game Maker Language (GML)",gnuplot:"gnuplot",groovy:"Groovy",haskell:"Haskell",hq9plus:"HQ9+",html4strict:"HTML",html5:"HTML5",idl:"Uno IDL",ini:"INI",inno:"Inno",intercal:"INTERCAL",io:"Io",java:"Java",java5:"Java(TM) 2 Platform Standard Edition 5.0",javascript:"JavaScript",kixtart:"KiXtart",klonec:"Klone C",klonecpp:"Klone C++",
latex:"LaTeX",lisp:"Lisp",lolcode:"LOLCODE",lotusscript:"LotusScript",lua:"Lua",Code:"Language",m68k:"Motorola 68000 Assembler",make:"make",matlab:"MATLAB M",mirc:"mIRC scripting language",mxml:"MXML",mpasm:"Microchip Assembler",mysql:"MySQL",nsis:"Nullsoft Scriptable Install System (NSIS)",objc:"Objective-C","ocaml-brief":"OCaml",ocaml:"OCaml",oobas:"OpenOffice.org Basic",oracle8:"Oracle 8 SQL",oracle11:"Oracle 11 SQL",pascal:"Pascal",per:"per",perl:"Perl","php-brief":"PHP",php:"PHP",pixelbender:"Pixel Bender",
plsql:"PL/SQL",povray:"Persistence of Vision Raytracer",powershell:"Windows PowerShell",progress:"OpenEdge Advanced Business Language",prolog:"Prolog",providex:"ProvideX",python:"Python",qbasic:"QBasic/QuickBASIC",rails:"Rails",reg:"Windows Registry",robots:"robots.txt",rsplus:"R",ruby:"Ruby",sas:"SAS",scala:"Scala",scheme:"Scheme",scilab:"Scilab",sdlbasic:"SdlBasic",smalltalk:"Smalltalk",smarty:"Smarty",sql:"SQL",tcl:"Tcl",teraterm:"Tera Term",text:"Plain text",thinbasic:"thinBasic",tsql:"Transact-SQL",
typoscript:"TypoScript",vala:"Vala",vb:"Visual Basic",vbnet:"Visual Basic .NET",verilog:"Verilog",vhdl:"VHDL",vim:"Vimscript",visualfoxpro:"Visual FoxPro",visualprolog:"Visual Prolog",whitespace:"Whitespace",winbatch:"Winbatch",xml:"XML",xorg_conf:"Xorg.conf",xpp:"X++",z80:"ZiLOG Z80 Assembler"}}(),CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function c(c){var h=this._;h.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(c),h.on?h.panel.hide():h.panel.showBlock(this._.id,
this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(k){var h=k.panel||{};delete k.panel;this.base(k);this.document=h.parent&&h.parent.getDocument()||CKEDITOR.document;h.block={attributes:h.attributes};h.toolbarRelated=!0;this.hasArrow="listbox";this.click=c;this._={panelDefinition:h}},statics:{handler:{create:function(c){return new CKEDITOR.ui.panelButton(c)}}},proto:{createPanel:function(c){var h=this._;if(!h.panel){var f=this._.panelDefinition,
a=this._.panelDefinition.block,b=f.parent||CKEDITOR.document.getBody(),d=CKEDITOR.document.getById(this._.id),l=this._.panel=new CKEDITOR.ui.floatPanel(c,b,f),f=l.addBlock(h.id,a),e=this,m=c.getCommand(this.command);l.onShow=function(){e.className&&this.element.addClass(e.className+"_panel");e.setState(CKEDITOR.TRISTATE_ON);d.setAttribute("aria-expanded","true");h.on=1;e.editorFocus&&c.focus();if(e.onOpen)e.onOpen()};l.onHide=function(a){e.className&&this.element.getFirst().removeClass(e.className+
"_panel");!e.modes&&m?e.setStateFromCommand(m):e.setState(e.modes&&e.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h.on=0;d.setAttribute("aria-expanded","false");if(!a&&e.onClose)e.onClose()};l.onEscape=function(){l.hide(1);e.document.getById(h.id).focus()};if(this.onBlock)this.onBlock(l,f);f.onHide=function(){h.on=0;!e.modes&&e.command?e.setStateFromCommand(m):e.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(c){this.setState(c.state)}}})},beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_PANELBUTTON,
CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(c,a){a&&CKEDITOR.tools.extend(this,a);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=c;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(c){return new CKEDITOR.ui.panel(c)}};
var c=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),k=CKEDITOR.addTemplate("panel-frame",'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),h=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e');
CKEDITOR.ui.panel.prototype={render:function(f,a){var b={editorId:f.id,id:this.id,langCode:f.langCode,dir:f.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":f.config.baseFloatZIndex+1};this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),d=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&d.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});d=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=
!0;if(this.onLoad)this.onLoad()},this));a.write(h.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+d+");"},b)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),d=this.document.getById(this.id).getAttribute("dir");if("input"!==a.data.getTarget().getName()||37!==b&&39!==b)this._.onKeyDown&&!1===this._.onKeyDown(b)?"input"===a.data.getTarget().getName()&&32===b||a.data.preventDefault():
(27==b||b==("rtl"==d?39:37))&&this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(d)}else a=this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var d=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";b.frame=k.output({id:this.id+"_frame",
src:d})}d=c.output(b);a&&a.push(d);return d},addBlock:function(c,a){a=this._.blocks[c]=a instanceof CKEDITOR.ui.panel.block?a:new CKEDITOR.ui.panel.block(this.getHolderElement(),a);this._.currentBlock||this.showBlock(c);return a},getBlock:function(c){return this._.blocks[c]},showBlock:function(c){c=this._.blocks[c];var a=this._.currentBlock,b=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");a&&a.hide();this._.currentBlock=c;CKEDITOR.fire("ariaWidget",b);c._.focusIndex=
-1;this._.onKeyDown=c.onKeyDown&&CKEDITOR.tools.bind(c.onKeyDown,c);c.show();return c},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(c,a){this.element=c.append(c.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));a&&CKEDITOR.tools.extend(this,a);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||
this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(c){-1!=c&&(c=this._.getItems().getItem(this._.focusIndex=c),CKEDITOR.env.webkit&&c.getDocument().getWindow().focus(),c.focus(),this.onMark&&this.onMark(c))},markFirstDisplayed:function(c){for(var a=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},b=this._.getItems(),d,h,e=b.count()-1;0<=e;e--)if(d=b.getItem(e),d.getAscendant(a)||(h=d,this._.focusIndex=
e),"true"==d.getAttribute("aria-selected")){h=d;this._.focusIndex=e;break}h&&(c&&c(),CKEDITOR.env.webkit&&h.getDocument().getWindow().focus(),h.focus(),this.onMark&&this.onMark(h))},getItems:function(){return this.element.find("a,input")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(c,a){var b=this.keys[c];switch(b){case "next":for(var d=this._.focusIndex,b=this._.getItems(),
h;h=b.getItem(++d);)if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=d;h.focus(!0);break}return h||a?!1:(this._.focusIndex=-1,this.onKeyDown(c,1));case "prev":d=this._.focusIndex;for(b=this._.getItems();0<d&&(h=b.getItem(--d));){if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=d;h.focus(!0);break}h=null}return h||a?!1:(this._.focusIndex=b.count(),this.onKeyDown(c,1));case "click":case "mouseup":return d=this._.focusIndex,(h=0<=d&&this._.getItems().getItem(d))&&
h.fireEventHandler(b,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function c(c,f,a,b,d){d=CKEDITOR.tools.genKey(f.getUniqueId(),a.getUniqueId(),c.lang.dir,c.uiColor||"",b.css||"",d||"");var l=k[d];l||(l=k[d]=new CKEDITOR.ui.panel(f,b),l.element=a.append(CKEDITOR.dom.element.createFromHtml(l.render(c),f)),l.element.setStyles({display:"none",position:"absolute"}));return l}var k={};CKEDITOR.ui.floatPanel=
CKEDITOR.tools.createClass({$:function(h,f,a,b){function d(){g.hide()}a.forceIFrame=1;a.toolbarRelated&&h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(f=CKEDITOR.document.getById("cke_"+h.name));var k=f.getDocument();b=c(h,k,f,a,b||0);var e=b.element,m=e.getFirst(),g=this;e.disableContextMenu();this.element=e;this._={editor:h,panel:b,parentElement:f,definition:a,document:k,iframe:m,children:[],dir:h.lang.dir,showBlockParams:null,markFirst:void 0!==a.markFirst?a.markFirst:!0};h.on("mode",d);h.on("resize",
d);k.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(c,f){return this._.panel.addBlock(c,f)},addListBlock:function(c,f){return this._.panel.addListBlock(c,f)},getBlock:function(c){return this._.panel.getBlock(c)},showBlock:function(c,f,a,b,d,k){var e=this._.panel,m=e.showBlock(c);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var g=this._.editor.editable();this._.returnFocus=g.hasFocus?g:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);
this._.hideTimeout=0;var n=this.element,g=this._.iframe,g=CKEDITOR.env.ie&&!CKEDITOR.env.edge?g:new CKEDITOR.dom.window(g.$.contentWindow),p=n.getDocument(),v=this._.parentElement.getPositionedAncestor(),r=f.getDocumentPosition(p),p=v?v.getDocumentPosition(p):{x:0,y:0},q="rtl"==this._.dir,t=r.x+(b||0)-p.x,y=r.y+(d||0)-p.y;!q||1!=a&&4!=a?q||2!=a&&3!=a||(t+=f.$.offsetWidth-1):t+=f.$.offsetWidth;if(3==a||4==a)y+=f.$.offsetHeight-1;this._.panel._.offsetParentId=f.getId();n.setStyles({top:y+"px",left:0,
display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(g);this._.blurSet||(CKEDITOR.event.useCapture=!0,g.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),g.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},
this),CKEDITOR.env.iOS&&(g.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),g.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);e.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&!1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(m.autoSize){var b=m.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?
m.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=m.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");e._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");q&&(t-=n.$.offsetWidth);n.setStyle("left",t+"px");var b=e.element.getWindow(),a=n.$.getBoundingClientRect(),
b=b.getViewPaneSize(),d=a.width||a.right-a.left,c=a.height||a.bottom-a.top,f=q?a.right:b.width-a.left,g=q?b.width-a.right:a.left;q?f<d&&(t=g>d?t+d:b.width>d?t-a.left:t-a.right+b.width):f<d&&(t=g>d?t-d:b.width>d?t-a.right+b.width:t-a.left);d=a.top;b.height-a.top<c&&(y=d>c?y-c:b.height>c?y-a.bottom+b.height:y-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&
(t=CKEDITOR.env.ie8Compat?t-2*n.getDocument().getDocumentElement().$.scrollLeft:t-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),h;(h=a.getCustomData("activePanel"))&&h.onHide&&h.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:y+"px",left:t+"px"});n.setOpacity(1);k&&k()},this);e.isLoaded?a():e.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();m.element.focus();CKEDITOR.env.webkit&&
(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){m.markFirstDisplayed?m.markFirstDisplayed():m._.markFirstDisplayed()},0):m.markFirstDisplayed?m.markFirstDisplayed():m._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var c=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),
this.showBlock.apply(this,c))},focus:function(){if(CKEDITOR.env.webkit){var c=CKEDITOR.document.getActive();c&&!c.equals(this._.iframe)&&c.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var c=this._.iframe.getFrameDocument().getActive();c&&c.is("a")&&(this._.lastFocused=c)},hide:function(c){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();
this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(c=c&&this._.returnFocus)CKEDITOR.env.webkit&&c.type&&c.getWindow().$.focus(),c.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(c){var f=this._.panel;void 0!==c&&(f.allowBlur=c);return f.allowBlur},showAsChild:function(c,f,a,b,d,k){if(this._.activeChild!=c||c._.panel._.offsetParentId!=a.getId())this.hideChild(),c.onHide=
CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=c,this._.focused=!1,c.showBlock(f,a,b,d,k),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){c.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(c){var f=this._.activeChild;f&&(delete f.onHide,delete this._.activeChild,f.hide(),c&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var c=CKEDITOR.tools.isEmpty(CKEDITOR.instances),
f;for(f in k){var a=k[f];c?a.destroy():a.element.hide()}c&&(k={})})}(),function(){var c,k,h;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(f){function a(a){function g(){var a=f.config["colorButton_"+t+"Style"];a.childRule="back"==t?function(a){return d(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||d(a)};return a}function n(a,b,d){var e={};a&&(e.color=a);b&&(e.colorName=b);b=!CKEDITOR.tools.isEmpty(e)&&new CKEDITOR.style(g(),e);f.execCommand(B,
{newStyle:b});if(a&&d)for(d.addColor(a.substr(1).toUpperCase()),a=E.element.find("[role\x3doption]").toArray(),d=0;d<a.length;d++)a[d].setAttributes({"aria-posinset":d+1,"aria-setsize":a.length})}var q=a.name,t=a.type,y=a.title,u=a.order,B=a.commandName;a=a.contentTransformations||{};var z=new CKEDITOR.style(e["colorButton_"+t+"Style"]),x=CKEDITOR.tools.getNextId()+"_colorBox",w={type:t},A=new CKEDITOR.style(e["colorButton_"+t+"Style"],{color:"inherit"}),D=function(){return CKEDITOR.tools.addFunction(function(a,
b,d){f.focus();f.fire("saveSnapshot");"?"==a?f.getColorFromDialog(function(a){a&&n(a,b,C)},null,w):n(a&&"#"+a,b,C);d&&(d.setAttribute("cke_colorlast",!0),f.once("selectionChange",function(){d.removeAttribute("cke_colorlast")}))})}(),C=h.getRowLimit(f)?new h(f,"back"==t?"background-color":"color",D):void 0,E;f.addCommand(B,{contextSensitive:!0,exec:function(a,b){if(!a.readOnly){var d=b.newStyle;a.removeStyle(A);a.focus();d&&a.applyStyle(d);a.fire("saveSnapshot")}},refresh:function(a,b){A.checkApplicable(b,
a,a.activeFilter)?A.checkActive(b,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});f.ui.add(q,CKEDITOR.UI_PANELBUTTON,{label:y,title:y,command:B,editorFocus:0,toolbar:"colors,"+u,allowedContent:z,requiredContent:z,contentTransformations:a,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(e.colorButton_contentsCss),attributes:{role:"listbox","aria-label":m.panelTitle}},select:function(a){var b=e.colorButton_colors.split(",");
a=CKEDITOR.tools.array.find(b,a);a=c.normalizeColor(a);k(E,a);E._.markFirstDisplayed()},onBlock:function(a,d){E=d;d.autoSize=!0;d.element.addClass("cke_colorblock");d.element.setHtml(b(x,D,C?C.getLength():0));d.element.getDocument().getBody().setStyle("overflow","hidden");d.element.getAscendant({html:1}).setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=d.keys,c="rtl"==f.lang.dir;e[c?37:39]="next";e[40]="next";e[9]="next";e[c?39:37]="prev";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";
e[32]="click";C&&C.setContainer(d.element.findOne(".cke_colorhistory"))},onOpen:function(){var a=f.getSelection(),b=a&&a.getStartElement(),d=f.elementPath(b),g="back"==t?"background-color":"color";if(d){b=d.block||d.blockLimit||f.document.getBody();do d=b&&b.getComputedStyle(g)||"transparent";while("back"==t&&"transparent"==d&&b&&(b=b.getParent()));d&&"transparent"!=d||(d="#ffffff");e.colorButton_enableAutomatic&&E.element.findOne("#"+x).setStyle("background-color",d);if(b=a&&a.getRanges()[0]){for(var a=
new CKEDITOR.dom.walker(b),h=b.collapsed?b.startContainer:a.next(),b="";h;){h.type!==CKEDITOR.NODE_ELEMENT&&(h=h.getParent());h=c.normalizeColor(h.getComputedStyle(g));b=b||h;if(b!==h){b="";break}h=a.next()}"transparent"==b&&(b="");"fore"==t&&(w.automaticTextColor="#"+c.normalizeColor(d));w.selectionColor=b?"#"+b:"";k(E,b)}return d}}})}function b(a,b,d){var g=[],k=e.colorButton_colors.split(","),l=f.plugins.colordialog&&e.colorButton_enableMore;d=k.length+d+(l?1:0);var n=1;e.colorButton_enableAutomatic&&
(d+=1,n+=1,g.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',m.auto,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',b,',null);return false;"'," href\x3d\"javascript:void('",m.auto,"')\"",' role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',d,'"\x3e','\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',f.config.colorButton_colorsPerRow,
'" align\x3d"center"\x3e','\x3cspan class\x3d"cke_colorbox" id\x3d"',a,'"\x3e\x3c/span\x3e',m.auto,"\x3c/td\x3e","\x3c/tr\x3e","\x3c/table\x3e","\x3c/a\x3e"));g.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctbody\x3e');for(a=0;a<k.length;a++){0===a%f.config.colorButton_colorsPerRow&&g.push("\x3c/tr\x3e\x3ctr\x3e");var B=k[a].split("/"),z=B[0],B=new c(f,{color:B[1]||z,label:B[1]?z:void 0},b);B.setPositionIndex(n+a,d);g.push(B.getHtml())}h.getRowLimit(f)&&
h.renderContainer(g,f);l&&g.push("\x3c/tr\x3e","\x3ctr\x3e",'\x3ctd colspan\x3d"',f.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',m.more,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',b,",'?');return false;\""," href\x3d\"javascript:void('",m.more,"')\"",' role\x3d"option" aria-posinset\x3d"',d,'" aria-setsize\x3d"',d,'"\x3e',m.more,"\x3c/a\x3e","\x3c/td\x3e");
g.push("\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e");return g.join("")}function d(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function k(a,b){var d=a._.getItems(),e=a.element.findOne("[aria-selected]"),f=a.element.findOne("[cke_colorlast]");e&&e.removeAttribute("aria-selected");if(f)f.setAttribute("aria-selected",!0);else for(e=0;e<d.count();e++)if(f=d.getItem(e),b&&b==c.normalizeColor(f.getAttribute("data-value"))){f.setAttribute("aria-selected",!0);break}}var e=
f.config,m=f.lang.colorbutton;if(!CKEDITOR.env.hc){a({name:"TextColor",type:"fore",commandName:"textColor",title:m.textColorTitle,order:10,contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var g,n=f.config.colorButton_normalizeBackground;if(void 0===n||n)g=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||
!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.object.keys(a).length},right:function(a){var b=(new CKEDITOR.style(f.config.colorButton_backStyle,{color:a.styles.background})).getDefinition();a.name=b.element;a.styles=b.styles;a.attributes=b.attributes||{};return a}}]];a({name:"BGColor",type:"back",commandName:"bgColor",title:m.bgColorTitle,order:20,contentTransformations:g})}}});c=CKEDITOR.tools.createClass({$:function(f,a,b){this.$=
new CKEDITOR.dom.element("td");this.color=CKEDITOR.tools._isValidColorFormat(a.color)?a.color:"";this.clickFn=b;this.label=a.label||c.colorNames(f)[this.color]||this.color;this.setHtml()},statics:{colorNames:function(c){return c.lang.colorbutton.colors},normalizeColor:function(c){var a=/^(rgb|hsl)a\(/g.test(c),b=/^rgba\((\s*0\s*,?){4}\)$/g.test(c);return a&&!b?(c=new CKEDITOR.tools.color(c),CKEDITOR.tools.normalizeHex(c.getHex()||"").replace(/#/g,"")):CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(c||
"")).replace(/#/g,"")}},proto:{getElement:function(){return this.$},getHtml:function(){return this.getElement().getOuterHtml()},setHtml:function(){this.getElement().setHtml('\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"'+this.label+'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction('+this.clickFn+",'"+this.color+"','"+this.label+"', this); return false;\" href\x3d\"javascript:void('"+this.color+'\')" data-value\x3d"'+this.color+
'" role\x3d"option"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#'+this.color+'"\x3e\x3c/span\x3e\x3c/a\x3e')},setPositionIndex:function(c,a){this.getElement().getChild(0).setAttributes({"aria-posinset":c,"aria-setsize":a})}}});k=CKEDITOR.tools.createClass({$:function(){this.$=new CKEDITOR.dom.element("tr");this.$.addClass("cke_colorhistory_row");this.boxes=[]},proto:{getElement:function(){return this.$},removeLastColor:function(){this.getElement().getLast().remove();return this.boxes.pop()},
addNewColor:function(c){this.boxes.unshift(c);this.getElement().append(c.getElement(),!0)},extractColorBox:function(c){var a=CKEDITOR.tools.getIndex(this.boxes,function(a){return a.color===c});if(0>a)return null;this.boxes[a].getElement().remove();return this.boxes.splice(a,1)[0]}}});h=CKEDITOR.tools.createClass({$:function(c,a,b){this.editor=c;this.cssProperty=a;this.clickFn=b;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},
this)},statics:{renderContainer:function(c,a){c.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',a.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e',"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},getRowLimit:function(c){return c.config.colorButton_historyRowLimit},getCapacity:function(c){return h.getRowLimit(c)*c.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},
_:{countColors:function(){var c=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(c,function(a,b){var d=this._.getHexCode(b,this.cssProperty,h.colorList);a[d]=a[d]||0;a[d]+=1;return a},{},this)},getHexCode:function(f,a,b){var d=f.getStyle(a);return d in b?b[d].substr(1):c.normalizeColor(f.getComputedStyle(a)).toUpperCase()},sortByOccurrencesAscending:function(c,a){var b=[],d;for(d in c){var h={};h[a]=d;h.frequency=c[d];b.push(h)}b.sort(function(a,
b){return b.frequency-a.frequency});this._.trimToCapacity(b);return b.reverse()},trimToCapacity:function(c){c.splice(h.getCapacity(this.editor))},addColors:function(c){CKEDITOR.tools.array.forEach(c,function(a){this.addColor(a.colorCode)},this)},extractColorBox:function(c){for(var a=0;a<this.rows.length;a++){var b=this.rows[a].extractColorBox(c);if(b)return b}return null},moveToBeginning:function(c){this.rows[0].addNewColor(c)},createAtBeginning:function(f){this._.moveToBeginning(new c(this.editor,
{color:f},this.clickFn))},addNewRow:function(){this.rows.push(new k);this.container&&this.container.append(this.rows[this.rows.length-1].getElement())},alignRows:function(){for(var c=0;c<h.getRowLimit(this.editor)&&!(this.rows[c].boxes.length<=this.editor.config.colorButton_colorsPerRow);c++)this.rows[c+1]?this._.moveLastBoxToNextRow(c):c<h.getRowLimit(this.editor)-1?(this._.addNewRow(),this._.moveLastBoxToNextRow(c)):this.rows[c].removeLastColor()},moveLastBoxToNextRow:function(c){this.rows[c+1].addNewColor(this.rows[c].removeLastColor())},
refreshPositions:function(){var c=this._.countPanelElements(),a=this._.calculateFirstPosition(c);CKEDITOR.tools.array.forEach(this.rows,function(b){CKEDITOR.tools.array.forEach(b.boxes,function(b){b.setPositionIndex(a,c);a+=1})})},countPanelElements:function(){var c=this.editor.config.colorButton_colors.split(",").length+this.getLength();this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore&&(c+=1);this.editor.config.colorButton_enableAutomatic&&(c+=1);return c},calculateFirstPosition:function(c){return this.editor.plugins.colordialog&&
this.editor.config.colorButton_enableMore?c-this.getLength():c-this.getLength()+1},attachRows:function(){CKEDITOR.tools.array.forEach(this.rows,function(c){this.container.append(c.getElement())},this)}},proto:{setContainer:function(c){this.container=c;this._.attachRows();this.getLength()&&this.show()},show:function(){this.container&&this.container.show()},renderContentColors:function(){var c=this._.countColors();CKEDITOR.tools.isEmpty(c)||(c=this._.sortByOccurrencesAscending(c,"colorCode"),this._.addColors(c),
this._.refreshPositions())},addColor:function(c){var a=this._.extractColorBox(c);this.container&&!this.container.isVisible()&&this.show();a?this._.moveToBeginning(a):this._.createAtBeginning(c);this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,function(c,a){return c+a.boxes.length},0)}}})}(),CKEDITOR.config.colorButton_enableMore=!0,CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",
CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.config.colorButton_enableAutomatic=!0,CKEDITOR.config.colorButton_colorsPerRow=6,CKEDITOR.config.colorButton_historyRowLimit=1,CKEDITOR.config.colorButton_renderContentColors=!0,CKEDITOR.config.colorButton_contentsCss=[],CKEDITOR.plugins.colordialog={requires:"dialog",
init:function(c){var k=new CKEDITOR.dialogCommand("colordialog");k.editorFocus=!1;c.addCommand("colordialog",k);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");c.getColorFromDialog=function(h,f,a){var b,d,k,e;b=function(a){k(this);(a="ok"==a.name?this.getValueOf("picker","selectedColor"):null)&&!CKEDITOR.tools._isValidColorFormat(a)&&(a=null);/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a)&&(a="#"+a);h.call(f,a)};d=function(b){a&&(b.data=a)};k=function(a){a.removeListener("ok",b);a.removeListener("cancel",
b);a.removeListener("show",d)};e=function(a){a.on("ok",b);a.on("cancel",b);a.on("show",d,null,null,5)};c.execCommand("colordialog");if(c._.storedDialogs&&c._.storedDialogs.colordialog)e(c._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){e(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",
CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(c){for(var k=c.config.menu_groups.split(","),h=c._.menuGroups={},f=c._.menuItems={},a=0;a<k.length;a++)h[k[a]]=a+1;c.addMenuGroup=function(a,d){h[a]=d||100};c.addMenuItem=function(a,d){h[d.group]&&(f[a]=new CKEDITOR.menuItem(this,a,d))};c.addMenuItems=function(a){for(var d in a)this.addMenuItem(d,a[d])};c.getMenuItem=function(a){return f[a]};c.removeMenuItem=function(a){delete f[a]}}}),function(){function c(a){a.sort(function(a,
b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var k='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"',h="";
CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(k+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(k+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var k=k+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+
'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',f=CKEDITOR.addTemplate("menuItem",k),a=CKEDITOR.addTemplate("menuArrow",
'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),b=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var e=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-
1,block:{}}),c=e.block.attributes=e.attributes||{};!c.role&&(c.role="menu");this._.panelDefinition=e},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),e=this.editor.elementPath(),c=this._.listeners;this.removeAll();for(var f=0;f<c.length;f++){var h=c[f](b,a,e);if(h)for(var k in h){var v=this.editor.getMenuItem(k);!v||v.command&&!this.editor.getCommand(v.command).state||(v.state=h[k],this.add(v))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&
this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,e=this.items[a];if(e=e.getItems&&e.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var c in e){var f=this.editor.getMenuItem(c);
f&&(f.state=e[c],b.add(f))}var h=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){b.show(h,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(a,b,e,f){if(!this.parent&&(this._.onShow(),!this.items.length))return;b=b||("rtl"==this.editor.lang.dir?2:1);var g=this.items,h=this.editor,k=this._.panel,v=this._.element;if(!k){k=this._.panel=
new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);k.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);k.onShow=function(){k._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};k.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);v=k.addBlock(this.id,this._.panelDefinition.block);v.autoSize=!0;var r=v.keys;r[40]="next";r[9]="next";r[38]="prev";r[CKEDITOR.SHIFT+
9]="prev";r["rtl"==h.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";r[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(r[13]="mouseup");v=this._.element=v.element;r=v.getDocument();r.getBody().setStyle("overflow","hidden");r.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,h.config.menu_subMenuDelay||400,this,[a])},
this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}c(g);for(var r=h.elementPath(),r=['\x3cdiv class\x3d"cke_menu'+(r&&r.direction()!=h.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],q=g.length,t=q&&g[0].group,y=0;y<q;y++){var u=
g[y];t!=u.group&&(r.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),t=u.group);u.render(this,y,r)}r.push("\x3c/div\x3e");v.setHtml(r.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(k,this.id,a,b,e,f):k.showBlock(this.id,a,b,e,f);h.fire("menuShow",[k])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)},findItemByCommandName:function(a){var b=CKEDITOR.tools.array.filter(this.items,
function(b){return a===b.command});return b.length?(b=b[0],{item:b,element:this._.element.findOne("."+b.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,e){CKEDITOR.tools.extend(this,e,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(d,c,e){var h=d.id+String(c),g="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,k="",p=this.editor,v,r,q=g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?
"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(k=' aria-checked\x3d"'+(g==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var t=this.getItems,y="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",u=this.name;this.icon&&!/\./.test(this.icon)&&(u=this.icon);this.command&&(v=p.getCommand(this.command),(v=p.getCommandKeystroke(v))&&(r=CKEDITOR.tools.keystrokeToString(p.lang.common.keyboard,v)));v=CKEDITOR.tools.htmlEncodeAttr(this.label);d={id:h,name:this.name,iconName:u,label:this.label,
attrLabel:v,cls:this.className||"",state:q,hasPopup:t?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,title:v+(r?" ("+r.display+")":""),ariaShortcut:r?p.lang.common.keyboardShortcut+" "+r.aria:"",href:"javascript:void('"+(v||"").replace("'")+"')",hoverFn:d._.itemOverFn,moveOutFn:d._.itemOutFn,clickFn:d._.itemClickFn,index:c,iconStyle:CKEDITOR.skin.getIconStyle(u,"rtl"==this.editor.lang.dir,u==this.icon?null:this.icon,this.iconOffset),shortcutHtml:r?b.output({shortcut:r.display}):"",arrowHtml:t?
a.output({label:y}):"",role:this.role?this.role:"menuitem",ariaChecked:k};f.output(d,e)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(c){this.base.call(this,c,{panel:{css:c.config.contextmenu_contentsCss,
className:"cke_menu_panel",attributes:{"aria-label":c.lang.contextmenu.options}}})},proto:{addTarget:function(c,k){function h(){a=!1}var f,a;c.on("contextmenu",function(b){b=b.data;var c=CKEDITOR.env.webkit?f:CKEDITOR.env.mac?b.$.metaKey:b.$.ctrlKey;if(!k||!c)if(b.preventDefault(),!a){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var c=this.editor,e=(new CKEDITOR.dom.elementPath(b.getTarget(),c.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);e&&"false"==e.getAttribute("contenteditable")&&
c.getSelection().fake(e)}var e=b.getTarget().getDocument(),h=b.getTarget().getDocument().getDocumentElement(),c=!e.equals(CKEDITOR.document),e=e.getWindow().getScrollPosition(),g=c?b.$.clientX:b.$.pageX||e.x+b.$.clientX,n=c?b.$.clientY:b.$.pageY||e.y+b.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(h,null,g,n)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var b=function(){f=0};c.on("keydown",function(a){f=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});c.on("keyup",b);
c.on("contextmenu",b)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(c.on("keydown",function(b){b.data.$.shiftKey&&121===b.data.$.keyCode&&(a=!0)},null,null,0),c.on("keyup",h),c.on("contextmenu",h))},open:function(c,k,h,f){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),c=c||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(c,k,h,f))}}})},beforeInit:function(c){var k=c.contextMenu=new CKEDITOR.plugins.contextMenu(c);
c.on("contentDom",function(){k.addTarget(c.editable(),!1!==c.config.browserContextMenuOnCtrl)});c.addCommand("contextMenu",{exec:function(c){var f=0,a=0,b=c.getSelection().getRanges(),b=b[b.length-1].getClientRects(c.editable().isInline());if(b=b[b.length-1])f=b["rtl"===c.lang.dir?"left":"right"],a=b.bottom;c.contextMenu.open(c.document.getBody().getParent(),null,f,a)}});c.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");c.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),CKEDITOR.plugins.add("contextmenu_linkopen",
{init:function(c){c.addCommand("openLinkCommand",{exec:function(c){c=c.getSelection().getStartElement();c.$&&c.$.href&&window.open(c.$.href,"_blank")}});c.addMenuItem("openLinkItem",{icon:"Redo",label:Core.Config.Get("RichText.Lang.OpenLink")||"Open link",command:"openLinkCommand",group:"link"});c.contextMenu.addListener(function(c){if(c.getAscendant("a",!0))return{openLinkItem:CKEDITOR.TRISTATE_OFF}})}}),function(){function c(a,b,e,c){var f=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(b,
!0)||a.endContainer.getAscendant(b,!0))if(e(a),c)return;for(;a=f.next();)if(a=a.getAscendant(b,!0))if(e(a),c)break}function k(a,b){var e={ul:"ol",ol:"ul"};return-1!==f(b,function(b){return b.element===a||b.element===e[a]})}function h(a){this.styles=null;this.sticky=!1;this.editor=a;this.filter=new CKEDITOR.filter(a,a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&this.filter.disallow(a.config.copyFormatting_disallowRules)}
var f=CKEDITOR.tools.indexOf,a=CKEDITOR.tools.getMouseButton,b=!1;CKEDITOR.plugins.add("copyformatting",{lang:"ar,az,bg,cs,da,de,de-ch,el,en,en-au,eo,es-mx,et,eu,fa,fr,gl,hr,hu,it,ja,ko,ku,lv,nb,nl,oc,pl,pt,pt-br,ro,ru,sk,sq,sr,sr-latn,sv,tr,uk,vi,zh,zh-cn",icons:"copyformatting",hidpi:!0,init:function(d){var c=CKEDITOR.plugins.copyformatting;c._addScreenReaderContainer();b||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),b=!0);d.addContentsCss&&d.addContentsCss(this.path+
"styles/copyformatting.css");d.copyFormatting=new c.state(d);d.addCommand("copyFormatting",c.commands.copyFormatting);d.addCommand("applyFormatting",c.commands.applyFormatting);d.ui.addButton("CopyFormatting",{isToggle:!0,label:d.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"});d.on("contentDom",function(){var b=d.getCommand("copyFormatting"),c=d.editable(),f=c.isInline()?c:d.document,h=d.ui.get("CopyFormatting");c.attachListener(f,"mouseup",function(c){a(c)===CKEDITOR.MOUSE_BUTTON_LEFT&&
b.state===CKEDITOR.TRISTATE_ON&&d.execCommand("applyFormatting")});c.attachListener(CKEDITOR.document,"mouseup",function(f){a(f)!==CKEDITOR.MOUSE_BUTTON_LEFT||b.state!==CKEDITOR.TRISTATE_ON||c.contains(f.data.getTarget())||d.execCommand("copyFormatting")});h&&(f=CKEDITOR.document.getById(h._.id),c.attachListener(f,"dblclick",function(){d.execCommand("copyFormatting",{sticky:!0})}),c.attachListener(f,"mouseup",function(a){a.data.stopPropagation()}))});d.config.copyFormatting_keystrokeCopy&&d.setKeystroke(d.config.copyFormatting_keystrokeCopy,
"copyFormatting");d.on("key",function(a){var b=d.getCommand("copyFormatting");a=a.data.domEvent;a.getKeystroke&&27===a.getKeystroke()&&b.state===CKEDITOR.TRISTATE_ON&&d.execCommand("copyFormatting")});d.copyFormatting.on("extractFormatting",function(a){var b=a.data.element;if(b.contains(d.editable())||b.equals(d.editable()))return a.cancel();b=c._convertElementToStyleDef(b);if(!d.copyFormatting.filter.check(new CKEDITOR.style(b),!0,!0))return a.cancel();a.data.styleDef=b});d.copyFormatting.on("applyFormatting",
function(a){if(!a.data.preventFormatStripping){var b=a.data.range,g=c._extractStylesFromRange(d,b),h=c._determineContext(b),p,v;if(d.copyFormatting._isContextAllowed(h))for(v=0;v<g.length;v++)h=g[v],p=b.createBookmark(),-1===f(c.preservedElements,h.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?g[v].removeFromRange(a.data.range,a.editor):g[v].remove(a.editor):k(h.element,a.data.styles)&&c._removeStylesFromElementInRange(b,h.element),b.moveToBookmark(p)}});d.copyFormatting.on("applyFormatting",
function(a){var b=CKEDITOR.plugins.copyformatting,c=b._determineContext(a.data.range);"list"===c&&d.copyFormatting._isContextAllowed("list")?b._applyStylesToListContext(a.editor,a.data.range,a.data.styles):"table"===c&&d.copyFormatting._isContextAllowed("table")?b._applyStylesToTableContext(a.editor,a.data.range,a.data.styles):d.copyFormatting._isContextAllowed("text")&&b._applyStylesToTextContext(a.editor,a.data.range,a.data.styles)},null,null,999)}});h.prototype._isContextAllowed=function(a){var b=
this.editor.config.copyFormatting_allowedContexts;return!0===b||-1!==f(b,a)};CKEDITOR.event.implementOn(h.prototype);CKEDITOR.plugins.copyformatting={state:h,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody","ul","ol"],excludedAttributesFromInlineTransform:["value","type"],preservedElements:"ul ol li td th tr thead tbody table".split(" "),
breakOnElements:["ul","ol","table"],_initialKeystrokePasteCommand:null,commands:{copyFormatting:{exec:function(a,b){var e=CKEDITOR.plugins.copyformatting,c=a.copyFormatting,f=b?"keystrokeHandler"==b.from:!1,h=b?b.sticky||f:!1,k=e._getCursorContainer(a),v=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return c.styles=null,c.sticky=!1,k.removeClass("cke_copyformatting_active"),v.removeClass("cke_copyformatting_disabled"),v.removeClass("cke_copyformatting_tableresize_cursor"),
e._putScreenReaderMessage(a,"canceled"),e._detachPasteKeystrokeHandler(a),this.setState(CKEDITOR.TRISTATE_OFF);c.styles=e._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);f||(k.addClass("cke_copyformatting_active"),v.addClass("cke_copyformatting_tableresize_cursor"),a.config.copyFormatting_outerCursor&&v.addClass("cke_copyformatting_disabled"));c.sticky=h;e._putScreenReaderMessage(a,"copied");e._attachPasteKeystrokeHandler(a)}},applyFormatting:{editorFocus:CKEDITOR.env.ie&&
!CKEDITOR.env.edge?!1:!0,exec:function(a,b){var e=a.getCommand("copyFormatting"),c=b?"keystrokeHandler"==b.from:!1,f=CKEDITOR.plugins.copyformatting,h=a.copyFormatting,k=f._getCursorContainer(a),v=CKEDITOR.document.getDocumentElement();if(c&&!h.styles)return f._putScreenReaderMessage(a,"failed"),f._detachPasteKeystrokeHandler(a),!1;c=f._applyFormat(a,h.styles);h.sticky||(h.styles=null,k.removeClass("cke_copyformatting_active"),v.removeClass("cke_copyformatting_disabled"),v.removeClass("cke_copyformatting_tableresize_cursor"),
e.setState(CKEDITOR.TRISTATE_OFF),f._detachPasteKeystrokeHandler(a));f._putScreenReaderMessage(a,c?"applied":"canceled")}}},_getCursorContainer:function(a){return a.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?a.editable():a.editable().getParent()},_convertElementToStyleDef:function(a){var b=CKEDITOR.tools,e=a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),b=b.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),type:CKEDITOR.STYLE_INLINE,attributes:e,styles:b}},
_extractStylesFromElement:function(a,b){var e={},c=[];do if(b.type===CKEDITOR.NODE_ELEMENT&&!b.hasAttribute("data-cke-bookmark")&&(e.element=b,a.copyFormatting.fire("extractFormatting",e,a)&&e.styleDef&&c.push(new CKEDITOR.style(e.styleDef)),b.getName&&-1!==f(CKEDITOR.plugins.copyformatting.breakOnElements,b.getName())))break;while((b=b.getParent())&&b.type===CKEDITOR.NODE_ELEMENT);return c},_extractStylesFromRange:function(a,b){for(var e=[],c=new CKEDITOR.dom.walker(b),f;f=c.next();)e=e.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,
f));return e},_removeStylesFromElementInRange:function(a,b){for(var e=-1!==f(["ol","ul","table"],b),c=new CKEDITOR.dom.walker(a),g;g=c.next();)if(g=g.getAscendant(b,!0))if(g.removeAttributes(g.getAttributes()),e)break},_getSelectedWordOffset:function(a){function b(a,d){return a[d?"getPrevious":"getNext"](function(a){return a.type!==CKEDITOR.NODE_COMMENT})}function e(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function c(a,
d){var g=a,h=/\s/g,k="p br ol ul li td th div caption body".split(" "),n=!1,w=!1,q,p;do{for(q=b(g,d);!q&&g.getParent();){g=g.getParent();if(-1!==f(k,g.getName())){w=n=!0;break}q=b(g,d)}if(q&&q.getName&&-1!==f(k,q.getName())){n=!0;break}g=q}while(g&&g.getStyle&&("none"==g.getStyle("display")||!g.getText()));for(g||(g=a);g.type!==CKEDITOR.NODE_TEXT;)g=!n||d||w?g.getChild(0):g.getChild(g.getChildCount()-1);for(k=e(g);null!=(w=h.exec(k))&&(p=w.index,d););if("number"!==typeof p&&!n)return c(g,d);if(n)d?
p=0:(h=/([\.\b]*$)/,p=(w=h.exec(k))?w.index:k.length);else if(d&&(p+=1,p>k.length))return c(g);return{node:g,offset:p}}var g=/\b\w+\b/ig,h,k,v,r,q;v=r=q=a.startContainer;for(h=e(v);null!=(k=g.exec(h));)if(k.index+k[0].length>=a.startOffset)return a=k.index,g=k.index+k[0].length,0===k.index&&(k=c(v,!0),r=k.node,a=k.offset),g>=h.length&&(h=c(v),q=h.node,g=h.offset),{startNode:r,startOffset:a,endNode:q,endOffset:g};return null},_filterStyles:function(a){var b=CKEDITOR.tools.isEmpty,e=[],c,f;for(f=0;f<
a.length;f++)c=a[f]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,c.element)&&(c.element=a[f].element="span"),"span"===c.element&&b(c.attributes)&&b(c.styles)||e.push(a[f]);return e},_determineContext:function(a){function b(e){var c=new CKEDITOR.dom.walker(a),f;if(a.startContainer.getAscendant(e,!0)||a.endContainer.getAscendant(e,!0))return!0;for(;f=c.next();)if(f.getAscendant(e,!0))return!0}return b({ul:1,ol:1})?"list":b("table")?"table":"text"},_applyStylesToTextContext:function(a,
b,e){var c=CKEDITOR.plugins.copyformatting,g=c.excludedAttributesFromInlineTransform,h,k;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([b]);for(h=0;h<e.length;h++)if(b=e[h],-1===f(c.excludedElementsFromInlineTransform,b.element)){if(-1!==f(c.elementsForInlineTransform,b.element))for(b.element=b._.definition.element="span",k=0;k<g.length;k++)b._.definition.attributes[g[k]]&&delete b._.definition.attributes[g[k]];b.apply(a)}},_applyStylesToListContext:function(a,b,e){var f,
g,h;for(h=0;h<e.length;h++)f=e[h],g=b.createBookmark(),"ol"===f.element||"ul"===f.element?c(b,{ul:1,ol:1},function(a){var b=f;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===f.element?c(b,"li",function(a){f.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,b,[f]),b.moveToBookmark(g)},_applyStylesToTableContext:function(a,b,e){function h(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}
var g,k,p;for(p=0;p<e.length;p++)g=e[p],k=b.createBookmark(),-1!==f(["table","tr"],g.element)?c(b,g.element,function(a){g.applyToObject(a)}):-1!==f(["td","th"],g.element)?c(b,{td:1,th:1},function(a){h(a,g)}):-1!==f(["thead","tbody"],g.element)?c(b,{thead:1,tbody:1},function(a){h(a,g)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(a,b,[g]),b.moveToBookmark(k)},_applyFormat:function(a,b){var e=a.getSelection().getRanges()[0],c=CKEDITOR.plugins.copyformatting,f,h;if(!e)return!1;if(e.collapsed){h=
a.getSelection().createBookmarks();if(!(f=c._getSelectedWordOffset(e)))return;e=a.createRange();e.setStart(f.startNode,f.startOffset);e.setEnd(f.endNode,f.endOffset);e.select()}b=c._filterStyles(b);if(!a.copyFormatting.fire("applyFormatting",{styles:b,range:e,preventFormatStripping:!1},a))return!1;h&&a.getSelection().selectBookmarks(h);return!0},_putScreenReaderMessage:function(a,b){var e=this._getScreenReaderContainer();e&&e.setText(a.lang.copyformatting.notification[b])},_addScreenReaderContainer:function(){if(this._getScreenReaderContainer())return this._getScreenReaderContainer();
if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e')).getChild(0)},_getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")},_attachPasteKeystrokeHandler:function(a){var b=
a.config.copyFormatting_keystrokePaste;b&&(this._initialKeystrokePasteCommand=a.keystrokeHandler.keystrokes[b],a.setKeystroke(b,"applyFormatting"))},_detachPasteKeystrokeHandler:function(a){var b=a.config.copyFormatting_keystrokePaste;b&&a.setKeystroke(b,this._initialKeystrokePasteCommand||!1)}};CKEDITOR.config.copyFormatting_outerCursor=!0;CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}";CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";
CKEDITOR.config.copyFormatting_allowedContexts=!0;CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67;CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86}(),CKEDITOR.plugins.add("devtools",{init:function(c){c._.showDialogDefinitionTooltips=1},onLoad:function(){CKEDITOR.document.appendStyleText(CKEDITOR.config.devtools_styles||"#cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }#cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }#cke_tooltip ul { padding: 0pt; list-style-type: none; }")}}),
function(){function c(c,a,b,d){c=c.lang.devtools;var h='\x3ca href\x3d"https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition_'+(b?"text"==b.type?"textInput":b.type:"content")+'.html" target\x3d"_blank" rel\x3d"noopener noreferrer"\x3e'+(b?b.type:"content")+"\x3c/a\x3e";a="\x3ch2\x3e"+c.title+"\x3c/h2\x3e\x3cul\x3e\x3cli\x3e\x3cstrong\x3e"+c.dialogName+"\x3c/strong\x3e : "+a.getName()+"\x3c/li\x3e\x3cli\x3e\x3cstrong\x3e"+c.tabName+"\x3c/strong\x3e : "+d+"\x3c/li\x3e";b&&(a+="\x3cli\x3e\x3cstrong\x3e"+
c.elementId+"\x3c/strong\x3e : "+b.id+"\x3c/li\x3e");a+="\x3cli\x3e\x3cstrong\x3e"+c.elementType+"\x3c/strong\x3e : "+h+"\x3c/li\x3e";return a+"\x3c/ul\x3e"}function k(c,a,b,d,k,e){var m=a.getDocumentPosition(),g={"z-index":CKEDITOR.dialog._.currentZIndex+10,top:m.y+a.getSize("height")+"px"};h.setHtml(c(b,d,k,e));h.show();"rtl"==b.lang.dir?(c=CKEDITOR.document.getWindow().getViewPaneSize(),g.right=c.width-m.x-a.getSize("width")+"px"):g.left=m.x+"px";h.setStyles(g)}var h;CKEDITOR.on("reset",function(){h&&
h.remove();h=null});CKEDITOR.on("dialogDefinition",function(f){var a=f.editor;if(a._.showDialogDefinitionTooltips){h||(h=CKEDITOR.dom.element.createFromHtml('\x3cdiv id\x3d"cke_tooltip" tabindex\x3d"-1" style\x3d"position: absolute"\x3e\x3c/div\x3e',CKEDITOR.document),h.hide(),h.on("mouseover",function(){this.show()}),h.on("mouseout",function(){this.hide()}),h.appendTo(CKEDITOR.document.getBody()));var b=f.data.definition.dialog,d=a.config.devtools_textCallback||c;b.on("load",function(){for(var c=
b.parts.tabs.getChildren(),e,f=0,g=c.count();f<g;f++)e=c.getItem(f),e.on("mouseover",function(){var e=this.$.id;k(d,this,a,b,null,e.substring(4,e.lastIndexOf("_")))}),e.on("mouseout",function(){h.hide()});b.foreach(function(e){if(!(e.type in{hbox:1,vbox:1})){var c=e.getElement();c&&(c.on("mouseover",function(){k(d,this,a,b,e,b._.currentTabId)}),c.on("mouseout",function(){h.hide()}))}})})}})}(),function(){function c(c){var a=this.att;c=c&&c.hasAttribute(a)&&c.getAttribute(a)||"";void 0!==c&&this.setValue(c)}
function k(){for(var c,a=0;a<arguments.length;a++)if(arguments[a]instanceof CKEDITOR.dom.element){c=arguments[a];break}if(c){var a=this.att,b=this.getValue();b?c.setAttribute(a,b):c.removeAttribute(a,b)}}var h={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(c){c||(c=h);var a=[];c.id&&a.push("id");c.dir&&a.push("dir");var b="";a.length&&(b+="["+a.join(",")+"]");c.classes&&(b+="(*)");c.styles&&(b+="{*}");return b},createAdvancedTab:function(f,
a,b){a||(a=h);var d=f.lang.common,l={id:"advanced",label:d.advancedTab,title:d.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},e=[];if(a.id||a.dir)a.id&&e.push({id:"advId",att:"id",type:"text",requiredContent:b?b+"[id]":null,label:d.id,setup:c,commit:k}),a.dir&&e.push({id:"advLangDir",att:"dir",type:"select",requiredContent:b?b+"[dir]":null,label:d.langDir,"default":"",style:"width:100%",items:[[d.notSet,""],[d.langDirLTR,"ltr"],[d.langDirRTL,"rtl"]],setup:c,commit:k}),l.elements[0].children.push({type:"hbox",
widths:["50%","50%"],children:[].concat(e)});if(a.styles||a.classes)e=[],a.styles&&e.push({id:"advStyles",att:"style",type:"text",requiredContent:b?b+"{cke-xyz}":null,label:d.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(d.invalidInlineStyle),onChange:function(){},getStyle:function(a,b){var d=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return d?d[1]:b},updateStyle:function(a,b){var d=this.getValue(),e=f.document.createElement("span");e.setAttribute("style",
d);e.setStyle(a,b);d=CKEDITOR.tools.normalizeCssText(e.getAttribute("style"));this.setValue(d,1)},setup:c,commit:k}),a.classes&&e.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:b?b+"(cke-xyz)":null,label:d.cssClasses,"default":"",setup:c,commit:k}]}),l.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(e)});return l}})}(),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(c){if(!c.blockless){var k=
c.lang.div,h="div(*)";CKEDITOR.dialog.isTabEnabled(c,"editdiv","advanced")&&(h+=";div[dir,id,lang,title]{*}");c.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:h,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(c,a){this.setState("div"in(c.config.div_wrapTable?a.root:a.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}}));c.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));
c.addCommand("removediv",{requiredContent:"div",exec:function(c){function a(a){(a=CKEDITOR.plugins.div.getSurroundDiv(c,a))&&!a.data("cke-div-added")&&(k.push(a),a.data("cke-div-added"))}for(var b=c.getSelection(),d=b&&b.getRanges(),h,e=b.createBookmarks(),k=[],g=0;g<d.length;g++)h=d[g],h.collapsed?a(b.getStartElement()):(h=new CKEDITOR.dom.walker(h),h.evaluator=a,h.lastForward());for(g=0;g<k.length;g++)k[g].remove(!0);b.selectBookmarks(e)}});c.ui.addButton&&c.ui.addButton("CreateDiv",{label:k.toolbar,
command:"creatediv",toolbar:"blocks,50"});c.addMenuItems&&(c.addMenuItems({editdiv:{label:k.edit,command:"editdiv",group:"div",order:1},removediv:{label:k.remove,command:"removediv",group:"div",order:5}}),c.contextMenu&&c.contextMenu.addListener(function(f){return!f||f.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(c)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:null}));CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});
CKEDITOR.plugins.div={getSurroundDiv:function(c,k){var h=c.elementPath(k);return c.elementPath(h.blockLimit).contains(function(c){return c.is("div")&&!c.isReadOnly()},1)}}}(),CKEDITOR.plugins.add("divarea",{afterInit:function(c){c.addMode("wysiwyg",function(k){var h=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_wysiwyg_div cke_reset cke_enable_context_menu" hidefocus\x3d"true"\x3e\x3c/div\x3e');c.ui.space("contents").append(h);h=c.editable(h);h.detach=CKEDITOR.tools.override(h.detach,
function(c){return function(){c.apply(this,arguments);this.remove()}});c.setData(c.getData(1),k);c.fire("contentDom")})}}),function(){function c(a){function b(a){var b=!1;g.attachListener(g,"keydown",function(){var d=c.getBody().getElementsByTag(a);if(!b){for(var e=0;e<d.count();e++)d.getItem(e).setCustomData("retain",!0);b=!0}},null,null,1);g.attachListener(g,"keyup",function(){var d=c.getElementsByTag(a);b&&(1==d.count()&&!d.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(d.getItem(0).getAttributes())&&
d.getItem(0).remove(1),b=!1)})}var d=this.editor;if(d&&!d.isDetached()){var c=a.document,e=c.body,f=c.getElementById("cke_actscrpt");f&&f.parentNode.removeChild(f);(f=c.getElementById("cke_shimscrpt"))&&f.parentNode.removeChild(f);(f=c.getElementById("cke_basetagscrpt"))&&f.parentNode.removeChild(f);e.contentEditable=!0;CKEDITOR.env.ie&&(e.hideFocus=!0,e.disabled=!0,e.removeAttribute("disabled"));delete this._.isLoadingData;this.$=e;c=new CKEDITOR.dom.document(c);this.setup();this.fixInitialSelection();
var g=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&c.getDocumentElement().addClass(c.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&d.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&d.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)c.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){d.editable().focus()})});k(d);try{d.document.$.execCommand("2D-position",!1,!0)}catch(h){}(CKEDITOR.env.gecko||
CKEDITOR.env.ie&&"CSS1Compat"==d.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){d.getSelection().scrollIntoView()},0);else if(d.window.$.innerHeight>this.$.offsetHeight){var e=d.createRange();e[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);e.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(c,"blur",function(){try{c.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&
this.attachListener(c,"touchend",function(){a.focus()});e=d.document.getElementsByTag("title").getItem(0);e.data("cke-title",e.getText());CKEDITOR.env.ie&&(d.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");d.fire("contentDom");this._.isPendingFocus&&(d.focus(),this._.isPendingFocus=!1);setTimeout(function(){d.fire("dataReady")},0)},0,this)}}function k(a){function b(){var b;a.editable().attachListener(a,"selectionChange",function(){var e=
a.getSelection().getSelectedElement();e&&(b&&(b.detachEvent("onresizestart",d),b=null),e.$.attachEvent("onresizestart",d),b=e.$)})}function d(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var c=a.document.$;c.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);c.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(e){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b()}function h(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
var b=[],d;for(d in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+d+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var f;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});a.addMode("wysiwyg",function(b){function d(d){d&&d.removeListener();if(!a.isDestroyed()&&!a.isDetached()&&(a.editable(new f(a,k.getFrameDocument().getBody())),a.setData(a.getData(1),b),y)){if(t)a.on("mode",c,{iframe:k,editor:a,callback:b});a.on("mode",function(){a.status="ready"});e()}}function c(a){a&&a.removeListener();k.on("load",function(){q&&(q=!1,h())})}function e(){u=new MutationObserver(function(b){for(var d=0;d<b.length;d++){var e=b[d];if("childList"===e.type&&0!==
e.addedNodes.length)for(var c=0;c<e.addedNodes.length;c++){var f=e.addedNodes[c];f.contains&&f.contains(a.container.$)&&(t?q=!0:h())}}});u.observe(a.config.observableParent,{childList:!0,subtree:!0})}function h(){var d=a.getData(!1),e;a.editable().preserveIframe=!0;a.editable(null);e=new f(a,k.getFrameDocument().getBody());a.editable(e);a.status="recreating";a.setData(d,{callback:b,internal:!1,noSnapshot:!1})}var g="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",
g=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(g)+"}())":"",k=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+g+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');k.setStyles({width:"100%",height:"100%"});k.addClass("cke_wysiwyg_frame").addClass("cke_reset");g=a.ui.space("contents");g.append(k);var p=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(p)k.on("load",d);var v=a.title,r=a.fire("ariaEditorHelpLabel",
{}).label,q=!1,t=CKEDITOR.env.ie&&11===CKEDITOR.env.version,y=!!window.MutationObserver,u;v&&(CKEDITOR.env.ie&&r&&(v+=", "+r),k.setAttribute("title",v));if(r){var v=CKEDITOR.tools.getNextId(),B=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+v+'" class\x3d"cke_voice_label"\x3e'+r+"\x3c/span\x3e");g.append(B,1);k.setAttribute("aria-describedby",v)}a.on("beforeModeUnload",function(a){a.removeListener();B&&B.remove();y&&u.disconnect()});a.on("destroy",function(){u&&u.disconnect()});k.setAttributes({tabIndex:a.tabIndex,
allowTransparency:"true"});!p&&d();a.fire("ariaWidget",k)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,d=b.contentsCss;CKEDITOR.tools.isArray(d)||(b.contentsCss=d?[d]:[]);b.contentsCss.push(a)};f=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(c,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")||" "},base:CKEDITOR.editable,
proto:{preserveIframe:!1,setData:function(a,b){var d=this.editor;if(b)this.setHtml(a),this.fixInitialSelection(),d.fire("dataReady");else{this._.isLoadingData=!0;d._.dataStore={id:1};var c=d.config,e=c.fullPage,f=c.docType,g=CKEDITOR.tools.buildStyleHtml(h()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');e||(g+=CKEDITOR.tools.buildStyleHtml(d.config.contentsCss));var k=c.baseHref?'\x3cbase href\x3d"'+c.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";e&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){d.docType=
f=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){d.xmlDeclaration=a;return""}));a=d.dataProcessor.toHtml(a);e?(/<body[\s|>]/.test(a)||(a="\x3cbody\x3e"+a),/<html[\s|>]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),k&&(a=a.replace(/<head[^>]*?>/,"$\x26"+k)),a=a.replace(/<\/head\s*>/,g+"$\x26"),a=
f+a):a=c.docType+'\x3chtml dir\x3d"'+c.contentsLangDirection+'" lang\x3d"'+(c.contentsLanguage||d.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+k+g+"\x3c/head\x3e\x3cbody"+(c.bodyId?' id\x3d"'+c.bodyId+'"':"")+(c.bodyClass?' class\x3d"'+c.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&(a=a.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));
a=a.replace(/<body/,'\x3cbody role\x3d"textbox" aria-multiline\x3d"true"');d.title&&(a=a.replace(/<body/,'\x3cbody aria-label\x3d"'+CKEDITOR.tools.htmlEncodeAttr(d.title)+'"'));CKEDITOR.env.gecko||(a=a.replace("\x3cbody",'\x3cbody tabindex\x3d"0" '));c='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR \x26\x26 window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+
",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(c+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');k&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,
c);this.clearCustomData();this.clearListeners();d.fire("contentDomUnload");var p=this.getDocument();try{p.write(a)}catch(v){setTimeout(function(){p.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,d=b.fullPage,c=d&&a.docType,e=d&&a.xmlDeclaration,f=this.getDocument(),f=d?f.getDocumentElement().getOuterHtml():f.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(f=f.replace(/<br>(?=\s*(:?$|<\/body>))/,""));d&&(f=f.replace(/<body(.*?)role="?textbox"?/i,
"\x3cbody$1").replace(/<body(.*?)aria-multiline="?true"?/i,"\x3cbody$1").replace(/<body(.*?)tabindex="?0"?/i,"\x3cbody$1").replace(/<body(.*?)aria-label="(.+?)"/i,"\x3cbody$1").replace(/<body(.*?)aria-readonly="?(?:true|false)"?/i,"\x3cbody$1"));f=a.dataProcessor.toDataFormat(f);e&&(f=e+"\n"+f);c&&(f=c+"\n"+f);return f},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:f.baseProto.focus.call(this)},detach:function(){if(!this.preserveIframe){var a=this.editor,b=a.document,a=a.container.findOne("iframe.cke_wysiwyg_frame");
f.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);b.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);a&&(a.clearCustomData(),(b=a.removeCustomData("onResize"))&&b.removeListener(),a.isDetached()||a.remove())}}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.observableParent=CKEDITOR.document.$,CKEDITOR.plugins.add("docprops",
{requires:"wysiwygarea,dialog,colordialog",init:function(c){var k=new CKEDITOR.dialogCommand("docProps");k.modes={wysiwyg:c.config.fullPage};k.allowedContent={body:{styles:"*",attributes:"dir"},html:{attributes:"lang,xml:lang"}};k.requiredContent="body";c.addCommand("docProps",k);CKEDITOR.dialog.add("docProps",this.path+"dialogs/docprops.js");c.ui.addButton&&c.ui.addButton("DocProps",{label:c.lang.docprops.label,command:"docProps",toolbar:"document,30"})}}),function(){function c(c,a,b){var d=k;b&&
(d=CKEDITOR.tools.debounce(k,b));c.on(a,d,null,{editor:c})}function k(c){var a=c.listenerData.editor;c=a.focusManager.hasFocus;var b=a.editable(),d=a.config.editorplaceholder,k=/<body.*?>((?:.|[\n\r])*?)<\/body>/i,e=a.config.fullPage,a=a.getData();e&&(k=a.match(k))&&1<k.length&&(a=k[1]);if(0!==a.length||c)return b.removeAttribute(h);b.setAttribute(h,d)}CKEDITOR.plugins.add("editorplaceholder",{isSupportedEnvironment:function(){return!CKEDITOR.env.ie||9<=CKEDITOR.env.version},onLoad:function(){CKEDITOR.addCss(CKEDITOR.plugins.editorplaceholder.styles)},
init:function(f){this.isSupportedEnvironment()&&f.config.editorplaceholder&&(c(f,"contentDom"),c(f,"focus"),c(f,"blur"),c(f,"change",f.config.editorplaceholder_delay))}});var h="data-cke-editorplaceholder";CKEDITOR.plugins.editorplaceholder={styles:"["+h+"]::before {position: absolute;opacity: .8;color: #aaa;content: attr( "+h+" );}.cke_wysiwyg_div["+h+"]::before {margin-top: 1em;}"};CKEDITOR.config.editorplaceholder_delay=150;CKEDITOR.config.editorplaceholder=""}(),function(){function c(a,b){function d(b){b=
g.list[b];var d;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(d=a.createRange(),d.selectNodeContents(b),d=d.select()):(d=a.getSelection(),d.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:d,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function c(){h&&h.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete g.list}var e=a.ui.spaceId("path"),h,g=a._.elementsPath,n=g.idBase;b.html+='\x3cspan id\x3d"'+e+'_label" class\x3d"cke_voice_label"\x3e'+
a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+e+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+e+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});g.onClick=d;var p=CKEDITOR.tools.addFunction(d),v=CKEDITOR.tools.addFunction(function(b,e){var c=g.idBase,f;e=new CKEDITOR.dom.event(e);f="rtl"==a.lang.dir;switch(e.getKeystroke()){case f?39:37:case 9:return(f=
CKEDITOR.document.getById(c+(b+1)))||(f=CKEDITOR.document.getById(c+"0")),f.focus(),!1;case f?37:39:case CKEDITOR.SHIFT+9:return(f=CKEDITOR.document.getById(c+(b-1)))||(f=CKEDITOR.document.getById(c+(g.list.length-1))),f.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return d(b),!1;case CKEDITOR.ALT+121:return a.execCommand("toolbarFocus"),!1}return!0});a.on("selectionChange",function(b){for(var d=[],c=g.list=[],k=[],l=g.filters,B=!0,z=b.data.path.elements,x=z.length;x--;){var w=z[x],A=0;
b=w.data("cke-display-name")?w.data("cke-display-name"):w.data("cke-real-element-type")?w.data("cke-real-element-type"):w.getName();(B=w.hasAttribute("contenteditable")?"true"==w.getAttribute("contenteditable"):B)||w.hasAttribute("contenteditable")||(A=1);for(var D=0;D<l.length;D++){var C=l[D](w,b);if(!1===C){A=1;break}b=C||b}A||(c.unshift(w),k.unshift(b))}c=c.length;for(l=0;l<c;l++)b=k[l],B=a.lang.elementspath.eleTitle.replace(/%1/,b),b=f.output({id:n+l,label:B,text:b,jsTitle:"javascript:void('"+
b+"')",index:l,keyDownFn:v,clickFn:p}),d.unshift(b);h||(h=CKEDITOR.document.getById(e));k=h;k.setHtml(d.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:k})});a.on("readOnly",c);a.on("contentDomUnload",c);a.addCommand("elementsPathFocus",k.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var k={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||
CKEDITOR.env.air)}}},h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+h+' hidefocus\x3d"true"  draggable\x3d"false"  ondragstart\x3d"return false;" onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e');
CKEDITOR.plugins.add("elementspath",{init:function(a){a._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};a.on("uiSpace",function(b){"bottom"==b.data.space&&c(a,b.data)})}})}(),function(){function c(c,f,a){this.editor=c;this.notification=null;this._message=new CKEDITOR.template(f);this._singularMessage=a?new CKEDITOR.template(a):null;this._tasks=[];this._doneTasks=this._doneWeights=this._totalWeights=0}function k(c){this._weight=c||1;this._doneWeight=0;this._isCanceled=
!1}CKEDITOR.plugins.add("notificationaggregator",{requires:"notification"});c.prototype={createTask:function(c){c=c||{};var f=!this.notification,a;f&&(this.notification=this._createNotification());a=this._addTask(c);a.on("updated",this._onTaskUpdate,this);a.on("done",this._onTaskDone,this);a.on("canceled",function(){this._removeTask(a)},this);this.update();f&&this.notification.show();return a},update:function(){this._updateNotification();this.isFinished()&&this.fire("finished")},getPercentage:function(){return 0===
this.getTaskCount()?1:this._doneWeights/this._totalWeights},isFinished:function(){return this.getDoneTaskCount()===this.getTaskCount()},getTaskCount:function(){return this._tasks.length},getDoneTaskCount:function(){return this._doneTasks},_updateNotification:function(){this.notification.update({message:this._getNotificationMessage(),progress:this.getPercentage()})},_getNotificationMessage:function(){var c=this.getTaskCount(),f={current:this.getDoneTaskCount(),max:c,percentage:Math.round(100*this.getPercentage())};
return(1==c&&this._singularMessage?this._singularMessage:this._message).output(f)},_createNotification:function(){return new CKEDITOR.plugins.notification(this.editor,{type:"progress"})},_addTask:function(c){c=new k(c.weight);this._tasks.push(c);this._totalWeights+=c._weight;return c},_removeTask:function(c){var f=CKEDITOR.tools.indexOf(this._tasks,c);-1!==f&&(c._doneWeight&&(this._doneWeights-=c._doneWeight),this._totalWeights-=c._weight,this._tasks.splice(f,1),this.update())},_onTaskUpdate:function(c){this._doneWeights+=
c.data;this.update()},_onTaskDone:function(){this._doneTasks+=1;this.update()}};CKEDITOR.event.implementOn(c.prototype);k.prototype={done:function(){this.update(this._weight)},update:function(c){if(!this.isDone()&&!this.isCanceled()){c=Math.min(this._weight,c);var f=c-this._doneWeight;this._doneWeight=c;this.fire("updated",f);this.isDone()&&this.fire("done")}},cancel:function(){this.isDone()||this.isCanceled()||(this._isCanceled=!0,this.fire("canceled"))},isDone:function(){return this._weight===this._doneWeight},
isCanceled:function(){return this._isCanceled}};CKEDITOR.event.implementOn(k.prototype);CKEDITOR.plugins.notificationAggregator=c;CKEDITOR.plugins.notificationAggregator.task=k}(),function(){var c={_attachScript:function(c,h){var f=new CKEDITOR.dom.element("script");f.setAttribute("src",c);f.on("error",h);CKEDITOR.document.getBody().append(f);return f},sendRequest:function(c,h,f,a){function b(){e&&(e.remove(),delete CKEDITOR._.jsonpCallbacks[l],e=null)}var d={};h=h||{};var l=CKEDITOR.tools.getNextNumber(),
e;h.callback="CKEDITOR._.jsonpCallbacks["+l+"]";CKEDITOR._.jsonpCallbacks[l]=function(a){setTimeout(function(){b();f(a)})};e=this._attachScript(c.output(h),function(){b();a&&a()});d.cancel=b;return d}};CKEDITOR.plugins.add("embedbase",{requires:"dialog,widget,notificationaggregator",onLoad:function(){CKEDITOR._.jsonpCallbacks={}},init:function(){CKEDITOR.dialog.add("embedBase",this.path+"dialogs/embedbase.js")}});CKEDITOR.plugins.embedBase={createWidgetBaseDefinition:function(k){var h,f=k.lang.embedbase;
return{mask:!0,template:"\x3cdiv\x3e\x3c/div\x3e",pathName:f.pathName,_cache:{},urlRegExp:/^((https?:)?\/\/|www\.)/i,init:function(){this.on("sendRequest",function(a){this._sendRequest(a.data)},this,null,999);this.on("handleResponse",function(a){if(!a.data.html){var b=this._responseToHtml(a.data.url,a.data.response);null!==b?a.data.html=b:(a.data.errorMessage="unsupportedUrl",a.cancel())}},this,null,999)},loadContent:function(a,b){function d(d){f.response=d;c.editor.widgets.instances[c.id]?c._handleResponse(f)&&
(c._cacheResponse(a,d),b.callback&&b.callback()):(CKEDITOR.warn("embedbase-widget-invalid"),f.task&&f.task.done())}b=b||{};var c=this,e=this._getCachedResponse(a),f={noNotifications:b.noNotifications,url:a,callback:d,errorCallback:function(a){c._handleError(f,a);b.errorCallback&&b.errorCallback(a)}};if(e)setTimeout(function(){d(e)});else return b.noNotifications||(f.task=this._createTask()),this.fire("sendRequest",f),f},isUrlValid:function(a){return this.urlRegExp.test(a)&&!1!==this.fire("validateUrl",
a)},getErrorMessage:function(a,b,d){(d=k.lang.embedbase[a+(d||"")])||(d=a);return(new CKEDITOR.template(d)).output({url:b||""})},_sendRequest:function(a){var b=this,d=c.sendRequest(this.providerUrl,{url:encodeURIComponent(a.url)},a.callback,function(){a.errorCallback("fetchingFailed")});a.cancel=function(){d.cancel();b.fire("requestCanceled",a)}},_handleResponse:function(a){var b={url:a.url,html:"",response:a.response};if(!1!==this.fire("handleResponse",b))return a.task&&a.task.done(),this._setContent(a.url,
b.html),!0;a.errorCallback(b.errorMessage);return!1},_handleError:function(a,b){a.task&&(a.task.cancel(),a.noNotifications||k.showNotification(this.getErrorMessage(b,a.url),"warning"))},_responseToHtml:function(a,b){return"photo"==b.type?'\x3cimg src\x3d"'+CKEDITOR.tools.htmlEncodeAttr(b.url)+'" alt\x3d"'+CKEDITOR.tools.htmlEncodeAttr(b.title||"")+'" style\x3d"max-width:100%;height:auto" /\x3e':"video"==b.type||"rich"==b.type?(b.html=b.html.replace(/<iframe/g,'\x3ciframe tabindex\x3d"-1"'),b.html):
null},_setContent:function(a,b){this.setData("url",a);this.element.setHtml(b)},_createTask:function(){if(!h||h.isFinished())h=new CKEDITOR.plugins.notificationAggregator(k,f.fetchingMany,f.fetchingOne),h.on("finished",function(){h.notification.hide()});return h.createTask()},_cacheResponse:function(a,b){this._cache[a]=b},_getCachedResponse:function(a){return this._cache[a]}}},_jsonp:c}}(),function(){CKEDITOR.plugins.add("embed",{requires:"embedbase",init:function(c){var k=CKEDITOR.plugins.embedBase.createWidgetBaseDefinition(c),
h=k.init;c.config.embed_provider||CKEDITOR.error("embed-no-provider-url");CKEDITOR.tools.extend(k,{dialog:"embedBase",button:c.lang.embedbase.button,allowedContent:"div[!data-oembed-url]",requiredContent:"div[data-oembed-url]",providerUrl:new CKEDITOR.template(c.config.embed_provider||""),styleToAllowedContentRules:function(c){return{div:{propertiesOnly:!0,classes:c.getClassesArray(),attributes:"!data-oembed-url"}}},init:function(){h.call(this);if(!c.config.embed_keepOriginalContent)this.on("ready",
function(){this.loadContent(this.data.url,{callback:function(){c.fire("updateSnapshot")}})})},upcast:function(f,a){var b;if("div"==f.name&&f.attributes["data-oembed-url"]){a.url=f.attributes["data-oembed-url"];if(!c.config.embed_keepOriginalContent)for(;b=f.getFirst();)b.remove();return!0}},downcast:function(c){c.attributes["data-oembed-url"]=this.data.url}},!0);c.widgets.add("embed",k);c.config.embed_keepOriginalContent&&c.filter.addElementCallback(function(c){if("data-oembed-url"in c.attributes)return CKEDITOR.FILTER_SKIP_TREE})}})}(),
CKEDITOR.config.embed_keepOriginalContent=!1,function(){CKEDITOR.plugins.add("embedsemantic",{requires:"embedbase",onLoad:function(){this.registerOembedTag()},init:function(c){var k=CKEDITOR.plugins.embedBase.createWidgetBaseDefinition(c),h=k.init;CKEDITOR.tools.extend(k,{dialog:"embedBase",button:c.lang.embedbase.button,allowedContent:"oembed",requiredContent:"oembed",styleableElements:"oembed",providerUrl:new CKEDITOR.template(c.config.embed_provider||"//ckeditor.iframe.ly/api/oembed?url\x3d{url}\x26callback\x3d{callback}"),
init:function(){var f=this;h.call(this);this.once("ready",function(){this.data.loadOnReady&&this.loadContent(this.data.url,{callback:function(){f.setData("loadOnReady",!1);c.fire("updateSnapshot")}})})},upcast:function(c,a){if("oembed"==c.name){var b=c.children[0];if(b&&b.type==CKEDITOR.NODE_TEXT&&b.value)return a.url=b.value,a.loadOnReady=!0,b=new CKEDITOR.htmlParser.element("div"),c.replaceWith(b),b.attributes["class"]=c.attributes["class"],b}},downcast:function(c){var a=new CKEDITOR.htmlParser.element("oembed");
a.add(new CKEDITOR.htmlParser.text(this.data.url));c.attributes["class"]&&(a.attributes["class"]=c.attributes["class"]);return a}},!0);c.widgets.add("embedSemantic",k)},registerOembedTag:function(){var c=CKEDITOR.dtd,k;c.oembed={"#":1};for(k in c)c[k].div&&(c[k].oembed=1)}})}(),function(){function c(a,b,e){e=a.config.forceEnterMode||e;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var c=a.elementPath();c&&!c.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,e=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?
d(a,b,null,e):l(a,b,null,e);a.fire("saveSnapshot")}}function k(a){a=a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function h(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){c(a)}});
a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){c(a,a.activeShiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var f=CKEDITOR.dom.walker.whitespaces(),a=CKEDITOR.dom.walker.bookmark(),b,d,l,e;CKEDITOR.plugins.enterkey={enterBlock:function(b,c,l,p){function v(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],y.lastElement.getName())||1!==y.lastElement.getChildCount())return!1;a=y.lastElement.getChild(0).clone(!0);
(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(l=l||k(b)){l=h(l);var r=l.document,q=l.checkStartOfBlock(),t=l.checkEndOfBlock(),y=b.elementPath(l.startContainer),u=y.block,B=c==CKEDITOR.ENTER_DIV?"div":"p",z;if(u&&q&&t){q=u.getParent();if(q.is("li")&&1<q.getChildCount()){r=new CKEDITOR.dom.element("li");z=b.createRange();r.insertAfter(q);u.remove();z.setStart(r,0);b.getSelection().selectRanges([z]);return}if(u.is("li")||u.getParent().is("li")){u.is("li")||(u=u.getParent(),q=u.getParent());
z=q.getParent();l=!u.hasPrevious();var x=!u.hasNext();p=b.getSelection();var B=p.createBookmarks(),w=u.getDirection(1),t=u.getAttribute("class"),A=u.getAttribute("style"),D=z.getDirection(1)!=w;b=b.enterMode!=CKEDITOR.ENTER_BR||D||A||t;if(z.is("li"))l||x?(l&&x&&q.remove(),u[x?"insertAfter":"insertBefore"](z)):u.breakParent(z);else{if(b)if(y.block.is("li")?(z=r.createElement(c==CKEDITOR.ENTER_P?"p":"div"),D&&z.setAttribute("dir",w),A&&z.setAttribute("style",A),t&&z.setAttribute("class",t),u.moveChildren(z)):
z=y.block,l||x)z[l?"insertBefore":"insertAfter"](q);else u.breakParent(q),z.insertAfter(q);else if(u.appendBogus(!0),l||x)for(;r=u[l?"getFirst":"getLast"]();)r[l?"insertBefore":"insertAfter"](q);else for(u.breakParent(q);r=u.getLast();)r.insertAfter(q);u.remove()}p.selectBookmarks(B);return}if(u&&u.getParent().is("blockquote")){u.breakParent(u.getParent());u.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||u.getPrevious().remove();u.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||u.getNext().remove();
l.moveToElementEditStart(u);l.select();return}}else if(u&&u.is("pre")&&!t){d(b,c,l,p);return}if(A=l.splitBlock(B)){b=A.previousBlock;u=A.nextBlock;q=A.wasStartOfBlock;t=A.wasEndOfBlock;u?(x=u.getParent(),x.is("li")&&(u.breakParent(x),u.move(u.getNext(),1))):b&&(x=b.getParent())&&x.is("li")&&(b.breakParent(x),x=b.getNext(),l.moveToElementEditStart(x),b.move(b.getPrevious()));if(q||t)if(v(c))l.moveToElementEditStart(l.getTouchedStartNode());else{if(b){if(b.is("li")||!e.test(b.getName())&&!b.is("pre"))z=
b.clone()}else u&&(z=u.clone());z?p&&!z.is("li")&&z.renameNode(B):x&&x.is("li")?z=x:(z=r.createElement(B),b&&(w=b.getDirection())&&z.setAttribute("dir",w));if(r=A.elementPath)for(c=0,p=r.elements.length;c<p;c++){B=r.elements[c];if(B.equals(r.block)||B.equals(r.blockLimit))break;CKEDITOR.dtd.$removeEmpty[B.getName()]&&(B=B.clone(),z.moveChildren(B),z.append(B))}z.appendBogus();z.getParent()||l.insertNode(z);z.is("li")&&z.removeAttribute("value");!CKEDITOR.env.ie||!q||t&&b.getChildCount()||(l.moveToElementEditStart(t?
b:z),l.select());l.moveToElementEditStart(q&&!t?u:z)}else u.is("li")&&(z=l.clone(),z.selectNodeContents(u),z=new CKEDITOR.dom.walker(z),z.evaluator=function(b){return!(a(b)||f(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in CKEDITOR.dtd.$inline&&!(b.getName()in CKEDITOR.dtd.$empty))},(x=z.next())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?r.createElement("br"):r.createText(" ")).insertBefore(x)),u&&l.moveToElementEditStart(u);l.select();l.scrollIntoView()}}},enterBr:function(a,
b,d,c){if(d=d||k(a)){var f=d.document,h=d.checkEndOfBlock(),q=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),t=q.block,y=t&&q.block.getName();c||"li"!=y?(!c&&h&&e.test(y)?(h=t.getDirection())?(f=f.createElement("div"),f.setAttribute("dir",h),f.insertAfter(t),d.setStart(f,0)):(f.createElement("br").insertAfter(t),CKEDITOR.env.gecko&&f.createText("").insertAfter(t),d.setStartAt(t.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==y&&
CKEDITOR.env.ie&&8>CKEDITOR.env.version?f.createText("\r"):f.createElement("br"),d.deleteContents(),d.insertNode(a),CKEDITOR.env.needsBrFiller?(f.createText("﻿").insertAfter(a),h&&(t||q.blockLimit).appendBogus(),a.getNext().$.nodeValue="",d.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):d.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),d.collapse(!0),d.select(),d.scrollIntoView()):l(a,b,d,c)}}};b=CKEDITOR.plugins.enterkey;d=b.enterBr;l=b.enterBlock;e=/^h[1-6]$/}(),CKEDITOR.plugins.add("popup"),
CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(c,k,h,f){k=k||"80%";h=h||"70%";"string"==typeof k&&1<k.length&&"%"==k.substr(k.length-1,1)&&(k=parseInt(window.screen.width*parseInt(k,10)/100,10));"string"==typeof h&&1<h.length&&"%"==h.substr(h.length-1,1)&&(h=parseInt(window.screen.height*parseInt(h,10)/100,10));640>k&&(k=640);420>h&&(h=420);var a=parseInt((window.screen.height-h)/2,10),b=parseInt((window.screen.width-k)/2,10);f=(f||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+
",width\x3d"+k+",height\x3d"+h+",top\x3d"+a+",left\x3d"+b;var d=window.open("",null,f,!0);if(!d)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(d.moveTo(b,a),d.resizeTo(k,h)),d.focus(),d.location.href=c}catch(l){window.open(c,null,f,!0)}return!0}}),"use strict",function(){function c(a){this.editor=a;this.loaders=[]}function k(a,b,d){var c=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof b?(this.data=b,this.file=h(this.data),this.loaded=this.total=
this.file.size):(this.data=null,this.file=b,this.total=this.file.size,this.loaded=0);d?this.fileName=d:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),c&&(a[0]=c),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}function h(a){var b=a.match(f)[1];a=a.replace(f,"");a=atob(a);var d=[],c,e,h,g;for(c=0;c<a.length;c+=512){e=a.slice(c,c+512);h=Array(e.length);for(g=0;g<e.length;g++)h[g]=
e.charCodeAt(g);e=new Uint8Array(h);d.push(e)}return new Blob(d,{type:b})}CKEDITOR.plugins.add("filetools",{beforeInit:function(a){a.uploadRepository=new c(a);a.on("fileUploadRequest",function(a){var d=a.data.fileLoader;d.xhr.open("POST",d.uploadUrl,!0);a.data.requestData.upload={file:d.file,name:d.fileName}},null,null,5);a.on("fileUploadRequest",function(b){var d=b.data.fileLoader,c=new FormData;b=b.data.requestData;var e=a.config.fileTools_requestHeaders,f,g;for(g in b){var h=b[g];"object"===typeof h&&
h.file?c.append(g,h.file,h.name):c.append(g,h)}c.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(e)for(f in e)d.xhr.setRequestHeader(f,e[f]);d.xhr.send(c)},null,null,999);a.on("fileUploadResponse",function(a){var d=a.data.fileLoader,c=d.xhr,e=a.data;try{var f=JSON.parse(c.responseText);f.error&&f.error.message&&(e.message=f.error.message);if(f.uploaded)for(var g in f)e[g]=f[g];else a.cancel()}catch(h){e.message=d.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:c.responseText}),
a.cancel()}},null,null,999)}});c.prototype={create:function(a,b,d){d=d||k;var c=this.loaders.length;a=new d(this.editor,a,b);a.id=c;this.loaders[c]=a;this.fire("instanceCreated",a);return a},isFinished:function(){for(var a=0;a<this.loaders.length;++a)if(!this.loaders[a].isFinished())return!1;return!0}};k.prototype={loadAndUpload:function(a,b){var d=this;this.once("loaded",function(c){c.cancel();d.once("update",function(a){a.cancel()},null,null,0);d.upload(a,b)},null,null,0);this.load()},load:function(){var a=
this,b=this.reader=new FileReader;a.changeStatus("loading");this.abort=function(){a.reader.abort()};b.onabort=function(){a.changeStatus("abort")};b.onerror=function(){a.message=a.lang.filetools.loadError;a.changeStatus("error")};b.onprogress=function(b){a.loaded=b.loaded;a.update()};b.onload=function(){a.loaded=a.total;a.data=b.result;a.changeStatus("loaded")};b.readAsDataURL(this.file)},upload:function(a,b){var d=b||{};a?(this.uploadUrl=a,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),
this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:d})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function a(){"error"!=d.status&&(d.message=d.lang.filetools.networkError,d.changeStatus("error"))}function b(){"abort"!=d.status&&d.changeStatus("abort")}var d=this,c=this.xhr;d.abort=function(){c.abort();b()};c.onerror=a;c.onabort=b;c.upload?(c.upload.onprogress=function(a){a.lengthComputable&&
(d.uploadTotal||(d.uploadTotal=a.total),d.uploaded=a.loaded,d.update())},c.upload.onerror=a,c.upload.onabort=b):(d.uploadTotal=d.total,d.update());c.onload=function(){d.update();if("abort"!=d.status)if(d.uploaded=d.uploadTotal,200>c.status||299<c.status)d.message=d.lang.filetools["httpError"+c.status],d.message||(d.message=d.lang.filetools.httpError.replace("%1",c.status)),d.changeStatus("error");else{for(var a={fileLoader:d},b=["message","fileName","url"],f=d.editor.fire("fileUploadResponse",a),
h=0;h<b.length;h++){var k=b[h];"string"===typeof a[k]&&(d[k]=a[k])}d.responseData=a;delete d.responseData.fileLoader;!1===f?d.changeStatus("error"):d.changeStatus("uploaded")}}},changeStatus:function(a){this.status=a;if("error"==a||"abort"==a||"loaded"==a||"uploaded"==a)this.abort=function(){};this.fire(a);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};CKEDITOR.event.implementOn(c.prototype);CKEDITOR.event.implementOn(k.prototype);
var f=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:c,fileLoader:k,getUploadUrl:function(a,b){var d=CKEDITOR.tools.capitalize;return b&&a[b+"UploadUrl"]?a[b+"UploadUrl"]:a.uploadUrl?a.uploadUrl:b&&a["filebrowser"+d(b,1)+"UploadUrl"]?a["filebrowser"+d(b,1)+"UploadUrl"]+"\x26responseType\x3djson":a.filebrowserUploadUrl?a.filebrowserUploadUrl+"\x26responseType\x3djson":null},isTypeSupported:function(a,b){return!!a.type.match(b)},
isFileUploadSupported:"function"===typeof FileReader&&"function"===typeof(new FileReader).readAsDataURL&&"function"===typeof FormData&&"function"===typeof(new FormData).append&&"function"===typeof XMLHttpRequest&&"function"===typeof Blob})}(),function(){function c(a,b){var d=[];if(b)for(var c in b)d.push(c+"\x3d"+encodeURIComponent(b[c]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+d.join("\x26")}function k(a){return!a.match(/command=QuickUpload/)||a.match(/(\?|&)responseType=json/)?a:
c(a,{responseType:"json"})}function h(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function f(){var a=this.getDialog(),b=a.getParentEditor();b._.filebrowserSe=this;var d=b.config["filebrowser"+h(a.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",a=b.config["filebrowser"+h(a.getName())+"WindowHeight"]||b.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=b.name;e.CKEditorFuncNum=b._.filebrowserFn;e.langCode||(e.langCode=b.langCode);e=c(this.filebrowser.url,
e);b.popup(e,d,a,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function a(a){var b=new CKEDITOR.dom.element(a.$.form);b&&((a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a):(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken()))}function b(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&
a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function d(a,b,d){var e=d.params||{};e.CKEditor=a.name;e.CKEditorFuncNum=a._.filebrowserFn;e.langCode||(e.langCode=a.langCode);b.action=c(d.url,e);b.filebrowser=d}function l(c,m,v,r){if(r&&r.length)for(var q,t=r.length;t--;)if(q=r[t],"hbox"!=q.type&&"vbox"!=q.type&&"fieldset"!=q.type||l(c,m,v,q.children),q.filebrowser)if("string"==typeof q.filebrowser&&(q.filebrowser={action:"fileButton"==q.type?"QuickUpload":"Browse",target:q.filebrowser}),
"Browse"==q.filebrowser.action){var y=q.filebrowser.url;void 0===y&&(y=c.config["filebrowser"+h(m)+"BrowseUrl"],void 0===y&&(y=c.config.filebrowserBrowseUrl));y&&(q.onClick=f,q.filebrowser.url=y,q.hidden=!1)}else if("QuickUpload"==q.filebrowser.action&&q["for"]&&(y=q.filebrowser.url,void 0===y&&(y=c.config["filebrowser"+h(m)+"UploadUrl"],void 0===y&&(y=c.config.filebrowserUploadUrl)),y)){var u=q.onClick;q.onClick=function(d){var f=d.sender,h=f.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement(),
l=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(u&&!1===u.call(f,d))return!1;if(b.call(f,d)){if("form"!==c.config.filebrowserUploadMethod&&l)return d=c.uploadRepository.create(h.$.files[0]),d.on("uploaded",function(a){var b=a.sender.responseData;g.call(a.sender.editor,b.url,b.message)}),d.on("error",e.bind(this)),d.on("abort",e.bind(this)),d.loadAndUpload(k(y)),"xhr";a(h);return!0}return!1};q.filebrowser.url=y;q.hidden=!1;d(c,v.getContents(q["for"][0]).get(q["for"][1]),q.filebrowser)}}
function e(a){var b={};try{b=JSON.parse(a.sender.xhr.response)||{}}catch(d){}this.enable();alert(b.error?b.error.message:a.sender.message)}function m(a,b,d){if(-1!==d.indexOf(";")){d=d.split(";");for(var c=0;c<d.length;c++)if(m(a,b,d[c]))return!0;return!1}return(a=a.getContents(b).get(d).filebrowser)&&a.url}function g(a,b){var d=this._.filebrowserSe.getDialog(),c=this._.filebrowserSe["for"],e=this._.filebrowserSe.filebrowser.onSelect;c&&d.getContentElement(c[0],c[1]).reset();if("function"!=typeof b||
!1!==b.call(this._.filebrowserSe))if(!e||!1!==e.call(this._.filebrowserSe,a,b))if("string"==typeof b&&b&&alert(b),a&&(c=this._.filebrowserSe,d=c.getDialog(),c=c.filebrowser.target||null))if(c=c.split(":"),e=d.getContentElement(c[0],c[1]))e.setValue(a),d.selectPage(c[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(g,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",
function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,d,c=0;c<b.contents.length;++c)if(d=b.contents[c])l(a.editor,a.data.name,b,d.elements),d.hidden&&d.filebrowser&&(d.hidden=!m(b,d.id,d.filebrowser))})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(c){var k=c.addCommand("find",new CKEDITOR.dialogCommand("find")),h=c.addCommand("replace",new CKEDITOR.dialogCommand("find",{tabId:"replace"}));k.canUndo=!1;k.readOnly=1;h.canUndo=!1;c.ui.addButton&&(c.ui.addButton("Find",
{label:c.lang.find.find,command:"find",toolbar:"find,10"}),c.ui.addButton("Replace",{label:c.lang.find.replace,command:"replace",toolbar:"find,20"}));CKEDITOR.dialog.add("find",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},CKEDITOR.plugins.add("flash",{init:function(){CKEDITOR.error("editor-plugin-deprecated",{plugin:"flash"})}}),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),
function(){function c(c){var a=c.config,b=c.fire("uiSpace",{space:"top",html:""}).html,d=function(){function b(a,d,c){e.setStyle(d,h(c));e.setStyle("position",a)}function g(a){var d=m.getDocumentPosition();switch(a){case "top":b("absolute","top",d.y-u-x);break;case "pin":b("fixed","top",A);break;case "bottom":b("absolute","top",d.y+(t.height||t.bottom-t.top)+x)}l=a}var l,m,q,t,y,u,B,z=a.floatSpaceDockedOffsetX||0,x=a.floatSpaceDockedOffsetY||0,w=a.floatSpacePinnedOffsetX||0,A=a.floatSpacePinnedOffsetY||
0;return function(b){if(m=c.editable()){var n=b&&"focus"==b.name;n&&e.show();c.fire("floatingSpaceLayout",{show:n});e.removeStyle("left");e.removeStyle("right");q=e.getClientRect();t=m.getClientRect();y=k.getViewPaneSize();u=q.height;B="pageXOffset"in k.$?k.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;l?(u+x<=t.top?g("top"):u+x>y.height-t.bottom?g("pin"):g("bottom"),b=y.width/2,b=a.floatSpacePreferRight?"right":0<t.left&&t.right<y.width&&t.width>q.width?"rtl"==a.contentsLangDirection?
"right":"left":b-t.left>t.right-b?"left":"right",q.width>y.width?(b="left",n=0):(n="left"==b?0<t.left?t.left:0:t.right<y.width?y.width-t.right:0,n+q.width>y.width&&(b="left"==b?"right":"left",n=0)),e.setStyle(b,h(("pin"==l?w:z)+n+("pin"==l?0:"left"==b?B:-B)))):(l="pin",g("pin"),d(b))}}}();if(b){var l=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?
" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(c.applicationTitle?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(c.applicationTitle?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),e=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(l.output({content:b,
id:c.id,langDir:c.lang.dir,langCode:c.langCode,name:c.name,style:"display:none;z-index:"+(a.baseFloatZIndex-1),topId:c.ui.spaceId("top"),voiceLabel:c.applicationTitle}))),m=CKEDITOR.tools.eventsBuffer(500,d),g=CKEDITOR.tools.eventsBuffer(100,d);e.unselectable();e.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});c.on("focus",function(a){d(a);c.on("change",m.input);k.on("scroll",g.input);k.on("resize",g.input)});c.on("blur",function(){e.hide();c.removeListener("change",
m.input);k.removeListener("scroll",g.input);k.removeListener("resize",g.input)});c.on("destroy",function(){k.removeListener("scroll",g.input);k.removeListener("resize",g.input);e.clearCustomData();e.remove()});c.focusManager.hasFocus&&e.show();c.focusManager.add(e,1)}}var k=CKEDITOR.document.getWindow(),h=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(f){f.on("loaded",function(){c(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var c=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),k=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')"  {language} onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),
h=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),f=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var d=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&
(d["aria-multiselectable"]=!0);!d.role&&(d.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",d.role);d=this.keys;d[40]="next";d[9]="next";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(d[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=c.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);
delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,d,c){var e=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=e;var h;h=CKEDITOR.tools.htmlEncodeAttr(a).replace(f,"\\'");a={id:e,val:h,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26':
"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(d||a),text:b||a,language:c?'lang\x3d"'+c+'"':""};this._.pendingList.push(k.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(h.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},
hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,d=this.element.getDocument(),c;for(c in a)d.getById(a[c]).setStyle("display","");for(var e in b)a=d.getById(b[e]),c=a.getNext(),a.setStyle("display",""),c&&"ul"==
c.getName()&&c.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var d=b.getById(a);d.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(d)},unmarkAll:function(){var a=
this._.items,b=this.element.getDocument(),d;for(d in a){var c=a[d];b.getById(c).removeClass("cke_selected");b.getById(c+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),d,c=-1;if(a)for(d=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++c);){if(a.equals(d)){this._.focusIndex=
c;break}}else this.element.focus();d&&setTimeout(function(){d.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var c='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+
(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',k="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(k='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+
k+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),h=CKEDITOR.addTemplate("combo",c);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(c){CKEDITOR.tools.extend(this,
c,{canGroup:!1,title:c.label,modes:{wysiwyg:1},editorFocus:1});c=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=c.parent&&c.parent.getDocument()||CKEDITOR.document;c.className="cke_combopanel";c.block={multiSelect:c.multiSelect,attributes:c.attributes};c.toolbarRelated=!0;this._={panelDefinition:c,items:{},listeners:[]}},proto:{renderHtml:function(c){var a=[];this.render(c,a);return a.join("")},render:function(c,a){function b(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a=
this.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;c.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var d=CKEDITOR.env,k,e,m="cke_"+this.id,g=CKEDITOR.tools.addFunction(function(a){e&&(c.unlockSelection(1),e=0);k.execute(a)},this),n=this;k={id:m,combo:this,focus:function(){CKEDITOR.document.getById(m).getChild(1).focus()},execute:function(a){var b=n._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(c),
b.on)b.panel.hide();else{n.commit();var d=n.getValue();d?b.list.mark(d):b.list.unmarkAll();b.panel.showBlock(n.id,new CKEDITOR.dom.element(a),4)}},clickFn:g};this._.listeners.push(c.on("activeFilterChange",b,this));this._.listeners.push(c.on("mode",b,this));this._.listeners.push(c.on("selectionChange",b,this));!this.readOnly&&this._.listeners.push(c.on("readOnly",b,this));var p=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var d=a.getKeystroke();switch(d){case 13:case 32:case 40:CKEDITOR.tools.callFunction(g,
b);break;default:k.onkey(k,d)}a.preventDefault()}),v=CKEDITOR.tools.addFunction(function(){k.onfocus&&k.onfocus()});e=0;k.keyDownFn=p;d={id:m,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:d.gecko&&!d.hc?"":(this.title||"").replace("'",""),keydownFn:p,focusFn:v,clickFn:g};h.output(d,a);if(this.onRender)this.onRender();return k},createPanel:function(c){if(!this._.panel){var a=this._.panelDefinition,b=this._.panelDefinition.block,d=a.parent||CKEDITOR.document.getBody(),
h="cke_combopanel__"+this.name,e=new CKEDITOR.ui.floatPanel(c,d,a),a=e.addListBlock(this.id,b),k=this;e.onShow=function(){this.element.addClass(h);k.setState(CKEDITOR.TRISTATE_ON);k._.on=1;k.editorFocus&&!c.focusManager.hasFocus&&c.focus();if(k.onOpen)k.onOpen()};e.onHide=function(a){this.element.removeClass(h);k.setState(k.modes&&k.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);k._.on=0;if(!a&&k.onClose)k.onClose()};e.onEscape=function(){e.hide(1)};a.onClick=function(a,b){k.onClick&&
k.onClick.call(k,a,b);e.hide()};this._.panel=e;this._.list=a;e.getBlock(this.id).onHide=function(){k._.on=0;k.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(c,a){this._.value=c;var b=this.document.getById("cke_"+this.id+"_text");b&&(c||a?b.removeClass("cke_combo_inlinelabel"):(a=this.label,b.addClass("cke_combo_inlinelabel")),b.setText("undefined"!=typeof a?a:c));var b="undefined"!=typeof a?a:c,d=this.label,b=b===d?b:b+", "+d;(d=this.document.getById("cke_"+this.id+"_label"))&&
d.setText(b)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(c){this._.list.mark(c)},hideItem:function(c){this._.list.hideItem(c)},hideGroup:function(c){this._.list.hideGroup(c)},showAll:function(){this._.list.showAll()},add:function(c,a,b,d){this._.items[c]=b||c;this._.list.add(c,a,b,d)},startGroup:function(c){this._.list.startGroup(c)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));
this._.committed=1},setState:function(c){if(this._.state!=c){var a=this.document.getById("cke_"+this.id),b=a.getElementsByTag("a").getItem(0);a.setState(c,"cke_combo");c==CKEDITOR.TRISTATE_DISABLED?a.setAttribute("aria-disabled",!0):a.removeAttribute("aria-disabled");b&&b.setAttribute("aria-expanded",c==CKEDITOR.TRISTATE_ON);this._.state=c}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=
CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(c){c.removeListener()});this._.listeners=[]},select:function(c){if(!CKEDITOR.tools.isEmpty(this._.items))for(var a in this._.items)if(c({value:a,text:this._.items[a]})){this.setValue(a);break}}},statics:{handler:{create:function(c){return new CKEDITOR.ui.richCombo(c)}}}});CKEDITOR.ui.prototype.addRichCombo=function(c,a){this.add(c,
CKEDITOR.UI_RICHCOMBO,a)}}(),function(){function c(b,d){var c=b.config,e=d.lang,f=new CKEDITOR.style(d.styleDefinition),g=new a({entries:d.entries,styleVariable:d.styleVariable,styleDefinition:d.styleDefinition}),n;b.addCommand(d.commandName,{exec:function(a,b){var d=b.newStyle,c=b.oldStyle,e=a.getSelection().getRanges()[0],f=void 0===d;if(c||d)c&&e.collapsed&&h({editor:a,range:e,style:c}),f?a.removeStyle(c):(c&&!k(c,d)&&a.removeStyle(c),a.applyStyle(d))},refresh:function(a,b){f.checkApplicable(b,
a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});n=b.getCommand(d.commandName);b.ui.addRichCombo(d.comboName,{label:e.label,title:e.panelTitle,command:d.commandName,toolbar:"styles,"+d.order,defaultValue:"cke-default",allowedContent:f,requiredContent:f,contentTransformations:"span"===d.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");
a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(c.contentsCss),multiSelect:!1,attributes:{"aria-label":e.panelTitle}},init:function(){var a="("+b.lang.common.optionDefault+")";this.startGroup(e.panelTitle);this.add(this.defaultValue,
a,a);g.addToCombo(this)},onClick:function(a){var c=this.getValue();b.focus();b.fire("saveSnapshot");b.execCommand(d.commandName,{newStyle:g.getStyle(a),oldStyle:g.getStyle(c)});b.fire("saveSnapshot")},onRender:function(){b.on("selectionChange",function(a){var c=this.getValue();(a=g.getMatchingValue(b,a.data.path))?a!=c&&this.setValue(a):this.setValue("",d.defaultLabel)},this);n.on("state",function(){this.setState(n.state)},this)},refresh:function(){this.setState(n.state)}})}function k(a,d){if(!(a instanceof
CKEDITOR.style&&d instanceof CKEDITOR.style))return!1;var c=function(a,b){var d=a.getDefinition().attributes,c=b.getDefinition().attributes;return CKEDITOR.tools.objectCompare(d,c)}(a,d),e=function(a,b){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition())}(a,d);return c&&e}function h(a){var d=a.editor,c=a.range,e=a.style,h,g,k;h=d.elementPath();if(a=h.contains(function(a){return e.checkElementRemovable(a)})){g=c.checkBoundaryOfElement(a,CKEDITOR.START);
k=c.checkBoundaryOfElement(a,CKEDITOR.END);if(g&&k){for(g=c.createBookmark();h=a.getFirst();)h.insertBefore(a);a.remove();c.moveToBookmark(g)}else g||k?c.moveToPosition(a,g?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(c.splitElement(a),c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END)),f(c,h.elements.slice(),a);d.getSelection().selectRanges([c])}}function f(a,d,c){var e=d.pop();if(e){if(c)return f(a,d,e.equals(c)?null:c);c=e.clone();a.insertNode(c);a.moveToPosition(c,CKEDITOR.POSITION_AFTER_START);
f(a,d)}}var a=CKEDITOR.tools.createClass({$:function(a){var d=a.entries.split(";");this._.data={};this._.names=[];for(var c=0;c<d.length;c++){var e=d[c],f,g;e?(e=e.split("/"),f=e[0],e=e[1],g={},g[a.styleVariable]=e||f,this._.data[f]=new CKEDITOR.style(a.styleDefinition,g),this._.data[f]._.definition.name=f,this._.names.push(f)):(d.splice(c,1),c--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var d=0;d<this._.names.length;d++){var c=this._.names[d];a.add(c,this.getStyle(c).buildPreview(),
c)}},getMatchingValue:function(a,d){for(var c=d.elements,e=0,f;e<c.length;e++)if(f=c[e],f=this._.findMatchingStyleName(a,f))return f;return null}},_:{findMatchingStyleName:function(a,d){return CKEDITOR.tools.array.find(this._.names,function(c){return this.getStyle(c).checkElementMatch(d,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(a){var d=a.config;c(a,{comboName:"Font",commandName:"font",styleVariable:"family",lang:a.lang.font,entries:d.font_names,defaultLabel:d.font_defaultLabel,
styleDefinition:d.font_style,order:30});c(a,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:a.lang.font.fontSize,entries:d.fontSize_sizes,defaultLabel:d.fontSize_defaultLabel,styleDefinition:d.fontSize_style,order:40})}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",
CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("format",
{requires:"richcombo",init:function(c){if(!c.blockless){for(var k=c.config,h=c.lang.format,f=k.format_tags.split(";"),a={},b=0,d=[],l=0;l<f.length;l++){var e=f[l],m=new CKEDITOR.style(k["format_"+e]);if(!c.filter.customConfig||c.filter.check(m))b++,a[e]=m,a[e]._.enterMode=c.config.enterMode,d.push(m)}0!==b&&c.ui.addRichCombo("Format",{label:h.label,title:h.panelTitle,toolbar:"styles,20",allowedContent:d,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(k.contentsCss),multiSelect:!1,attributes:{"aria-label":h.panelTitle}},
init:function(){this.startGroup(h.panelTitle);for(var b in a){var d=h["tag_"+b];this.add(b,a[b].buildPreview(d),d)}},onClick:function(b){c.focus();c.fire("saveSnapshot");b=a[b];var d=c.elementPath();c.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK});b.checkActive(d,c)||c.applyStyle(b);setTimeout(function(){c.fire("saveSnapshot")},0)},onRender:function(){c.on("selectionChange",function(b){var d=this.getValue();b=b.data.path;this.refresh();for(var e in a)if(a[e].checkActive(b,c)){e!=d&&this.setValue(e,
c.lang.format["tag_"+e]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var b in a)c.activeFilter.check(a[b])||this.hideItem(b)},refresh:function(){var b=c.elementPath();if(b){if(b.isContextFor("p"))for(var d in a)if(c.activeFilter.check(a[d]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},
CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+
CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}");CKEDITOR.style.unstylableElements.push("select","option")},init:function(c){var k=c.lang,h=0,f={email:1,password:1,search:1,tel:1,text:1,url:1},a={checkbox:"input[type,name,checked,required]",radio:"input[type,name,checked,required]",textfield:"input[type,name,value,size,maxlength,required]",textarea:"textarea[cols,rows,name,required]",
select:"select[name,size,multiple,required]; option[value,selected]",button:"input[type,name,value]",form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},b={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},d=function(d,e,f){var l={allowedContent:a[e],requiredContent:b[e]};
"form"==e&&(l.context="form");c.addCommand(e,new CKEDITOR.dialogCommand(e,l));c.ui.addButton&&c.ui.addButton(d,{label:k.common[d.charAt(0).toLowerCase()+d.slice(1)],command:e,toolbar:"forms,"+(h+=10)});CKEDITOR.dialog.add(e,f)},l=this.path+"dialogs/";!c.blockless&&d("Form","form",l+"form.js");d("Checkbox","checkbox",l+"checkbox.js");d("Radio","radio",l+"radio.js");d("TextField","textfield",l+"textfield.js");d("Textarea","textarea",l+"textarea.js");d("Select","select",l+"select.js");d("Button","button",
l+"button.js");var e=c.plugins.image;e&&!c.plugins.image2&&d("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js");d("HiddenField","hiddenfield",l+"hiddenfield.js");c.addMenuItems&&(d={checkbox:{label:k.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:k.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:k.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:k.forms.hidden.title,
command:"hiddenfield",group:"hiddenfield"},button:{label:k.forms.button.title,command:"button",group:"button"},select:{label:k.forms.select.title,command:"select",group:"select"},textarea:{label:k.forms.textarea.title,command:"textarea",group:"textarea"}},e&&(d.imagebutton={label:k.image.titleButton,command:"imagebutton",group:"imagebutton"}),!c.blockless&&(d.form={label:k.forms.form.menu,command:"form",group:"form"}),c.addMenuItems(d));c.contextMenu&&(!c.blockless&&c.contextMenu.addListener(function(a,
b,d){if((a=d.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),c.contextMenu.addListener(function(a){if(a&&!a.isReadOnly()){var b=a.getName();if("select"==b)return{select:CKEDITOR.TRISTATE_OFF};if("textarea"==b)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==b){var d=a.getAttribute("type")||"text";switch(d){case "button":case "submit":case "reset":return{button:CKEDITOR.TRISTATE_OFF};case "checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case "radio":return{radio:CKEDITOR.TRISTATE_OFF};
case "image":return e?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(f[d])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==b&&"hiddenfield"==a.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}}));c.on("doubleclick",function(a){var b=a.data.element;if(!c.blockless&&b.is("form"))a.data.dialog="form";else if(b.is("select"))a.data.dialog="select";else if(b.is("textarea"))a.data.dialog="textarea";else if(b.is("img")&&"hiddenfield"==b.data("cke-real-element-type"))a.data.dialog="hiddenfield";
else if(b.is("input")){b=b.getAttribute("type")||"text";switch(b){case "button":case "submit":case "reset":a.data.dialog="button";break;case "checkbox":a.data.dialog="checkbox";break;case "radio":a.data.dialog="radio";break;case "image":a.data.dialog="imagebutton"}f[b]&&(a.data.dialog="textfield")}})},afterInit:function(c){var k=c.dataProcessor,h=k&&k.htmlFilter,k=k&&k.dataFilter;CKEDITOR.env.ie&&h&&h.addRules({elements:{input:function(c){c=c.attributes;var a=c.type;a||(c.type="text");"checkbox"!=
a&&"radio"!=a||"on"!=c.value||delete c.value}}},{applyToAll:!0});k&&k.addRules({elements:{input:function(f){if("hidden"==f.attributes.type)return c.createFakeParserElement(f,"cke_hidden","hiddenfield")}}},{applyToAll:!0})}}),CKEDITOR.plugins.forms={_setupRequiredAttribute:function(c){this.setValue(c.hasAttribute("required"))}},function(){var c={canUndo:!1,exec:function(c){var h=c.document.createElement("hr");c.insertElement(h)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",
{init:function(k){k.blockless||(k.addCommand("horizontalrule",c),k.ui.addButton&&k.ui.addButton("HorizontalRule",{label:k.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(c){var k=new CKEDITOR.htmlWriter;k.forceSimpleAmpersand=c.config.forceSimpleAmpersand;k.indentationChars="string"===typeof c.config.dataIndentationChars?c.config.dataIndentationChars:"\t";c.dataProcessor.writer=k}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,
$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var c=CKEDITOR.dtd,k;for(k in CKEDITOR.tools.extend({},c.$nonBodyContent,c.$block,c.$listItem,c.$tableContent))this.setRules(k,{indent:!c[k]["#"],breakBeforeOpen:1,breakBeforeClose:!c[k]["#"],breakAfterClose:1,needsSpace:k in c.$block&&!(k in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",
{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(c){var k=this._.rules[c];this._.afterCloser&&k&&k.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():k&&k.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",c);this._.afterCloser=0},openTagClose:function(c,k){var h=this._.rules[c];k?(this._.output.push(this.selfClosingEnd),h&&
h.breakAfterClose&&(this._.needsSpace=h.needsSpace)):(this._.output.push("\x3e"),h&&h.indent&&(this._.indentation+=this.indentationChars));h&&h.breakAfterOpen&&this.lineBreak();"pre"==c&&(this._.inPre=1)},attribute:function(c,k){"string"==typeof k&&(k=CKEDITOR.tools.htmlEncodeAttr(k),this.forceSimpleAmpersand&&(k=k.replace(/&amp;/g,"\x26")));this._.output.push(" ",c,'\x3d"',k,'"')},closeTag:function(c){var k=this._.rules[c];k&&k.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));
this._.indent?this.indentation():k&&k.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",c,"\x3e");"pre"==c&&(this._.inPre=0);k&&k.breakAfterClose&&(this.lineBreak(),this._.needsSpace=k.needsSpace);this._.afterCloser=1},text:function(c){this._.indent&&(this.indentation(),!this._.inPre&&(c=CKEDITOR.tools.ltrim(c)));this._.output.push(c)},comment:function(c){this._.indent&&this.indentation();this._.output.push("\x3c!--",c,"--\x3e")},lineBreak:function(){!this._.inPre&&
0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(c,k){var h=this._.rules[c];h?CKEDITOR.tools.extend(h,k,!0):this._.rules[c]=k}}}),function(){CKEDITOR.plugins.add("iframe",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+
CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(c){var k=c.lang.iframe,h="iframe[align,longdesc,tabindex,frameborder,height,name,scrolling,src,title,width,sandbox]";c.plugins.dialogadvtab&&(h+=";iframe"+c.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1}));CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");c.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",
{allowedContent:h,requiredContent:"iframe"}));c.ui.addButton&&c.ui.addButton("Iframe",{label:k.toolbar,command:"iframe",toolbar:"insert,80"});c.on("doubleclick",function(c){var a=c.data.element;a.is("img")&&"iframe"==a.data("cke-real-element-type")&&(c.data.dialog="iframe")});c.addMenuItems&&c.addMenuItems({iframe:{label:k.title,command:"iframe",group:"image"}});c.contextMenu&&c.contextMenu.addListener(function(c){if(c&&c.is("img")&&"iframe"==c.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},
afterInit:function(c){var k=c.dataProcessor;(k=k&&k.dataFilter)&&k.addRules({elements:{iframe:function(h){var f=c.plugins.iframe._.getIframeAttributes(c,h);void 0!==f&&(h.attributes=CKEDITOR.tools.object.merge(h.attributes,f));return c.createFakeParserElement(h,"cke_iframe","iframe",!0)}}})},_:{getIframeAttributes:function(c,k){var h=c.config.iframe_attributes;if("function"===typeof h)return h(k);if("object"===typeof h)return h}}})}(),CKEDITOR.config.iframe_attributes={sandbox:""},CKEDITOR.plugins.add("iframedialog",
{requires:"dialog",onLoad:function(){CKEDITOR.dialog.addIframe=function(c,k,h,f,a,b,d){h={type:"iframe",src:h,width:"100%",height:"100%"};h.onContentLoad="function"==typeof b?b:function(){var a=this.getElement().$.contentWindow;if(a.onDialogEvent){var b=this.getDialog(),d=function(b){return a.onDialogEvent(b)};b.on("ok",d);b.on("cancel",d);b.on("resize",d);b.on("hide",function(a){b.removeListener("ok",d);b.removeListener("cancel",d);b.removeListener("resize",d);a.removeListener()});a.onDialogEvent({name:"load",
sender:this,editor:b._.editor})}};var l={title:k,minWidth:f,minHeight:a,contents:[{id:"iframe",label:k,expand:!0,elements:[h],style:"width:"+h.width+";height:"+h.height}]},e;for(e in d)l[e]=d[e];this.add(c,function(){return l})};(function(){var c=function(c,h,f){if(!(3>arguments.length)){var a=this._||(this._={}),b=h.onContentLoad&&CKEDITOR.tools.bind(h.onContentLoad,this),d=CKEDITOR.tools.cssLength(h.width),l=CKEDITOR.tools.cssLength(h.height);a.frameId=CKEDITOR.tools.getNextId()+"_iframe";c.on("load",
function(){CKEDITOR.document.getById(a.frameId).getParent().setStyles({width:d,height:l})});var e={src:"%2",id:a.frameId,frameborder:0,allowtransparency:!0},m=[];"function"==typeof h.onContentLoad&&(e.onload="CKEDITOR.tools.callFunction(%1);");CKEDITOR.ui.dialog.uiElement.call(this,c,h,m,"iframe",{width:d,height:l},e,"");f.push('\x3cdiv style\x3d"width:'+d+";height:"+l+';" id\x3d"'+this.domId+'"\x3e\x3c/div\x3e');m=m.join("");c.on("show",function(){var d=CKEDITOR.document.getById(a.frameId).getParent(),
c=CKEDITOR.tools.addFunction(b),c=m.replace("%1",c).replace("%2",CKEDITOR.tools.htmlEncode(h.src));d.setHtml(c)})}};c.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.dialog.addUIElement("iframe",{build:function(k,h,f){return new c(k,h,f)}})})()}}),function(){function c(c,f){f||(f=c.getSelection().getSelectedElement());if(f&&f.is("img")&&!f.data("cke-realelement")&&!f.isReadOnly())return f}function k(c){var f=c.getStyle("float");if("inherit"==f||"none"==f)f=0;f||(f=c.getAttribute("align"));return f}
CKEDITOR.plugins.add("image",{requires:"dialog",init:function(h){if(!h.plugins.detectConflict("image",["easyimage","image2"])){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var f="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(h,"image","advanced")&&(f="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");h.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:f,requiredContent:"img[alt,src]",
contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));h.ui.addButton&&h.ui.addButton("Image",{label:h.lang.common.image,command:"image",toolbar:"insert,10"});h.on("doubleclick",function(a){var b=a.data.element;!b.is("img")||b.data("cke-realelement")||b.isReadOnly()||(a.data.dialog="image")});h.addMenuItems&&h.addMenuItems({image:{label:h.lang.image.menu,command:"image",group:"image"}});h.contextMenu&&
h.contextMenu.addListener(function(a){if(c(h,a))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(h){function f(a){var b=h.getCommand("justify"+a);if(b){if("left"==a||"right"==a)b.on("exec",function(b){var f=c(h),e;f&&(e=k(f),e==a?(f.removeStyle("float"),a==k(f)&&f.removeAttribute("align")):f.setStyle("float",a),b.cancel())});b.on("refresh",function(b){var f=c(h);f&&(f=k(f),this.setState(f==a?CKEDITOR.TRISTATE_ON:"right"==a||"left"==a?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}
h.plugins.image2||(f("left"),f("right"),f("center"),f("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,"use strict",function(){function c(a){function d(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget),this.deflated=!0)}function c(){var b=a.editable(),d=a.document;if(this.deflated)this.widget=a.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,b)).block&&(b=d.createElement(a.activeEnterMode==
CKEDITOR.ENTER_P?"p":"div"),b.replace(this.widget.wrapper),this.widget.wrapper.move(b)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var f=this.widget,b=e,d=f.wrapper,g=f.data.align,f=f.data.hasCaption;if(b){for(var h=3;h--;)d.removeClass(b[h]);"center"==g?f&&d.addClass(b[1]):"none"!=g&&d.addClass(b[v[g]])}else"center"==g?(f?d.setStyle("text-align","center"):d.removeStyle("text-align"),d.removeStyle("float")):("none"==g?d.removeStyle("float"):d.setStyle("float",
g),d.removeStyle("text-align"))}}var e=a.config.image2_alignClasses,f=a.config.image2_captionedClass;return{allowedContent:m(a),requiredContent:"img[src,alt]",features:g(a),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var b=this.features;
this.data.hasCaption&&!a.filter.checkFeature(b.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||a.filter.checkFeature(b.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:d,inflate:c});this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&&delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&
!this.oldData.hasCaption&&this.data.hasCaption)for(var e in this.data.classes)this.parts.image.removeClass(e);if(a.filter.checkFeature(b.dimension)){b=this.data;b={width:b.width,height:b.height};e=this.parts.image;for(var f in b)b[f]?e.setAttribute(f,b[f]):e.removeAttribute(f)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var d=CKEDITOR.plugins.image2,c=this.parts.image,f=this.ready?d.checkHasNaturalRatio(c):!0,f={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||
"",width:c.getAttribute("width")||"",height:c.getAttribute("height")||"",lock:void 0!==a.config.image2_defaultLockRatio?a.config.image2_defaultLockRatio:f},g=c.getAscendant("a");g&&this.wrapper.contains(g)&&(this.parts.link=g);f.align||(c=f.hasCaption?this.element:c,e?(c.hasClass(e[0])?f.align="left":c.hasClass(e[2])&&(f.align="right"),f.align?c.removeClass(e[v[f.align]]):f.align="none"):(f.align=c.getStyle("float")||"none",c.removeStyle("float")));a.plugins.link&&this.parts.link&&(f.link=d.getLinkAttributesParser()(a,
this.parts.link),(c=f.link.advanced)&&c.advCSSClasses&&(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(f.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(f);a.filter.checkFeature(this.features.dimension)&&!0!==a.config.image2_disableResizer&&b(this);this.shiftState=d.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF;if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=
CKEDITOR.TRISTATE_OFF})},addClass:function(a){n(this).addClass(a)},hasClass:function(a){return n(this).hasClass(a)},removeClass:function(a){n(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+[].concat(f,e).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:k(a),downcast:h(a),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||"")+" "+this.pathName)}}}
function k(b){var c=f(b),d=b.config.image2_captionedClass;return function(b,e){var f={width:1,height:1},g=b.name,h;if(!b.attributes["data-cke-realelement"]&&(c(b)?("div"==g&&(h=b.getFirst("figure"))&&(b.replaceWith(h),b=h),e.align="center",h=b.getFirst("img")||b.getFirst("a").getFirst("img")):"figure"==g&&b.hasClass(d)?h=b.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:a(b)&&(h="a"==b.name?b.children[0]:b),h)){for(var k in f)(f=h.attributes[k])&&
f.match(r)&&delete h.attributes[k];return b}}}function h(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var f=a.getFirst("span");f&&f.replaceWith(f.getFirst({img:1,a:1}))}e&&"none"!=e&&(f=CKEDITOR.tools.parseCssText(d.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1,right:1}&&(b?c.addClass(b[v[e]]):f["float"]=
e),b||CKEDITOR.tools.isEmpty(f)||(d.style=CKEDITOR.tools.writeCssText(f)));return a}}function f(b){var c=b.config.image2_captionedClass,d=b.config.image2_alignClasses,e={figure:1,a:1,img:1};return function(f){if(!(f.name in{div:1,p:1}))return!1;var g=f.children;if(1!==g.length)return!1;g=g[0];if(!(g.name in e))return!1;if("p"==f.name){if(!a(g))return!1}else if("figure"==g.name){if(!g.hasClass(c))return!1}else if(b.enterMode==CKEDITOR.ENTER_P||!a(g))return!1;return(d?f.hasClass(d[1]):"center"==CKEDITOR.tools.parseCssText(f.attributes.style||
"",!0)["text-align"])?!0:!1}}function a(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function b(a){var b=a.editor,c=b.editable(),d=b.document,e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("​",d));if(a.inline)a.wrapper.append(e);else{var f=a.parts.link||a.parts.image,g=f.getParent(),h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(f);h.append(e);
a.element.append(h,!0);g.is("span")&&g.remove()}e.on("mousedown",function(f){function g(a,b,c){var e=CKEDITOR.document,f=[];d.equals(e)||f.push(e.on(a,b));f.push(d.on(a,b));if(c)for(a=f.length;a--;)c.push(f.pop())}function h(){S=p+w*T;U=Math.round(S/v)}function k(){U=z-fa;S=Math.round(U*v)}var l=a.parts.image,m=function(){var a=b.config.image2_maxSize,c;if(!a)return null;a=CKEDITOR.tools.copy(a);c=CKEDITOR.plugins.image2.getNatural(l);a.width=Math.max("natural"===a.width?c.width:a.width,15);a.height=
Math.max("natural"===a.height?c.height:a.height,15);return a}(),w="right"==a.data.align?-1:1,n=f.data.$.screenX,x=f.data.$.screenY,p=l.$.clientWidth,z=l.$.clientHeight,v=p/z,r=[],M="cke_image_s"+(~w?"e":"w"),W,S,U,ea,T,fa,ga;b.fire("saveSnapshot");g("mousemove",function(a){W=a.data.$;T=W.screenX-n;fa=x-W.screenY;ga=Math.abs(T/fa);1==w?0>=T?0>=fa?h():ga>=v?h():k():0>=fa?ga>=v?k():h():k():0>=T?0>=fa?ga>=v?k():h():k():0>=fa?h():ga>=v?h():k();a=m&&(S>m.width||U>m.height);15>S||15>U||a||(ea={width:S,height:U},
l.setAttributes(ea))},r);g("mouseup",function(){for(var d;d=r.pop();)d.removeListener();c.removeClass(M);e.removeClass("cke_image_resizing");ea&&(a.setData(ea),b.fire("saveSnapshot"));ea=!1},r);c.addClass(M);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function d(a){var b=[],c;return function(d){var f=a.getCommand("justify"+d);if(f){b.push(function(){f.refresh(a,a.elementPath())});if(d in{right:1,left:1,center:1})f.on("exec",
function(c){var f=e(a);if(f){f.setData("align",d);for(f=b.length;f--;)b[f]();c.cancel()}});f.on("refresh",function(b){var f=e(a),g={right:1,left:1,center:1};f&&(void 0===c&&(c=a.filter.checkFeature(a.widgets.registered.image.features.align)),c?this.setState(f.data.align==d?CKEDITOR.TRISTATE_ON:d in g?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function l(a){if(a.plugins.link){var b=CKEDITOR.on("dialogDefinition",function(b){b=b.data;
if("link"==b.name){b=b.definition;var c=b.onShow,d=b.onOk;b.onShow=function(){var b=e(a),d=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),d.hide()):(d.show(),c.apply(this,arguments))};b.onOk=function(){var b=e(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var c={};this.commitContent(c);b.setData("link",c)}else d.apply(this,arguments)}}});a.on("destroy",function(){b.removeListener()});
a.getCommand("unlink").on("exec",function(b){var c=e(a);c&&c.parts.link&&(c.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())});a.getCommand("unlink").on("refresh",function(b){var c=e(a);c&&(this.setState(c.data.link||c.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}function e(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function m(a){var b=a.config.image2_alignClasses;a={div:{match:f(a)},p:{match:f(a)},img:{attributes:"!src,alt,width,height"},
figure:{classes:"!"+a.config.image2_captionedClass},figcaption:!0};b?(a.div.classes=b[1],a.p.classes=a.div.classes,a.img.classes=b[0]+","+b[2],a.figure.classes+=","+a.img.classes):(a.div.styles="text-align",a.p.styles="text-align",a.img.styles="float",a.figure.styles="float,display");return a}function g(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a?"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}}function n(a){return a.data.hasCaption?
a.element:a.parts.image}var p=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),v={left:0,center:1,right:2},r=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')},
init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,d=a.lang.image2,e=c(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;e.pathName=d.pathName;e.editables.caption.pathName=d.pathNameCaption;a.widgets.add("image",e);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:d.menu,command:"image",
group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=d(a),e;for(e in b)c(e);l(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,f){var g={};e?g.attributes={"class":e[1]}:g.styles={"text-align":"center"};g=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",g);c(g,f);f.move(g);return g}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);
d.remove();g.insertElementIntoRange(b,e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,f=a.config.image2_captionedClass,g=a.editable(),h=["hasCaption","align","link"],k={align:function(c,d,f){var g=c.element;c.changed.align?c.newData.hasCaption||("center"==f&&(c.deflate(),c.element=b(a,g)),c.changed.hasCaption||"center"!=d||"center"==f||(c.deflate(),d=g.findOne("a,img"),d.replace(g),c.element=d)):"center"==f&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element=
b(a,g));!e&&g.is("figure")&&("center"==f?g.setStyle("display","inline-block"):g.removeStyle("display"))},hasCaption:function(b,e,g){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),g?(g=CKEDITOR.dom.element.createFromHtml(p.output({captionedClass:f,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(g,b.element),e.replace(g.findOne("img")),b.element=g):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var f=b.element.is("img")?
b.element:b.element.findOne("img"),g=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(f),f.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||g).setAttributes(e.set),e.removed.length&&(k||g).removeAttributes(e.removed)):(e=g.findOne("img"),e.replace(g),k=e);h&&(b.element=k)}}};return function(a){var b,c;
a.changed={};for(c=0;c<h.length;c++)b=h[c],a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:!1;for(c=0;c<h.length;c++)b=h[c],k[b](a,a.oldData?a.oldData[b]:null,a.newData[b]);a.inflate()}},checkHasNaturalRatio:function(a){var b=a.$;a=this.getNatural(a);return Math.round(b.clientWidth/a.width*a.height)==b.clientHeight||Math.round(b.clientHeight/a.height*a.width)==b.clientWidth},getNatural:function(a){if(a.$.naturalWidth)a={width:a.$.naturalWidth,height:a.$.naturalHeight};else{var b=new Image;b.src=
a.getAttribute("src");a={width:b.width,height:b.height}}return a},getLinkAttributesGetter:function(){return CKEDITOR.plugins.link.getLinkAttributes},getLinkAttributesParser:function(){return CKEDITOR.plugins.link.parseLinkAttributes}}}(),CKEDITOR.config.image2_captionedClass="image",function(){function c(c,a){var b,d;a.on("refresh",function(a){var b=[k],c;for(c in a.data.states)b.push(a.data.states[c]);this.setState(CKEDITOR.tools.search(b,h)?h:k)},a,null,100);a.on("exec",function(a){b=c.getSelection();
d=b.createBookmarks(1);a.data||(a.data={});a.data.done=!1},a,null,0);a.on("exec",function(){c.forceNextSelectionCheck();b.selectBookmarks(d)},a,null,100)}var k=CKEDITOR.TRISTATE_DISABLED,h=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(f){var a=CKEDITOR.plugins.indent.genericDefinition;c(f,f.addCommand("indent",new a(!0)));c(f,f.addCommand("outdent",new a));f.ui.addButton&&(f.ui.addButton("Indent",{label:f.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),
f.ui.addButton("Outdent",{label:f.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));f.on("dirChanged",function(a){var c=f.createRange(),h=a.data.node;c.setStartBefore(h);c.setEndAfter(h);for(var e=new CKEDITOR.dom.walker(c),k;k=e.next();)if(k.type==CKEDITOR.NODE_ELEMENT)if(!k.equals(h)&&k.getDirection())c.setStartAfter(k),e=new CKEDITOR.dom.walker(c);else{var g=f.config.indentClasses;if(g)for(var n="ltr"==a.data.dir?["_rtl",""]:["","_rtl"],p=0;p<g.length;p++)k.hasClass(g[p]+
n[0])&&(k.removeClass(g[p]+n[0]),k.addClass(g[p]+n[1]));g=k.getStyle("margin-right");n=k.getStyle("margin-left");g?k.setStyle("margin-left",g):k.removeStyle("margin-left");n?k.setStyle("margin-right",n):k.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(c){this.isIndent=!!c;this.startDisabled=!this.isIndent},specificDefinition:function(c,a,b){this.name=a;this.editor=c;this.jobs={};this.enterBr=c.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!b;this.relatedGlobal=
b?"indent":"outdent";this.indentKey=b?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(c,a){c.on("pluginsLoaded",function(){for(var b in a)(function(a,b){var c=a.getCommand(b.relatedGlobal),f;for(f in b.jobs)c.on("exec",function(c){c.data.done||(a.fire("lockSnapshot"),b.execJob(a,f)&&(c.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,f),c.on("refresh",function(c){c.data.states||(c.data.states={});c.data.states[b.name+"@"+f]=b.refreshJob(a,
f,c.data.path)},this,null,f);a.addFeature(b)})(this,a[b])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(c,a){var b=this.jobs[a];if(b.state!=k)return b.exec.call(this,c)},refreshJob:function(c,a,b){a=this.jobs[a];c.activeFilter.checkFeature(this)?a.state=a.refresh.call(this,c,b):a.state=k;return a.state},getContext:function(c){return c.contains(this.context)}}}(),function(){function c(a,
b,c){if(!a.getCustomData("indent_processed")){var f=this.editor,g=this.isIndent;if(b){f=a.$.className.match(this.classNameRegex);c=0;f&&(f=f[1],c=CKEDITOR.tools.indexOf(b,f)+1);if(0>(c+=g?1:-1))return;c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<c&&a.addClass(b[c-1])}else{b=k(a,c);c=parseInt(a.getStyle(b),10);var h=f.config.indentOffset||40;isNaN(c)&&(c=0);c+=(g?1:-1)*h;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/h)*h;a.setStyle(b,
c?c+(f.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function k(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var h=CKEDITOR.dtd.$listItem,f=CKEDITOR.dtd.$list,a=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(d){function l(){e.specificDefinition.apply(this,arguments);this.allowedContent=
{"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:m?null:"margin-left,margin-right",classes:m||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=
!0);this.requiredContent=(this.enterBr?"div":"p")+(m?"("+m.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(c,d){var e=d.block||d.blockLimit;if(!e.is(h))var f=e.getAscendant(h),e=f&&d.contains(f)||e;e.is(h)&&(e=e.getParent());if(this.enterBr||this.getContext(d)){if(m){var f=m,e=e.$.className.match(this.classNameRegex),l=this.isIndent,f=e?l?e[1]!=f.slice(-1):!0:l;return f?b:a}return this.isIndent?b:e?CKEDITOR[0>=(parseInt(e.getStyle(k(e)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:a}return a},
exec:function(a){var b=a.getSelection(),b=b&&b.getRanges()[0],d;if(d=a.elementPath().contains(f))c.call(this,d,m);else for(b=b.createIterator(),a=a.config.enterMode,b.enforceRealBlocks=!0,b.enlargeBr=a!=CKEDITOR.ENTER_BR;d=b.getNextParagraph(a==CKEDITOR.ENTER_P?"p":"div");)d.isReadOnly()||c.call(this,d,m);return!0}}}}var e=CKEDITOR.plugins.indent,m=d.config.indentClasses;e.registerCommands(d,{indentblock:new l(d,"indentblock",!0),outdentblock:new l(d,"outdentblock")});CKEDITOR.tools.extend(l.prototype,
e.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:m?new RegExp("(?:^|\\s+)("+m.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function c(a){function b(e){for(var k=p.startContainer,u=p.endContainer;k&&!k.getParent().equals(e);)k=k.getParent();for(;u&&!u.getParent().equals(e);)u=u.getParent();if(!k||!u)return!1;for(var q=[],z=!1;!z;)k.equals(u)&&(z=!0),q.push(k),k=k.getNext();if(1>q.length)return!1;k=e.getParents(!0);for(u=
0;u<k.length;u++)if(k[u].getName&&f[k[u].getName()]){e=k[u];break}for(var k=c.isIndent?1:-1,u=q[0],q=q[q.length-1],z=CKEDITOR.plugins.list.listToArray(e,d),x=z[q.getCustomData("listarray_index")].indent,u=u.getCustomData("listarray_index");u<=q.getCustomData("listarray_index");u++)if(z[u].indent+=k,0<k){for(var w=z[u].parent,A=u-1;0<=A;A--)if(z[A].indent===k){w=z[A].parent;break}z[u].parent=new CKEDITOR.dom.element(w.getName(),w.getDocument())}for(u=q.getCustomData("listarray_index")+1;u<z.length&&
z[u].indent>x;u++)z[u].indent+=k;k=CKEDITOR.plugins.list.arrayToList(z,d,null,a.config.enterMode,e.getDirection());if(!c.isIndent){var v;if((v=e.getParent())&&v.is("li"))for(var q=k.listNode.getChildren(),C=[],r,u=q.count()-1;0<=u;u--)(r=q.getItem(u))&&r.is&&r.is("li")&&C.push(r)}k&&k.listNode.replace(e);if(C&&C.length)for(u=0;u<C.length;u++){for(r=e=C[u];(r=r.getNext())&&r.is&&r.getName()in f;)CKEDITOR.env.needsNbspFiller&&!e.getFirst(h)&&e.append(p.document.createText(" ")),e.append(r);e.insertAfter(v)}k&&
a.fire("contentDomInvalidated");return!0}for(var c=this,d=this.database,f=this.context,p,v=a.getSelection(),v=(v&&v.getRanges()).createIterator();p=v.getNextRange();){for(var r=p.getCommonAncestor();r&&(r.type!=CKEDITOR.NODE_ELEMENT||!f[r.getName()]);){if(a.editable().equals(r)){r=!1;break}r=r.getParent()}r||(r=p.startPath().contains(f))&&p.setEndAt(r,CKEDITOR.POSITION_BEFORE_END);if(!r){var q=p.getEnclosedNode();q&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in f&&(p.setStartAt(q,CKEDITOR.POSITION_AFTER_START),
p.setEndAt(q,CKEDITOR.POSITION_BEFORE_END),r=q)}r&&p.startContainer.type==CKEDITOR.NODE_ELEMENT&&p.startContainer.getName()in f&&(q=new CKEDITOR.dom.walker(p),q.evaluator=k,p.startContainer=q.next());r&&p.endContainer.type==CKEDITOR.NODE_ELEMENT&&p.endContainer.getName()in f&&(q=new CKEDITOR.dom.walker(p),q.evaluator=k,p.endContainer=q.previous());if(r)return b(r)}return 0}function k(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function h(b){return f(b)&&a(b)}var f=CKEDITOR.dom.walker.whitespaces(!0),
a=CKEDITOR.dom.walker.bookmark(!1,!0),b=CKEDITOR.TRISTATE_DISABLED,d=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(a){function e(a){f.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];a.on("key",function(b){var c=a.elementPath();if("wysiwyg"==a.mode&&b.data.keyCode==this.indentKey&&c){var d=this.getContext(c);!d||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d)||(a.execCommand(this.relatedGlobal),b.cancel())}},
this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,c){var e=this.getContext(c),f=CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,e);return e&&this.isIndent&&!f?d:b}:function(a,c){return!this.getContext(c)||this.isIndent?b:d},exec:CKEDITOR.tools.bind(c,this)}}var f=CKEDITOR.plugins.indent;f.registerCommands(a,{indentlist:new e(a,"indentlist",!0),outdentlist:new e(a,"outdentlist")});CKEDITOR.tools.extend(e.prototype,f.specificDefinition.prototype,{context:{ol:1,ul:1}})}});
CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var d=b.contains(k);c||(c=b.contains(a));return c&&d&&d.equals(c.getFirst(k))}}(),function(){function c(c,a){var b;if(a)b=c.getComputedStyle("text-align");else{for(;!c.hasAttribute||!c.hasAttribute("align")&&!c.getStyle("text-align");){b=c.getParent();if(!b)break;c=b}b=c.getStyle("text-align")||c.getAttribute("align")||""}b&&(b=b.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!b&&a&&(b="rtl"==c.getComputedStyle("direction")?
"right":"left");return b}function k(c,a,b){this.editor=c;this.name=a;this.value=b;this.context="p";a=c.config.justifyClasses;var d=c.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(a){switch(b){case "left":this.cssClassName=a[0];break;case "center":this.cssClassName=a[1];break;case "right":this.cssClassName=a[2];break;case "justify":this.cssClassName=a[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+a.join("|")+")(?\x3d$|\\s)");this.requiredContent=d+"("+this.cssClassName+")"}else this.requiredContent=
d+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};c.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function h(c){var a=c.editor,b=a.createRange();b.setStartBefore(c.data.node);b.setEndAfter(c.data.node);for(var d=new CKEDITOR.dom.walker(b),h;h=d.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(c.data.node)&&h.getDirection())b.setStartAfter(h),d=
new CKEDITOR.dom.walker(b);else{var e=a.config.justifyClasses;e&&(h.hasClass(e[0])?(h.removeClass(e[0]),h.addClass(e[2])):h.hasClass(e[2])&&(h.removeClass(e[2]),h.addClass(e[0])));e=h.getStyle("text-align");"left"==e?h.setStyle("text-align","right"):"right"==e&&h.setStyle("text-align","left")}}k.prototype={exec:function(f){var a=f.getSelection(),b=f.config.enterMode;if(a){for(var d=a.createBookmarks(),h=a.getRanges(),e=this.cssClassName,k,g,n=f.config.useComputedState,p=h.length-1;0<=p;p--)for(k=
h[p].createIterator(),k.enlargeBr=b!=CKEDITOR.ENTER_BR;g=k.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)if(!g.isReadOnly()){var v=g.getName(),r;r=f.activeFilter.check(v+"{text-align}");if((v=f.activeFilter.check(v+"("+e+")"))||r){g.removeAttribute("align");g.removeStyle("text-align");var q=e&&(g.$.className=CKEDITOR.tools.ltrim(g.$.className.replace(this.cssClassRegex,""))),t=this.state==CKEDITOR.TRISTATE_OFF&&(!n||c(g,!0)!=this.value);e&&v?t?g.addClass(e):q||g.removeAttribute("class"):t&&r&&
g.setStyle("text-align",this.value)}}f.focus();f.forceNextSelectionCheck();a.selectBookmarks(d)}},refresh:function(f,a){var b=a.block||a.blockLimit,d=b.getName(),h=b.equals(f.editable()),d=this.cssClassName?f.activeFilter.check(d+"("+this.cssClassName+")"):f.activeFilter.check(d+"{text-align}");h&&!CKEDITOR.dtd.$list[a.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!h&&d?this.setState(c(b,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};
CKEDITOR.plugins.add("justify",{init:function(c){if(!c.blockless){var a=new k(c,"justifyleft","left"),b=new k(c,"justifycenter","center"),d=new k(c,"justifyright","right"),l=new k(c,"justifyblock","justify");c.addCommand("justifyleft",a);c.addCommand("justifycenter",b);c.addCommand("justifyright",d);c.addCommand("justifyblock",l);c.ui.addButton&&(c.ui.addButton("JustifyLeft",{isToggle:!0,label:c.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),c.ui.addButton("JustifyCenter",{isToggle:!0,
label:c.lang.common.center,command:"justifycenter",toolbar:"align,20"}),c.ui.addButton("JustifyRight",{isToggle:!0,label:c.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),c.ui.addButton("JustifyBlock",{isToggle:!0,label:c.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));c.on("dirChanged",h)}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var c=function(c){var h=this._,f=CKEDITOR.document.getById(h.id),a=h.menu;h.state!==CKEDITOR.TRISTATE_DISABLED&&
(h.on&&a?a.hide():(h.previousState=h.state,a||(a=h.menu=new CKEDITOR.menu(c,{panel:{className:"cke_menu_panel",attributes:{"aria-label":c.lang.common.options}}}),a.onHide=CKEDITOR.tools.bind(function(){var a=this.command?c.getCommand(this.command).modes:this.modes;this.setState(!a||a[c.mode]?h.previousState:CKEDITOR.TRISTATE_DISABLED);h.on=0;f.setAttribute("aria-expanded","false")},this),this.onMenu&&a.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),h.on=1,f.setAttribute("aria-expanded",
"true"),setTimeout(function(){a.show(CKEDITOR.document.getById(h.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(k){delete k.panel;this.base(k);this.hasArrow="menu";this.click=c},statics:{handler:{create:function(c){return new CKEDITOR.ui.menuButton(c)}}}})},beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",
init:function(c){var k=c.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],h=this,f=c.lang.language,a={},b,d,l,e;c.addCommand("language",{allowedContent:"span[!lang,dir]",requiredContent:"span[lang]",contextSensitive:!0,exec:function(b,c){var d=a["language_"+c];if(d)b[d.style.checkActive(b.elementPath(),b)?"removeStyle":"applyStyle"](d.style)},refresh:function(a){this.setState(h.getCurrentLangElement(a)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(e=0;e<k.length;e++)b=k[e].split(":"),
d=b[0],l="language_"+d,a[l]={label:b[1],langId:d,group:"language",order:e,ltr:"rtl"!=(""+b[2]).toLowerCase(),onClick:function(){c.execCommand("language",this.langId)},role:"menuitemcheckbox"},a[l].style=new CKEDITOR.style({element:"span",attributes:{lang:d,dir:a[l].ltr?"ltr":"rtl"}});a.language_remove={label:f.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:a.length,onClick:function(){var a=h.getCurrentLangElement(c);a&&c.execCommand("language",a.getAttribute("lang"))}};c.addMenuGroup("language",
1);c.addMenuGroup("language_remove");c.addMenuItems(a);c.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:f.button,allowedContent:"span[!lang,dir]",requiredContent:"span[lang]",toolbar:"bidi,30",command:"language",contentTransformations:[[{element:"span",left:function(a){return a.attributes.lang&&(!a.attributes.dir||""===a.attributes.dir)},right:function(a){var b=CKEDITOR.tools.object.keys(CKEDITOR.lang.rtl),b=-1!==CKEDITOR.tools.array.indexOf(b,a.attributes.lang)?"rtl":"ltr";a.attributes.dir=b}}]],
onMenu:function(){var b={},d=h.getCurrentLangElement(c),e;for(e in a)b[e]=CKEDITOR.TRISTATE_OFF;b.language_remove=d?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;d&&(b["language_"+d.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return b}});c.addRemoveFormatFilter&&c.addRemoveFormatFilter(function(a){return!(a.is("span")&&a.getAttribute("dir")&&a.getAttribute("lang"))})},getCurrentLangElement:function(c){var k=c.elementPath();c=k&&k.elements;var h;if(k)for(var f=0;f<c.length;f++)k=c[f],!h&&"span"==
k.getName()&&k.hasAttribute("lang")&&(h=k);return h}})}(),function(){function c(a,b,c,d){for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,l,g=0;g<f.length;g++){var m=f[g].getCustomData("listarray_index");k=e[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,
{start:1,type:1}),l.removeStyle("list-style-type"),e[m].parent=l)}c=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode);for(var n,e=c.listNode.getChildCount(),g=0;g<e&&(n=c.listNode.getChild(g));g++)n.getName()==this.type&&d.push(n);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function k(a,b,c){var d=b.contents,e=b.root.getDocument(),f=[];if(1==d.length&&d[0].equals(b.root)){var g=e.createElement("div");d[0].moveChildren&&d[0].moveChildren(g);d[0].append(g);d[0]=g}b=b.contents[0].getParent();
for(g=0;g<d.length;g++)b=b.getCommonAncestor(d[g].getParent());a=a.config.useComputedState;for(var h,k,g=0;g<d.length;g++)for(var l=d[g],m;m=l.getParent();){if(m.equals(b)){f.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>f.length)){d=f[f.length-1].getNext();g=e.createElement(this.type);for(c.push(g);f.length;)c=f.shift(),a=e.createElement("li"),l=c,l.is("pre")||r.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),
h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function h(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,
c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<f.length;g++)h=f[g].getCustomData("listarray_index"),e[h].indent=-1;for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,
b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function f(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function a(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](q);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function b(b){function c(d){var e=b[d?"getPrevious":"getNext"](p);e&&e.type==CKEDITOR.NODE_ELEMENT&&
e.is(b.getName())&&(a(b,e,null,!d),b.remove(),b=e)}c();c(1)}function d(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(c,d,f){c.fire("saveSnapshot");f.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var g=f.extractContents();d.trim(!1,!0);var h=d.createBookmark(),k=new CKEDITOR.dom.elementPath(d.startContainer),l=k.block,k=k.lastElement.getAscendant("li",1)||l,m=new CKEDITOR.dom.elementPath(f.startContainer),
n=m.contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():m&&(l=m.getPrevious(p))&&v(l)&&l.remove();(l=g.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=d.startContainer.getChild(d.startOffset))?g.insertBefore(l):d.startContainer.append(g);n&&(g=e(n))&&(k.contains(n)?(a(g,n.getParent(),n),g.remove()):k.append(g));for(;f.checkStartOfBlock()&&f.checkEndOfBlock();){m=f.startPath();g=m.block;if(!g)break;g.is("li")&&(k=g.getParent(),g.equals(k.getLast(p))&&
g.equals(k.getFirst(p))&&(g=k));f.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove()}f=f.clone();g=c.editable();f.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=function(a){return p(a)&&!v(a)};(f=f.next())&&f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in CKEDITOR.dtd.$list&&b(f);d.moveToBookmark(h);d.select();c.fire("saveSnapshot")}function e(a){return(a=a.getLast(p))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in m?a:null}var m={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),
n=CKEDITOR.dom.walker.bookmark(),p=function(a){return!(g(a)||n(a))},v=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,e){if(!m[a.getName()])return[];d||(d=0);c||(c=[]);for(var f=0,g=a.getChildCount();f<g;f++){var h=a.getChild(f);h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(h,b,c,d+1);if("li"==h.$.nodeName.toLowerCase()){var k={parent:a,indent:d,element:h,contents:[]};e?k.grandparent=e:(k.grandparent=a.getParent(),
k.grandparent&&"li"==k.grandparent.$.nodeName.toLowerCase()&&(k.grandparent=k.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,h,"listarray_index",c.length);c.push(k);for(var l=0,n=h.getChildCount(),q;l<n;l++)q=h.getChild(l),q.type==CKEDITOR.NODE_ELEMENT&&m[q.getName()]?CKEDITOR.plugins.list.listToArray(q,b,c,d+1,k.grandparent):k.contents.push(q)}}return c},arrayToList:function(a,b,c,d,e){c||(c=0);if(!a||a.length<c+1)return null;for(var f,g=a[c].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(g),
k=null,l=c,q=Math.max(a[c].indent,0),v=null,r,G,L=d==CKEDITOR.ENTER_P?"p":"div";;){var H=a[l];f=H.grandparent;r=H.element.getDirection(1);if(H.indent==q){k&&a[l].parent.getName()==k.getName()||(k=a[l].parent.clone(!1,1),e&&k.setAttribute("dir",e),h.append(k));v=k.append(H.element.clone(0,1));r!=k.getDirection(1)&&v.setAttribute("dir",r);for(f=0;f<H.contents.length;f++)v.append(H.contents[f].clone(1,1));l++}else if(H.indent==Math.max(q,0)+1)H=a[l-1].element.getDirection(1),l=CKEDITOR.plugins.list.arrayToList(a,
null,l,d,H!=r?r:null),!v.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=g.$.documentMode&&v.append(g.createText(" ")),v.append(l.listNode),l=l.nextIndex;else if(-1==H.indent&&!c&&f){m[f.getName()]?(v=H.element.clone(!1,!0),r!=f.getDirection(1)&&v.setAttribute("dir",r)):v=new CKEDITOR.dom.documentFragment(g);var k=f.getDirection(1)!=r,F=H.element,P=F.getAttribute("class"),N=F.getAttribute("style"),O=v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||k||N||P),M,W=H.contents.length,S;
for(f=0;f<W;f++)if(M=H.contents[f],n(M)&&1<W)O?S=M.clone(1,1):v.append(M.clone(1,1));else if(M.type==CKEDITOR.NODE_ELEMENT&&M.isBlockBoundary()){k&&!M.getDirection()&&M.setAttribute("dir",r);G=M;var U=F.getAttribute("style");U&&G.setAttribute("style",U.replace(/([^;])$/,"$1;")+(G.getAttribute("style")||""));P&&M.addClass(P);G=null;S&&(v.append(S),S=null);v.append(M.clone(1,1))}else O?(G||(G=g.createElement(L),v.append(G),k&&G.setAttribute("dir",r)),N&&G.setAttribute("style",N),P&&G.setAttribute("class",
P),S&&(G.append(S),S=null),G.append(M.clone(1,1))):v.append(M.clone(1,1));S&&((G||v).append(S),S=null);v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&l!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(r=v.getLast())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br")&&r.remove(),(r=v.getLast(p))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(CKEDITOR.dtd.$block)||v.append(g.createElement("br")));r=v.$.nodeName.toLowerCase();"div"!=r&&"p"!=r||v.appendBogus();h.append(v);k=null;l++}else return null;G=null;if(a.length<=l||Math.max(a[l].indent,
0)<q)break}if(b)for(a=h.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,g=e=d=void 0,d=c.getDirection()))){for(e=c.getParent();e&&!(g=e.getDirection());)e=e.getParent();d==g&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:h,nextIndex:l}}};var r=/^h[1-6]$/,q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);f.prototype={exec:function(a){function d(a){return m[a.root.getName()]&&!e(a.root,[CKEDITOR.NODE_COMMENT])}
function e(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function f(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(a,a.elementPath());var g=a.config,l=a.getSelection(),w=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var n=a.editable();if(n.getFirst(p)){var q=1==w.length&&w[0];(g=q&&q.getEnclosedNode())&&
g.is&&this.type==g.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else g.enterMode==CKEDITOR.ENTER_BR?n.appendBogus():w[0].fixBlock(1,g.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(w)}for(var g=l.createBookmarks(!0),n=[],v={},w=w.createIterator(),r=0;(q=w.getNextRange())&&++r;){var I=q.getBoundaryNodes(),K=I.startNode,G=I.endNode;K.type==CKEDITOR.NODE_ELEMENT&&"td"==K.getName()&&q.setStartAt(I.startNode,CKEDITOR.POSITION_AFTER_START);G.type==CKEDITOR.NODE_ELEMENT&&"td"==G.getName()&&q.setEndAt(I.endNode,
CKEDITOR.POSITION_BEFORE_END);q=q.createIterator();for(q.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;I=q.getNextParagraph();)if(!I.getCustomData("list_block")&&!f(I)){CKEDITOR.dom.element.setMarker(v,I,"list_block",1);for(var L=a.elementPath(I),K=L.elements,G=0,L=L.blockLimit,H,F=K.length-1;0<=F&&(H=K[F]);F--)if(m[H.getName()]&&L.contains(H)){L.removeCustomData("list_group_object_"+r);(K=H.getCustomData("list_group_object"))?K.contents.push(I):(K={root:H,contents:[I]},n.push(K),CKEDITOR.dom.element.setMarker(v,
H,"list_group_object",K));G=1;break}G||(G=L,G.getCustomData("list_group_object_"+r)?G.getCustomData("list_group_object_"+r).contents.push(I):(K={root:G,contents:[I]},CKEDITOR.dom.element.setMarker(v,G,"list_group_object_"+r,K),n.push(K)))}}for(H=[];0<n.length;)K=n.shift(),this.state==CKEDITOR.TRISTATE_OFF?d(K)||(m[K.root.getName()]?c.call(this,a,K,v,H):k.call(this,a,K,H)):this.state==CKEDITOR.TRISTATE_ON&&m[K.root.getName()]&&!d(K)&&h.call(this,a,K,v);for(F=0;F<H.length;F++)b(H[F]);CKEDITOR.dom.element.clearAllMarkers(v);
l.selectBookmarks(g);a.focus()},refresh:function(a,b){var c=b.contains(m,1),d=b.blockLimit||b.root;c&&d.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||(a.addCommand("numberedlist",new f("numberedlist","ol")),a.addCommand("bulletedlist",new f("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{isToggle:!0,label:a.lang.list.numberedlist,
command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{isToggle:!0,label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var c=b.data.domEvent.getKey(),f;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var g=a.getSelection().getRanges()[0],h=g&&g.startPath();if(g&&g.collapsed){var k=8==c,n=a.editable(),q=new CKEDITOR.dom.walker(g.clone());q.evaluator=function(a){return p(a)&&!v(a)};q.guard=function(a,b){return!(b&&
a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=g.clone();if(k){var r;(r=h.contains(m))&&g.checkBoundaryOfElement(r,CKEDITOR.START)&&(r=r.getParent())&&r.is("li")&&(r=e(r))?(f=r,r=r.getPrevious(p),c.moveToPosition(r&&v(r)?r:f,CKEDITOR.POSITION_BEFORE_START)):(q.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),q.range.setEnd(g.startContainer,g.startOffset),(r=q.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&(r.getName()in m||r.is("li"))&&(r.is("li")||(q.range.selectNodeContents(r),q.reset(),q.evaluator=
d,r=q.previous()),f=r,c.moveToElementEditEnd(f),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)l(a,c,g),b.cancel();else{var E=h.contains(m);E&&g.checkBoundaryOfElement(E,CKEDITOR.START)&&(f=E.getFirst(p),g.checkBoundaryOfElement(f,CKEDITOR.START)&&(r=E.getPrevious(p),e(f)?r&&(g.moveToElementEditEnd(r),g.select()):a.execCommand("outdent"),b.cancel()))}}else if(f=h.contains("li")){if(q.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),k=(n=f.getLast(p))&&d(n)?n:f,h=0,(r=q.next())&&
r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in m&&r.equals(n)?(h=1,r=q.next()):g.checkBoundaryOfElement(k,CKEDITOR.END)&&(h=2),h&&r){g=g.clone();g.moveToElementEditStart(r);if(1==h&&(c.optimize(),!c.startContainer.equals(f))){for(f=c.startContainer;f.is(CKEDITOR.dtd.$inline);)E=f,f=f.getParent();E&&c.moveToPosition(E,CKEDITOR.POSITION_AFTER_END)}2==h&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));
l(a,c,g);b.cancel()}}else q.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(r=q.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(m)&&(r=r.getFirst(p),h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(h.block.remove(),g.moveToElementEditStart(r),g.select()):e(r)?(g.moveToElementEditStart(r),g.select()):(g=g.clone(),g.moveToElementEditStart(r),l(a,c,g)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(c){if(!c.blockless){var k;
k=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]});k=c.addCommand("numberedListStyle",k);c.addFeature(k);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");k=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});k=c.addCommand("bulletedListStyle",
k);c.addFeature(k);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");c.addMenuGroup("list",108);c.addMenuItems({numberedlist:{label:c.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:c.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});c.contextMenu.addListener(function(c){if(!c||c.isReadOnly())return null;for(;c;){var f=c.getName();if("ol"==f)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==f)return{bulletedlist:CKEDITOR.TRISTATE_OFF};
c=c.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function c(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(ba(a)||da(a)||p(a))}))}function k(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function h(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=d(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}
function f(a,b,c){z(a,b);z(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function a(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!ba(b)||n(b)&&!p(b)&&!g(a,b)})}function b(a,b,c){return a>b&&a<c}function d(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function l(a){var c=a.doc,d=E('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+
ia+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',c),f=CKEDITOR.getUrl(this.path+"images/"+(I.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");D(d,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[D(E('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',c),{base:ia+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+f+") center no-repeat "+
a.boxColor+";cursor:pointer;"+(I.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(I.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),D(E(X,c),{base:V+"left:0px;border-left-color:"+a.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),D(E(X,c),{base:V+"right:0px;border-right-color:"+
a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){z(a,this);var c=a.holdDistance,d=this.size;return d&&b(a.mouse.y,d.top-c,d.bottom+c)&&b(a.mouse.x,d.left-c,d.right+c)?!0:!1},place:function(){var c=a.view,d=a.editable,e=a.trigger,f=e.upper,g=e.lower,h=f||g,k=h.getParent(),l={};this.trigger=e;f&&z(a,f,!0);g&&z(a,g,!0);z(a,
k,!0);a.inInlineMode&&x(a,!0);k.equals(d)?(l.left=c.scroll.x,l.right=-c.scroll.x,l.width=""):(l.left=h.size.left-h.size.margin.left+c.scroll.x-(a.inInlineMode?c.editable.left+c.editable.border.left:0),l.width=h.size.outerWidth+h.size.margin.left+h.size.margin.right+c.scroll.x,l.right="");f&&g?l.top=f.size.margin.bottom===g.size.margin.top?0|f.size.bottom+f.size.margin.bottom/2:f.size.margin.bottom<g.size.margin.top?f.size.bottom+f.size.margin.bottom:f.size.bottom+f.size.margin.bottom-g.size.margin.top:
f?g||(l.top=f.size.bottom+f.size.margin.bottom):l.top=g.size.top-g.size.margin.top;e.is(O)||b(l.top,c.scroll.y-15,c.scroll.y+5)?(l.top=a.inInlineMode?0:c.scroll.y,this.look(O)):e.is(M)||b(l.top,c.pane.bottom-5,c.pane.bottom+15)?(l.top=a.inInlineMode?c.editable.height+c.editable.padding.top+c.editable.padding.bottom:c.pane.bottom-1,this.look(M)):(a.inInlineMode&&(l.top-=c.editable.top+c.editable.border.top),this.look(W));a.inInlineMode&&(l.top--,l.top+=c.editable.scroll.top,l.left+=c.editable.scroll.left);
for(var m in l)l[m]=CKEDITOR.tools.cssLength(l[m]);this.setStyles(l)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new C("span",a.doc)});for(c=d.lineChildren.length;c--;)d.lineChildren[c].appendTo(d);d.look(W);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(b){d.detach();e(a,function(b){var c=a.line.trigger;b[c.is(H)?"insertBefore":"insertAfter"](c.is(H)?
c.lower:c.upper)},!0);a.editor.focus();I.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});d.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=d}function e(a,b,c){var e=new CKEDITOR.dom.range(a.doc),f=a.editor,g;I.ie&&a.enterMode==CKEDITOR.ENTER_BR?g=a.doc.createText(S):(g=(g=d(a.element,!0))&&g.data("cke-enter-mode")||a.enterMode,g=new C(L[g],a.doc),g.is("br")||a.doc.createText(S).appendTo(g));c&&f.fire("saveSnapshot");b(g);e.moveToPosition(g,
CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([e]);a.hotNode=g;c&&f.fire("saveSnapshot")}function m(b,c){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function f(a){var d=I.ie&&9>I.version?" ":S,g=b.hotNode&&b.hotNode.getText()==d&&b.element.equals(b.hotNode)&&b.lastCmdDirection===!!c;e(b,function(d){g&&b.hotNode&&b.hotNode.remove();d[c?"insertAfter":"insertBefore"](a);d.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});b.lastCmdDirection=!!c});I.ie||b.enterMode==
CKEDITOR.ENTER_BR||b.hotNode.scrollIntoView();b.line.detach()}return function(e){e=e.getSelection().getStartElement();var g;e=e.getAscendant(fa,1);if(!q(b,e)&&e&&!e.equals(b.editable)&&!e.contains(b.editable)){(g=d(e))&&"false"==g.getAttribute("contenteditable")&&(e=g);b.element=e;g=a(b,e,!c);var k;n(g)&&g.is(b.triggers)&&g.is(T)&&(!a(b,g,!c)||(k=a(b,g,!c))&&n(k)&&k.is(b.triggers))?f(g):(k=h(b,e),n(k)&&(a(b,k,!c)?(e=a(b,k,!c))&&n(e)&&e.is(b.triggers)&&f(k):f(k)))}}}()}}function g(a,b){if(!b||b.type!=
CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function p(a){if(!n(a))return!1;var b;(b=v(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function r(a,b){return n(b)?b.is(a.triggers):null}function q(a,b){if(!b)return!1;for(var c=b.getParents(1),d=
c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function t(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ea)});if(!b)return!1;z(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function y(a){var c=a.editable,d=a.mouse,e=a.view,f=a.triggerOffset;x(a);var h=d.y>(a.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),c=c[h?"getLast":"getFirst"](function(a){return!(ba(a)||
da(a))});if(!c)return null;g(a,c)&&(c=a.line.wrap[h?"getPrevious":"getNext"](function(a){return!(ba(a)||da(a))}));if(!n(c)||p(c)||!r(a,c))return null;z(a,c);return!h&&0<=c.size.top&&b(d.y,0,c.size.top+f)?(a=a.inInlineMode||0===e.scroll.y?O:W,new k([null,c,H,N,a])):h&&c.size.bottom<=e.pane.height&&b(d.y,c.size.bottom-f,e.pane.height)?(a=a.inInlineMode||b(c.size.bottom,e.pane.height-f,e.pane.height)?M:W,new k([c,null,F,N,a])):null}function u(c){var d=c.mouse,e=c.view,f=c.triggerOffset,g=h(c);if(!g)return null;
z(c,g);var f=Math.min(f,0|g.size.outerHeight/2),l=[],m,q;if(b(d.y,g.size.top-1,g.size.top+f))q=!1;else if(b(d.y,g.size.bottom-f,g.size.bottom+1))q=!0;else return null;if(p(g)||t(c,g,q)||g.getParent().is(U))return null;var w=a(c,g,!q);if(w){if(w&&w.type==CKEDITOR.NODE_TEXT)return null;if(n(w)){if(p(w)||!r(c,w)||w.getParent().is(U))return null;l=[w,g][q?"reverse":"concat"]().concat([P,N])}}else g.equals(c.editable[q?"getLast":"getFirst"](c.isRelevant))?(x(c),q&&b(d.y,g.size.bottom-f,e.pane.height)&&
b(g.size.bottom,e.pane.height-f,e.pane.height)?m=M:b(d.y,0,g.size.top+f)&&(m=O)):m=W,l=[null,g][q?"reverse":"concat"]().concat([q?F:H,N,m,g.equals(c.editable[q?"getLast":"getFirst"](c.isRelevant))?q?M:O:W]);return 0 in l?new k(l):null}function B(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=Q.length;l--;)f[Q[l]]=parseInt(b.getComputedStyle.call(b,"border-"+Q[l]+"-width"),10)||0,h[Q[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+Q[l]),10)||0,g[Q[l]]=parseInt(b.getComputedStyle.call(b,
"margin-"+Q[l]),10)||0;c&&!d||w(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+f.top+f.bottom);k.width=k.outerWidth-(h.left+h.right+f.left+f.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return D({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function z(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size=
{};else if(b.size.ignoreScroll==c&&b.size.date>new Date-ga)return null;return D(b.size,B(a,b,c),{date:+new Date},!0)}function x(a,b){a.view.editable=B(a,a.editable,b,!0)}function w(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-ga)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();D(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},
date:+new Date},!0)}}function A(a,b,c,d){for(var e=d,f=d,g=0,h=!1,l=!1,m=a.view.pane.height,q=a.mouse;q.y+g<m&&0<q.y-g;){h||(h=b(e,d));l||(l=b(f,d));!h&&0<q.y-g&&(e=c(a,{x:q.x,y:q.y-g}));!l&&q.y+g<m&&(f=c(a,{x:q.x,y:q.y+g}));if(h&&l)break;g+=2}return new k([e,f,null,null])}CKEDITOR.plugins.add("magicline",{init:function(b){var c=b.config,d=c.magicline_triggerOffset||30,f={editor:b,enterMode:c.enterMode,triggerOffset:d,holdDistance:0|d*(c.magicline_holdDistance||.5),boxColor:c.magicline_color||"#ff0000",
rtl:"rtl"==c.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(c.magicline_tabuList||[]),triggers:c.magicline_everywhere?fa:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},t,r,A;f.isRelevant=function(a){return n(a)&&!g(f,a)&&!p(a)};b.on("contentDom",function(){var d=b.editable(),n=b.document,p=b.window;D(f,{editable:d,inInlineMode:d.isInline(),doc:n,win:p,hotNode:null},!0);f.boundary=f.inInlineMode?f.editable:f.doc.getDocumentElement();d.is(G.$inline)||(f.inInlineMode&&!v(d)&&
d.setStyles({position:"relative",top:null,left:null}),l.call(this,f),w(f),d.attachListener(b,"beforeUndoImage",function(){f.line.detach()}),d.attachListener(b,"beforeGetData",function(){f.line.wrap.getParent()&&(f.line.detach(),b.once("getData",function(){f.line.attach()},null,null,1E3))},null,null,0),d.attachListener(f.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(a){if("wysiwyg"==b.mode)if(f.inInlineMode){var c=a.data.$.clientX;a=a.data.$.clientY;w(f);x(f,!0);var d=f.view.editable,
e=f.view.scroll;c>d.left-e.x&&c<d.right-e.x&&a>d.top-e.y&&a<d.bottom-e.y||(clearTimeout(A),A=null,f.line.detach())}else clearTimeout(A),A=null,f.line.detach()}),d.attachListener(d,"keyup",function(){f.hiddenMode=0}),d.attachListener(d,"keydown",function(a){if("wysiwyg"==b.mode)switch(a.data.getKeystroke()){case 2228240:case 16:f.hiddenMode=1,f.line.detach()}}),d.attachListener(f.inInlineMode?d:n,"mousemove",function(a){r=!0;if("wysiwyg"==b.mode&&!b.readOnly&&!A){var c={x:a.data.$.clientX,y:a.data.$.clientY};
A=setTimeout(function(){f.mouse=c;A=f.trigger=null;w(f);r&&!f.hiddenMode&&b.focusManager.hasFocus&&!f.line.mouseNear()&&(f.element=aa(f,!0))&&((f.trigger=y(f)||u(f)||Y(f))&&!q(f,f.trigger.upper||f.trigger.lower)?f.line.attach().place():(f.trigger=null,f.line.detach()),r=!1)},30)}}),d.attachListener(p,"scroll",function(){"wysiwyg"==b.mode&&(f.line.detach(),I.webkit&&(f.hiddenMode=1,clearTimeout(t),t=setTimeout(function(){f.mouseDown||(f.hiddenMode=0)},50)))}),d.attachListener(K?n:p,"mousedown",function(){"wysiwyg"==
b.mode&&(f.line.detach(),f.hiddenMode=1,f.mouseDown=1)}),d.attachListener(K?n:p,"mouseup",function(){f.hiddenMode=0;f.mouseDown=0}),b.addCommand("accessPreviousSpace",m(f)),b.addCommand("accessNextSpace",m(f,!0)),b.setKeystroke([[c.magicline_keystrokePrevious,"accessPreviousSpace"],[c.magicline_keystrokeNext,"accessNextSpace"]]),b.on("loadSnapshot",function(){var a,c,d,e;for(e in{p:1,br:1,div:1})for(a=b.document.getElementsByTag(e),d=a.count();d--;)if((c=a.getItem(d)).data("cke-magicline-hot")){f.hotNode=
c;f.lastCmdDirection="true"===c.data("cke-magicline-dir")?!0:!1;return}}),b._.magiclineBackdoor={accessFocusSpace:e,boxTrigger:k,isLine:g,getAscendantTrigger:h,getNonEmptyNeighbour:a,getSize:B,that:f,triggerEdge:u,triggerEditable:y,triggerExpand:Y})},this)}});var D=CKEDITOR.tools.extend,C=CKEDITOR.dom.element,E=C.createFromHtml,I=CKEDITOR.env,K=CKEDITOR.env.ie&&9>CKEDITOR.env.version,G=CKEDITOR.dtd,L={},H=128,F=64,P=32,N=16,O=4,M=2,W=1,S=" ",U=G.$listItem,ea=G.$tableContent,T=D({},G.$nonEditable,
G.$empty),fa=G.$block,ga=100,ia="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",V=ia+"border-color:transparent;display:block;border-style:solid;",X="\x3cspan\x3e"+S+"\x3c/span\x3e";L[CKEDITOR.ENTER_BR]="br";L[CKEDITOR.ENTER_P]="p";L[CKEDITOR.ENTER_DIV]="div";k.prototype={set:function(a,b,c){this.properties=a+b+(c||W);return this},is:function(a){return(this.properties&a)==a}};var aa=function(){function a(b,c){var d=
b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,f=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&g(b,h)&&(f.hide(),h=a(e,d),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||I.ie&&9>I.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),ba=CKEDITOR.dom.walker.whitespaces(),da=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),Y=function(){function a(e){var g=e.element,h,k,l;if(!n(g)||g.contains(e.editable)||
g.isReadOnly())return null;l=A(e,function(a,b){return!b.equals(a)},function(a,b){return aa(a,!0,b)},g);h=l.upper;k=l.lower;if(c(e,h,k))return l.set(P,8);if(h&&g.contains(h))for(;!h.getParent().equals(g);)h=h.getParent();else h=g.getFirst(function(a){return d(e,a)});if(k&&g.contains(k))for(;!k.getParent().equals(g);)k=k.getParent();else k=g.getLast(function(a){return d(e,a)});if(!h||!k)return null;z(e,h);z(e,k);if(!b(e.mouse.y,h.size.top,k.size.bottom))return null;for(var g=Number.MAX_VALUE,m,q,w,
t;k&&!k.equals(h)&&(q=h.getNext(e.isRelevant));)m=Math.abs(f(e,h,q)-e.mouse.y),m<g&&(g=m,w=h,t=q),h=q,z(e,h);if(!w||!t||!b(e.mouse.y,w.size.top,t.size.bottom))return null;l.upper=w;l.lower=t;return l.set(P,8)}function d(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||da(b)||p(b)||g(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(b){var d=a(b),e;if(e=d){e=d.upper;var f=d.lower;e=!e||!f||p(f)||p(e)||f.equals(e)||e.equals(f)||f.contains(e)||e.contains(f)?!1:r(b,e)&&r(b,f)&&c(b,e,f)?
!0:!1}return e?d:null}}(),Q=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,"use strict",function(){CKEDITOR.plugins.add("mathjax",{requires:"widget,dialog",icons:"mathjax",isSupportedEnvironment:function(){return!CKEDITOR.env.ie||8<CKEDITOR.env.version},init:function(c){var k=c.config.mathJaxClass||"math-tex";c.config.mathJaxLib||CKEDITOR.error("mathjax-no-config");
c.widgets.add("mathjax",{inline:!0,dialog:"mathjax",button:c.lang.mathjax.button,mask:!0,allowedContent:"span(!"+k+")",styleToAllowedContentRules:function(c){c=c.getClassesArray();if(!c)return null;c.push("!"+k);return"span("+c.join(",")+")"},pathName:c.lang.mathjax.pathName,template:'\x3cspan class\x3d"'+k+'" style\x3d"display:inline-block" data-cke-survive\x3d1\x3e\x3c/span\x3e',parts:{span:"span"},defaults:{math:"\\(x \x3d {-b \\pm \\sqrt{b^2-4ac} \\over 2a}\\)"},init:function(){var h=this.parts.span.getChild(0);
h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("iframe")||(h=new CKEDITOR.dom.element("iframe"),h.setAttributes({style:"border:0;width:0;height:0",scrolling:"no",frameborder:0,allowTransparency:!0,src:CKEDITOR.plugins.mathjax.fixSrc}),this.parts.span.append(h));this.once("ready",function(){CKEDITOR.env.ie&&h.setAttribute("src",CKEDITOR.plugins.mathjax.fixSrc);this.frameWrapper=new CKEDITOR.plugins.mathjax.frameWrapper(h,c);this.frameWrapper.setValue(this.data.math)})},data:function(){this.frameWrapper&&this.frameWrapper.setValue(this.data.math)},
upcast:function(c,f){if("span"==c.name&&c.hasClass(k)&&!(1<c.children.length||c.children[0].type!=CKEDITOR.NODE_TEXT)){f.math=CKEDITOR.tools.htmlDecode(c.children[0].value);var a=c.attributes;a.style=a.style?a.style+";display:inline-block":"display:inline-block";a["data-cke-survive"]=1;c.children[0].remove();return c}},downcast:function(c){c.children[0].replaceWith(new CKEDITOR.htmlParser.text(CKEDITOR.tools.htmlEncode(this.data.math)));var f=c.attributes;f.style=f.style.replace(/display:\s?inline-block;?\s?/,
"");""===f.style&&delete f.style;return c}});CKEDITOR.dialog.add("mathjax",this.path+"dialogs/mathjax.js");c.on("contentPreview",function(h){h.data.dataValue=h.data.dataValue.replace(/<\/head>/,'\x3cscript src\x3d"'+CKEDITOR.getUrl(c.config.mathJaxLib)+'"\x3e\x3c/script\x3e\x3c/head\x3e')});c.on("paste",function(c){c.data.dataValue=c.data.dataValue.replace(new RegExp("\x3cspan[^\x3e]*?"+k+".*?\x3c/span\x3e","ig"),function(c){return c.replace(/(<iframe.*?\/iframe>)/i,"")})})}});CKEDITOR.plugins.mathjax=
{};CKEDITOR.plugins.mathjax.fixSrc=CKEDITOR.env.gecko?"javascript:true":CKEDITOR.env.ie?"javascript:void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})())":"javascript:void(0)";CKEDITOR.plugins.mathjax.loadingIcon=CKEDITOR.plugins.get("mathjax").path+"images/loader.gif";CKEDITOR.plugins.mathjax.copyStyles=function(c,k){for(var h="color font-family font-style font-weight font-variant font-size".split(" "),f=0;f<h.length;f++){var a=h[f],b=
c.getComputedStyle(a);b&&k.setStyle(a,b)}};CKEDITOR.plugins.mathjax.trim=function(c){var k=c.indexOf("\\(")+2,h=c.lastIndexOf("\\)");return c.substring(k,h)};CKEDITOR.plugins.mathjax.frameWrapper=CKEDITOR.env.ie&&8==CKEDITOR.env.version?function(c,k){c.getFrameDocument().write('\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e\x3cbody style\x3d"padding:0;margin:0;background:transparent;overflow:hidden"\x3e\x3cspan style\x3d"white-space:nowrap;" id\x3d"tex"\x3e\x3c/span\x3e\x3c/body\x3e\x3c/html\x3e');
return{setValue:function(h){var f=c.getFrameDocument(),a=f.getById("tex");a.setHtml(CKEDITOR.plugins.mathjax.trim(CKEDITOR.tools.htmlEncode(h)));CKEDITOR.plugins.mathjax.copyStyles(c,a);k.fire("lockSnapshot");c.setStyles({width:Math.min(250,a.$.offsetWidth)+"px",height:f.$.body.offsetHeight+"px",display:"inline","vertical-align":"middle"});k.fire("unlockSnapshot")}}}:function(c,k){function h(){e=c.getFrameDocument();e.getById("preview")||(CKEDITOR.env.ie&&c.removeAttribute("src"),e.write('\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3cscript type\x3d"text/x-mathjax-config"\x3eMathJax.Hub.Config( {showMathMenu: false,messageStyle: "none"} );function getCKE() {if ( typeof window.parent.CKEDITOR \x3d\x3d \'object\' ) {return window.parent.CKEDITOR;} else {return window.parent.parent.CKEDITOR;}}function update() {MathJax.Hub.Queue([ \'Typeset\', MathJax.Hub, this.buffer ],function() {getCKE().tools.callFunction( '+
p+" );});}MathJax.Hub.Queue( function() {getCKE().tools.callFunction("+n+');} );\x3c/script\x3e\x3cscript src\x3d"'+k.config.mathJaxLib+'"\x3e\x3c/script\x3e\x3c/head\x3e\x3cbody style\x3d"padding:0;margin:0;background:transparent;overflow:hidden"\x3e\x3cspan id\x3d"preview"\x3e\x3c/span\x3e\x3cspan id\x3d"buffer" style\x3d"display:none"\x3e\x3c/span\x3e\x3c/body\x3e\x3c/html\x3e'))}function f(){g=!0;d=l;k.fire("lockSnapshot");a.setHtml(d);b.setHtml("\x3cimg src\x3d"+CKEDITOR.plugins.mathjax.loadingIcon+
" alt\x3d"+k.lang.mathjax.loading+"\x3e");c.setStyles({height:"16px",width:"16px",display:"inline","vertical-align":"middle"});k.fire("unlockSnapshot");e.getWindow().$.update(d)}var a,b,d,l,e=c.getFrameDocument(),m=!1,g=!1,n=CKEDITOR.tools.addFunction(function(){b=e.getById("preview");a=e.getById("buffer");m=!0;l&&f();CKEDITOR.fire("mathJaxLoaded",c)}),p=CKEDITOR.tools.addFunction(function(){CKEDITOR.plugins.mathjax.copyStyles(c,b);b.setHtml(a.getHtml());k.fire("lockSnapshot");c.setStyles({height:0,
width:0});var h=Math.max(e.$.body.offsetHeight,e.$.documentElement.offsetHeight),m=Math.max(b.$.offsetWidth,e.$.body.scrollWidth);c.setStyles({height:h+"px",width:m+"px"});k.fire("unlockSnapshot");CKEDITOR.fire("mathJaxUpdateDone",c);d!=l?f():g=!1});c.on("load",h);h();return{setValue:function(a){l=CKEDITOR.tools.htmlEncode(a);m&&!g&&f()}}}}(),function(){function c(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||"form"!=a.getName())return[];for(var c=[],f=["style","className"],e=0;e<f.length;e++){var h=a.$.elements.namedItem(f[e]);
h&&(h=new CKEDITOR.dom.element(h),c.push([h,h.nextSibling]),h.remove())}return c}function k(a,c){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&"form"==a.getName()&&0<c.length)for(var f=c.length-1;0<=f;f--){var e=c[f][0],h=c[f][1];h?e.insertBefore(h):e.appendTo(a)}}function h(a,d){var f=c(a),e={},h=a.$;d||(e["class"]=h.className||"",h.className="");e.inline=h.style.cssText||"";d||(h.style.cssText="position: static; overflow: visible");k(f);return e}function f(a,d){var f=c(a),e=a.$;"class"in d&&(e.className=
d["class"]);"inline"in d&&(e.style.cssText=d.inline);k(f)}function a(a){if(!a.editable().isInline()){var c=CKEDITOR.instances,f;for(f in c){var e=c[f];"wysiwyg"!=e.mode||e.readOnly||(e=e.document.getBody(),e.setAttribute("contentEditable",!1),e.setAttribute("contentEditable",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add("maximize",{init:function(b){function c(){var a=g.getViewPaneSize();b.resize(a.width,a.height,null,!0)}function k(){var a=b.getCommand("maximize");
a.state===CKEDITOR.TRISTATE_ON&&a.exec()}if(b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=b.lang,m=CKEDITOR.document,g=m.getWindow(),n,p,v,r=CKEDITOR.TRISTATE_OFF;b.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var e=b.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),k=b.ui.space("contents");if("wysiwyg"==b.mode){var l=b.getSelection();n=l&&l.getRanges();p=g.getScrollPosition()}else{var q=
b.editable().$;n=!CKEDITOR.env.ie&&[q.selectionStart,q.selectionEnd];p=[q.scrollLeft,q.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){g.on("resize",c);v=g.getScrollPosition();for(l=b.container;l=l.getParent();)l.setCustomData("maximize_saved_styles",h(l)),l.setStyle("z-index",b.config.baseFloatZIndex-5);k.setCustomData("maximize_saved_styles",h(k,!0));e.setCustomData("maximize_saved_styles",h(e,!0));k={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};m.getDocumentElement().setStyles(k);
!CKEDITOR.env.gecko&&m.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||m.getBody().setStyles(k);CKEDITOR.env.ie?setTimeout(function(){g.$.scrollTo(0,0)},0):g.$.scrollTo(0,0);e.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");e.$.offsetLeft;e.setStyles({"z-index":b.config.baseFloatZIndex-5,left:"0px",top:"0px"});e.addClass("cke_maximized");c();k=e.getDocumentPosition();e.setStyles({left:-1*k.x+"px",top:-1*k.y+"px"});CKEDITOR.env.gecko&&
a(b)}else if(this.state==CKEDITOR.TRISTATE_ON){g.removeListener("resize",c);for(var l=[k,e],z=0;z<l.length;z++)f(l[z],l[z].getCustomData("maximize_saved_styles")),l[z].removeCustomData("maximize_saved_styles");for(l=b.container;l=l.getParent();)f(l,l.getCustomData("maximize_saved_styles")),l.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){g.$.scrollTo(v.x,v.y)},0):g.$.scrollTo(v.x,v.y);e.removeClass("cke_maximized");CKEDITOR.env.webkit&&(e.setStyle("display","inline"),
setTimeout(function(){e.setStyle("display","block")},0));b.fire("resize",{outerHeight:b.container.$.offsetHeight,contentsHeight:k.$.offsetHeight,outerWidth:b.container.$.offsetWidth})}this.toggleState();"wysiwyg"==b.mode?n?(CKEDITOR.env.gecko&&a(b),b.getSelection().selectRanges(n),(q=b.getSelection().getStartElement())&&q.scrollIntoView(!0)):g.$.scrollTo(p.x,p.y):(n&&(q.selectionStart=n[0],q.selectionEnd=n[1]),q.scrollLeft=p[0],q.scrollTop=p[1]);n=p=null;r=this.state;b.fire("maximize",this.state)},
canUndo:!1});b.ui.addButton&&b.ui.addButton("Maximize",{isToggle:!0,label:e.maximize.maximize,command:"maximize",toolbar:"tools,10"});b.on("mode",function(){var a=b.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:r)},null,null,100);if(b.config.maximize_historyIntegration){var q=b.config.maximize_historyIntegration===CKEDITOR.HISTORY_NATIVE?"popstate":"hashchange";g.on(q,k);b.on("destroy",function(){g.removeListener(q,k)})}}}});CKEDITOR.config.maximize_historyIntegration=
CKEDITOR.HISTORY_NATIVE}(),"use strict",function(){function c(a,b){var c=b.feed;this.caseSensitive=b.caseSensitive;this.marker=b.hasOwnProperty("marker")?b.marker:"@";this.minChars=null!==b.minChars&&void 0!==b.minChars?b.minChars:2;var f;if(!(f=b.pattern)){f=this.minChars;var e="\\"+this.marker+"[_a-zA-Z0-9À-ž]",e=(f?e+("{"+f+",}"):e+"*")+"$";f=new RegExp(e)}this.pattern=f;this.cache=void 0!==b.cache?b.cache:!0;this.followingSpace=b.followingSpace;this.throttle=void 0!==b.throttle?b.throttle:200;
this._autocomplete=new CKEDITOR.plugins.autocomplete(a,{textTestCallback:k(this.marker,this.minChars,this.pattern),dataCallback:h(c,this),itemTemplate:b.itemTemplate,outputTemplate:b.outputTemplate,throttle:this.throttle,itemsLimit:b.itemsLimit,followingSpace:this.followingSpace})}function k(a,b,c){function f(a,b){var g=a.slice(0,b).match(c);if(!g)return null;var h=a[g.index-1];return void 0===h||h.match(/\s+/)?{start:g.index,end:b}:null}return function(a){return a.collapsed?CKEDITOR.plugins.textMatch.match(a,
f):null}}function h(a,b){return function(c,h){function e(){var c=k(a).filter(function(a){a=a.name;b.caseSensitive||(a=a.toLowerCase(),p=p.toLowerCase());return 0===a.indexOf(p)});n(c)}function k(a){var b=1;return CKEDITOR.tools.array.reduce(a,function(a,c){a.push({name:c,id:b++});return a},[])}function g(){var c=(new CKEDITOR.template(a)).output({encodedQuery:encodeURIComponent(p)});if(b.cache&&f[c])return n(f[c]);CKEDITOR.ajax.load(c,function(a){a=JSON.parse(a);b.cache&&null!==a&&(f[c]=a);n(a)})}
function n(a){a&&(a=CKEDITOR.tools.array.map(a,function(a){return CKEDITOR.tools.object.merge(a,{name:b.marker+a.name})}),h(a))}var p=c.query;b.marker&&(p=p.substring(b.marker.length));CKEDITOR.tools.array.isArray(a)?e():"string"===typeof a?g():a({query:p,marker:b.marker},n)}}CKEDITOR._.mentions={cache:{}};var f=CKEDITOR._.mentions.cache;CKEDITOR.plugins.add("mentions",{requires:"autocomplete,textmatch,ajax",instances:[],init:function(a){var b=this;a.on("instanceReady",function(){CKEDITOR.tools.array.forEach(a.config.mentions||
[],function(d){b.instances.push(new c(a,d))})})},isSupportedEnvironment:function(a){return a.plugins.autocomplete.isSupportedEnvironment(a)}});c.prototype={destroy:function(){this._autocomplete.destroy()}};CKEDITOR.plugins.mentions=c}(),CKEDITOR.plugins.add("newpage",{init:function(c){c.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(c){var h=this;c.setData(c.config.newpage_html||"",function(){c.focus();setTimeout(function(){c.fire("afterCommandExec",{name:"newpage",command:h});c.selectionChange()},
200)})},async:!0});c.ui.addButton&&c.ui.addButton("NewPage",{label:c.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}}),"use strict",function(){function c(c){return{"aria-label":c,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:c}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var c=("background:url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g,
" !important;");CKEDITOR.addCss("div.cke_pagebreak{"+c+"}")},init:function(c){c.blockless||(c.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),c.ui.addButton&&c.ui.addButton("PageBreak",{label:c.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&c.on("contentDom",function(){c.document.on("click",function(h){h=h.data.getTarget();h.is("div")&&h.hasClass("cke_pagebreak")&&c.getSelection().selectElement(h)})}))},afterInit:function(k){function h(a){CKEDITOR.tools.extend(a.attributes,
c(k.lang.pagebreak.alt),!0);a.children.length=0}var f=k.dataProcessor,a=f&&f.dataFilter,f=f&&f.htmlFilter,b=/page-break-after\s*:\s*always/i,d=/display\s*:\s*none/i;f&&f.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak","");if(c!=a){var d=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];b.children.length=0;b.add(d);d=b.attributes;delete d["aria-label"];delete d.contenteditable;delete d.title}return c}}},{applyToAll:!0,
priority:5});a&&a.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])h(a);else if(b.test(a.attributes.style)){var c=a.children[0];c&&"span"==c.name&&d.test(c.attributes.style)&&h(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(c){c.insertElement(CKEDITOR.plugins.pagebreak.createElement(c))},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(c){return(c=c.parent)&&"div"==c.name&&c.styles&&c.styles["page-break-after"]},styles:"display"}},
requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(k){return k.document.createElement("div",{attributes:c(k.lang.pagebreak.alt)})}}}(),function(){function c(a,b){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(b)}).sort(function(a,b){return a.priority===b.priority?0:a.priority-b.priority})}function k(a,b){var c=a.shift();c&&c.handle(b,function(){k(a,b)})}function h(a){var b=CKEDITOR.tools.array.reduce(a,function(a,b){return CKEDITOR.tools.array.isArray(b.filters)?
a.concat(b.filters):a},[]);return CKEDITOR.tools.array.filter(b,function(a,c){return CKEDITOR.tools.array.indexOf(b,a)===c})}function f(b,c){var e=0,f,g;if(!CKEDITOR.tools.array.isArray(b)||0===b.length)return!0;f=CKEDITOR.tools.array.filter(b,function(b){return-1===CKEDITOR.tools.array.indexOf(a,b)});if(0<f.length)for(g=0;g<f.length;g++)(function(b){CKEDITOR.scriptLoader.queue(b,function(d){d&&a.push(b);++e===f.length&&c()})})(f[g]);return 0===f.length}var a=[],b=CKEDITOR.tools.createClass({$:function(){this.handlers=
[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(a){a.on("paste",function(b){var e=c(this.handlers,b),m;if(0!==e.length){m=h(e);m=f(m,function(){return a.fire("paste",b.data)});if(!m)return b.cancel();k(e,b)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:["clipboard","ajax"],beforeInit:function(a){a.pasteTools=new b;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:f,
createFilter:function(a){var b=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],c=a.additionalTransforms;return function(a,d){var f=new CKEDITOR.htmlParser.basicWriter,h=new CKEDITOR.htmlParser.filter,k;c&&(a=c(a,d));CKEDITOR.tools.array.forEach(b,function(b){h.addRules(b(a,d,h))});k=CKEDITOR.htmlParser.fragment.fromHtml(a);h.applyTo(k);k.writeHtml(f);return f.getHtml()}},getClipboardData:function(a,b){var c;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===b?(c=a.dataTransfer.getData(b,
!0))||"text/html"!==b?c:a.dataValue:null},getConfigValue:function(a,b){if(a&&a.config){var c=CKEDITOR.tools,f=a.config,g=c.object.keys(f),h=["pasteTools_"+b,"pasteFromWord_"+b,"pasteFromWord"+c.capitalize(b,!0)],h=c.array.find(h,function(a){return-1!==c.array.indexOf(g,a)});return f[h]}},getContentGeneratorName:function(a){if((a=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(a))&&a.length)return a=a[1].toLowerCase(),0===a.indexOf("microsoft")?"microsoft":0===a.indexOf("libreoffice")?
"libreoffice":"unknown"}};CKEDITOR.pasteFilters=CKEDITOR.plugins.pastetools.filters}(),function(){CKEDITOR.plugins.add("pastefromgdocs",{requires:"pastetools",init:function(c){var k=CKEDITOR.plugins.getPath("pastetools"),h=this.path;c.pasteTools.register({filters:[CKEDITOR.getUrl(k+"filter/common.js"),CKEDITOR.getUrl(h+"filter/default.js")],canHandle:function(c){return/id=(\"|\')?docs\-internal\-guid\-/.test(c.data.dataValue)},handle:function(f,a){var b=f.data,d=CKEDITOR.plugins.pastetools.getClipboardData(b,
"text/html");b.dontFilter=!0;b.dataValue=CKEDITOR.pasteFilters.gdocs(d,c);!0===c.config.forcePasteAsPlainText&&(b.type="text");a()}})}})}(),function(){CKEDITOR.plugins.add("pastefromlibreoffice",{requires:"pastetools",isSupportedEnvironment:function(){var c=CKEDITOR.env.ie&&11>=CKEDITOR.env.version;return!(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome)&&!c},init:function(c){if(this.isSupportedEnvironment()){var k=CKEDITOR.plugins.getPath("pastetools"),h=this.path;c.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(k+
"filter/common.js"),CKEDITOR.getUrl(k+"filter/image.js"),CKEDITOR.getUrl(h+"filter/default.js")],canHandle:function(c){c=c.data;return(c=c.dataTransfer.getData("text/html",!0)||c.dataValue)?"libreoffice"===CKEDITOR.plugins.pastetools.getContentGeneratorName(c):!1},handle:function(f,a){var b=f.data,d=b.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(b,"text/html");b.dontFilter=!0;d=CKEDITOR.pasteFilters.image(d,c,CKEDITOR.plugins.pastetools.getClipboardData(b,"text/rtf"));b.dataValue=CKEDITOR.pasteFilters.libreoffice(d,
c);!0===c.config.forcePasteAsPlainText&&(b.type="text");a()}})}}})}(),function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(c){var k=0,h=CKEDITOR.plugins.getPath("pastetools"),f=this.path,a=void 0===c.config.pasteFromWord_inlineImages?!0:c.config.pasteFromWord_inlineImages,h=[CKEDITOR.getUrl(h+"filter/common.js"),CKEDITOR.getUrl(h+"filter/image.js"),CKEDITOR.getUrl(f+"filter/default.js")];c.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,c){k=1;a.execCommand("paste",
{type:"html",notification:c&&"undefined"!==typeof c.notification?c.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(c,"PasteFromWord",{label:c.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});c.pasteTools.register({filters:c.config.pasteFromWordCleanupFile?[c.config.pasteFromWordCleanupFile]:h,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var c=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),f=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,
c=c?"microsoft"===c:f.test(a);return a&&(k||c)},handle:function(b,d){var f=b.data,e=CKEDITOR.plugins.pastetools.getClipboardData(f,"text/html"),h=CKEDITOR.plugins.pastetools.getClipboardData(f,"text/rtf"),e={dataValue:e,dataTransfer:{"text/rtf":h}};if(!1!==c.fire("pasteFromWord",e)||k){f.dontFilter=!0;if(k||!c.config.pasteFromWordPromptCleanup||confirm(c.lang.pastefromword.confirmCleanup))e.dataValue=CKEDITOR.cleanWord(e.dataValue,c),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&a&&CKEDITOR.pasteFilters.image&&
(e.dataValue=CKEDITOR.pasteFilters.image(e.dataValue,c,h)),c.fire("afterPasteFromWord",e),f.dataValue=e.dataValue,!0===c.config.forcePasteAsPlainText?f.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==c.config.forcePasteAsPlainText||(f.type="html");k=0;d()}}})}})}(),function(){var c={canUndo:!1,async:!0,exec:function(c,h){var f=c.lang,a=CKEDITOR.tools.keystrokeToString(f.common.keyboard,c.getCommandKeystroke(CKEDITOR.env.ie?c.commands.paste:this)),b=h&&"undefined"!==
typeof h.notification?h.notification:!h||!h.from||"keystrokeHandler"===h.from&&CKEDITOR.env.ie,f=b&&"string"===typeof b?b:f.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+a.aria+'"\x3e'+a.display+"\x3c/kbd\x3e");c.execCommand("paste",{type:"text",notification:b?f:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(k){var h=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;k.addCommand("pastetext",c);k.setKeystroke(h,
"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(k,"PasteText",{label:k.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(k.config.forcePasteAsPlainText)k.on("beforePaste",function(c){"html"!=c.data.type&&(c.data.type="text")});k.on("pasteState",function(c){k.getCommand("pastetext").setState(c.data)})}})}(),"use strict",function(){CKEDITOR.plugins.add("placeholder",{requires:"widget,dialog",onLoad:function(){CKEDITOR.addCss(".cke_placeholder{background-color:#ff0}")},init:function(c){var k=
c.lang.placeholder;CKEDITOR.dialog.add("placeholder",this.path+"dialogs/placeholder.js");c.widgets.add("placeholder",{dialog:"placeholder",pathName:k.pathName,template:'\x3cspan class\x3d"cke_placeholder"\x3e[[]]\x3c/span\x3e',downcast:function(){return new CKEDITOR.htmlParser.text("[["+this.data.name+"]]")},init:function(){this.setData("name",this.element.getText().slice(2,-2))},data:function(){this.element.setText("[["+this.data.name+"]]")},getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,
this.data.name+" "+this.pathName)}});c.ui.addButton&&c.ui.addButton("CreatePlaceholder",{label:k.toolbar,command:"placeholder",toolbar:"insert,5",icon:"placeholder"})},afterInit:function(c){var k=/\[\[([^\[\]])+\]\]/g;c.dataProcessor.dataFilter.addRules({text:function(h,f){var a=f.parent&&CKEDITOR.dtd[f.parent.name];if(!a||a.span)return h.replace(k,function(a){var d=null,d=new CKEDITOR.htmlParser.element("span",{"class":"cke_placeholder"});d.add(new CKEDITOR.htmlParser.text(a));d=c.widgets.wrapElement(d,
"placeholder");return d.getOuterHtml()})}})}})}(),function(){function c(c,f){var a=CKEDITOR.plugins.getPath("preview"),b=c.config,d=c.title,k;k=b.baseHref?'\x3cbase href\x3d"'+b.baseHref+'"\x3e':"";if(b.fullPage)a=c.getData().replace(/<head>/,"$\x26"+k).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+d);else{a=b.docType+'\x3chtml dir\x3d"'+b.contentsLangDirection+'"\x3e\x3chead\x3e'+k+"\x3ctitle\x3e"+d+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(b.contentsCss)+'\x3clink rel\x3d"stylesheet" media\x3d"screen" href\x3d"'+
a+'styles/screen.css"\x3e\x3c/head\x3e';b="\x3cbody\x3e";if(d=c.document&&c.document.getBody())d.getAttribute("id")&&(b=b.replace("\x3e",' id\x3d"'+d.getAttribute("id")+'"\x3e')),d.getAttribute("class")&&(b=b.replace("\x3e",' class\x3d"'+d.getAttribute("class")+'"\x3e'));a=a+b+c.getData()+(f?"\x3cscript\x3e"+(CKEDITOR.env.ie?"window.onload":"document.onreadystatechange")+" \x3d function() { previewCallback(); } \x3c/script\x3e":"")+"\x3c/body\x3e\x3c/html\x3e"}return a}function k(){var c=window.screen;
return{width:Math.round(.8*c.width),height:Math.round(.7*c.height),left:Math.round(.1*c.width)}}CKEDITOR.plugins.add("preview",{init:function(c){c.addCommand("preview",{modes:{wysiwyg:1},canUndo:!1,readOnly:1,exec:function(){CKEDITOR.plugins.preview.createPreview(c)}});c.ui.addButton&&c.ui.addButton("Preview",{label:c.lang.preview.preview,command:"preview",toolbar:"document,40"})}});CKEDITOR.plugins.preview={createPreview:function(h,f){var a={dataValue:c(h,f)},b=k(),d;d=CKEDITOR.env.ie?"javascript:void( (function(){document.open();"+
("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )":null;var l,e;if(!1===h.fire("contentPreview",a))return!1;d&&(window._cke_htmlToLoad=a.dataValue);l=window.open("",null,["toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes","width\x3d"+b.width,"height\x3d"+b.height,"left\x3d"+b.left].join());e=
new CKEDITOR.dom.window(l);d&&l&&(l.location=d);window._cke_htmlToLoad||(b=l.document,b.open(),b.write(a.dataValue),b.close());f&&(l.previewCallback=function(){"complete"===l.document.readyState&&f(e)},l.previewCallback());return e}}}(),function(){CKEDITOR.plugins.add("print",{requires:"preview",init:function(c){c.addCommand("print",CKEDITOR.plugins.print);c.ui.addButton&&c.ui.addButton("Print",{label:c.lang.print.toolbar,command:"print",toolbar:"document,50"})}});CKEDITOR.plugins.print={exec:function(c){CKEDITOR.plugins.preview.createPreview(c,
function(c){c=c.$;CKEDITOR.env.gecko?c.print():c.document.execCommand("Print");c.close()})},canUndo:!1,readOnly:1,modes:{wysiwyg:1}}}(),CKEDITOR.plugins.add("removeformat",{init:function(c){c.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);c.ui.addButton&&c.ui.addButton("RemoveFormat",{label:c.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(c){for(var k=c._.removeFormatRegex||
(c._.removeFormatRegex=new RegExp("^(?:"+c.config.removeFormatTags.replace(/,/g,"|")+")$","i")),h=c._.removeAttributes||(c._.removeAttributes=c.config.removeFormatAttributes.split(",")),f=CKEDITOR.plugins.removeformat.filter,a=c.getSelection().getRanges(),b=a.createIterator(),d=function(a){return a.type==CKEDITOR.NODE_ELEMENT},l;l=b.getNextRange();){l.enlarge(CKEDITOR.ENLARGE_INLINE);var e=l.createBookmark(),m=e.startNode,g=e.endNode,n=function(a){for(var b=c.elementPath(a),d=b.elements,e=1,g;(g=
d[e])&&!g.equals(b.block)&&!g.equals(b.blockLimit);e++)k.test(g.getName())&&f(c,g)&&a.breakParent(g)};n(m);if(g)for(n(g),m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);m&&!m.equals(g);)if(m.isReadOnly()){if(m.getPosition(g)&CKEDITOR.POSITION_CONTAINS)break;m=m.getNext(d)}else n=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==m.getName()&&m.data("cke-realelement")||!f(c,m)||(k.test(m.getName())?m.remove(1):(m.removeAttributes(h),c.fire("removeFormatCleanup",m))),m=n;l.moveToBookmark(e)}c.forceNextSelectionCheck();
c.getSelection().selectRanges(a)}}},filter:function(c,k){for(var h=c._.removeFormatFilters||[],f=0;f<h.length;f++)if(!1===h[f](k))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(c){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(c)},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",
CKEDITOR.plugins.add("resize",{init:function(c){function k(a){var d=e.width,h=e.height,k=d+(a.data.$.screenX-l.x)*("rtl"==b?-1:1);a=h+(a.data.$.screenY-l.y);m&&(d=Math.max(f.resize_minWidth,Math.min(k,f.resize_maxWidth)));g&&(h=Math.max(f.resize_minHeight,Math.min(a,f.resize_maxHeight)));c.resize(m?d:null,h)}function h(){CKEDITOR.document.removeListener("mousemove",k);CKEDITOR.document.removeListener("mouseup",h);c.document&&(c.document.removeListener("mousemove",k),c.document.removeListener("mouseup",
h))}var f=c.config,a=c.ui.spaceId("resizer"),b=c.element?c.element.getDirection(1):"ltr";!f.resize_dir&&(f.resize_dir="vertical");void 0===f.resize_maxWidth&&(f.resize_maxWidth=3E3);void 0===f.resize_maxHeight&&(f.resize_maxHeight=3E3);void 0===f.resize_minWidth&&(f.resize_minWidth=750);void 0===f.resize_minHeight&&(f.resize_minHeight=250);if(!1!==f.resize_enabled){var d=null,l,e,m=("both"==f.resize_dir||"horizontal"==f.resize_dir)&&f.resize_minWidth!=f.resize_maxWidth,g=("both"==f.resize_dir||"vertical"==
f.resize_dir)&&f.resize_minHeight!=f.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(a){d||(d=c.getResizable());e={width:d.$.offsetWidth||0,height:d.$.offsetHeight||0};l={x:a.screenX,y:a.screenY};f.resize_minWidth>e.width&&(f.resize_minWidth=e.width);f.resize_minHeight>e.height&&(f.resize_minHeight=e.height);CKEDITOR.document.on("mousemove",k);CKEDITOR.document.on("mouseup",h);c.document&&(c.document.on("mousemove",k),c.document.on("mouseup",h));a.preventDefault&&a.preventDefault()});c.on("destroy",
function(){CKEDITOR.tools.removeFunction(n)});c.on("uiSpace",function(d){if("bottom"==d.data.space){var e="";m&&!g&&(e=" cke_resizer_horizontal");!m&&g&&(e=" cke_resizer_vertical");var f='\x3cspan id\x3d"'+a+'" class\x3d"cke_resizer'+e+" cke_resizer_"+b+'" title\x3d"'+CKEDITOR.tools.htmlEncode(c.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==b?"◢":"◣")+"\x3c/span\x3e";"ltr"==b&&"ltr"==e?d.data.html+=f:d.data.html=f+d.data.html}},c,null,100);c.on("maximize",
function(a){c.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var c={readOnly:1,modes:{wysiwyg:1,source:1},exec:function(c){if(c.fire("save")&&(c=c.element.$.form))try{c.submit()}catch(h){c.submit.click&&c.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(k){k.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(k.addCommand("save",c).startDisabled=!k.element.$.form,k.ui.addButton&&k.ui.addButton("Save",{label:k.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})}(),
function(){CKEDITOR.plugins.add("selectall",{init:function(c){c.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(c){var h=c.editable();if(h.is("textarea"))c=h.$,CKEDITOR.env.ie&&c.createTextRange?c.createTextRange().execCommand("SelectAll"):(c.selectionStart=0,c.selectionEnd=c.value.length),c.focus();else{if(h.is("body"))c.document.$.execCommand("SelectAll",!1,null);else{var f=c.createRange();f.selectNodeContents(h);f.select()}c.forceNextSelectionCheck();c.selectionChange()}},canUndo:!1});
c.ui.addButton&&c.ui.addButton("SelectAll",{label:c.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){function c(c,f,a){var b,d;if(a="string"==typeof a?CKEDITOR.document.getById(a):new CKEDITOR.dom.element(a))if(b=c.fire("uiSpace",{space:f,html:""}).html)c.on("uiSpace",function(a){a.data.space==f&&a.cancel()},null,null,1),d=a.append(CKEDITOR.dom.element.createFromHtml(k.output({id:c.id,name:c.name,langDir:c.lang.dir,langCode:c.langCode,space:f,spaceId:c.ui.spaceId(f),
content:b}))),a.getCustomData("cke_hasshared")?d.hide():a.setCustomData("cke_hasshared",1),d.unselectable(),d.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()}),c.focusManager.add(d,1),c.on("focus",function(){for(var b=0,c,f=a.getChildren();c=f.getItem(b);b++)c.type==CKEDITOR.NODE_ELEMENT&&!c.equals(d)&&c.hasClass("cke_shared")&&c.hide();d.show()}),c.on("destroy",function(){d.remove()})}var k=CKEDITOR.addTemplate("sharedcontainer",'\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_shared cke_detached cke_{langDir} '+
CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{spaceId}" class\x3d"cke_{space}" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');CKEDITOR.plugins.add("sharedspace",{init:function(h){h.on("loaded",function(){var f=h.config.sharedSpaces;if(f)for(var a in f)c(h,a,f[a])},null,null,9)}})}(),function(){var c={readOnly:1,preserveState:!0,editorFocus:!1,
exec:function(c){this.toggleState();this.refresh(c)},refresh:function(c){if(c.document){var h=this.state!=CKEDITOR.TRISTATE_ON||c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!c.focusManager.hasFocus?"removeClass":"attachClass";c.editable()[h]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var c="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),h,f,a,b,d=CKEDITOR.getUrl(this.path),l=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),e=l?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":
"",m,g;for(h=f=a=b="";m=c.pop();)g=c.length?",":"",h+=".cke_show_blocks "+m+e+g,a+=".cke_show_blocks.cke_contents_ltr "+m+e+g,b+=".cke_show_blocks.cke_contents_rtl "+m+e+g,f+=".cke_show_blocks "+m+e+"{background-image:url("+CKEDITOR.getUrl(d+"images/block_"+m+".png")+")}";CKEDITOR.addCss((h+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(f,a+"{background-position:top left;padding-left:8px}",b+"{background-position:top right;padding-right:8px}"));l||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
init:function(k){function h(){f.refresh(k)}if(!k.blockless){var f=k.addCommand("showblocks",c);f.canUndo=!1;k.config.startupOutlineBlocks&&f.setState(CKEDITOR.TRISTATE_ON);k.ui.addButton&&k.ui.addButton("ShowBlocks",{label:k.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});k.on("mode",function(){f.state!=CKEDITOR.TRISTATE_DISABLED&&f.refresh(k)});k.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(k.on("focus",h),k.on("blur",h));k.on("contentDom",function(){f.state!=CKEDITOR.TRISTATE_DISABLED&&
f.refresh(k)})}}})}(),function(){var c={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(c){this.toggleState();this.refresh(c)},refresh:function(c){if(c.document){var h=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";c.editable()[h]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var c;c=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,
"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(c)},init:function(k){var h=k.addCommand("showborders",c);h.canUndo=!1;!1!==k.config.startupShowBorders&&h.setState(CKEDITOR.TRISTATE_ON);k.on("mode",function(){h.state!=CKEDITOR.TRISTATE_DISABLED&&h.refresh(k)},null,null,100);k.on("contentDom",function(){h.state!=CKEDITOR.TRISTATE_DISABLED&&h.refresh(k)});k.on("removeFormatCleanup",function(c){c=c.data;k.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&c.is("table")&&(!c.hasAttribute("border")||
0>=parseInt(c.getAttribute("border"),10))&&c.addClass("cke_show_border")})},afterInit:function(c){var h=c.dataProcessor;c=h&&h.dataFilter;h=h&&h.htmlFilter;c&&c.addRules({elements:{table:function(c){c=c.attributes;var a=c["class"],b=parseInt(c.border,10);b&&!(0>=b)||a&&-1!=a.indexOf("cke_show_border")||(c["class"]=(a||"")+" cke_show_border")}}});h&&h.addRules({elements:{table:function(c){c=c.attributes;var a=c["class"];a&&(c["class"]=a.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(c){var h=c.data.name;if("table"==h||"tableProperties"==h)if(c=c.data.definition,h=c.getContents("info").get("txtBorder"),h.commit=CKEDITOR.tools.override(h.commit,function(c){return function(a,b){c.apply(this,arguments);var d=parseInt(this.getValue(),10);b[!d||0>=d?"addClass":"removeClass"]("cke_show_border")}}),c=(c=c.getContents("advanced"))&&c.get("advCSSClasses"))c.setup=CKEDITOR.tools.override(c.setup,function(c){return function(){c.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),c.commit=CKEDITOR.tools.override(c.commit,function(c){return function(a,b){c.apply(this,arguments);parseInt(b.getAttribute("border"),10)||b.addClass("cke_show_border")}})})}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(c){c.config.smiley_path=c.config.smiley_path||this.path+"images/";c.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));
c.ui.addButton&&c.ui.addButton("Smiley",{label:c.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"});CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}}),CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "),
CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),function(){CKEDITOR.plugins.add("sourcearea",{init:function(k){function h(){var b=a&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();b&&this.focus()}if(k.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var f=
CKEDITOR.plugins.sourcearea;k.addMode("source",function(a){var d=k.ui.space("contents").getDocument().createElement("textarea");d.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",k.config.sourceAreaTabSize||4)));d.setAttribute("dir","ltr");d.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");k.ui.space("contents").append(d);d=k.editable(new c(k,
d));d.setData(k.getData(1));CKEDITOR.env.ie&&(d.attachListener(k,"resize",h,d),d.attachListener(CKEDITOR.document.getWindow(),"resize",h,d),CKEDITOR.tools.setTimeout(h,0,d));k.fire("ariaWidget",this);a()});k.addCommand("source",f.commands.source);k.ui.addButton&&k.ui.addButton("Source",{isToggle:!0,label:k.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});k.on("mode",function(){k.getCommand("source").setState("source"==k.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var a=CKEDITOR.env.ie&&
9==CKEDITOR.env.version}}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(c){this.setValue(c);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(c){this[(c?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea=
{commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"==c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"==c.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("sourcedialog",{requires:"dialog",init:function(c){c.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js");c.ui.addButton&&c.ui.addButton("Sourcedialog",
{label:c.lang.sourcedialog.toolbar,command:"sourcedialog",toolbar:"mode,10"})}}),CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(c){var k=
this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");c.addCommand("specialchar",{exec:function(){var h=c.langCode,h=k.availableLangs[h]?h:k.availableLangs[h.replace(/-.*/,"")]?h.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(k.path+"dialogs/lang/"+h+".js"),function(){CKEDITOR.tools.extend(c.lang.specialchar,k.langEntries[h]);c.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});c.ui.addButton&&c.ui.addButton("SpecialChar",{label:c.lang.specialchar.toolbar,
command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "),
CKEDITOR.plugins.add("splitquote",{hidpi:!0,icons:"splitquote,removequote",init:function(c){c.addCommand("splitQuote",{exec:function(c){var h,f,a,b=0,d;f=c.elementPath().contains("div",!1,!0);null!==f&&f.hasAttribute("type")&&"cite"===f.getAttribute("type")&&(h=c.getSelection().getRanges()[0],a=h.startContainer,d=a.nodeType,3===d&&void 0!==typeof a.getLength&&(b=a.getLength()),h=h.startOffset,h===b&&a.hasNext()&&"br"===a.getNext().getName()&&(h=c.createRange(),h.setStart(a.getNext().getNext(),0),
h.setEnd(a.getNext().getNext(),0),c.getSelection().selectRanges([h])),h=CKEDITOR.dom.element.createFromHtml("\x3cbr /\x3e"),c.insertElement(h),h.breakParent(f),a=CKEDITOR.dom.element.createFromHtml(" "),a.insertAfter(f),h=new CKEDITOR.dom.range(c.document),h.moveToElementEditablePosition(a,!0),c.getSelection().selectRanges([h]))}});c.addCommand("removeQuote",{exec:function(c){c=c.elementPath().contains("div",!1,!0);null!==c&&c.hasAttribute("type")&&"cite"===c.getAttribute("type")&&(c.insertBeforeMe(new CKEDITOR.dom.element("br")),
c.remove(!0))}});c.ui.addButton("SplitQuote",{label:Core.Config.Get("RichText.Lang.SplitQuote")||"Split Quote",command:"splitQuote",toolbar:"insert"});c.ui.addButton("RemoveQuote",{label:Core.Config.Get("RichText.Lang.RemoveQuote")||"Remove Quote",command:"removeQuote",toolbar:"insert"});c.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+13,"splitQuote")}}),function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(c){var k=c.config,h=c.lang.stylescombo,f={},a=[],b=[];c.on("stylesSet",
function(d){if(d=d.data.styles){for(var h,e,m,g,n=0,p=d.length;n<p;n++)(h=d[n],c.blockless&&h.element in CKEDITOR.dtd.$block||"string"==typeof h.type&&!CKEDITOR.style.customHandlers[h.type]||(e=h.name,g=h.language||c.langCode,h=new CKEDITOR.style(h),c.filter.customConfig&&!c.filter.check(h)))||(h._name=e,h._.enterMode=k.enterMode,h._.type=m=h.assignedTo||h.type,h._.weight=n+1E3*(m==CKEDITOR.STYLE_OBJECT?1:m==CKEDITOR.STYLE_BLOCK?2:3),h._.language=g,f[e]=h,a.push(h),b.push(h));a.sort(function(a,b){return a._.weight-
b._.weight})}});c.on("stylesRemove",function(a){a=a.data&&a.data.type;var b=void 0===a,e;for(e in f){var h=f[e];(b||h.type===a)&&c.removeStyle(h)}});c.ui.addRichCombo("Styles",{label:h.label,title:h.panelTitle,toolbar:"styles,10",allowedContent:b,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(k.contentsCss),multiSelect:!0,attributes:{"aria-label":h.panelTitle}},init:function(){var b,c,e,f,g,k,p;k=0;for(p=a.length;k<p;k++)b=a[k],c=b._name,f=b._.type,g=b._.definition.language,f!=e&&(this.startGroup(h["panelTitle"+
String(f)]),e=f),this.add(c,b.type==CKEDITOR.STYLE_OBJECT?c:b.buildPreview(),c,g);this.commit()},onClick:function(a){c.focus();c.fire("saveSnapshot");a=f[a];var b=c.elementPath();if(a.group&&a.removeStylesFromSameGroup(c))c.applyStyle(a);else c[a.checkActive(b,c)?"removeStyle":"applyStyle"](a);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(a){var b=this.getValue();a=a.data.path.elements;for(var e=0,h=a.length,g;e<h;e++){g=a[e];for(var k in f)if(f[k].checkElementRemovable(g,
!0,c)){k!=b&&this.setValue(k);return}}this.setValue("")},this)},onOpen:function(){var a=c.getSelection(),a=a.getSelectedElement()||a.getStartElement()||c.editable(),a=c.elementPath(a),b=[0,0,0,0];this.showAll();this.unmarkAll();for(var e in f){var k=f[e],g=k._.type;k.checkApplicable(a,c,c.activeFilter)?b[g]++:this.hideItem(e);k.checkActive(a,c)&&this.mark(e)}b[CKEDITOR.STYLE_BLOCK]||this.hideGroup(h["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);b[CKEDITOR.STYLE_INLINE]||this.hideGroup(h["panelTitle"+
String(CKEDITOR.STYLE_INLINE)]);b[CKEDITOR.STYLE_OBJECT]||this.hideGroup(h["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var a=c.elementPath();if(a){for(var b in f)if(f[b].checkApplicable(a,c,c.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){f={};a=[]}})}})}(),function(){function c(c,h,f){var a=[],b=[],d;for(d=0;d<c.styleSheets.length;d++){var l=c.styleSheets[d];if(!((l.ownerNode||l.owningElement).getAttribute("data-cke-temp")||l.href&&"chrome://"==
l.href.substr(0,9)))try{for(var e=l.cssRules||l.rules,l=0;l<e.length;l++)b.push(e[l].selectorText)}catch(m){}}d=b.join(" ");d=d.replace(/(,|>|\+|~)/g," ");d=d.replace(/\[[^\]]*/g,"");d=d.replace(/#[^\s]*/g,"");d=d.replace(/\:{1,2}[^\s]*/g,"");d=d.replace(/\s+/g," ");d=d.split(" ");c=[];for(b=0;b<d.length;b++)e=d[b],f.test(e)&&!h.test(e)&&-1==CKEDITOR.tools.indexOf(c,e)&&c.push(e);for(d=0;d<c.length;d++)f=c[d].split("."),h=f[0].toLowerCase(),f=f[1],a.push({name:h+"."+f,element:h,attributes:{"class":f}});
return a}CKEDITOR.plugins.add("stylesheetparser",{init:function(k){k.filter.disable();var h;k.once("stylesSet",function(f){f.cancel();k.once("contentDom",function(){k.getStylesSet(function(a){h=a.concat(c(k.document.$,k.config.stylesheetParser_skipSelectors||/(^body\.|^\.)/i,k.config.stylesheetParser_validSelectors||/\w+\.\w+/));k.getStylesSet=function(a){if(h)return a(h)};k.fire("stylesSet",{styles:h})})})},null,null,1)}})}(),function(){function c(a){return{editorFocus:!1,canUndo:!0,modes:{wysiwyg:1},
exec:function(b){if(b.editable().hasFocus){var c=b.getSelection(),f;if(f=(new CKEDITOR.dom.elementPath(c.getStartElement(),c.root)).contains({td:1,th:1},1)){var c=b.createRange(),e=CKEDITOR.tools.tryThese(function(){var b=f.getParent().$.cells[f.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=f.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(e||a)if(e)e=new CKEDITOR.dom.element(e),c.moveToElementEditStart(e),c.checkStartOfBlock()&&
c.checkEndOfBlock()||c.selectNodeContents(e);else return!0;else{for(var h=f.getAscendant("table").$,e=f.getParent().$.cells,h=new CKEDITOR.dom.element(h.insertRow(-1),b.document),g=0,k=e.length;g<k;g++)h.append((new CKEDITOR.dom.element(e[g],b.document)).clone(!1,!1)).appendBogus();c.moveToElementEditStart(h)}c.select(!0);return!0}}return!1}}}var k={editorFocus:!1,modes:{wysiwyg:1,source:1}},h={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},f={exec:function(a){a.container.focusPrevious(!0,
a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(a){for(var b=!1!==a.config.enableTabKeyTools,d=a.config.tabSpaces||0,l="";d--;)l+=" ";if(l)a.on("key",function(b){9==b.data.keyCode&&(a.insertText(l),b.cancel())});if(b)a.on("key",function(b){(9==b.data.keyCode&&a.execCommand("selectNextCell")||b.data.keyCode==CKEDITOR.SHIFT+9&&a.execCommand("selectPreviousCell"))&&b.cancel()});a.addCommand("blur",CKEDITOR.tools.extend(h,k));a.addCommand("blurBack",CKEDITOR.tools.extend(f,k));a.addCommand("selectNextCell",
c());a.addCommand("selectPreviousCell",c(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(c,k){var h=void 0===k?this.getTabIndex():k,f,a,b,d,l,e;if(0>=h)for(l=this.getNextSourceNode(c,CKEDITOR.NODE_ELEMENT);l;){if(l.isVisible()&&0===l.getTabIndex()){b=l;break}l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(l=this.getDocument().getBody().getFirst();l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!a&&l.equals(this)){if(a=!0,c){if(!(l=l.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;
f=1}}else a&&!this.contains(l)&&(f=1);if(l.isVisible()&&!(0>(e=l.getTabIndex()))){if(f&&e==h){b=l;break}e>h&&(!b||!d||e<d)?(b=l,d=e):b||0!==e||(b=l,d=e)}}b&&b.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(c,k){for(var h=void 0===k?this.getTabIndex():k,f,a,b,d=0,l,e=this.getDocument().getBody().getLast();e=e.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!a&&e.equals(this)){if(a=!0,c){if(!(e=e.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else a&&!this.contains(e)&&
(f=1);if(e.isVisible()&&!(0>(l=e.getTabIndex())))if(0>=h){if(f&&0===l){b=e;break}l>d&&(b=e,d=l)}else{if(f&&l==h){b=e;break}l<h&&(!b||l>d)&&(b=e,d=l)}}b&&b.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(c){function k(c){return CKEDITOR.tools.extend(c||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!c.blockless){var h=c.lang.table;c.addCommand("table",new CKEDITOR.dialogCommand("table",
{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+(c.plugins.dialogadvtab?"table"+c.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(c){if(c.styles){var a;
if(c.styles.border)a=CKEDITOR.tools.style.parse.border(c.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var b=c.styles;b["border-left"]&&b["border-left"]===b["border-right"]&&b["border-right"]===b["border-top"]&&b["border-top"]===b["border-bottom"]&&(a=CKEDITOR.tools.style.parse.border(b["border-top"]))}a&&a.style&&"solid"===a.style&&a.width&&0!==parseFloat(a.width)&&(c.attributes.border=1);"collapse"==c.styles["border-collapse"]&&(c.attributes.cellspacing=0)}}}]]}));c.addCommand("tableProperties",
new CKEDITOR.dialogCommand("tableProperties",k()));c.addCommand("tableDelete",k({exec:function(c){var a=c.elementPath().contains("table",1);if(a){var b=a.getParent(),d=c.editable();1!=b.getChildCount()||b.is("td","th")||b.equals(d)||(a=b);c=c.createRange();c.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);a.remove();c.select()}}}));c.ui.addButton&&c.ui.addButton("Table",{label:h.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",
this.path+"dialogs/table.js");c.addMenuItems&&c.addMenuItems({table:{label:h.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:h.deleteTable,command:"tableDelete",group:"table",order:1}});c.on("doubleclick",function(c){c.data.element.is("table")&&(c.data.dialog="tableProperties")});c.contextMenu&&c.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function c(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",
!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!b.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(f,a,"selected_cell",!0),e.push(a))}var e=[],f={};if(!a)return e;for(var g=a.getRanges(),h=0;h<g.length;h++){var k=g[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&e.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||
(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(f,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(f);return e}function k(a,b){for(var d=r(a)?a:c(a),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[k]),h=b?h:k,g=b?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=b?d[h-1]:d[h+1],d=d[0].length,
e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&h&&f[k]==h[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),e.append(l),l=l.$);k+=l.colSpan-1}b?e.insertBefore(g):e.insertAfter(g);return e}function h(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),d=c(a),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),g=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,
d=[];a.reset();for(a=g;a<=k;a++){for(var l=f[a],m=new CKEDITOR.dom.element(e.$.rows[a]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),r=p.getParent().$.rowIndex;1==p.$.rowSpan?p.remove():(--p.$.rowSpan,r==a&&(r=f[a+1],r[n-1]?p.insertAfter(new CKEDITOR.dom.element(r[n-1])):(new CKEDITOR.dom.element(e.$.rows[a+1])).append(p,1)));n+=p.$.colSpan-1}d.push(m)}f=e.$.rows;b[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);g=new CKEDITOR.dom.element(f[k+1]||(0<g?f[g-1]:null)||e.$.parentNode);
for(a=d.length;0<=a;a--)h(d[a]);return e.$.parentNode?g:(b[0].select(),null)}a instanceof CKEDITOR.dom.element&&(e=a.getAscendant("table"),1==e.$.rows.length?e.remove():a.remove());return null}function f(a){for(var b=a.getParent().$.cells,c=0,d=0;d<b.length;d++){var e=b[d],c=c+e.colSpan;if(e==a.$)break}return c-1}function a(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e=f(a[d]);if(b?e<c:e>c)c=e}return c}function b(b,d){for(var e=r(b)?b:c(b),f=e[0].getAscendant("table"),g=a(e,1),e=a(e),h=d?
g:e,k=CKEDITOR.tools.buildTableMap(f),f=[],g=[],e=[],l=k.length,m=0;m<l;m++){var n=d?k[m][h-1]:k[m][h+1];f.push(k[m][h]);g.push(n)}for(m=0;m<l;m++)f[m]&&(1<f[m].colSpan&&g[m]==f[m]?(k=f[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(f[m]),k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[d?"insertBefore":"insertAfter"].call(k,h),e.push(k),k=k.$),m+=k.rowSpan-1);return e}function d(a){function b(a){var c=a.getRanges(),d,e;if(1!==c.length)return a;c=c[0];if(c.collapsed||0!==c.endOffset)return a;
d=c.endContainer;e=d.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=d.getPrevious())||(e=d.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return c.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=b(a));var d=a.getRanges(),e=c(a),f=e[0],g=e[e.length-1],e=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(e),k,l,m=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var p=
0,r=h[n].length;p<r;p++)void 0===k&&h[n][p]==f.$&&(k=p),h[n][p]==g.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<h.length;p++)g=h[p],f=new CKEDITOR.dom.element(e.$.rows[p]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,p+=g.$.rowSpan-1,f.$.cells.length||m.push(f));k=h[0].length-1>l?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==a&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),
d[0].select(),e.remove());return k}function l(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function e(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),d=c(a),f=d[0]&&d[0].getAscendant("table"),g;a:{var h=0;g=d.length-1;for(var k={},l,n;l=d[h++];)CKEDITOR.dom.element.setMarker(k,l,"delete_cell",!0);for(h=0;l=d[h++];)if((n=l.getPrevious())&&!n.getCustomData("delete_cell")||(n=l.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(k);
g=n;break a}CKEDITOR.dom.element.clearAllMarkers(k);h=d[0].getParent();(h=h.getPrevious())?g=h.getLast():(h=d[g].getParent(),g=(h=h.getNext())?h.getChild(0):null)}a.reset();for(a=d.length-1;0<=a;a--)e(d[a]);g?m(g,!0):f&&(b[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),b[0].select(),f.remove())}else a instanceof CKEDITOR.dom.element&&(b=a.getParent(),1==b.getChildCount()?b.remove():a.remove())}function m(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&
(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function g(a,b,c){a=a[b];if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function n(a,b,d){var e=c(a),f;if((b?1!=e.length:2>e.length)||(f=a.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;a=e[0];f=a.getAscendant("table");
var h=CKEDITOR.tools.buildTableMap(f),k=h.length,l=h[0].length,m=a.getParent().$.rowIndex,n=g(h,m,a),p;if(b){var r;try{var v=parseInt(a.getAttribute("rowspan"),10)||1;p=parseInt(a.getAttribute("colspan"),10)||1;r=h["up"==b?m-v:"down"==b?m+v:m]["left"==b?n-p:"right"==b?n+p:n]}catch(K){return!1}if(!r||a.$==r)return!1;e["up"==b||"left"==b?"unshift":"push"](new CKEDITOR.dom.element(r))}b=a.getDocument();var G=m,v=r=0,L=!d&&new CKEDITOR.dom.documentFragment(b),H=0;for(b=0;b<e.length;b++){p=e[b];var F=
p.getParent(),P=p.getFirst(),N=p.$.colSpan,O=p.$.rowSpan,F=F.$.rowIndex,M=g(h,F,p),H=H+N*O,v=Math.max(v,M-n+N);r=Math.max(r,F-m+O);d||(N=p,(O=N.getBogus())&&O.remove(),N.trim(),p.getChildren().count()&&(F==G||!P||P.isBlockBoundary&&P.isBlockBoundary({br:1})||(G=L.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!G||G.is&&G.is("br")||L.append("br")),p.moveChildren(L)),b?p.remove():p.setHtml(""));G=F}if(d)return r*v==H;L.moveChildren(a);a.appendBogus();v>=l?a.removeAttribute("rowSpan"):a.$.rowSpan=r;r>=
k?a.removeAttribute("colSpan"):a.$.colSpan=v;d=new CKEDITOR.dom.nodeList(f.$.rows);e=d.count();for(b=e-1;0<=b;b--)f=d.getItem(b),f.$.cells.length||(f.remove(),e++);return a}function p(a,b){var d=c(a);if(1<d.length)return!1;if(b)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k=e.$.rowIndex,l=g(h,k,d),m=d.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),e=k+n,f=new CKEDITOR.dom.element(f.$.rows[e]),h=g(h,e),p,e=d.clone(),k=0;k<h.length;k++)if(p=
h[k],p.parentNode==f.$&&k>l){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||f.append(e)}else for(m=n=1,f=e.clone(),f.insertAfter(e),f.append(e=d.clone()),p=g(h,k),l=0;l<p.length;l++)p[l].rowSpan++;e.appendBogus();d.$.rowSpan=n;e.$.rowSpan=m;1==n&&d.removeAttribute("rowSpan");1==m&&e.removeAttribute("rowSpan");return e}function v(a,b){var d=c(a);if(1<d.length)return!1;if(b)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),h=g(f,e.$.rowIndex,
d),k=d.$.colSpan;if(1<k)e=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=e=1,l=[],m=0;m<f.length;m++){var n=f[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(f=0;f<l.length;f++)l[f].colSpan++}f=d.clone();f.insertAfter(d);f.appendBogus();d.$.colSpan=e;f.$.colSpan=k;1==e&&d.removeAttribute("colSpan");1==k&&f.removeAttribute("colSpan");return f}var r=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function f(a){return CKEDITOR.tools.extend(a||
{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function g(b,c){var d=a.addCommand(b,c);a.addFeature(d)}var r=a.lang.table,B=CKEDITOR.tools.style.parse,z="td{width} td{height} td{border-color} td{background-color} td{white-space} td{vertical-align} td{text-align} td[colspan] td[rowspan] th".split(" ");g("cellProperties",new CKEDITOR.dialogCommand("cellProperties",f({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",
requiredContent:z,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&B.background(a.styles.background).color},right:function(a){a.styles["background-color"]=B.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},
right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");g("rowDelete",f({requiredContent:"table",exec:function(a){a=
a.getSelection();(a=h(a))&&m(a)}}));g("rowInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();a=c(a);k(a,!0)}}));g("rowInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();a=c(a);k(a)}}));g("columnDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();(a=d(a))&&m(a,!0)}}));g("columnInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();a=c(a);b(a,!0)}}));g("columnInsertAfter",f({requiredContent:"table",exec:function(a){a=
a.getSelection();a=c(a);b(a)}}));g("cellDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();e(a)}}));g("cellMerge",f({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());m(b.cell,!0)}}));g("cellMergeRight",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");m(b.cell,!0)}}));g("cellMergeDown",f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",
exec:function(a,b){b.cell=n(a.getSelection(),"down");m(b.cell,!0)}}));g("cellVerticalSplit",f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){m(v(a.getSelection()))}}));g("cellHorizontalSplit",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){m(p(a.getSelection()))}}));g("cellInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();l(a,!0)}}));g("cellInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();
l(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:r.cell.menu,group:"tablecell",order:1,getItems:function(){var b=a.getSelection(),d=c(b),b={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(b,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(b,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
tablecell_split_vertical:v(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:p(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.filter.check(z)&&(b.tablecell_properties=0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return b}},tablecell_insertBefore:{label:r.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:r.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:r.cell.deleteCell,
group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:r.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:r.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:r.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:r.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:r.cell.splitVertical,group:"tablecell",
command:"cellVerticalSplit",order:20},tablecell_properties:{label:r.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:r.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:r.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:r.row.insertAfter,group:"tablerow",
command:"rowInsertAfter",order:10},tablerow_delete:{label:r.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:r.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:r.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:r.column.insertAfter,
group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:r.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});a.contextMenu&&a.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:f,insertRow:k,insertColumn:b,getSelectedCells:c};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),
CKEDITOR.tools.buildTableMap=function(c,k,h,f,a){c=c.$.rows;h=h||0;f="number"===typeof f?f:c.length-1;a="number"===typeof a?a:-1;var b=-1,d=[];for(k=k||0;k<=f;k++){b++;!d[b]&&(d[b]=[]);for(var l=-1,e=h;e<=(-1===a?c[k].cells.length-1:a);e++){var m=c[k].cells[e];if(!m)break;for(l++;d[b][l];)l++;for(var g=isNaN(m.colSpan)?1:m.colSpan,m=isNaN(m.rowSpan)?1:m.rowSpan,n=0;n<m&&!(k+n>f);n++){d[b+n]||(d[b+n]=[]);for(var p=0;p<g;p++)d[b+n][l+p]=c[k].cells[e]}l+=g-1;if(-1!==a&&l>=a)break}}return d},CKEDITOR.config.tabletools_scopedHeaders=
!1,function(){function c(a){return CKEDITOR.env.ie?a.$.clientWidth:parseInt(a.getComputedStyle("width"),10)}function k(a,b){var c=a.getComputedStyle("border-"+b+"-width"),d={thin:"0px",medium:"1px",thick:"2px"};0>c.indexOf("px")&&(c=c in d&&"none"!=a.getComputedStyle("border-style")?d[c]:0);return parseFloat(c)}function h(a){var b=[],c={},d="rtl"===a.getComputedStyle("direction"),f=CKEDITOR.tools.array.zip((new CKEDITOR.dom.nodeList(a.$.rows)).toArray(),CKEDITOR.tools.buildTableMap(a));CKEDITOR.tools.array.forEach(f,
function(f){var h=f[0].$;f=f[1];var l=-1,p=0,y=null;h?(p=new CKEDITOR.dom.element(h),y={height:p.$.offsetHeight,position:p.getDocumentPosition()}):y=void 0;for(var h=CKEDITOR.env.ie&&!CKEDITOR.env.edge,u="collapse"===a.getComputedStyle("border-collapse"),p=y.height,y=y.position,B=0;B<f.length;B++){var z=new CKEDITOR.dom.element(f[B]),x=f[B+1]&&new CKEDITOR.dom.element(f[B+1]),w,A,D=z.getDocumentPosition().x,l=l+(z.$.colSpan||1);d?A=D+k(z,"left"):w=D+z.$.offsetWidth-k(z,"right");x?(D=x.getDocumentPosition().x,
d?w=D+x.$.offsetWidth-k(x,"right"):A=D+k(x,"left")):(D=a.getDocumentPosition().x,d?w=D:A=D+a.$.offsetWidth);z=Math.max(A-w,3);h&&u&&(w-=z,z=Math.max(A-w,3));z={table:a,index:l,x:w,y:y.y,width:z,height:p,rtl:d};c[l]=c[l]||[];c[l].push(z);z.alignedPillars=c[l];b.push(z)}});return b}function f(a){(a.data||a).preventDefault()}function a(a){function b(){y=0;t.setOpacity(0);B&&g();var a=r.table;setTimeout(function(){a.removeCustomData("_cke_table_pillars")},0);q.removeListener("dragstart",f)}function g(){for(var b=
r.rtl,f=b?w.length:x.length,g=0,h=0;h<f;h++){var l=x[h],m=w[h],n=r.table;CKEDITOR.tools.setTimeout(function(c,h,k,l,m,p){c&&c.setStyle("width",d(Math.max(h+p,1)));k&&k.setStyle("width",d(Math.max(l-p,1)));m&&n.setStyle("width",d(m+p*(b?-1:1)));++g==f&&a.fire("saveSnapshot")},0,this,[l,l&&c(l),m,m&&c(m),(!l||!m)&&c(n)+k(n,"left")+k(n,"right"),B])}}function h(b){f(b);a.fire("saveSnapshot");b=r.index;for(var d=CKEDITOR.tools.buildTableMap(r.table),g=[],k=[],l=Number.MAX_VALUE,m=l,n=r.rtl,z=0,P=d.length;z<
P;z++){var N=d[z],O=N[b+(n?1:0)],N=N[b+(n?0:1)],O=O&&new CKEDITOR.dom.element(O),N=N&&new CKEDITOR.dom.element(N);O&&N&&O.equals(N)||(O&&(l=Math.min(l,c(O))),N&&(m=Math.min(m,c(N))),g.push(O),k.push(N))}x=g;w=k;A=r.x-l;D=r.x+m;t.setOpacity(.5);u=parseInt(t.getStyle("left"),10);B=0;y=1;t.on("mousemove",v);q.on("dragstart",f);q.on("mouseup",p,this)}function p(a){a.removeListener();b()}function v(a){z(a.data.getPageOffset().x)}var r,q,t,y,u,B,z,x,w,A,D;q=a.document;t=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-temp\x3d1 contenteditable\x3dfalse unselectable\x3don style\x3d"position:absolute;cursor:col-resize;filter:alpha(opacity\x3d0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10000"\x3e\x3c/div\x3e',
q);a.on("destroy",function(){t.remove()});l||q.getDocumentElement().append(t);this.attachTo=function(a){var b,c,e;y||(l&&(q.getBody().append(t),B=0),r=a,b=r.alignedPillars[0],c=r.alignedPillars[r.alignedPillars.length-1],e=b.y,b=c.height+c.y-b.y,t.setStyles({width:d(a.width),height:d(b),left:d(a.x),top:d(e)}),l&&t.setOpacity(.25),t.on("mousedown",h,this),q.getBody().setStyle("cursor","col-resize"),t.show())};z=this.move=function(a,b){if(!r)return 0;if(!(y||a>=r.x&&a<=r.x+r.width&&b>=r.y&&b<=r.y+r.height))return r=
null,y=B=0,q.removeListener("mouseup",p),t.removeListener("mousedown",h),t.removeListener("mousemove",v),q.getBody().setStyle("cursor","auto"),l?t.remove():t.hide(),0;var c=a-Math.round(t.$.offsetWidth/2);if(y){if(c==A||c==D)return 1;c=Math.max(c,A);c=Math.min(c,D);B=c-u}t.setStyle("left",d(c));return 1}}function b(a){var b=a.data.getTarget();if("mouseout"==a.name){if(!b.is("table"))return;for(var c=new CKEDITOR.dom.element(a.data.$.relatedTarget||a.data.$.toElement);c&&c.$&&!c.equals(b)&&!c.is("body");)c=
c.getParent();if(!c||c.equals(b))return}b.getAscendant("table",1).removeCustomData("_cke_table_pillars");a.removeListener()}var d=CKEDITOR.tools.cssLength,l=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(c){c.on("contentDom",function(){var d,g=c.editable(),k=g.isInline()?g:c.document;g.attachListener(k,"mousemove",function(g){g=g.data;var k=g.getTarget();if(k.type==CKEDITOR.NODE_ELEMENT){var l=g.getPageOffset().x,
n=g.getPageOffset().y;if(d&&d.move(l,n))f(g);else if(k.is("table")||k.getAscendant({thead:1,tbody:1,tfoot:1},1))if(g=k.getAscendant("table",1),c.editable().contains(g)){(k=g.getCustomData("_cke_table_pillars"))||(g.setCustomData("_cke_table_pillars",k=h(g)),g.on("mouseout",b),g.on("mousedown",b));a:{g=k;for(var k=0,t=g.length;k<t;k++){var y=g[k];if(l>=y.x&&l<=y.x+y.width&&n>=y.y&&n<=y.y+y.height){l=y;break a}}l=null}l&&(!d&&(d=new a(c)),d.attachTo(l))}}});g.attachListener(k,"scroll",function(){var a=
g.find("table").toArray();CKEDITOR.tools.array.forEach(a,CKEDITOR.tools.debounce(function(a){a.removeCustomData("_cke_table_pillars")},200))})})}})}(),function(){function c(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function k(a,b){var c=a.getAscendant("table"),d=b.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(c),g=e(a),h=e(b),k=[],l={},m,n;c.contains(d)&&(b=b.getAscendant({td:1,th:1}),h=e(b));g>h&&(c=g,g=h,h=c,c=a,a=b,b=c);for(c=0;c<f[g].length;c++)if(a.$===
f[g][c]){m=c;break}for(c=0;c<f[h].length;c++)if(b.$===f[h][c]){n=c;break}m>n&&(c=m,m=n,n=c);for(c=g;c<=h;c++)for(g=m;g<=n;g++)d=new CKEDITOR.dom.element(f[c][g]),d.$&&!d.getCustomData("selected_cell")&&(k.push(d),CKEDITOR.dom.element.setMarker(l,d,"selected_cell",!0));CKEDITOR.dom.element.clearAllMarkers(l);return k}function h(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function f(a,b){var c=a.editable().find(".cke_table-faked-selection"),d=a.editable().findOne("[data-cke-table-faked-selection-table]"),
e;a.fire("lockSnapshot");a.editable().removeClass("cke_table-faked-selection-editor");for(e=0;e<c.count();e++)c.getItem(e).removeClass("cke_table-faked-selection");d&&d.data("cke-table-faked-selection-table",!1);a.fire("unlockSnapshot");b&&(q={active:!1},a.getSelection().isInTable()&&a.getSelection().reset())}function a(a,b){var c=[],d,e;for(e=0;e<b.length;e++)d=a.createRange(),d.setStartBefore(b[e]),d.setEndAfter(b[e]),c.push(d);a.getSelection().selectRanges(c)}function b(b){var c=b.editable().find(".cke_table-faked-selection");
1>c.count()||(c=k(c.getItem(0),c.getItem(c.count()-1)),a(b,c))}function d(b,d,e){var g=y(b.getSelection(!0));d=d.is("table")?null:d;var h;(h=q.active&&!q.first)&&!(h=d)&&(h=b.getSelection().getRanges(),h=1<g.length||h[0]&&!h[0].collapsed?!0:!1);if(h)q.first=d||g[0],q.dirty=d?!1:1!==g.length;else if(q.active&&d&&q.first.getAscendant("table").equals(d.getAscendant("table"))){g=k(q.first,d);if(!q.dirty&&1===g.length&&!c(e.data.getTarget()))return f(b,"mouseup"===e.name);q.dirty=!0;q.last=d;a(b,g)}}function l(a){var b=
(a=a.editor||a.sender.editor)&&a.getSelection(),c=b&&b.getRanges()||[],d=c&&c[0].getEnclosedNode(),d=d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is("img"),e;if(b&&(f(a),b.isInTable()&&b.isFake))if(d)a.getSelection().reset();else if(!c[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){1===c.length&&c[0]._getTableElement()&&c[0]._getTableElement().is("table")&&(e=c[0]._getTableElement());e=y(b,e);a.fire("lockSnapshot");for(b=0;b<e.length;b++)e[b].addClass("cke_table-faked-selection");
0<e.length&&(a.editable().addClass("cke_table-faked-selection-editor"),e[0].getAscendant("table").data("cke-table-faked-selection-table",""));a.fire("unlockSnapshot")}}function e(a){return a.getAscendant("tr",!0).$.rowIndex}function m(a){function e(a,b){return a&&b?a.equals(b)||a.contains(b)||b.contains(a)||a.getCommonAncestor(b).is(u):!1}function g(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(l.document)}function k(a,b,c,d){if("mousedown"===a.name&&(CKEDITOR.tools.getMouseButton(a)===
CKEDITOR.MOUSE_BUTTON_LEFT||!d))return!0;if(b=a.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!g(a.data.getTarget()))a=a.data.getTarget().getAscendant({td:1,th:1},!0),b=!(a&&a.hasClass("cke_table-faked-selection"));return b}if(a.data.getTarget().getName&&("mouseup"===a.name||!c(a.data.getTarget()))){var l=a.editor||a.listenerData.editor,n=l.getSelection(1),p=h(l),r=a.data.getTarget(),t=r&&r.getAscendant({td:1,th:1},!0),r=r&&r.getAscendant("table",!0),u={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,
th:1};r&&r.hasAttribute("data-cke-tableselection-ignored")||(k(a,n,p,r)&&f(l,!0),!q.active&&"mousedown"===a.name&&CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT&&r&&(q={active:!0},CKEDITOR.document.on("mouseup",m,null,{editor:l})),(t||r)&&d(l,t||r,a),"mouseup"===a.name&&(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT&&(g(a.data.getTarget())||e(p,r))&&b(l),q={active:!1},CKEDITOR.document.removeListener("mouseup",m)))}}function g(a){var b=a.data.getTarget().getAscendant("table",
!0);q.active=!1;b&&b.hasAttribute("data-cke-tableselection-ignored")||(a=a.data.getTarget().getAscendant({td:1,th:1},!0),!a||a.hasClass("cke_table-faked-selection"))}function n(a,b){function c(a){a.cancel()}var d=a.getSelection(),e=d.createBookmarks(),f=a.document,g=a.createRange(),h=f.getDocumentElement().$,k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.blockless||CKEDITOR.env.ie?"span":"div",m,n,p,q;f.getById("cke_table_copybin")||(m=f.createElement(l),n=f.createElement(l),n.setAttributes({id:"cke_table_copybin",
"data-cke-temp":"1"}),m.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),m.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),m.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),n.append(m),a.editable().append(n),q=a.on("selectionChange",c,null,null,0),k&&(p=h.scrollTop),g.selectNodeContents(m),g.select(),k&&(h.scrollTop=p),setTimeout(function(){n.remove();d.selectBookmarks(e);q.removeListener();a.fire("unlockSnapshot");b&&(a.extractSelectedHtml(),
a.fire("saveSnapshot"))},100))}function p(a){var b=a.editor||a.sender.editor,c=b.getSelection();c.isInTable()&&(c.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||n(b,"cut"===a.name))}function v(a){this._reset();a&&this.setSelectedCells(a)}function r(a,b,c){a.on("beforeCommandExec",function(c){-1!==CKEDITOR.tools.array.indexOf(b,c.data.name)&&(c.data.selectedCells=y(a.getSelection()))});a.on("afterCommandExec",function(d){-1!==CKEDITOR.tools.array.indexOf(b,
d.data.name)&&c(a,d.data)},null,null,9)}var q={active:!1},t,y,u,B,z;v.prototype={};v.prototype._reset=function(){this.cells={first:null,last:null,all:[]};this.rows={first:null,last:null}};v.prototype.setSelectedCells=function(a){this._reset();a=a.slice(0);this._arraySortByDOMOrder(a);this.cells.all=a;this.cells.first=a[0];this.cells.last=a[a.length-1];this.rows.first=a[0].getAscendant("tr");this.rows.last=this.cells.last.getAscendant("tr")};v.prototype.getTableMap=function(){var a=u(this.cells.first),
b;a:{b=this.cells.last;var c=b.getAscendant("table"),d=e(b),c=CKEDITOR.tools.buildTableMap(c),f;for(f=0;f<c[d].length;f++)if((new CKEDITOR.dom.element(c[d][f])).equals(b)){b=f;break a}b=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),e(this.rows.first),a,e(this.rows.last),b)};v.prototype._getTable=function(){return this.rows.first.getAscendant("table")};v.prototype.insertRow=function(a,b,c){if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells.first.$.cellIndex,e=this.cells.last.$.cellIndex,
f=c?[]:this.cells.all,g,h=0;h<a;h++)g=B(c?this.cells.all:f,b),g=CKEDITOR.tools.array.filter(g.find("td, th").toArray(),function(a){return c?!0:a.$.cellIndex>=d&&a.$.cellIndex<=e}),f=b?g.concat(f):f.concat(g);this.setSelectedCells(f)};v.prototype.insertColumn=function(a){function b(a){a=e(a);return a>=f&&a<=g}if("undefined"===typeof a)a=1;else if(0>=a)return;for(var c=this.cells,d=c.all,f=e(c.first),g=e(c.last),c=0;c<a;c++)d=d.concat(CKEDITOR.tools.array.filter(z(d),b));this.setSelectedCells(d)};v.prototype.emptyCells=
function(a){a=a||this.cells.all;for(var b=0;b<a.length;b++)a[b].setHtml("")};v.prototype._arraySortByDOMOrder=function(a){a.sort(function(a,b){return a.getPosition(b)&CKEDITOR.POSITION_PRECEDING?-1:1})};var x={onPaste:function(b){function c(a){var b=e.createRange();b.selectNodeContents(a);b.select()}function d(a){return Math.max.apply(null,CKEDITOR.tools.array.map(a,function(a){return a.length},0))}var e=b.editor,f=e.getSelection(),g=y(f),h=f.isInTable(!0)&&this.isBoundarySelection(f),l=this.findTableInPastedContent(e,
b.data.dataValue),m,n;(function(a,b,c,d){a=a.getRanges();var e=a.length&&a[0]._getTableElement({table:1});if(!b.length||e&&e.hasAttribute("data-cke-tableselection-ignored")||d&&!c)return!1;if(b=!d)(b=a[0])?(b=b.clone(),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),b=(b=b.getEnclosedNode())&&b.is&&b.is(CKEDITOR.dtd.$tableContent)):b=void 0,b=!b;return b?!1:!0})(f,g,l,h)&&"drop"!==b.data.method&&(g=g[0].getAscendant("table"),m=new v(y(f,g)),e.once("afterPaste",function(){var b;if(n){b=new CKEDITOR.dom.element(n[0][0]);
var c=n[n.length-1];b=k(b,new CKEDITOR.dom.element(c[c.length-1]))}else b=m.cells.all;a(e,b)}),l?(b.stop(),h?(m.insertRow(1,1===h,!0),f.selectElement(m.rows.first)):(m.emptyCells(),a(e,m.cells.all)),b=m.getTableMap(),n=CKEDITOR.tools.buildTableMap(l),m.insertRow(n.length-b.length),m.insertColumn(d(n)-d(b)),b=m.getTableMap(),this.pasteTable(m,b,n),e.fire("saveSnapshot"),setTimeout(function(){e.fire("afterPaste")},0)):(c(m.cells.first),e.once("afterPaste",function(){e.fire("lockSnapshot");m.emptyCells(m.cells.all.slice(1));
a(e,m.cells.all);e.fire("unlockSnapshot")})))},isBoundarySelection:function(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(a,b){var c=a.dataProcessor,d=new CKEDITOR.dom.element("body");c||(c=new CKEDITOR.htmlDataProcessor(a));d.setHtml(c.toHtml(b),{fixForBody:!1});return 1<d.getChildCount()?null:d.findOne("table")},
pasteTable:function(a,b,c){var d,e=u(a.cells.first),f=a._getTable(),g={},h,k,l,m;for(l=0;l<c.length;l++)for(h=new CKEDITOR.dom.element(f.$.rows[a.rows.first.$.rowIndex+l]),m=0;m<c[l].length;m++)if(k=new CKEDITOR.dom.element(c[l][m]),d=b[l]&&b[l][m]?new CKEDITOR.dom.element(b[l][m]):null,k&&!k.getCustomData("processed")){if(d&&d.getParent())k.replace(d);else if(0===m||c[l][m-1])(d=0!==m?new CKEDITOR.dom.element(c[l][m-1]):null)&&h.equals(d.getParent())?k.insertAfter(d):0<e?h.$.cells[e]?k.insertAfter(new CKEDITOR.dom.element(h.$.cells[e])):
h.append(k):h.append(k,!0);CKEDITOR.dom.element.setMarker(g,k,"processed",!0)}else k.getCustomData("processed")&&d&&d.remove();CKEDITOR.dom.element.clearAllMarkers(g)}};CKEDITOR.plugins.tableselection={getCellsBetween:k,keyboardIntegration:function(a){function c(a){var b=a.getEnclosedNode();b&&"function"===typeof b.is&&b.is({td:1,th:1})?b.setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var d=a.editable();d.attachListener(d,"keydown",function(a){function b(c,
d){if(!d.length)return null;var f=a.createRange(),g=CKEDITOR.dom.range.mergeRanges(d);CKEDITOR.tools.array.forEach(g,function(a){a.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var h=g[0].getBoundaryNodes(),k=h.startNode,h=h.endNode;if(k&&k.is&&k.is(e)){for(var l=k.getAscendant("table",!0),m=k.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l),n=!1,p=function(a){return!k.contains(a)&&a.is&&a.is("td","th")};m&&!p(m);)m=m.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l);!m&&h&&h.is&&!h.is("table")&&h.getNext()&&
(m=h.getNext().findOne("td, th"),n=!0);if(m)f["moveToElementEdit"+(n?"Start":"End")](m);else f.setStartBefore(k.getAscendant("table",!0)),f.collapse(!0);g[0].deleteContents();return[f]}if(k)return f.moveToElementEditablePosition(k),[f]}var d={37:1,38:1,39:1,40:1,8:1,46:1,13:1},e=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent);delete e.td;delete e.th;return function(e){var f=e.data.getKey(),g=e.data.getKeystroke(),h,k=37===f||38==f,l,m,n;if(d[f]&&!a.readOnly&&(h=a.getSelection())&&h.isInTable()&&
h.isFake){l=h.getRanges();m=l[0]._getTableElement();n=l[l.length-1]._getTableElement();if(13!==f||a.plugins.enterkey)e.data.preventDefault(),e.cancel();if(36<f&&41>f)l[0].moveToElementEditablePosition(k?m:n,!k),h.selectRanges([l[0]]);else if(13!==f||13===g||g===CKEDITOR.SHIFT+13){for(e=0;e<l.length;e++)c(l[e]);(e=b(m,l))?l=e:l[0].moveToElementEditablePosition(m);h.selectRanges(l);13===f&&a.plugins.enterkey?(a.fire("lockSnapshot"),13===g?a.execCommand("enter"):a.execCommand("shiftEnter"),a.fire("unlockSnapshot"),
a.fire("saveSnapshot")):13!==f&&a.fire("saveSnapshot")}}}}(a),null,null,-1);d.attachListener(d,"keypress",function(b){var d=a.getSelection(),e=b.data.$.charCode||13===b.data.getKey(),f;if(!a.readOnly&&d&&d.isInTable()&&d.isFake&&e&&!(b.data.getKeystroke()&CKEDITOR.CTRL)){b=d.getRanges();e=b[0].getEnclosedNode().getAscendant({td:1,th:1},!0);for(f=0;f<b.length;f++)c(b[f]);e&&(b[0].moveToElementEditablePosition(e),d.selectRanges([b[0]]))}},null,null,-1);d.attachListener(d,"keyup",function(a){return function(c){c=
c.data.getKey();var d=a.getSelection();9===c&&d.isInTable()&&b(a)}}(a),null,null,-1)}};CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&11>CKEDITOR.env.version)},onLoad:function(){t=CKEDITOR.plugins.tabletools;y=t.getSelectedCells;u=t.getCellColIndex;B=t.insertRow;z=t.insertColumn;CKEDITOR.document.appendStyleSheet(this.path+"styles/tableselection.css")},init:function(b){this.isSupportedEnvironment()&&(b.addContentsCss&&
b.addContentsCss(this.path+"styles/tableselection.css"),b.on("contentDom",function(){var a=b.editable(),c=a.isInline()?a:b.document,d={editor:b};a.attachListener(c,"mousedown",m,null,d);a.attachListener(c,"mousemove",m,null,d);a.attachListener(c,"mouseup",m,null,d);a.attachListener(a,"dragstart",g);a.attachListener(b,"selectionCheck",l);CKEDITOR.plugins.tableselection.keyboardIntegration(b);CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(a.attachListener(a,"cut",
p),a.attachListener(a,"copy",p))}),b.on("paste",x.onPaste,x),r(b,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(b,c){a(b,c.selectedCells)}),r(b,["cellMerge","cellMergeRight","cellMergeDown"],function(b,c){a(b,[c.commandData.cell])}),r(b,["cellDelete"],function(a){f(a,!0)}))}})}(),function(){CKEDITOR.plugins.add("templates",{requires:"dialog,ajax",init:function(c){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));
c.addCommand("templates",new CKEDITOR.dialogCommand("templates"));c.ui.addButton&&c.ui.addButton("Templates",{label:c.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},k={};CKEDITOR.addTemplates=function(h,f){c[h]=f};CKEDITOR.getTemplates=function(h){return c[h]};CKEDITOR.loadTemplates=function(c,f){for(var a=[],b=0,d=c.length;b<d;b++)k[c[b]]||(a.push(c[b]),k[c[b]]=1);a.length?CKEDITOR.scriptLoader.load(a,f):setTimeout(f,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],
CKEDITOR.config.templates_replaceContent=!0,CKEDITOR.plugins.add("uicolor",{requires:"dialog",init:function(c){var k=new CKEDITOR.dialogCommand("uicolor");k.editorFocus=!1;CKEDITOR.dialog.add("uicolor",this.path+"dialogs/uicolor.js");c.addCommand("uicolor",k);c.ui.addButton&&c.ui.addButton("UIColor",{label:c.lang.uicolor.title,command:"uicolor",toolbar:"tools,1"})}}),"use strict",function(){CKEDITOR.plugins.add("uploadwidget",{requires:"widget,clipboard,filetools,notificationaggregator",init:function(c){c.filter.allow("*[!data-widget,!data-cke-upload-id]")},
isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}});CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{addUploadWidget:function(c,k,h){var f=CKEDITOR.fileTools,a=c.uploadRepository,b=h.supportedTypes?10:20;CKEDITOR.plugins.clipboard.addFileMatcher(c,function(a){return h.supportedTypes?f.isTypeSupported(a,h.supportedTypes):!0});if(h.fileToElement)c.on("paste",function(b){b=b.data;var h=c.widgets.registered[k],e=b.dataTransfer,
m=e.getFilesCount(),g=h.loadMethod||"loadAndUpload",n,p;if(!b.dataValue&&m)for(p=0;p<m;p++)if(n=e.getFile(p),!h.supportedTypes||f.isTypeSupported(n,h.supportedTypes)){var v=h.fileToElement(n);n=a.create(n,void 0,h.loaderType);v&&(n[g](h.uploadUrl,h.additionalRequestParameters),CKEDITOR.fileTools.markElement(v,k,n.id),"loadAndUpload"!=g&&"upload"!=g||h.skipNotifications||CKEDITOR.fileTools.bindNotifications(c,n),b.dataValue+=v.getOuterHtml())}},null,null,b);CKEDITOR.tools.extend(h,{downcast:function(){return new CKEDITOR.htmlParser.text("")},
init:function(){var b=this,f=this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),e=a.loaders[f],h=CKEDITOR.tools.capitalize,g,k;e.on("update",function(a){if("abort"===e.status&&"function"===typeof b.onAbort)b.onAbort(e);if(b.wrapper&&b.wrapper.getParent()){c.fire("lockSnapshot");a="on"+h(e.status);if("abort"===e.status||"function"!==typeof b[a]||!1!==b[a](e))k="cke_upload_"+e.status,b.wrapper&&k!=g&&(g&&b.wrapper.removeClass(g),b.wrapper.addClass(k),g=k),"error"!=e.status&&"abort"!=
e.status||c.widgets.del(b);c.fire("unlockSnapshot")}else CKEDITOR.instances[c.name]&&c.editable().find('[data-cke-upload-id\x3d"'+f+'"]').count()||e.abort(),a.removeListener()});e.update()},replaceWith:function(a,b){if(""===a.trim())c.widgets.del(this);else{var e=this==c.widgets.focused,f=c.editable(),g=c.createRange(),h,k;e||(k=c.getSelection().createBookmarks());g.setStartBefore(this.wrapper);g.setEndAfter(this.wrapper);e&&(h=g.createBookmark());f.insertHtmlIntoRange(a,g,b);c.widgets.checkWidgets({initOnlyNew:!0});
c.widgets.destroy(this,!0);e?(g.moveToBookmark(h),g.select()):c.getSelection().selectBookmarks(k);c.fire("change")}},_getLoader:function(){var a=this.wrapper.findOne("[data-cke-upload-id]");return a?this.editor.uploadRepository.loaders[a.data("cke-upload-id")]:null}});c.widgets.add(k,h)},markElement:function(c,k,h){c.setAttributes({"data-cke-upload-id":h,"data-widget":k})},bindNotifications:function(c,k){function h(){f=c._.uploadWidgetNotificaionAggregator;if(!f||f.isFinished())f=c._.uploadWidgetNotificaionAggregator=
new CKEDITOR.plugins.notificationAggregator(c,c.lang.uploadwidget.uploadMany,c.lang.uploadwidget.uploadOne),f.once("finished",function(){var a=f.getTaskCount();0===a?f.notification.hide():f.notification.update({message:1==a?c.lang.uploadwidget.doneOne:c.lang.uploadwidget.doneMany.replace("%1",a),type:"success",important:1})})}var f,a=null;k.on("update",function(){!a&&k.uploadTotal&&(h(),a=f.createTask({weight:k.uploadTotal}));a&&"uploading"==k.status&&a.update(k.uploaded)});k.on("uploaded",function(){a&&
a.done()});k.on("error",function(){a&&a.cancel();c.showNotification(k.message,"warning")});k.on("abort",function(){a&&a.cancel();CKEDITOR.instances[c.name]&&c.showNotification(c.lang.uploadwidget.abort,"info")})}})}(),"use strict",function(){CKEDITOR.plugins.add("uploadfile",{requires:"uploadwidget,link",init:function(c){if(this.isSupportedEnvironment()){var k=CKEDITOR.fileTools;k.getUploadUrl(c.config)?k.addUploadWidget(c,"uploadfile",{uploadUrl:k.getUploadUrl(c.config),fileToElement:function(c){var f=
new CKEDITOR.dom.element("a");f.setText(c.name);f.setAttribute("href","#");return f},onUploaded:function(c){this.replaceWith('\x3ca href\x3d"'+c.url+'" target\x3d"_blank"\x3e'+c.fileName+"\x3c/a\x3e")}}):CKEDITOR.error("uploadfile-config")}},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}})}(),"use strict",function(){function c(c){9>=c&&(c="0"+c);return String(c)}function k(f){var a=new Date,a=[a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),
a.getSeconds()];h+=1;return"image-"+CKEDITOR.tools.array.map(a,c).join("")+"-"+h+"."+f}var h=0;CKEDITOR.plugins.add("uploadimage",{requires:"uploadwidget",onLoad:function(){CKEDITOR.addCss(".cke_upload_uploading img{opacity: 0.3}")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported},init:function(c){if(this.isSupportedEnvironment()){var a=CKEDITOR.fileTools,b=a.getUploadUrl(c.config,"image");b&&(c.config.clipboard_handleImages&&(c.config.clipboard_handleImages=
!1,CKEDITOR.warn("clipboard-image-handling-disabled",{editor:c.name,plugin:"uploadimage"})),a.addUploadWidget(c,"uploadimage",{supportedTypes:c.config.uploadImage_supportedTypes,uploadUrl:b,fileToElement:function(){var a=new CKEDITOR.dom.element("img");a.setAttribute("src","data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs\x3d");return a},parts:{img:"img"},onUploading:function(a){this.parts.img.setAttribute("src",a.data)},onUploaded:function(a){var b=this.parts.img.$;
this.replaceWith('\x3cimg src\x3d"'+a.url+'" width\x3d"'+(a.responseData.width||b.naturalWidth)+'" height\x3d"'+(a.responseData.height||b.naturalHeight)+'"\x3e')}}),c.on("paste",function(d){if(d.data.dataValue.match(/<img[\s\S]+data:/i)){d=d.data;var h=document.implementation.createHTMLDocument(""),h=new CKEDITOR.dom.element(h.body),e,m,g;h.data("cke-editable",1);h.appendHtml(d.dataValue);e=h.find("img");for(g=0;g<e.count();g++){m=e.getItem(g);var n=m.getAttribute("src"),p=n&&"data:"==n.substring(0,
5),v=null===m.data("cke-realelement");p&&v&&!m.data("cke-upload-id")&&!m.isReadOnly(1)&&(p=(p=n.match(/image\/([a-z]+?);/i))&&p[1]||"jpg",n=c.uploadRepository.create(n,k(p)),n.upload(b),a.markElement(m,"uploadimage",n.id),a.bindNotifications(c,n))}d.dataValue=h.getHtml()}}))}}});CKEDITOR.config.uploadImage_supportedTypes=/image\/(jpeg|png|gif|bmp)/}(),CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,textwatcher,autocomplete,notification,button,toolbar,clipboard,textmatch,fakeobjects,link,autolink,undo,autoembed,autogrow,balloonpanel,balloontoolbar,basicstyles,entities,bbcode,bidi,blockquote,codemirror,lineutils,widgetselection,widget,codesnippet,xml,ajax,codesnippetgeshi,panelbutton,panel,floatpanel,colorbutton,colordialog,menu,contextmenu,contextmenu_linkopen,copyformatting,devtools,dialogadvtab,div,divarea,wysiwygarea,docprops,editorplaceholder,elementspath,notificationaggregator,embedbase,embed,embedsemantic,enterkey,popup,filetools,filebrowser,find,flash,floatingspace,listblock,richcombo,font,format,forms,horizontalrule,htmlwriter,iframe,iframedialog,image,image2,indent,indentblock,indentlist,justify,menubutton,language,list,liststyle,magicline,mathjax,maximize,mentions,newpage,pagebreak,pastetools,pastefromgdocs,pastefromlibreoffice,pastefromword,pastetext,placeholder,preview,print,removeformat,resize,save,selectall,sharedspace,showblocks,showborders,smiley,sourcearea,sourcedialog,specialchar,splitquote,stylescombo,stylesheetparser,tab,table,tabletools,tableresize,tableselection,templates,uicolor,uploadwidget,uploadfile,uploadimage",
CKEDITOR.config.skin="moono-lisa",function(){var c=function(c,h){var f=CKEDITOR.getUrl("plugins/"+h);c=c.split(",");for(var a=0;a<c.length;a++)CKEDITOR.skin.icons[c[a]]={path:f,offset:-c[++a],bgsize:c[++a]}};CKEDITOR.env.hidpi?c("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,codesnippet,384,,bgcolor,408,,textcolor,432,,copyformatting,456,,creatediv,480,,docprops-rtl,504,,docprops,528,,easyimagealigncenter,552,,easyimagealignleft,576,,easyimagealignright,600,,easyimagealt,624,,easyimagefull,648,,easyimageside,672,,easyimageupload,696,,embed,720,,embedsemantic,744,,emojipanel,768,,find-rtl,792,,find,816,,replace,840,,button,864,,checkbox,888,,form,912,,hiddenfield,936,,imagebutton,960,,radio,984,,select-rtl,1008,,select,1032,,textarea-rtl,1056,,textarea,1080,,textfield-rtl,1104,,textfield,1128,,horizontalrule,1152,,iframe,1176,,image,1200,,indent-rtl,1224,,indent,1248,,outdent-rtl,1272,,outdent,1296,,justifyblock,1320,,justifycenter,1344,,justifyleft,1368,,justifyright,1392,,language,1416,,anchor-rtl,1440,,anchor,1464,,link,1488,,unlink,1512,,bulletedlist-rtl,1536,,bulletedlist,1560,,numberedlist-rtl,1584,,numberedlist,1608,,mathjax,1632,,maximize,1656,,newpage-rtl,1680,,newpage,1704,,pagebreak-rtl,1728,,pagebreak,1752,,pastefromword-rtl,1776,,pastefromword,1800,,pastetext-rtl,1824,,pastetext,1848,,placeholder,1872,,preview-rtl,1896,,preview,1920,,print,1944,,removeformat,1968,,save,1992,,selectall,2016,,showblocks-rtl,2040,,showblocks,2064,,smiley,2088,,source-rtl,2112,,source,2136,,sourcedialog-rtl,2160,,sourcedialog,2184,,specialchar,2208,,removequote,2232,,splitquote,2256,,table,2280,,templates-rtl,2304,,templates,2328,,uicolor,2352,,redo-rtl,2376,,redo,2400,,undo-rtl,2424,,undo,2448,,simplebox,4944,auto",
"icons_hidpi.png"):c("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,copyformatting,456,auto,creatediv,480,auto,docprops-rtl,504,auto,docprops,528,auto,easyimagealigncenter,552,auto,easyimagealignleft,576,auto,easyimagealignright,600,auto,easyimagealt,624,auto,easyimagefull,648,auto,easyimageside,672,auto,easyimageupload,696,auto,embed,720,auto,embedsemantic,744,auto,emojipanel,768,auto,find-rtl,792,auto,find,816,auto,replace,840,auto,button,864,auto,checkbox,888,auto,form,912,auto,hiddenfield,936,auto,imagebutton,960,auto,radio,984,auto,select-rtl,1008,auto,select,1032,auto,textarea-rtl,1056,auto,textarea,1080,auto,textfield-rtl,1104,auto,textfield,1128,auto,horizontalrule,1152,auto,iframe,1176,auto,image,1200,auto,indent-rtl,1224,auto,indent,1248,auto,outdent-rtl,1272,auto,outdent,1296,auto,justifyblock,1320,auto,justifycenter,1344,auto,justifyleft,1368,auto,justifyright,1392,auto,language,1416,auto,anchor-rtl,1440,auto,anchor,1464,auto,link,1488,auto,unlink,1512,auto,bulletedlist-rtl,1536,auto,bulletedlist,1560,auto,numberedlist-rtl,1584,auto,numberedlist,1608,auto,mathjax,1632,auto,maximize,1656,auto,newpage-rtl,1680,auto,newpage,1704,auto,pagebreak-rtl,1728,auto,pagebreak,1752,auto,pastefromword-rtl,1776,auto,pastefromword,1800,auto,pastetext-rtl,1824,auto,pastetext,1848,auto,placeholder,1872,auto,preview-rtl,1896,auto,preview,1920,auto,print,1944,auto,removeformat,1968,auto,save,1992,auto,selectall,2016,auto,showblocks-rtl,2040,auto,showblocks,2064,auto,smiley,2088,auto,source-rtl,2112,auto,source,2136,auto,sourcedialog-rtl,2160,auto,sourcedialog,2184,auto,specialchar,2208,auto,removequote,2232,auto,splitquote,2256,auto,table,2280,auto,templates-rtl,2304,auto,templates,2328,auto,uicolor,2352,auto,redo-rtl,2376,auto,redo,2400,auto,undo-rtl,2424,auto,undo,2448,auto,simplebox,2472,auto",
"icons.png")}(),CKEDITOR.lang.languages={af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1})})();