/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var f=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"I8E8",version:"4.10.1",revision:"59246e973",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:f},status:"unloaded",basePath:function(){var d=window.CKEDITOR_BASEPATH||"";if(!d)for(var k=document.getElementsByTagName("script"),e=0;e<k.length;e++){var b=k[e].src.match(f);if(b){d=b[1];break}}-1==d.indexOf(":/")&&"//"!=d.slice(0,
2)&&(d=0===d.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+d:location.href.match(/^[^\?]*\/(?:)/)[0]+d);if(!d)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d}(),getUrl:function(d){-1==d.indexOf(":/")&&0!==d.indexOf("/")&&(d=this.basePath+d);this.timestamp&&"/"!=d.charAt(d.length-1)&&!/[&?]t=/.test(d)&&(d+=(0<=d.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return d},
domReady:function(){function d(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",d,!1),k()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",d),k())}catch(b){}}function k(){for(var b;b=e.shift();)b()}var e=[];return function(b){function g(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(g,1);return}d()}e.push(b);"complete"===document.readyState&&setTimeout(d,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
d,!1),window.addEventListener("load",d,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",d);window.attachEvent("onload",d);b=!1;try{b=!window.frameElement}catch(c){}document.documentElement.doScroll&&b&&g()}}}()},e=window.CKEDITOR_GETURL;if(e){var k=h.getUrl;h.getUrl=function(d){return e.call(h,d)||k.call(h,d)}}return h}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(f){var h=CKEDITOR.event.prototype,e;for(e in h)null==f[e]&&(f[e]=h[e])},
CKEDITOR.event.prototype=function(){function f(k){var d=h(this);return d[k]||(d[k]=new e(k))}var h=function(k){k=k.getPrivate&&k.getPrivate()||k._||(k._={});return k.events||(k.events={})},e=function(k){this.name=k;this.listeners=[]};e.prototype={getListenerIndex:function(k){for(var d=0,e=this.listeners;d<e.length;d++)if(e[d].fn==k)return d;return-1}};return{define:function(k,d){var e=f.call(this,k);CKEDITOR.tools.extend(e,d,!0)},on:function(k,d,e,h,b){function g(a,n,b,g){a={name:k,sender:this,editor:a,
data:n,listenerData:h,stop:b,cancel:g,removeListener:c};return!1===d.call(e,a)?!1:a.data}function c(){n.removeListener(k,d)}var a=f.call(this,k);if(0>a.getListenerIndex(d)){a=a.listeners;e||(e=this);isNaN(b)&&(b=10);var n=this;g.fn=d;g.priority=b;for(var w=a.length-1;0<=w;w--)if(a[w].priority<=b)return a.splice(w+1,0,g),{removeListener:c};a.unshift(g)}return{removeListener:c}},once:function(){var k=Array.prototype.slice.call(arguments),d=k[1];k[1]=function(k){k.removeListener();return d.apply(this,
arguments)};return this.on.apply(this,k)},capture:function(){CKEDITOR.event.useCapture=1;var k=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return k},fire:function(){var k=0,d=function(){k=1},e=0,f=function(){e=1};return function(b,g,c){var a=h(this)[b];b=k;var n=e;k=e=0;if(a){var w=a.listeners;if(w.length)for(var w=w.slice(0),v,t=0;t<w.length;t++){if(a.errorProof)try{v=w[t].call(this,c,g,d,f)}catch(p){}else v=w[t].call(this,c,g,d,f);!1===v?e=1:"undefined"!=typeof v&&(g=v);if(k||e)break}}g=
e?!1:"undefined"==typeof g?!0:g;k=b;e=n;return g}}(),fireOnce:function(k,d,e){d=this.fire(k,d,e);delete h(this)[k];return d},removeListener:function(k,d){var e=h(this)[k];if(e){var f=e.getListenerIndex(d);0<=f&&e.listeners.splice(f,1)}},removeAllListeners:function(){var e=h(this),d;for(d in e)delete e[d]},hasListeners:function(e){return(e=h(this)[e])&&0<e.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(f,h){f in{instanceReady:1,loaded:1}&&(this[f]=!0);return CKEDITOR.event.prototype.fire.call(this,f,h,this)},CKEDITOR.editor.prototype.fireOnce=function(f,h){f in{instanceReady:1,loaded:1}&&(this[f]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,f,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var f=navigator.userAgent.toLowerCase(),h=f.match(/edge[ \/](\d+.?\d*)/),e=-1<f.indexOf("trident/"),e=!(!h&&!e),e={ie:e,edge:!!h,webkit:!e&&
-1<f.indexOf(" applewebkit/"),air:-1<f.indexOf(" adobeair/"),mac:-1<f.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<f.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(f),isCustomDomain:function(){if(!this.ie)return!1;var d=document.domain,e=window.location.hostname;return d!=e&&d!="["+e+"]"},secure:"https:"==location.protocol};e.gecko="Gecko"==navigator.product&&!e.webkit&&!e.ie;e.webkit&&(-1<f.indexOf("chrome")?e.chrome=
!0:e.safari=!0);var k=0;e.ie&&(k=h?parseFloat(h[1]):e.quirks||!document.documentMode?parseFloat(f.match(/msie (\d+)/)[1]):document.documentMode,e.ie9Compat=9==k,e.ie8Compat=8==k,e.ie7Compat=7==k,e.ie6Compat=7>k||e.quirks);e.gecko&&(h=f.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),k=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));e.air&&(k=parseFloat(f.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(k=parseFloat(f.match(/ applewebkit\/(\d+)/)[1]));e.version=k;e.isCompatible=!(e.ie&&7>k)&&!(e.gecko&&4E4>k)&&!(e.webkit&&
534>k);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko||e.webkit||e.ie&&10<k;e.needsNbspFiller=e.ie&&11>k;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air");e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}()),"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 f=document.createElement("script");f.type="text/javascript";f.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(f)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(f){(this._.pending||(this._.pending=[])).push(f)};(function(){CKEDITOR.domReady(function(){var f=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;f&&(CKEDITOR.status=
"basic_ready",f&&f._load?f():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();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(f,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:f,additionalData:h})},CKEDITOR.error=function(f,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
{type:"error",errorCode:f,additionalData:h})},CKEDITOR.on("log",function(f){if(window.console&&window.console.log){var h=console[f.data.type]?f.data.type:"log",e=f.data.errorCode;if(f=f.data.additionalData)console[h]("[CKEDITOR] Error code: "+e+".",f);else console[h]("[CKEDITOR] Error code: "+e+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+e)}},null,null,999),CKEDITOR.dom={},function(){var f=[],h=CKEDITOR.env.gecko?
"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",e=/&/g,k=/>/g,d=/</g,l=/"/g,m=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,b={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},g=function(c,a){return"#"==a[0]?String.fromCharCode(parseInt(a.slice(1),10)):b[a]};CKEDITOR.on("reset",function(){f=[]});CKEDITOR.tools={arrayCompare:function(c,a){if(!c&&!a)return!0;if(!c||!a||c.length!=a.length)return!1;for(var n=0;n<c.length;n++)if(c[n]!=a[n])return!1;return!0},getIndex:function(c,a){for(var n=
0;n<c.length;++n)if(a(c[n]))return n;return-1},clone:function(c){var a;if(c&&c instanceof Array){a=[];for(var n=0;n<c.length;n++)a[n]=CKEDITOR.tools.clone(c[n]);return a}if(null===c||"object"!=typeof c||c instanceof String||c instanceof Number||c instanceof Boolean||c instanceof Date||c instanceof RegExp||c.nodeType||c.window===c)return c;a=new c.constructor;for(n in c)a[n]=CKEDITOR.tools.clone(c[n]);return a},capitalize:function(c,a){return c.charAt(0).toUpperCase()+(a?c.slice(1):c.slice(1).toLowerCase())},
extend:function(c){var a=arguments.length,n,b;"boolean"==typeof(n=arguments[a-1])?a--:"boolean"==typeof(n=arguments[a-2])&&(b=arguments[a-1],a-=2);for(var g=1;g<a;g++){var d=arguments[g],e;for(e in d)if(!0===n||null==c[e])if(!b||e in b)c[e]=d[e]}return c},prototypedCopy:function(c){var a=function(){};a.prototype=c;return new a},copy:function(c){var a={},n;for(n in c)a[n]=c[n];return a},isArray:function(c){return"[object Array]"==Object.prototype.toString.call(c)},isEmpty:function(c){for(var a in c)if(c.hasOwnProperty(a))return!1;
return!0},cssVendorPrefix:function(c,a,n){if(n)return h+c+":"+a+";"+c+":"+a;n={};n[c]=a;n[h+c]=a;return n},cssStyleToDomStyle:function(){var c=document.createElement("div").style,a="undefined"!=typeof c.cssFloat?"cssFloat":"undefined"!=typeof c.styleFloat?"styleFloat":"float";return function(c){return"float"==c?a:c.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(c){c=[].concat(c);for(var a,n=[],b=0;b<c.length;b++)if(a=c[b])/@import|[{}]/.test(a)?n.push("\x3cstyle\x3e"+
a+"\x3c/style\x3e"):n.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+a+'"\x3e');return n.join("")},htmlEncode:function(c){return void 0===c||null===c?"":String(c).replace(e,"\x26amp;").replace(k,"\x26gt;").replace(d,"\x26lt;")},htmlDecode:function(c){return c.replace(m,g)},htmlEncodeAttr:function(c){return CKEDITOR.tools.htmlEncode(c).replace(l,"\x26quot;")},htmlDecodeAttr:function(c){return CKEDITOR.tools.htmlDecode(c)},transformPlainTextToHtml:function(c,a){var n=a==CKEDITOR.ENTER_BR,
b=this.htmlEncode(c.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),g=a==CKEDITOR.ENTER_P?"p":"div";if(!n){var d=/\n{2}/g;if(d.test(b))var e="\x3c"+g+"\x3e",k="\x3c/"+g+"\x3e",b=e+b.replace(d,function(){return k+e})+k}b=b.replace(/\n/g,"\x3cbr\x3e");n||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+g+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,function(a,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,
"\x26nbsp;")},getNextNumber:function(){var c=0;return function(){return++c}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var c="e",a=0;8>a;a++)c+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return c},override:function(c,a){var n=a(c);n.prototype=c.prototype;return n},setTimeout:function(c,a,n,b,g){g||(g=window);n||(n=g);return g.setTimeout(function(){b?c.apply(n,[].concat(b)):c.apply(n)},a||0)},throttle:function(c,a,n){var b,g=0;n=n||{};return{input:function(){function d(){g=
(new Date).getTime();b=!1;a.apply(n,e)}var e=Array.prototype.slice.call(arguments);b&&(clearTimeout(b),b=0);var k=(new Date).getTime()-g;k<c?b=setTimeout(d,c-k):d()},reset:function(){b&&(clearTimeout(b),b=g=0)}}},trim:function(){var c=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(c,"")}}(),ltrim:function(){var c=/^[ \t\n\r]+/g;return function(a){return a.replace(c,"")}}(),rtrim:function(){var c=/[ \t\n\r]+$/g;return function(a){return a.replace(c,"")}}(),indexOf:function(c,
a){if("function"==typeof a)for(var n=0,b=c.length;n<b;n++){if(a(c[n]))return n}else{if(c.indexOf)return c.indexOf(a);n=0;for(b=c.length;n<b;n++)if(c[n]===a)return n}return-1},search:function(c,a){var n=CKEDITOR.tools.indexOf(c,a);return 0<=n?c[n]:null},bind:function(c,a){return function(){return c.apply(a,arguments)}},createClass:function(c){var a=c.$,n=c.base,b=c.privates||c._,g=c.proto;c=c.statics;!a&&(a=function(){n&&this.base.apply(this,arguments)});if(b)var d=a,a=function(){var a=this._||(this._=
{}),c;for(c in b){var n=b[c];a[c]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}d.apply(this,arguments)};n&&(a.prototype=this.prototypedCopy(n.prototype),a.prototype.constructor=a,a.base=n,a.baseProto=n.prototype,a.prototype.base=function(){this.base=n.prototype.base;n.apply(this,arguments);this.base=arguments.callee});g&&this.extend(a.prototype,g,!0);c&&this.extend(a,c,!0);return a},addFunction:function(c,a){return f.push(function(){return c.apply(a||this,arguments)})-1},removeFunction:function(c){f[c]=
null},callFunction:function(c){var a=f[c];return a&&a.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var c=/^-?\d+\.?\d*px$/,a;return function(n){a=CKEDITOR.tools.trim(n+"")+"px";return c.test(a)?a:n||""}}(),convertToPx:function(){var c;return function(a){c||(c=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(c));return/%$/.test(a)?
a:(c.setStyle("width",a),c.$.clientWidth)}}(),repeat:function(c,a){return Array(a+1).join(c)},tryThese:function(){for(var c,a=0,n=arguments.length;a<n;a++){var b=arguments[a];try{c=b();break}catch(g){}}return c},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(c){return function(){var a=arguments,n=this;window.setTimeout(function(){c.apply(n,a)},0)}},normalizeCssText:function(c,a){var n=[],b,g=CKEDITOR.tools.parseCssText(c,!0,a);for(b in g)n.push(b+":"+g[b]);
n.sort();return n.length?n.join(";")+";":""},convertRgbToHex:function(c){return c.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,c,b,g){a=[c,b,g];for(c=0;3>c;c++)a[c]=("0"+parseInt(a[c],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(c){return c.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,c,b,g){a=c.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+g})},parseCssText:function(c,a,b){var g={};
b&&(c=(new CKEDITOR.dom.element("span")).setAttribute("style",c).getAttribute("style")||"");c&&(c=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(c)));if(!c||";"==c)return g;c.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,b,n){a&&(b=b.toLowerCase(),"font-family"==b&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));g[b]=n});return g},writeCssText:function(c,a){var b,g=[];for(b in c)g.push(b+":"+c[b]);a&&g.sort();return g.join("; ")},objectCompare:function(c,
a,b){var g;if(!c&&!a)return!0;if(!c||!a)return!1;for(g in c)if(c[g]!=a[g])return!1;if(!b)for(g in a)if(c[g]!=a[g])return!1;return!0},objectKeys:function(c){var a=[],b;for(b in c)a.push(b);return a},convertArrayToObject:function(c,a){var b={};1==arguments.length&&(a=!0);for(var g=0,d=c.length;g<d;++g)b[c[g]]=a;return b},fixDomain:function(){for(var c;;)try{c=window.parent.document.domain;break}catch(a){c=c?c.replace(/.+?(?:\.|$)/,""):document.domain;if(!c)break;document.domain=c}return!!c},eventsBuffer:function(c,
a,b){function g(){e=(new Date).getTime();d=!1;b?a.call(b):a()}var d,e=0;return{input:function(){if(!d){var a=(new Date).getTime()-e;a<c?d=setTimeout(g,c-a):g()}},reset:function(){d&&clearTimeout(d);d=e=0}}},enableHtml5Elements:function(c,a){for(var b="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(" "),g=b.length,d;g--;)d=c.createElement(b[g]),a&&c.appendChild(d)},checkIfAnyArrayItemMatches:function(c,
a){for(var b=0,g=c.length;b<g;++b)if(c[b].match(a))return!0;return!1},checkIfAnyObjectPropertyMatches:function(c,a){for(var b in c)if(b.match(a))return!0;return!1},keystrokeToString:function(c,a){var b=this.keystrokeToArray(c,a);b.display=b.display.join("+");b.aria=b.aria.join("+");return b},keystrokeToArray:function(c,a){var b=a&16711680,g=a&65535,d=CKEDITOR.env.mac,e=[],k=[];b&CKEDITOR.CTRL&&(e.push(d?"⌘":c[17]),k.push(d?c[224]:c[17]));b&CKEDITOR.ALT&&(e.push(d?"⌥":c[18]),k.push(c[18]));b&CKEDITOR.SHIFT&&
(e.push(d?"⇧":c[16]),k.push(c[16]));g&&(c[g]?(e.push(c[g]),k.push(c[g])):(e.push(String.fromCharCode(g)),k.push(String.fromCharCode(g))));return{display:e,aria:k}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(c){c=c.toLowerCase();for(var a=document.cookie.split(";"),b,g,d=0;d<a.length;d++)if(b=a[d].split("\x3d"),g=decodeURIComponent(CKEDITOR.tools.trim(b[0]).toLowerCase()),g===c)return decodeURIComponent(1<b.length?
b[1]:"");return null},setCookie:function(c,a){document.cookie=encodeURIComponent(c)+"\x3d"+encodeURIComponent(a)+";path\x3d/"},getCsrfToken:function(){var c=CKEDITOR.tools.getCookie("ckCsrfToken");if(!c||40!=c.length){var c=[],a="";if(window.crypto&&window.crypto.getRandomValues)c=new Uint8Array(40),window.crypto.getRandomValues(c);else for(var b=0;40>b;b++)c.push(Math.floor(256*Math.random()));for(b=0;b<c.length;b++)var g="abcdefghijklmnopqrstuvwxyz0123456789".charAt(c[b]%36),a=a+(.5<Math.random()?
g.toUpperCase():g);c=a;CKEDITOR.tools.setCookie("ckCsrfToken",c)}return c},escapeCss:function(c){return c?window.CSS&&CSS.escape?CSS.escape(c):isNaN(parseInt(c.charAt(0),10))?c:"\\3"+c.charAt(0)+" "+c.substring(1,c.length):""},getMouseButton:function(c){var a=(c=c.data)&&c.$;return c&&a?CKEDITOR.env.ie&&9>CKEDITOR.env.version?4===a.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:1===a.button?CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:a.button:!1},convertHexStringToBytes:function(c){var a=[],b=c.length/
2,g;for(g=0;g<b;g++)a.push(parseInt(c.substr(2*g,2),16));return a},convertBytesToBase64:function(c){var a="",b=c.length,g;for(g=0;g<b;g+=3){var d=c.slice(g,g+3),e=d.length,k=[],f;if(3>e)for(f=e;3>f;f++)d[f]=0;k[0]=(d[0]&252)>>2;k[1]=(d[0]&3)<<4|d[1]>>4;k[2]=(d[1]&15)<<2|(d[2]&192)>>6;k[3]=d[2]&63;for(f=0;4>f;f++)a=f<=e?a+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k[f]):a+"\x3d"}return a},style:{parse:{_colors:{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",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_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(c){var a={},b=this._findColor(c);b.length&&(a.color=b[0],CKEDITOR.tools.array.forEach(b,function(a){c=c.replace(a,"")}));if(c=CKEDITOR.tools.trim(c))a.unprocessed=c;return a},margin:function(c){function a(a){b.top=g[a[0]];b.right=g[a[1]];b.bottom=g[a[2]];b.left=g[a[3]]}var b={},g=c.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(g.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(c){var a={},b=c.split(/\s+/g);c=CKEDITOR.tools.style.parse._findColor(c);c.length&&(a.color=c[0]);CKEDITOR.tools.array.forEach(b,function(c){a.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,c)?!a.width&&CKEDITOR.tools.style.parse._widthRegExp.test(c)&&(a.width=c):a.style=c});return a},_findColor:function(c){var a=[],b=CKEDITOR.tools.array,a=a.concat(c.match(this._rgbaRegExp)||[]),a=a.concat(c.match(this._hslaRegExp)||
[]);return a=a.concat(b.filter(c.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(c,a,b){var g=[];this.forEach(c,function(d,e){a.call(b,d,e,c)&&g.push(d)});return g},forEach:function(c,a,b){var g=c.length,d;for(d=0;d<g;d++)a.call(b,c[d],d,c)},map:function(c,a,b){for(var g=[],d=0;d<c.length;d++)g.push(a.call(b,c[d],d,c));return g},reduce:function(c,a,b,g){for(var d=0;d<c.length;d++)b=a.call(g,
b,c[d],d,c);return b},every:function(c,a,b){if(!c.length)return!0;a=this.filter(c,a,b);return c.length===a.length}},object:{findKey:function(c,a){if("object"!==typeof c)return null;for(var b in c)if(c[b]===a)return b;return null},merge:function(c,a){var b=CKEDITOR.tools,g=b.clone(c),d=b.clone(a);b.array.forEach(b.objectKeys(d),function(a){g[a]="object"===typeof d[a]&&"object"===typeof g[a]?b.object.merge(g[a],d[a]):d[a]});return g}},getAbsoluteRectPosition:function(c,a){function b(a){if(a){var c=
a.getClientRect();g.top+=c.top;g.left+=c.left;"x"in g&&"y"in g&&(g.x+=c.x,g.y+=c.y);b(a.getWindow().getFrame())}}var g=CKEDITOR.tools.copy(a);b(c.getFrame());var d=CKEDITOR.document.getWindow().getScrollPosition();g.top+=d.y;g.left+=d.x;"x"in g&&"y"in g&&(g.y+=d.y,g.x+=d.x);g.right=g.left+g.width;g.bottom=g.top+g.height;return g}};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 f=CKEDITOR.tools.extend,h=function(c,a){for(var b=CKEDITOR.tools.clone(c),g=1;g<arguments.length;g++){a=arguments[g];for(var d in a)delete b[d]}return b},e={},k={},d={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},l={command:1,link:1,meta:1,noscript:1,script:1,style:1},m={},b={"#":1},g={center:1,dir:1,noframes:1};
f(e,{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},b,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});f(k,d,e,g);h={a:h(e,{a:1,button:1}),abbr:e,address:k,
area:m,article:k,aside:k,audio:f({source:1,track:1},k),b:e,base:m,bdi:e,bdo:e,blockquote:k,body:k,br:m,button:h(e,{a:1,button:1}),canvas:e,caption:k,cite:e,code:e,col:m,colgroup:{col:1},command:m,datalist:f({option:1},e),dd:k,del:e,details:f({summary:1},k),dfn:e,div:k,dl:{dt:1,dd:1},dt:k,em:e,embed:m,fieldset:f({legend:1},k),figcaption:k,figure:f({figcaption:1},k),footer:k,form:k,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,head:f({title:1,base:1},l),header:k,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:m,html:f({head:1,
body:1},k,l),i:e,iframe:b,img:m,input:m,ins:e,kbd:e,keygen:m,label:e,legend:e,li:k,link:m,main:k,map:k,mark:e,menu:f({li:1},k),meta:m,meter:h(e,{meter:1}),nav:k,noscript:f({link:1,meta:1,style:1},e),object:f({param:1},e),ol:{li:1},optgroup:{option:1},option:b,output:e,p:e,param:m,pre:e,progress:h(e,{progress:1}),q:e,rp:e,rt:e,ruby:f({rp:1,rt:1},e),s:e,samp:e,script:b,section:k,select:{optgroup:1,option:1},small:e,source:m,span:e,strong:e,style:b,sub:e,summary:f({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},e),
sup:e,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:k,textarea:b,tfoot:{tr:1},th:k,thead:{tr:1},time:h(e,{time:1}),title:b,tr:{th:1,td:1},track:m,u:e,ul:{li:1},"var":e,video:f({source:1,track:1},k),wbr:m,acronym:e,applet:f({param:1},k),basefont:m,big:e,center:k,dialog:m,dir:{li:1},font:e,isindex:m,noframes:k,strike:e,tt:e};f(h,{$block:f({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,g),$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:e,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:f({body:1,head:1,html:1},h.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 h}(),CKEDITOR.dom.event=function(f){this.$=
f},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var f=this.getKey();if(this.$.ctrlKey||this.$.metaKey)f+=CKEDITOR.CTRL;this.$.shiftKey&&(f+=CKEDITOR.SHIFT);this.$.altKey&&(f+=CKEDITOR.ALT);return f},preventDefault:function(f){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;f&&this.stopPropagation()},stopPropagation:function(){var f=this.$;f.stopPropagation?f.stopPropagation():f.cancelBubble=!0},getTarget:function(){var f=
this.$.target||this.$.srcElement;return f?new CKEDITOR.dom.node(f):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var f=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(f.documentElement.scrollLeft||f.body.scrollLeft),y:this.$.pageY||this.$.clientY+(f.documentElement.scrollTop||f.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.dom.domObject=function(f){f&&(this.$=f)},CKEDITOR.dom.domObject.prototype=function(){var f=function(f,e){return function(k){"undefined"!=typeof CKEDITOR&&f.fire(e,new CKEDITOR.dom.event(k))}};return{getPrivate:function(){var f;(f=this.getCustomData("_"))||this.setCustomData("_",f={});return f},on:function(h){var e=this.getCustomData("_cke_nativeListeners");e||(e={},this.setCustomData("_cke_nativeListeners",e));e[h]||(e=e[h]=f(this,h),this.$.addEventListener?this.$.addEventListener(h,e,
!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+h,e));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(f){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(f)){var e=this.getCustomData("_cke_nativeListeners"),k=e&&e[f];k&&(this.$.removeEventListener?this.$.removeEventListener(f,k,!1):this.$.detachEvent&&this.$.detachEvent("on"+f,k),delete e[f])}},removeAllListeners:function(){var f=this.getCustomData("_cke_nativeListeners"),
e;for(e in f){var k=f[e];this.$.detachEvent?this.$.detachEvent("on"+e,k):this.$.removeEventListener&&this.$.removeEventListener(e,k,!1);delete f[e]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(f){var h={};CKEDITOR.on("reset",function(){h={}});f.equals=function(e){try{return e&&e.$===this.$}catch(k){return!1}};f.setCustomData=function(e,k){var d=this.getUniqueId();(h[d]||(h[d]={}))[e]=k;return this};f.getCustomData=function(e){var k=this.$["data-cke-expando"];return(k=k&&h[k])&&
e in k?k[e]:null};f.removeCustomData=function(e){var k=this.$["data-cke-expando"],k=k&&h[k],d,f;k&&(d=k[e],f=e in k,delete k[e]);return f?d:null};f.clearCustomData=function(){this.removeAllListeners();var e=this.$["data-cke-expando"];e&&delete h[e]};f.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(f)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(f){return f?new CKEDITOR.dom[f.nodeType==
CKEDITOR.NODE_DOCUMENT?"document":f.nodeType==CKEDITOR.NODE_ELEMENT?"element":f.nodeType==CKEDITOR.NODE_TEXT?"text":f.nodeType==CKEDITOR.NODE_COMMENT?"comment":f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](f):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(f,h){f.append(this,h);return f},clone:function(f,h){function e(d){d["data-cke-expando"]&&(d["data-cke-expando"]=!1);if(d.nodeType==CKEDITOR.NODE_ELEMENT||d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(h||d.nodeType!=CKEDITOR.NODE_ELEMENT||d.removeAttribute("id",!1),f){d=d.childNodes;for(var k=0;k<d.length;k++)e(d[k])}}function k(d){if(d.type==
CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=d.getName();":"==e[0]&&d.renameNode(e.substring(1))}if(f)for(e=0;e<d.getChildCount();e++)k(d.getChild(e))}}var d=this.$.cloneNode(f);e(d);d=new CKEDITOR.dom.node(d);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&k(d);return d},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},
insertAfter:function(f){f.$.parentNode.insertBefore(this.$,f.$.nextSibling);return f},insertBefore:function(f){f.$.parentNode.insertBefore(this.$,f.$);return f},insertBeforeMe:function(f){this.$.parentNode.insertBefore(f.$,this.$);return f},getAddress:function(f){for(var h=[],e=this.getDocument().$.documentElement,k=this.$;k&&k!=e;){var d=k.parentNode;d&&h.unshift(this.getIndex.call({$:k},f));k=d}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},
getIndex:function(f){function h(d,b){var g=b?d.nextSibling:d.previousSibling;return g&&g.nodeType==CKEDITOR.NODE_TEXT?e(g)?h(g,b):g:null}function e(d){return!d.nodeValue||d.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var k=this.$,d=-1,l;if(!this.$.parentNode||f&&k.nodeType==CKEDITOR.NODE_TEXT&&e(k)&&!h(k)&&!h(k,!0))return-1;do f&&k!=this.$&&k.nodeType==CKEDITOR.NODE_TEXT&&(l||e(k))||(d++,l=k.nodeType==CKEDITOR.NODE_TEXT);while(k=k.previousSibling);return d},getNextSourceNode:function(f,
h,e){if(e&&!e.call){var k=e;e=function(d){return!d.equals(k)}}f=!f&&this.getFirst&&this.getFirst();var d;if(!f){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;f=this.getNext()}for(;!f&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;f=d.getNext()}return!f||e&&!1===e(f)?null:h&&h!=f.type?f.getNextSourceNode(!1,h,e):f},getPreviousSourceNode:function(f,h,e){if(e&&!e.call){var k=e;e=function(d){return!d.equals(k)}}f=!f&&this.getLast&&this.getLast();var d;if(!f){if(this.type==
CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;f=this.getPrevious()}for(;!f&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;f=d.getPrevious()}return!f||e&&!1===e(f)?null:h&&f.type!=h?f.getPreviousSourceNode(!1,h,e):f},getPrevious:function(f){var h=this.$,e;do e=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(e&&f&&!f(e));return e},getNext:function(f){var h=this.$,e;do e=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(e&&f&&!f(e));return e},getParent:function(f){var h=
this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||f&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(f){var h=this,e=[];do e[f?"push":"unshift"](h);while(h=h.getParent());return e},getCommonAncestor:function(f){if(f.equals(this))return this;if(f.contains&&f.contains(this))return f;var h=this.contains?this:this.getParent();do if(h.contains(f))return h;while(h=h.getParent());return null},getPosition:function(f){var h=this.$,e=f.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(e);
if(h==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&f.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(e))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(e.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex<e.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();f=f.getAddress();
for(var e=Math.min(h.length,f.length),k=0;k<e;k++)if(h[k]!=f[k])return h[k]<f[k]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<f.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(f,h){var e=this.$,k,d;h||(e=e.parentNode);"function"==typeof f?(d=!0,k=f):(d=!1,k=function(d){d="string"==typeof d.nodeName?d.nodeName.toLowerCase():"";return"string"==typeof f?d==f:d in f});for(;e;){if(k(d?
new CKEDITOR.dom.node(e):e))return new CKEDITOR.dom.node(e);try{e=e.parentNode}catch(l){e=null}}return null},hasAscendant:function(f,h){var e=this.$;h||(e=e.parentNode);for(;e;){if(e.nodeName&&e.nodeName.toLowerCase()==f)return!0;e=e.parentNode}return!1},move:function(f,h){f.append(this.remove(),h)},remove:function(f){var h=this.$,e=h.parentNode;if(e){if(f)for(;f=h.firstChild;)e.insertBefore(h.removeChild(f),h);e.removeChild(h)}return this},replace:function(f){this.insertBefore(f);f.remove()},trim:function(){this.ltrim();
this.rtrim()},ltrim:function(){for(var f;this.getFirst&&(f=this.getFirst());){if(f.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(f.getText()),e=f.getLength();if(h)h.length<e&&(f.split(e-h.length),this.$.removeChild(this.$.firstChild));else{f.remove();continue}}break}},rtrim:function(){for(var f;this.getLast&&(f=this.getLast());){if(f.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(f.getText()),e=f.getLength();if(h)h.length<e&&(f.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));
else{f.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(f=this.$.lastChild)&&1==f.type&&"br"==f.nodeName.toLowerCase()&&f.parentNode.removeChild(f)},isReadOnly:function(f){var h=this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(f=!0);if(!f&&h&&"undefined"!=typeof h.$.isContentEditable)return!(h.$.isContentEditable||h.data("cke-editable"));for(;h;){if(h.data("cke-editable"))return!1;if(h.hasAttribute("contenteditable"))return"false"==
h.getAttribute("contenteditable");h=h.getParent()}return!0}}),CKEDITOR.dom.window=function(f){CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var f=this.$.document,h="CSS1Compat"==f.compatMode;return{width:(h?f.documentElement.clientWidth:f.body.clientWidth)||0,height:(h?f.documentElement.clientHeight:f.body.clientHeight)||0}},getScrollPosition:function(){var f=
this.$;if("pageXOffset"in f)return{x:f.pageXOffset||0,y:f.pageYOffset||0};f=f.document;return{x:f.documentElement.scrollLeft||f.body.scrollLeft||0,y:f.documentElement.scrollTop||f.body.scrollTop||0}},getFrame:function(){var f=this.$.frameElement;return f?new CKEDITOR.dom.element.get(f):null}}),CKEDITOR.dom.document=function(f){CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,
appendStyleSheet:function(f){if(this.$.createStyleSheet)this.$.createStyleSheet(f);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",type:"text/css",href:f});this.getHead().append(h)}},appendStyleText:function(f){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=f}else{var e=new CKEDITOR.dom.element("style",this);e.append(new CKEDITOR.dom.text(f,this));this.getHead().append(e)}return h||e.$.sheet},createElement:function(f,h){var e=new CKEDITOR.dom.element(f,
this);h&&(h.attributes&&e.setAttributes(h.attributes),h.styles&&e.setStyles(h.styles));return e},createText:function(f){return new CKEDITOR.dom.text(f,this)},focus:function(){this.getWindow().focus()},getActive:function(){var f;try{f=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(f)},getById:function(f){return(f=this.$.getElementById(f))?new CKEDITOR.dom.element(f):null},getByAddress:function(f,h){for(var e=this.$.documentElement,k=0;e&&k<f.length;k++){var d=f[k];if(h)for(var l=
-1,m=0;m<e.childNodes.length;m++){var b=e.childNodes[m];if(!0!==h||3!=b.nodeType||!b.previousSibling||3!=b.previousSibling.nodeType)if(l++,l==d){e=b;break}}else e=e.childNodes[d]}return e?new CKEDITOR.dom.node(e):null},getElementsByTag:function(f,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(f=h+":"+f);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(f))},getHead:function(){var f=this.$.getElementsByTagName("head")[0];return f=f?new CKEDITOR.dom.element(f):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(f){this.$.open("text/html","replace");CKEDITOR.env.ie&&(f=f.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(f);this.$.close()},find:function(f){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f))},
findOne:function(f){return(f=this.$.querySelector(f))?new CKEDITOR.dom.element(f):null},_getHtml5ShivFrag:function(){var f=this.getCustomData("html5ShivFrag");f||(f=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(f,!0),this.setCustomData("html5ShivFrag",f));return f}}),CKEDITOR.dom.nodeList=function(f){this.$=f},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(f){return 0>f||f>=this.$.length?null:(f=this.$[f])?new CKEDITOR.dom.node(f):null},
toArray:function(){return CKEDITOR.tools.array.map(this.$,function(f){return new CKEDITOR.dom.node(f)})}},CKEDITOR.dom.element=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createElement(f));CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.element.get=function(f){return(f="string"==typeof f?document.getElementById(f)||document.getElementsByName(f)[0]:f)&&(f.$?f:new CKEDITOR.dom.element(f))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(f,
h){var e=new CKEDITOR.dom.element("div",h);e.setHtml(f);return e.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(f,h,e,k){var d=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),l=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");f[d]=h;l[e]=1;return h.setCustomData(e,k)},CKEDITOR.dom.element.clearAllMarkers=function(f){for(var h in f)CKEDITOR.dom.element.clearMarkers(f,
f[h],1)},CKEDITOR.dom.element.clearMarkers=function(f,h,e){var k=h.getCustomData("list_marker_names"),d=h.getCustomData("list_marker_id"),l;for(l in k)h.removeCustomData(l);h.removeCustomData("list_marker_names");e&&(h.removeCustomData("list_marker_id"),delete f[d])},function(){function f(b,g){return-1<(" "+b+" ").replace(l," ").indexOf(" "+g+" ")}function h(b){var g=!0;b.$.id||(b.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),g=!1);return function(){g||b.removeAttribute("id")}}function e(b,g){var c=
CKEDITOR.tools.escapeCss(b.$.id);return"#"+c+" "+g.split(/,\s*/).join(", #"+c+" ")}function k(b){for(var g=0,c=0,a=m[b].length;c<a;c++)g+=parseFloat(this.getComputedStyle(m[b][c])||0,10)||0;return g}var d=document.createElement("_").classList,d="undefined"!==typeof d&&null!==String(d.add).match(/\[Native code\]/gi),l=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:d?function(b){this.$.classList.add(b);return this}:function(b){var g=this.$.className;
g&&(f(g,b)||(g+=" "+b));this.$.className=g||b;return this},removeClass:d?function(b){var g=this.$;g.classList.remove(b);g.className||g.removeAttribute("class");return this}:function(b){var g=this.getAttribute("class");g&&f(g,b)&&((g=g.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",g):this.removeAttribute("class"));return this},hasClass:function(b){return f(this.$.className,b)},append:function(b,g){"string"==typeof b&&(b=this.getDocument().createElement(b));
g?this.$.insertBefore(b.$,this.$.firstChild):this.$.appendChild(b.$);return b},appendHtml:function(b){if(this.$.childNodes.length){var g=new CKEDITOR.dom.element("div",this.getDocument());g.setHtml(b);g.moveChildren(this)}else this.setHtml(b)},appendText:function(b){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=b:this.append(new CKEDITOR.dom.text(b))},appendBogus:function(b){if(b||CKEDITOR.env.needsBrFiller){for(b=this.getLast();b&&b.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(b.getText());)b=
b.getPrevious();b&&b.is&&b.is("br")||(b=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&b.setAttribute("type","_moz"),this.append(b))}},breakParent:function(b,g){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(b);var a=c.extractContents(!1,g||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=a.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);
c.insertAfter(this);c.remove(!0)}else a.insertAfterNode(this)},contains:document.compareDocumentPosition?function(b){return!!(this.$.compareDocumentPosition(b.$)&16)}:function(b){var g=this.$;return b.type!=CKEDITOR.NODE_ELEMENT?g.contains(b.getParent().$):g!=b.$&&g.contains(b.$)},focus:function(){function b(){try{this.$.focus()}catch(b){}}return function(g){g?CKEDITOR.tools.setTimeout(b,100,this):b.call(this)}}(),getHtml:function(){var b=this.$.innerHTML;return CKEDITOR.env.ie?b.replace(/<\?[^>]*>/g,
""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(!0));return b.innerHTML},getClientRect:function(b){var g=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!g.width&&(g.width=g.right-g.left);!g.height&&(g.height=g.bottom-g.top);return b?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),g):g},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(b){try{var g=
this.$;if(this.getParent())return g.innerHTML=b;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(g);g.innerHTML=b;c.removeChild(g);return b}catch(a){this.$.innerHTML="";g=new CKEDITOR.dom.element("body",this.getDocument());g.$.innerHTML=b;for(g=g.getChildren();g.count();)this.append(g.getItem(0));return b}}:function(b){return this.$.innerHTML=b},setText:function(){var b=document.createElement("p");b.innerHTML="x";b=b.textContent;return function(g){this.$[b?"textContent":"innerText"]=g}}(),
getAttribute:function(){var b=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":return b=this.$.getAttribute(b,2),0!==b&&0===this.$.tabIndex&&(b=null),b;case "checked":return b=this.$.attributes.getNamedItem(b),(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];
case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:b}(),getAttributes:function(b){var g={},c=this.$.attributes,a;b=CKEDITOR.tools.isArray(b)?b:[];for(a=0;a<c.length;a++)-1===CKEDITOR.tools.indexOf(b,c[a].name)&&(g[c[a].name]=c[a].value);return g},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},
getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(b){var g=this.getWindow().$.getComputedStyle(this.$,null);return g?g.getPropertyValue(b):""}:function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]},getDtd:function(){var b=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var b=this.$.tabIndex;return 0!==b||CKEDITOR.dtd.$tabIndex[this.getName()]||
0===parseInt(this.getAttribute("tabindex"),10)?b:-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 b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var g=this.$.scopeName;"HTML"!=g&&(b=g.toLowerCase()+":"+b)}this.getName=function(){return b};return this.getName()},getValue:function(){return this.$.value},
getFirst:function(b){var g=this.$.firstChild;(g=g&&new CKEDITOR.dom.node(g))&&b&&!b(g)&&(g=g.getNext(b));return g},getLast:function(b){var g=this.$.lastChild;(g=g&&new CKEDITOR.dom.node(g))&&b&&!b(g)&&(g=g.getPrevious(b));return g},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if("object"==typeof arguments[0])return!!arguments[0][b];for(var g=0;g<arguments.length;g++)if(arguments[g]==b)return!0;return!1},isEditable:function(b){var g=
this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[g]||CKEDITOR.dtd.$empty[g]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==b?(b=CKEDITOR.dtd[g]||CKEDITOR.dtd.span,!(!b||!b["#"])):!0},isIdentical:function(b){var g=this.clone(0,1);b=b.clone(0,1);g.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);
b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(g.$.isEqualNode)return g.$.style.cssText=CKEDITOR.tools.normalizeCssText(g.$.style.cssText),b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),g.$.isEqualNode(b.$);g=g.getOuterHtml();b=b.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(g),g=c.getHtml(),c.setHtml(b),b=c.getHtml())}return g==
b},isVisible:function(){var b=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),g,c;b&&CKEDITOR.env.webkit&&(g=this.getWindow(),!g.equals(CKEDITOR.document.getWindow())&&(c=g.$.frameElement)&&(b=(new CKEDITOR.dom.element(c)).isVisible()));return!!b},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var b=this.getChildren(),g=0,c=b.count();g<c;g++){var a=b.getItem(g);if(a.type!=CKEDITOR.NODE_ELEMENT||!a.data("cke-bookmark"))if(a.type==
CKEDITOR.NODE_ELEMENT&&!a.isEmptyInlineRemoveable()||a.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(a.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var b=this.$.attributes,g=0;g<b.length;g++){var c=b[g];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(c.specified)return!0}}return!1}:function(){var b=this.$.attributes,g=b.length,c={"data-cke-expando":1,_moz_dirty:1};
return 0<g&&(2<g||!c[b[0].nodeName]||2==g&&!c[b[1].nodeName])},hasAttribute:function(){function b(b){var c=this.$.attributes.getNamedItem(b);if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return c?c.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(g){return"name"==g?!!this.$.name:b.call(this,g)}:b:function(b){return!!this.$.attributes.getNamedItem(b)}}(),
hide:function(){this.setStyle("display","none")},moveChildren:function(b,g){var c=this.$;b=b.$;if(c!=b){var a;if(g)for(;a=c.lastChild;)b.insertBefore(c.removeChild(a),b.firstChild);else for(;a=c.firstChild;)b.appendChild(c.removeChild(a))}},mergeSiblings:function(){function b(b,c,a){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=a?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var e=
a?b.getLast():b.getFirst();d.length;)d.shift().move(b,!a);c.moveChildren(b,!a);c.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(g){if(!1===g||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))b(this,this.getNext(),!0),b(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(b,c){this.$.setAttribute(b,c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(g,
c){"class"==g?this.$.className=c:"style"==g?this.$.style.cssText=c:"tabindex"==g?this.$.tabIndex=c:"checked"==g?this.$.checked=c:"contenteditable"==g?b.call(this,"contentEditable",c):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(g,c){if("src"==g&&c.match(/^http:\/\//))try{b.apply(this,arguments)}catch(a){}else b.apply(this,arguments);return this}:b}(),setAttributes:function(b){for(var g in b)this.setAttribute(g,b[g]);return this},setValue:function(b){this.$.value=
b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){"class"==b?b="className":"tabindex"==b?b="tabIndex":"contenteditable"==b&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var g=0;g<b.length;g++)this.removeAttribute(b[g]);else for(g in b=b||this.getAttributes(),b)b.hasOwnProperty(g)&&this.removeAttribute(g)},removeStyle:function(b){var g=
this.$.style;if(g.removeProperty||"border"!=b&&"margin"!=b&&"padding"!=b)g.removeProperty?g.removeProperty(b):g.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(b)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],a;"border"==b&&(a=["color","style","width"]);for(var g=[],d=0;d<c.length;d++)if(a)for(var e=0;e<a.length;e++)g.push([b,c[d],a[e]].join("-"));else g.push([b,c[d]].join("-"));for(b=0;b<g.length;b++)this.removeStyle(g[b])}},setStyle:function(b,
g){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]=g;return this},setStyles:function(b){for(var g in b)this.setStyle(g,b[g]);return this},setOpacity:function(b){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(b=Math.round(100*b),this.setStyle("filter",100<=b?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+b+")")):this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var b,
g=this.getElementsByTag("*"),c=0,a=g.count();c<a;c++)b=g.getItem(c),b.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var b=this;"html"!=b.getName();){if("static"!=b.getComputedStyle("position"))return b;b=b.getParent()}return null},getDocumentPosition:function(b){var g=0,c=0,a=this.getDocument(),d=a.getBody(),e="BackCompat"==a.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var k=this.$.getBoundingClientRect(),
f=a.$.documentElement,h=f.clientTop||d.$.clientTop||0,q=f.clientLeft||d.$.clientLeft||0,m=!0;CKEDITOR.env.ie&&(m=a.getDocumentElement().contains(this),a=a.getBody().contains(this),m=e&&a||!e&&m);m&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(g=d.$.scrollLeft||f.scrollLeft,c=d.$.scrollTop||f.scrollTop):(c=e?d.$:f,g=c.scrollLeft,c=c.scrollTop),g=k.left+g-q,c=k.top+c-h)}else for(h=this,q=null;h&&"body"!=h.getName()&&"html"!=h.getName();){g+=h.$.offsetLeft-h.$.scrollLeft;c+=h.$.offsetTop-
h.$.scrollTop;h.equals(this)||(g+=h.$.clientLeft||0,c+=h.$.clientTop||0);for(;q&&!q.equals(h);)g-=q.$.scrollLeft,c-=q.$.scrollTop,q=q.getParent();q=h;h=(k=h.$.offsetParent)?new CKEDITOR.dom.element(k):null}b&&(k=this.getWindow(),h=b.getWindow(),!k.equals(h)&&k.$.frameElement&&(b=(new CKEDITOR.dom.element(k.$.frameElement)).getDocumentPosition(b),g+=b.x,c+=b.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||e||(g+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:g,y:c}},
scrollIntoView:function(b){var g=this.getParent();if(g){do if((g.$.clientWidth&&g.$.clientWidth<g.$.scrollWidth||g.$.clientHeight&&g.$.clientHeight<g.$.scrollHeight)&&!g.is("body")&&this.scrollIntoParent(g,b,1),g.is("html")){var c=g.getWindow();try{var a=c.$.frameElement;a&&(g=new CKEDITOR.dom.element(a))}catch(d){}}while(g=g.getParent())}},scrollIntoParent:function(b,g,c){var a,d,e,k;function f(a,c){/body|html/.test(b.getName())?b.getWindow().$.scrollBy(a,c):(b.$.scrollLeft+=a,b.$.scrollTop+=c)}
function h(a,c){var b={x:0,y:0};if(!a.is(m?"body":"html")){var g=a.$.getBoundingClientRect();b.x=g.left;b.y=g.top}g=a.getWindow();g.equals(c)||(g=h(CKEDITOR.dom.element.get(g.$.frameElement),c),b.x+=g.x,b.y+=g.y);return b}function q(a,c){return parseInt(a.getComputedStyle("margin-"+c)||0,10)||0}!b&&(b=this.getWindow());e=b.getDocument();var m="BackCompat"==e.$.compatMode;b instanceof CKEDITOR.dom.window&&(b=m?e.getBody():e.getDocumentElement());CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=
null);e=b.getWindow();d=h(this,e);var l=h(b,e),C=this.$.offsetHeight;a=this.$.offsetWidth;var B=b.$.clientHeight,u=b.$.clientWidth;e=d.x-q(this,"left")-l.x||0;k=d.y-q(this,"top")-l.y||0;a=d.x+a+q(this,"right")-(l.x+u)||0;d=d.y+C+q(this,"bottom")-(l.y+B)||0;(0>k||0<d)&&f(0,!0===g?k:!1===g?d:0>k?k:d);c&&(0>e||0<a)&&f(0>e?e:a,0)},setState:function(b,g,c){g=g||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(g+"_on");this.removeClass(g+"_off");this.removeClass(g+"_disabled");c&&this.setAttribute("aria-pressed",
!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(g+"_disabled");this.removeClass(g+"_off");this.removeClass(g+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(g+"_off"),this.removeClass(g+"_on"),this.removeClass(g+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(g){b.src=
b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,g){var c=this.$.attributes;g=g||{};for(var a=0;a<c.length;a++){var d=c[a],e=d.nodeName.toLowerCase(),k;if(!(e in g))if("checked"==e&&(k=this.getAttribute(e)))b.setAttribute(e,k);else if(!CKEDITOR.env.ie||this.hasAttribute(e))k=this.getAttribute(e),null===k&&(k=d.nodeValue),b.setAttribute(e,k)}""!==this.$.style.cssText&&(b.$.style.cssText=this.$.style.cssText)},renameNode:function(b){if(this.getName()!=b){var g=
this.getDocument();b=new CKEDITOR.dom.element(b,g);this.copyAttributes(b);this.moveChildren(b);this.getParent(!0)&&this.$.parentNode.replaceChild(b.$,this.$);b.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=b.$;delete this.getName}},getChild:function(){function b(b,c){var a=b.childNodes;if(0<=c&&c<a.length)return a[c]}return function(g){var c=this.$;if(g.slice)for(g=g.slice();0<g.length&&c;)c=b(c,g.shift());else c=b(c,g);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},
disableContextMenu:function(){function b(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(g){g.data.getTarget().getAscendant(b,!0)||g.data.preventDefault()})},getDirection:function(b){return b?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(b,g){b="data-"+b;if(void 0===g)return this.getAttribute(b);
!1===g?this.removeAttribute(b):this.setAttribute(b,g);return null},getEditor:function(b){var g=CKEDITOR.instances,c,a,d;b=b||void 0===b;for(c in g)if(a=g[c],a.element.equals(this)&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!b&&(d=a.editable())&&(d.equals(this)||d.contains(this)))return a;return null},find:function(b){var g=h(this);b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,b)));g();return b},findOne:function(b){var g=h(this);b=this.$.querySelector(e(this,b));g();return b?new CKEDITOR.dom.element(b):
null},forEach:function(b,g,c){if(!(c||g&&this.type!=g))var a=b(this);if(!1!==a){c=this.getChildren();for(var d=0;d<c.count();d++)a=c.getItem(d),a.type==CKEDITOR.NODE_ELEMENT?a.forEach(b,g):g&&a.type!=g||b(a)}}});var m={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(b,d,c){"number"==typeof d&&(!c||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(d-=
k.call(this,b)),this.setStyle(b,d+"px"))};CKEDITOR.dom.element.prototype.getSize=function(b,d){var c=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||0;d&&(c-=k.call(this,b));return c}}(),CKEDITOR.dom.documentFragment=function(f){f=f||CKEDITOR.document;this.$=f.type==CKEDITOR.NODE_DOCUMENT?f.$.createDocumentFragment():f},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,
insertAfterNode:function(f){f=f.$;f.parentNode.insertBefore(this.$,f.nextSibling)},getHtml:function(){var f=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(f);return f.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}),function(){function f(a,
c){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 d,g=b.startContainer;d=b.endContainer;var e=b.startOffset,k=b.endOffset,f,n=this.guard,h=this.type,m=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),z=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(k):d.getNext();this._.guardLTR=function(a,c){return(!c||!l.equals(a))&&(!z||!a.equals(z))&&(a.type!=
CKEDITOR.NODE_ELEMENT||!c||!a.equals(b.root))}}if(a&&!this._.guardRTL){var I=g.type==CKEDITOR.NODE_ELEMENT?g:g.getParent(),F=g.type==CKEDITOR.NODE_ELEMENT?e?g.getChild(e-1):null:g.getPrevious();this._.guardRTL=function(a,c){return(!c||!I.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!c||!a.equals(b.root))}}var E=a?this._.guardRTL:this._.guardLTR;f=n?function(a,c){return!1===E(a,c)?!1:n(a,c)}:E;this.current?d=this.current[m](!1,h,f):(a?d.type==CKEDITOR.NODE_ELEMENT&&(d=0<k?d.getChild(k-
1):!1===f(d,!0)?null:d.getPreviousSourceNode(!0,h,f)):(d=g,d.type==CKEDITOR.NODE_ELEMENT&&((d=d.getChild(e))||(d=!1===f(g,!0)?null:g.getNextSourceNode(!0,h,f)))),d&&!1===f(d)&&(d=null));for(;d&&!this._.end;){this.current=d;if(!this.evaluator||!1!==this.evaluator(d)){if(!c)return d}else if(c&&this.evaluator)return!1;d=d[m](!1,h,f)}this.end();return this.current=null}function h(a){for(var c,b=null;c=f.call(this,a);)b=c;return b}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=
a;this._={}},proto:{end:function(){this._.end=1},next:function(){return f.call(this)},previous:function(){return f.call(this,1)},checkForward:function(){return!1!==f.call(this,0,1)},checkBackward:function(){return!1!==f.call(this,1,1)},lastForward:function(){return h.call(this)},lastBackward:function(){return h.call(this,1)},reset:function(){delete this.current;this._={}}}});var e={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},k={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in k||!e[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(c){return!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};
CKEDITOR.dom.walker.bookmark=function(a,c){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(d){var g,e;g=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(e=d.getParent())&&b(e);g=a?g:g||b(d);return!!(c^g)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(c){var b;c&&c.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(c.getText())||CKEDITOR.env.webkit&&c.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^b)}};CKEDITOR.dom.walker.invisible=
function(a){var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(d){c(d)?d=1:(d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent()),d=d.$.offsetWidth<=b);return!!(a^d)}};CKEDITOR.dom.walker.nodeType=function(a,c){return function(b){return!!(c^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function c(a){return!l(a)&&!m(a)}return function(b){var g=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&d.test(b.getText());g&&(g=b.getParent(),b=b.getNext(c),g=g.isBlockBoundary()&&
(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^g)}};CKEDITOR.dom.walker.temp=function(a){return function(c){c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent());c=c&&c.hasAttribute("data-cke-temp");return!!(a^c)}};var d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),b=CKEDITOR.dom.walker.temp(),g=function(a){return m(a)||l(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=
function(a){return function(c){c=l(c)||m(c)||b(c);return!!(a^c)}};var c=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var d=0,g=b.getChildCount();d<g;++d)if(!c(b.getChild(d)))return!!a;return!a}};var a=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var c={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(c[b]=1);return c}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(b){return function(d){d=
c(d)?!1:d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&(d.is(CKEDITOR.dtd.$inline)||d.is("hr")||"false"==d.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&d.is(n)&&a(d))?!0:!1;return!!(b^d)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(g(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&d.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(f){this.endOffset=this.endContainer=this.startOffset=this.startContainer=
null;this.collapsed=!0;var h=f instanceof CKEDITOR.dom.document;this.document=h?f:f.getDocument();this.root=h?f.getBody():f},function(){function f(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function h(a,c,b,d,g){function e(a,c,b,d){var k=b?a.getPrevious():a.getNext();if(d&&h)return k;l||d?c.append(a.clone(!0,g),b):(a.remove(),m&&c.append(a,b));return k}function k(){var a,c,b,d=Math.min(O.length,D.length);for(a=0;a<d;a++)if(c=
O[a],b=D[a],!c.equals(b))return a;return a-1}function f(){var c=S-1,b=E&&H&&!u.equals(y);c<J-1||c<R-1||b?(b?a.moveToPosition(y,CKEDITOR.POSITION_BEFORE_START):R==c+1&&F?a.moveToPosition(D[c],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(D[c+1],CKEDITOR.POSITION_BEFORE_START),d&&(c=O[c+1])&&c.type==CKEDITOR.NODE_ELEMENT&&(b=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),b.insertAfter(c),c.mergeSiblings(!1),a.moveToBookmark({startNode:b}))):
a.collapse(!0)}a.optimizeBookmark();var h=0===c,m=1==c,l=2==c;c=l||m;var u=a.startContainer,y=a.endContainer,x=a.startOffset,z=a.endOffset,I,F,E,H,G,L;if(l&&y.type==CKEDITOR.NODE_TEXT&&(u.equals(y)||u.type===CKEDITOR.NODE_ELEMENT&&u.getFirst().equals(y)))b.append(a.document.createText(y.substring(x,z)));else{y.type==CKEDITOR.NODE_TEXT?l?L=!0:y=y.split(z):0<y.getChildCount()?z>=y.getChildCount()?(y=y.getChild(z-1),F=!0):y=y.getChild(z):H=F=!0;u.type==CKEDITOR.NODE_TEXT?l?G=!0:u.split(x):0<u.getChildCount()?
0===x?(u=u.getChild(x),I=!0):u=u.getChild(x-1):E=I=!0;for(var O=u.getParents(),D=y.getParents(),S=k(),J=O.length-1,R=D.length-1,K=b,U,X,Y,Z=-1,M=S;M<=J;M++){X=O[M];Y=X.getNext();for(M!=J||X.equals(D[M])&&J<R?c&&(U=K.append(X.clone(0,g))):I?e(X,K,!1,E):G&&K.append(a.document.createText(X.substring(x)));Y;){if(Y.equals(D[M])){Z=M;break}Y=e(Y,K)}K=U}K=b;for(M=S;M<=R;M++)if(b=D[M],Y=b.getPrevious(),b.equals(O[M]))c&&(K=K.getChild(0));else{M!=R||b.equals(O[M])&&R<J?c&&(U=K.append(b.clone(0,g))):F?e(b,
K,!1,H):L&&K.append(a.document.createText(b.substring(0,z)));if(M>Z)for(;Y;)Y=e(Y,K,!0);K=U}l||f()}}function e(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(g){return b(g)||c(g)?!0:d(g)&&!a?a=!0:g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(l)?!1:!0}}function k(a){var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(1);
return function(d){return b(d)||c(d)?!0:!a&&m(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&c(a)&&(b=a);return g(a)&&!(m(a)&&a.equals(b))})}}var l={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},m=CKEDITOR.dom.walker.bogus(),b=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
g=CKEDITOR.dom.walker.editable(),c=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 c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,2,c,!1,"undefined"==typeof a?!0:a);return c},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,c){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,b,a,"undefined"==typeof c?!0:c);return b},createBookmark:function(a){var c,b,d,g,e=this.collapsed;c=this.document.createElement("span");c.data("cke-bookmark",1);c.setStyle("display",
"none");c.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),c.setAttribute("id",d+(e?"C":"S")));e||(b=c.clone(),b.setHtml("\x26nbsp;"),a&&b.setAttribute("id",d+"E"),g=this.clone(),g.collapse(),g.insertNode(b));g=this.clone();g.collapse(!0);g.insertNode(c);b?(this.setStartAfter(c),this.setEndBefore(b)):this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(e?"C":"S"):c,endNode:a?d+"E":b,serializable:a,collapsed:e}},createBookmark2:function(){function a(a){var c=
a.container,d=a.offset,g;g=c;var e=d;g=g.type!=CKEDITOR.NODE_ELEMENT||0===e||e==g.getChildCount()?0:g.getChild(e-1).type==CKEDITOR.NODE_TEXT&&g.getChild(e).type==CKEDITOR.NODE_TEXT;g&&(c=c.getChild(d-1),d=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(g=c;d--;)if(e=g.getChild(d).getIndex(!0),0<=e){d=e;break a}d=-1}d+=1}if(c.type==CKEDITOR.NODE_TEXT){g=c;for(e=0;(g=g.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;)e+=g.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
g=e;c.getText()?d+=g:(e=c.getPrevious(b),g?(d=g,c=e?e.getNext():c.getParent().getFirst()):(c=c.getParent(),d=e?e.getIndex(!0)+1:0))}a.container=c;a.offset=d}function c(a,b){var d=b.getCustomData("cke-fillingChar");if(d){var g=a.container;d.equals(g)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=g.getIndex(),a.container=g.getParent()))}}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(b){var d=this.collapsed,g={container:this.startContainer,
offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};b&&(a(g),c(g,this.root),d||(a(e),c(e,this.root)));return{start:g.container.getAddress(b),end:d?null:e.container.getAddress(b),startOffset:g.offset,endOffset:e.offset,normalized:b,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var c=this.document.getByAddress(a.start,a.normalized),b=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(c,b);d?this.setEnd(d,a):this.collapse(!0)}else c=
(b=a.serializable)?this.document.getById(a.startNode):a.startNode,a=b?this.document.getById(a.endNode):a.endNode,this.setStartBefore(c),c.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,c=this.endContainer,b=this.startOffset,d=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT)if(g=a.getChildCount(),g>b)a=a.getChild(b);else if(1>g)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=
a.getNextSourceNode()||a}if(c.type==CKEDITOR.NODE_ELEMENT)if(g=c.getChildCount(),g>d)c=c.getChild(d).getPreviousSourceNode(!0);else if(1>g)c=c.getPreviousSourceNode();else{for(c=c.$;c.lastChild;)c=c.lastChild;c=new CKEDITOR.dom.node(c)}a.getPosition(c)&CKEDITOR.POSITION_FOLLOWING&&(a=c);return{startNode:a,endNode:c}},getCommonAncestor:function(a,c){var b=this.startContainer,d=this.endContainer,b=b.equals(d)?a&&b.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?b.getChild(this.startOffset):
b:b.getCommonAncestor(d);return c&&!b.is?b.getParent():b},optimize:function(){var a=this.startContainer,c=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;c=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,c=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);
c&&c.is&&c.is("span")&&c.data("cke-bookmark")&&this.setEndAt(c,CKEDITOR.POSITION_AFTER_END)},trim:function(a,c){var b=this.startContainer,d=this.startOffset,g=this.collapsed;if((!a||g)&&b&&b.type==CKEDITOR.NODE_TEXT){if(d)if(d>=b.getLength())d=b.getIndex()+1,b=b.getParent();else{var e=b.split(d),d=b.getIndex()+1,b=b.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):b.equals(this.endContainer)&&(this.endOffset+=1)}else d=b.getIndex(),b=b.getParent();
this.setStart(b,d);if(g){this.collapse(!0);return}}b=this.endContainer;d=this.endOffset;c||g||!b||b.type!=CKEDITOR.NODE_TEXT||(d?(d>=b.getLength()||b.split(d),d=b.getIndex()+1):d=b.getIndex(),b=b.getParent(),this.setEnd(b,d))},enlarge:function(a,c){function b(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:var e=function(a,c){var b=new CKEDITOR.dom.range(f);
b.setStart(a,c);b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);var b=new CKEDITOR.dom.walker(b),g;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=b.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;I=g!=a?g.getText():g.substring(c);if(d.test(I))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),f=this.root,h,m,l,u,y,x=!1,z,I;z=this.startContainer;var F=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(F&&(z=!CKEDITOR.tools.trim(z.substring(0,F)).length&&
z,x=!!z),z&&((u=z.getPrevious())||(l=z.getParent()))):(F&&(u=z.getChild(F-1)||z.getLast()),u||(l=z));for(l=b(l);l||u;){if(l&&!u){!y&&l.equals(k)&&(y=!0);if(g?l.isBlockBoundary():!f.contains(l))break;x&&"inline"==l.getComputedStyle("display")||(x=!1,y?h=l:this.setStartBefore(l));u=l.getPrevious()}for(;u;)if(z=!1,u.type==CKEDITOR.NODE_COMMENT)u=u.getPrevious();else{if(u.type==CKEDITOR.NODE_TEXT)I=u.getText(),d.test(I)&&(u=null),z=/[\s\ufeff]$/.test(I);else if((u.$.offsetWidth>(CKEDITOR.env.webkit?1:
0)||c&&u.is("br"))&&!u.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[u.getName()]){I=u.getText();if(d.test(I))u=null;else for(var F=u.$.getElementsByTagName("*"),E=0,H;H=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){u=null;break}u&&(z=!!I.length)}else u=null;z&&(x?y?h=l:l&&this.setStartBefore(l):x=!0);if(u){z=u.getPrevious();if(!l&&!z){l=u;u=null;break}u=z}else l=null}l&&(l=b(l.getParent()))}z=this.endContainer;F=this.endOffset;l=u=null;y=x=!1;z.type==CKEDITOR.NODE_TEXT?
CKEDITOR.tools.trim(z.substring(F)).length?x=!0:(x=!z.getLength(),F==z.getLength()?(u=z.getNext())||(l=z.getParent()):e(z,F)&&(l=z.getParent())):(u=z.getChild(F))||(l=z);for(;l||u;){if(l&&!u){!y&&l.equals(k)&&(y=!0);if(g?l.isBlockBoundary():!f.contains(l))break;x&&"inline"==l.getComputedStyle("display")||(x=!1,y?m=l:l&&this.setEndAfter(l));u=l.getNext()}for(;u;){z=!1;if(u.type==CKEDITOR.NODE_TEXT)I=u.getText(),e(u,0)||(u=null),z=/^[\s\ufeff]/.test(I);else if(u.type==CKEDITOR.NODE_ELEMENT){if((0<u.$.offsetWidth||
c&&u.is("br"))&&!u.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[u.getName()]){I=u.getText();if(d.test(I))u=null;else for(F=u.$.getElementsByTagName("*"),E=0;H=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){u=null;break}u&&(z=!!I.length)}else u=null}else z=1;z&&x&&(y?m=l:this.setEndAfter(l));if(u){z=u.getNext();if(!l&&!z){l=u;u=null;break}u=z}else l=null}l&&(l=b(l.getParent()))}h&&m&&(k=h.contains(m)?m:h,this.setStartBefore(k),this.setEndAfter(k));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=
new CKEDITOR.dom.range(this.root);f=this.root;l.setStartAt(f,CKEDITOR.POSITION_AFTER_START);l.setEnd(this.startContainer,this.startOffset);l=new CKEDITOR.dom.walker(l);var G,L,O=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,S=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(D){if(D.equals(a)){D=null;return}}else D=a;else if(D)return;var c=O(a);c||(G=a);return c},g=function(a){var c=S(a);!c&&a.is&&a.is("br")&&
(L=a);return c};l.guard=S;l=l.lastBackward();G=G||f;this.setStartAt(G,!G.is("br")&&(!l&&this.checkStartOfBlock()||l&&G.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone();l=new CKEDITOR.dom.walker(l);var J=CKEDITOR.dom.walker.whitespaces(),R=CKEDITOR.dom.walker.bookmark();l.evaluator=function(a){return!J(a)&&!R(a)};if((l=l.previous())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone();l.collapse();l.setEndAt(f,
CKEDITOR.POSITION_BEFORE_END);l=new CKEDITOR.dom.walker(l);l.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:S;G=D=L=null;l=l.lastForward();G=G||f;this.setEndAt(G,!l&&this.checkEndOfBlock()||l&&G.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);L&&this.setEndAfter(L)}},shrink:function(a,c,b){var d="boolean"===typeof b?b:b&&"boolean"===typeof b.shrinkOnBlockBoundary?b.shrinkOnBlockBoundary:!0,g=b&&b.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var e=this.clone(),k=
this.startContainer,f=this.endContainer,h=this.startOffset,l=this.endOffset,m=b=1;k&&k.type==CKEDITOR.NODE_TEXT&&(h?h>=k.getLength()?e.setStartAfter(k):(e.setStartBefore(k),b=0):e.setStartBefore(k));f&&f.type==CKEDITOR.NODE_TEXT&&(l?l>=f.getLength()?e.setEndAfter(f):(e.setEndAfter(f),m=0):e.setEndBefore(f));var e=new CKEDITOR.dom.walker(e),u=CKEDITOR.dom.walker.bookmark(),y=CKEDITOR.dom.walker.bogus();e.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
var x;e.guard=function(c,b){if(g&&y(c)||u(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||b&&c.equals(x)||!1===d&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return!1;b||c.type!=CKEDITOR.NODE_ELEMENT||(x=c);return!0};b&&(k=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);m&&(e.reset(),(e=e[a==CKEDITOR.SHRINK_ELEMENT?
"lastBackward":"previous"]())&&this.setEndAt(e,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!b&&!m)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var c=this.startContainer,b=c.getChild(this.startOffset);b?a.insertBefore(b):c.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,c){this.setStartAt(a,c);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,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=c;this.endContainer||(this._setEndContainer(a),this.endOffset=c);f(this)},setEnd:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex()+
1,a=a.getParent());this._setEndContainer(a);this.endOffset=c;this.startContainer||(this._setStartContainer(a),this.startOffset=c);f(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,c){switch(c){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)}f(this)},setEndAt:function(a,c){switch(c){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)}f(this)},fixBlock:function(a,c){var b=this.createBookmark(),d=this.document.createElement(c);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var g=d.getBogus();g&&g.remove();d.appendBogus();this.moveToBookmark(b);return d},splitBlock:function(a,c){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),
g=b.block,e=d.block,k=null;if(!b.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(g||(g=this.fixBlock(!0,a),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,a)));b=g&&this.checkStartOfBlock();d=e&&this.checkEndOfBlock();this.deleteContents();g&&g.equals(e)&&(d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),e=null):b?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g,
CKEDITOR.POSITION_BEFORE_START),g=null):(e=this.splitElement(g,c||!1),g.is("ul","ol")||g.appendBogus()));return{previousBlock:g,nextBlock:e,wasStartOfBlock:b,wasEndOfBlock:d,elementPath:k}},splitElement:function(a,c){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(!1,c||!1),d=a.clone(!1,c||!1);b.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(a){return function(d){return c(d)||
b(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isEmptyInlineRemoveable()||a.is("table")&&d.is("caption")?!1:!0}}var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!1);return function(c){for(var b=this.createBookmark(),d=this[c?"endPath":"startPath"](),g=d.block||d.blockLimit,e;g&&!g.equals(d.root)&&!g.getFirst(a(g));)e=g.getParent(),this[c?"setEndAt":"setStartAt"](g,CKEDITOR.POSITION_AFTER_END),g.remove(1),g=e;this.moveToBookmark(b)}}(),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,c){var b=c==CKEDITOR.START,d=this.clone();d.collapse(b);d[b?"setStartAt":"setEndAt"](a,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=k(b);return d[b?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,
c)),b.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=e();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),b.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,
this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=e();return a.checkForward()},getPreviousNode:function(a,c,b){var d=this.clone();d.collapse(1);d.setStartAt(b||this.root,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(d);b.evaluator=a;b.guard=c;return b.previous()},getNextNode:function(a,c,b){var d=this.clone();d.collapse();d.setEndAt(b||this.root,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(d);
b.evaluator=a;b.guard=c;return b.next()},checkReadOnly:function(){function a(a,c){for(;a;){if(a.type==CKEDITOR.NODE_ELEMENT){if("false"==a.getAttribute("contentEditable")&&!a.data("cke-editable"))return 0;if(a.is("html")||"true"==a.getAttribute("contentEditable")&&(a.contains(c)||a.equals(c)))break}a=a.getParent()}return 1}return function(){var c=this.startContainer,b=this.endContainer;return!(a(c,b)&&a(b,c))}}(),moveToElementEditablePosition:function(a,d){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,
d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var g=0;a;){if(a.type==CKEDITOR.NODE_TEXT){d&&this.endContainer&&this.checkEndOfBlock()&&b.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);g=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),g=1;else if(d&&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 e=a,k=g,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(f=e[d?"getLast":"getFirst"](c));k||f||(f=e[d?"getPrevious":"getNext"](c));a=f}return!!g},moveToClosestEditablePosition:function(a,c){var b,d=0,g,e,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(b=new CKEDITOR.dom.range(this.root),
b.moveToPosition(a,k[c?0:1])):b=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(g=b[c?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(e=g.type==CKEDITOR.NODE_ELEMENT)&&g.is(CKEDITOR.dtd.$block)&&"false"==g.getAttribute("contenteditable")?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.setEndAt(g,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&g.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(b.setEnd(g,0),b.collapse()):b.moveToPosition(g,k[c?1:0]);d&&this.moveToRange(b);
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),c=CKEDITOR.dom.walker.bookmark(!1,!0),b=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return b(a)&&c(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:d(),getPreviousEditableNode:d(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.startContainer,b=
this.endContainer,d=c.getAscendant("table",!0),g=b.getAscendant("table",!0);return CKEDITOR.env.safari&&d&&b.equals(this.root)?c.getAscendant(a,!0):this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&g&&(d.equals(g)||d.contains(g)||g.contains(d))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,b,d,g=this.clone();g.optimize();(d=g.startContainer.type==CKEDITOR.NODE_TEXT)?(b=g.startContainer.getText(),
c=g.startContainer.split(g.startOffset),a.insertAfter(g.startContainer)):g.insertNode(a);a.scrollIntoView();d&&(g.startContainer.setText(b),c.remove());a.remove()},getClientRects:function(){function a(a,c){var b=CKEDITOR.tools.array.map(a,function(a){return a}),d=new CKEDITOR.dom.range(c.root),g,e,k;c.startContainer instanceof CKEDITOR.dom.element&&(e=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(k=(k=c.endOffset===(c.endContainer.getChildCount?
c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));e&&d.setStart(c.startContainer.getParent(),c.startContainer.getIndex());k&&d.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(e||k)c=d;d=c.cloneContents();d=CKEDITOR.dom.document.prototype.find.call(d,"[data-cke-widget-id]").toArray();if(d=CKEDITOR.tools.array.map(d,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return d=
CKEDITOR.tools.array.map(d,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;g=this.root.getDocument().$.createRange();g.setStart(c.getParent().$,c.getIndex());g.setEnd(c.getParent().$,c.getIndex()+1);c=g.getClientRects();c.widgetRect=a.getClientRect();return c},c),CKEDITOR.tools.array.forEach(d,function(a){function c(g){CKEDITOR.tools.array.forEach(b,function(c,e){var k=CKEDITOR.tools.objectCompare(a[g],c);k||(k=CKEDITOR.tools.objectCompare(a.widgetRect,c));k&&(Array.prototype.splice.call(b,
e,a.length-g,a.widgetRect),d=!0)});d||(g<b.length-1?c(g+1):b.push(a.widgetRect))}var d;c(0)}),b}function c(a,b,g){var e;b.collapsed?g.startContainer instanceof CKEDITOR.dom.element?(a=g.checkStartOfBlock(),e=new CKEDITOR.dom.text("​"),a?g.startContainer.append(e,!0):0===g.startOffset?e.insertBefore(g.startContainer.getFirst()):(g=g.startContainer.getChildren().getItem(g.startOffset-1),e.insertAfter(g)),b.setStart(e.$,0),b.setEnd(e.$,0),a=b.getClientRects(),e.remove()):g.startContainer instanceof CKEDITOR.dom.text&&
(""===g.startContainer.getText()?(g.startContainer.setText("​"),a=b.getClientRects(),g.startContainer.setText("")):a=[d(g.createBookmark())]):a=[d(g.createBookmark())];return a}function b(a,c,d){a=CKEDITOR.tools.extend({},a);c&&(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 c=a.startNode;a=a.endNode;var b;c.setText("​");c.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),
b=[c.getClientRect(),a.getClientRect()],a.remove()):b=[c.getClientRect(),c.getClientRect()];c.remove();return{right:Math.max(b[0].right,b[1].right),bottom:Math.max(b[0].bottom,b[1].bottom),left:Math.min(b[0].left,b[1].left),top:Math.min(b[0].top,b[1].top),width:Math.abs(b[0].left-b[1].left),height:Math.max(b[0].bottom,b[1].bottom)-Math.min(b[0].top,b[1].top)}}return void 0!==this.document.getSelection?function(d){var g=this.root.getDocument().$.createRange(),e;g.setStart(this.startContainer.$,this.startOffset);
g.setEnd(this.endContainer.$,this.endOffset);e=g.getClientRects();e=a(e,this);e.length||(e=c(e,g,this));return CKEDITOR.tools.array.map(e,function(a){return b(a,d,this)},this)}:function(a){return[b(d(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,c){var b=this.getCommonAncestor(),d=this.getBoundaryNodes(),g=[],e,k,f,h;if(b&&b.find)for(k=b.find(a),e=0;e<k.count();e++)if(b=k.getItem(e),c||!b.isReadOnly())f=
b.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(b),h=b.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||d.endNode.equals(b),f&&h&&g.push(b);return g}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,c){var b=a[a.length-1],d=!1;c=c.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(b){var g=new CKEDITOR.dom.range(c.root),d=new CKEDITOR.dom.walker(g),e=CKEDITOR.dom.walker.whitespaces();g.setStart(b.endContainer,
b.endOffset);g.setEnd(c.startContainer,c.startOffset);for(g=d.next();e(g)||c.endContainer.equals(g);)g=d.next();d=!g}d?b.setEnd(c.endContainer,c.endOffset):a.push(c);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 f(c){1>arguments.length||(this.range=c,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function h(c){var a=[];c.forEach(function(c){if("true"==c.getAttribute("contenteditable"))return a.push(c),!1},CKEDITOR.NODE_ELEMENT,!0);return a}function e(c,a,b,d){a:{null==d&&(d=h(b));for(var g;g=d.shift();)if(g.getDtd().p){d={element:g,remaining:d};break a}d=null}if(!d)return 0;if((g=CKEDITOR.filter.instances[d.element.data("cke-filter")])&&
!g.check(a))return e(c,a,b,d.remaining);a=new CKEDITOR.dom.range(d.element);a.selectNodeContents(d.element);a=a.createIterator();a.enlargeBr=c.enlargeBr;a.enforceRealBlocks=c.enforceRealBlocks;a.activeFilter=a.filter=g;c._.nestedEditable={element:d.element,container:b,remaining:d.remaining,iterator:a};return 1}function k(c,a,b){if(!a)return!1;c=c.clone();c.collapse(!b);return c.checkBoundaryOfElement(a,b?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0),
b=function(c){return l(c)&&m(c)},g={dd:1,dt:1,li:1};f.prototype={getNextParagraph:function(c){var a,f,h,m,t;c=c||"p";if(this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(c))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;this.activeFilter=this.filter;if(e(this,c,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(c);this._.nestedEditable=
null}if(!this.range.root.getDtd()[c])return null;if(!this._.started){var p=this.range.clone();f=p.startPath();var q=p.endPath(),A=!p.collapsed&&k(p,f.block),r=!p.collapsed&&k(p,q.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);A&&p.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);r&&p.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);
p.collapsed||(f=new CKEDITOR.dom.walker(p.clone()),q=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=q,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(p.clone()),f.evaluator=q,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&&
(q=new CKEDITOR.dom.elementPath(q.endContainer,q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(f)),p=null);this._.started=1;f=p}q=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;q;){var A=0,r=q.hasAscendant("pre"),C=q.type!=CKEDITOR.NODE_ELEMENT,B=0;if(C)q.type==CKEDITOR.NODE_TEXT&&d.test(q.getText())&&(C=0);else{var u=q.getName();
if(CKEDITOR.dtd.$block[u]&&"false"==q.getAttribute("contenteditable")){a=q;e(this,c,a);break}else if(q.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){if("br"==u)C=1;else if(!f&&!q.getChildCount()&&"hr"!=u){a=q;h=q.equals(p);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=u&&(this._.nextNode=q));A=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}C=1}}C&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));
h=(!A||C)&&q.equals(p);if(f&&!A)for(;!q.getNext(b)&&!h;){u=q.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){A=1;C=0;h||u.equals(p);f.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}q=u;C=1;h=q.equals(p);B=1}C&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,B,p);if((h=!q)||A&&f)break}if(!a){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;a=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=a.blockLimit;A={div:1,th:1,td:1};
a=a.block;!a&&q&&!this.enforceRealBlocks&&A[q.getName()]&&f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?a=q:!a||this.enforceRealBlocks&&a.is(g)?(a=this.range.document.createElement(c),f.extractContents().appendTo(a),a.trim(),f.insertNode(a),m=t=!0):"li"!=a.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(a=a.clone(!1),f.extractContents().appendTo(a),a.trim(),t=f.splitBlock(),m=!t.wasStartOfBlock,t=!t.wasEndOfBlock,f.insertNode(a)):h||(this._.nextNode=a.equals(p)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,
1,p))}m&&(m=a.getPrevious())&&m.type==CKEDITOR.NODE_ELEMENT&&("br"==m.getName()?m.remove():m.getLast()&&"br"==m.getLast().$.nodeName.toLowerCase()&&m.getLast().remove());t&&(m=a.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&"br"==m.getName()&&(!CKEDITOR.env.needsBrFiller||m.getPrevious(l)||m.getNext(l))&&m.remove();this._.nextNode||(this._.nextNode=h||a.equals(p)||!p?null:this._getNextSourceNode(a,1,p));return a},_getNextSourceNode:function(c,a,b){function d(a){return!(a.equals(b)||a.equals(g))}var g=
this.range.root;for(c=c.getNextSourceNode(a,null,d);!l(c);)c=c.getNextSourceNode(a,null,d);return c}};CKEDITOR.dom.range.prototype.createIterator=function(){return new f(this)}}(),CKEDITOR.command=function(f,h){this.uiItems=[];this.exec=function(e){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&f.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,f,e)};this.refresh=function(e,d){if(!this.readOnly&&e.readOnly)return!0;if(this.context&&!d.isContextFor(this.context)||
!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[e.mode]&&this.disable();return!1===this.fire("refresh",{editor:e,path:d})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var e;this.checkAllowed=function(k){return k||"boolean"!=typeof e?e=f.activeFilter.checkFeature(this):e};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.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(f){if(this.state==f||f!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=f;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,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function f(a,c,b,d,g){var e,f;a=[];for(e in c){f=c[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:E(f);"$"!=e.charAt(0)&&(f.elements=e);b&&(f.featureName=b.toLowerCase());var k=f;k.elements=m(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h=/\s*,\s*/,n=void 0;for(n in L){k[n]=m(k[n],
h)||null;var l=k,q=O[n],u=m(k[O[n]],h),D=k[n],B=[],J=!0,p=void 0;u?J=!1:u={};for(p in D)"!"==p.charAt(0)&&(p=p.slice(1),B.push(p),u[p]=!0,J=!1);for(;p=B.pop();)D[p]=D["!"+p],delete D["!"+p];l[q]=(J?!1:u)||null}k.match=k.match||null;d.push(f);a.push(f)}c=g.elements;g=g.generic;var w;b=0;for(d=a.length;b<d;++b){e=E(a[b]);f=!0===e.classes||!0===e.styles||!0===e.attributes;k=e;n=q=h=void 0;for(h in L)k[h]=A(k[h]);l=!0;for(n in O){h=O[n];q=k[h];u=[];D=void 0;for(D in q)-1<D.indexOf("*")?u.push(new RegExp("^"+
D.replace(/\*/g,".*")+"$")):u.push(D);q=u;q.length&&(k[h]=q,l=!1)}k.nothingRequired=l;k.noProperties=!(k.attributes||k.classes||k.styles);if(!0===e.elements||null===e.elements)g[f?"unshift":"push"](e);else for(w in k=e.elements,delete e.elements,k)if(c[w])c[w][f?"unshift":"push"](e);else c[w]=[e]}}function h(a,c,d,g){if(!a.match||a.match(c))if(g||b(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=e(a.attributes,c.attributes,d.validAttributes)),d.allStyles||(d.allStyles=e(a.styles,
c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;g=d.validClasses;if(a)if(!0===a)a=!0;else{for(var f=0,k=c.length,h;f<k;++f)h=c[f],g[h]||(g[h]=a(h));a=!1}else a=!1;d.allClasses=a}}function e(a,c,b){if(!a)return!1;if(!0===a)return!0;for(var d in c)b[d]||(b[d]=a(d));return!1}function k(a,c,b){if(!a.match||a.match(c)){if(a.noProperties)return!1;b.hadInvalidAttribute=d(a.attributes,c.attributes)||b.hadInvalidAttribute;b.hadInvalidStyle=d(a.styles,c.styles)||b.hadInvalidStyle;a=a.classes;
c=c.classes;if(a){for(var g=!1,e=!0===a,f=c.length;f--;)if(e||a(c[f]))c.splice(f,1),g=!0;a=g}else a=!1;b.hadInvalidClass=a||b.hadInvalidClass}}function d(a,c){if(!a)return!1;var b=!1,d=!0===a,g;for(g in c)if(d||a(g))delete c[g],b=!0;return b}function l(a,c,b){if(a.disabled||a.customConfig&&!b||!c)return!1;a._.cachedChecks={};return!0}function m(a,c){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=H(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(c));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var b={},d=0,g;for(g in a)b[g]=a[g],d++;return d?b:!1}function b(a,c){if(a.nothingRequired)return!0;var b,d,e,f;if(e=a.requiredClasses)for(f=c.classes,b=0;b<e.length;++b)if(d=e[b],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(f,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return!1;return g(c.styles,a.requiredStyles)&&g(c.attributes,a.requiredAttributes)}function g(a,c){if(!c)return!0;for(var b=0,d;b<c.length;++b)if(d=c[b],"string"==
typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function c(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var c={};a.length;)c[a.shift()]="cke-test";return c}function a(a){var c,b,d,g,e={},f=1;for(a=H(a);c=a.match(D);)(b=c[2])?(d=n(b,"styles"),g=n(b,"attrs"),b=n(b,"classes")):d=g=b=null,e["$"+f++]={elements:c[1],classes:b,styles:d,attributes:g},a=a.slice(c[0].length);return e}function n(a,c){var b=a.match(S[c]);return b?H(b[1]):null}
function w(a){var c=a.styleBackup=a.attributes.style,b=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(c||"",1));a.classes||(a.classes=b?b.split(/\s+/):[])}function v(a,c,b,d){var g=0,e;d.toHtml&&(c.name=c.name.replace(J,"$1"));if(d.doCallbacks&&a.elementCallbacks){a:{e=a.elementCallbacks;for(var f=0,n=e.length,l;f<n;++f)if(l=e[f](c)){e=l;break a}e=void 0}if(e)return e}if(d.doTransform&&(e=a._.transformations[c.name])){w(c);for(f=0;f<e.length;++f)u(a,c,e[f]);p(c)}if(d.doFilter){a:{f=
c.name;n=a._;a=n.allowedRules.elements[f];e=n.allowedRules.generic;f=n.disallowedRules.elements[f];n=n.disallowedRules.generic;l=d.skipRequired;var m={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},D,B;if(a||e){w(c);if(f)for(D=0,B=f.length;D<B;++D)if(!1===k(f[D],c,m)){a=null;break a}if(n)for(D=0,B=n.length;D<B;++D)k(n[D],c,m);if(a)for(D=0,B=a.length;D<B;++D)h(a[D],c,m,l);if(e)for(D=
0,B=e.length;D<B;++D)h(e[D],c,m,l);a=m}else a=null}if(!a||!a.valid)return b.push(c),1;B=a.validAttributes;var O=a.validStyles;e=a.validClasses;var f=c.attributes,r=c.styles,n=c.classes;l=c.classBackup;var A=c.styleBackup,y,t,F=[],m=[],x=/^data-cke-/;D=!1;delete f.style;delete f["class"];delete c.classBackup;delete c.styleBackup;if(!a.allAttributes)for(y in f)B[y]||(x.test(y)?y==(t=y.replace(/^data-cke-saved-/,""))||B[t]||(delete f[y],D=!0):(delete f[y],D=!0));if(!a.allStyles||a.hadInvalidStyle){for(y in r)a.allStyles||
O[y]?F.push(y+":"+r[y]):D=!0;F.length&&(f.style=F.sort().join("; "))}else A&&(f.style=A);if(!a.allClasses||a.hadInvalidClass){for(y=0;y<n.length;++y)(a.allClasses||e[n[y]])&&m.push(n[y]);m.length&&(f["class"]=m.sort().join(" "));l&&m.length<l.split(/\s+/).length&&(D=!0)}else l&&(f["class"]=l);D&&(g=1);if(!d.skipFinalValidation&&!q(c))return b.push(c),1}d.toHtml&&(c.name=c.name.replace(R,"cke:$1"));return g}function t(a){var c=[],b;for(b in a)-1<b.indexOf("*")&&c.push(b.replace(/\*/g,".*"));return c.length?
new RegExp("^(?:"+c.join("|")+")$"):null}function p(a){var c=a.attributes,b;delete c.style;delete c["class"];if(b=CKEDITOR.tools.writeCssText(a.styles,!0))c.style=b;a.classes.length&&(c["class"]=a.classes.sort().join(" "))}function q(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 A(a){if(!a)return!1;if(!0===a)return!0;var c=t(a);return function(b){return b in a||c&&b.match(c)}}function r(){return new CKEDITOR.htmlParser.element("br")}
function C(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||F.$block[a.name])}function B(a,c,b){var d=a.name;if(F.$empty[d]||!a.children.length)"hr"==d&&"br"==c?a.replaceWith(r()):(a.parent&&b.push({check:"it",el:a.parent}),a.remove());else if(F.$block[d]||"tr"==d)if("br"==c)a.previous&&!C(a.previous)&&(c=r(),c.insertBefore(a)),a.next&&!C(a.next)&&(c=r(),c.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,g;b:{g=F[c];for(var e=0,f=d.length,k;e<f;++e)if(k=d[e],k.type==CKEDITOR.NODE_ELEMENT&&
!g[k.name]){g=!1;break b}g=!0}if(g)a.name=c,a.attributes={},b.push({check:"parent-down",el:a});else{g=a.parent;for(var e=g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==g.name,h,n,f=d.length;0<f;)k=d[--f],e&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&F.$inline[k.name])?(h||(h=new CKEDITOR.htmlParser.element(c),h.insertAfter(a),b.push({check:"parent-down",el:h})),h.add(k,0)):(h=null,n=F[g.name]||F.span,k.insertAfter(a),g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||
n[k.name]||b.push({check:"el-up",el:k}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&b.push({check:"it",el:a.parent}),a.replaceWithChildren())}function u(a,c,b){var d,g;for(d=0;d<b.length;++d)if(g=b[d],!(g.check&&!a.check(g.check,!1)||g.left&&!g.left(c))){g.right(c,K);break}}function y(a,c){var b=c.getDefinition(),d=b.attributes,g=b.styles,e,f,k,h;if(a.name!=b.element)return!1;for(e in d)if("class"==e)for(b=d[e].split(/\s+/),k=a.classes.join("|");h=b.pop();){if(-1==k.indexOf(h))return!1}else if(a.attributes[e]!=
d[e])return!1;for(f in g)if(a.styles[f]!=g[f])return!1;return!0}function x(a,c){var b,d;"string"==typeof a?b=a:a instanceof CKEDITOR.style?d=a:(b=a[0],d=a[1]);return[{element:b,left:d,right:function(a,b){b.transform(a,c)}}]}function z(a){return function(c){return y(c,a)}}function I(a){return function(c,b){b[a](c)}}var F=CKEDITOR.dtd,E=CKEDITOR.tools.copy,H=CKEDITOR.tools.trim,G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){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;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var c=a.config.allowedContent;!0===c?this.disabled=!0:(c||(this.customConfig=!1),this.allow(c,"config",1),this.allow(a.config.extraAllowedContent,"extra",
1),this.allow(G[a.enterMode]+" "+G[a.shiftEnterMode],"default",1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(c,b,d){if(!l(this,c,d))return!1;var g,e;if("string"==typeof c)c=a(c);else if(c instanceof CKEDITOR.style){if(c.toAllowedContentRules)return this.allow(c.toAllowedContentRules(this.editor),b,d);g=c.getDefinition();c={};d=g.attributes;c[g.element]=g={styles:g.styles,requiredStyles:g.styles&&
CKEDITOR.tools.objectKeys(g.styles)};d&&(d=E(d),g.classes=d["class"]?d["class"].split(/\s+/):null,g.requiredClasses=g.classes,delete d["class"],g.attributes=d,g.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(c)){for(g=0;g<c.length;++g)e=this.allow(c[g],b,d);return e}f(this,c,b,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,c,b,d){if(this.disabled)return!1;var g=this,e=[],f=this.editor&&this.editor.config.protectedSource,k,h=!1,n={doFilter:!b,
doTransform:!0,doCallbacks:!0,toHtml:c};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!c||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(k=v(g,a,e,n),k&1)h=!0;else if(k&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var b;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));b=[];var l,q,m;if(f)for(q=0;q<f.length;++q)if((m=d.match(f[q]))&&
m[0].length==d.length){b=!0;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(l=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&v(g,l,b,n);b=!b.length}b||e.push(a)}},null,!0);e.length&&(h=!0);var l;a=[];d=G[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var m;b=e.pop();)b.type==CKEDITOR.NODE_ELEMENT?B(b,d,a):b.remove();for(;l=a.pop();)if(b=l.el,b.parent)switch(m=F[b.parent.name]||F.span,l.check){case "it":F.$removeEmpty[b.name]&&!b.children.length?B(b,d,a):q(b)||
B(b,d,a);break;case "el-up":b.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[b.name]||B(b,d,a);break;case "parent-down":b.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[b.name]||B(b.parent,d,a)}return h},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(c){if(!l(this,c,!0))return!1;"string"==typeof c&&(c=a(c));f(this,c,null,this.disallowedContent,
this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var c,b,d=[],g;for(c=0;c<a.length&&!g;++c)b=a[c],("string"==typeof b||b instanceof CKEDITOR.style)&&this.check(b)&&(g=b);if(g){for(c=0;c<a.length;++c)d.push(x(a[c],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 c,b;if(!this.disabled&&a){var d=this._.transformations,g;for(g=0;g<a.length;++g){c=a[g];var e=void 0,f=void 0,k=void 0,h=void 0,n=void 0,l=void 0;b=[];for(f=0;f<c.length;++f)k=c[f],"string"==typeof k?(k=k.split(/\s*:\s*/),h=k[0],n=null,l=k[1]):(h=k.check,n=k.left,
l=k.right),e||(e=k,e=e.element?e.element:h?h.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),n instanceof CKEDITOR.style&&(n=z(n)),b.push({check:h==e?null:h,left:n,right:"string"==typeof l?I(l):l});c=e;d[c]||(d[c]=[]);d[c].push(b)}}},check:function(b,d,g){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(b)){for(var e=b.length;e--;)if(this.check(b[e],d,g))return!0;return!1}var f,k;if("string"==typeof b){k=b+"\x3c"+(!1===d?"0":"1")+(g?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];
f=a(b).$1;var h=f.styles,e=f.classes;f.name=f.elements;f.classes=e=e?e.split(/\s*,\s*/):[];f.styles=c(h);f.attributes=c(f.attributes);f.children=[];e.length&&(f.attributes["class"]=e.join(" "));h&&(f.attributes.style=CKEDITOR.tools.writeCssText(f.styles))}else f=b.getDefinition(),h=f.styles,e=f.attributes||{},h&&!CKEDITOR.tools.isEmpty(h)?(h=E(h),e.style=CKEDITOR.tools.writeCssText(h,!0)):h={},f={name:f.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:h,children:[]};var h=
CKEDITOR.tools.clone(f),n=[],l;if(!1!==d&&(l=this._.transformations[f.name])){for(e=0;e<l.length;++e)u(this,f,l[e]);p(f)}v(this,h,n,{doFilter:!0,doTransform:!1!==d,skipRequired:!g,skipFinalValidation:!g});0<n.length?g=!1:((d=f.attributes["class"])&&(f.attributes["class"]=f.attributes["class"].split(" ").sort().join(" ")),g=CKEDITOR.tools.objectCompare(f.attributes,h.attributes,!0),d&&(f.attributes["class"]=d));"string"==typeof b&&(this._.cachedChecks[k]=g);return g},getAllowedEnterMode:function(){var a=
["p","div","br"],c={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(b,d){var g=a.slice(),e;if(this.check(G[b]))return b;for(d||(g=g.reverse());e=g.pop();)if(this.check(e))return c[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,c=CKEDITOR.tools.clone;a.allowedContent=c(this.allowedContent);a._.allowedRules=c(this._.allowedRules);a.disallowedContent=c(this.disallowedContent);a._.disallowedRules=c(this._.disallowedRules);a._.transformations=
c(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},O={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},D=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,S={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},
J=/^cke:(object|embed|param)$/,R=/^(object|embed|param)$/,K;K=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,c,b){b=b||c;if(!(b in a.styles)){var d=a.attributes[c];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[b]=d)}delete a.attributes[c]},lengthToAttribute:function(a,c,b){b=b||c;if(!(b in a.attributes)){var d=
a.styles[c],g=d&&d.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[b]=g[1]:"cke-test"==d&&(a.attributes[b]="cke-test")}delete a.styles[c]},alignmentToStyle:function(a){if(!("float"in a.styles)){var c=a.attributes.align;if("left"==c||"right"==c)a.styles["float"]=c}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var c=a.styles["float"];if("left"==c||"right"==c)a.attributes.align=c}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var c=
CKEDITOR.tools.style.parse.border(a.styles.border);c.color&&(a.styles["border-color"]=c.color);c.style&&(a.styles["border-style"]=c.style);c.width&&(a.styles["border-width"]=c.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 c(d){a.styles["margin-top"]=b[d[0]];a.styles["margin-right"]=b[d[1]];a.styles["margin-bottom"]=b[d[2]];a.styles["margin-left"]=b[d[3]]}if(a.styles.margin){var b=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(b.length){case 1:c([0,0,0,0]);break;case 2:c([0,1,0,1]);break;case 3:c([0,1,2,1]);break;case 4:c([0,1,2,3])}delete a.styles.margin}},
matchesStyle:y,transform:function(a,c){if("string"==typeof c)a.name=c;else{var b=c.getDefinition(),d=b.styles,g=b.attributes,e,f,k,h;a.name=b.element;for(e in g)if("class"==e)for(b=a.classes.join("|"),k=g[e].split(/\s+/);h=k.pop();)-1==b.indexOf(h)&&a.classes.push(h);else a.attributes[e]=g[e];for(f in d)a.styles[f]=d[f]}}}}(),function(){CKEDITOR.focusManager=function(f){if(f.focusManager)return f.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:f};return this};CKEDITOR.focusManager._=
{blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(f){this._.timer&&clearTimeout(this._.timer);f&&(this.currentActive=f);this.hasFocus||this._.locked||((f=CKEDITOR.currentInstance)&&f.focusManager.blur(1),this.hasFocus=!0,(f=this._.editor.container)&&f.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(f){function h(){if(this.hasFocus){this.hasFocus=!1;var e=this._.editor.container;e&&e.removeClass("cke_focus");
this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var e=CKEDITOR.focusManager._.blurDelay;f||!e?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;h.call(this)},e,this)}},add:function(f,h){var e=f.getCustomData("focusmanager");if(!e||e!=this){e&&e.remove(f);var e="focus",k="blur";h&&(CKEDITOR.env.ie?(e="focusin",k="focusout"):CKEDITOR.event.useCapture=1);var d={blur:function(){f.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(f)}};
f.on(e,d.focus,this);f.on(k,d.blur,this);h&&(CKEDITOR.event.useCapture=0);f.setCustomData("focusmanager",this);f.setCustomData("focusmanager_handlers",d)}},remove:function(f){f.removeCustomData("focusmanager");var h=f.removeCustomData("focusmanager_handlers");f.removeListener("blur",h.blur);f.removeListener("focus",h.focus)}}}(),CKEDITOR.keystrokeHandler=function(f){if(f.keystrokeHandler)return f.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:f};return this},function(){var f,
h=function(e){e=e.data;var d=e.getKeystroke(),h=this.keystrokes[d],m=this._.editor;f=!1===m.fire("key",{keyCode:d,domEvent:e});f||(h&&(f=!1!==m.execCommand(h,{from:"keystrokeHandler"})),f||(f=!!this.blockedKeystrokes[d]));f&&e.preventDefault(!0);return!f},e=function(e){f&&(f=!1,e.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(f){f.on("keydown",h,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)f.on("keypress",e,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(f,h,e){f&&CKEDITOR.lang.languages[f]||(f=this.detect(h,f));var k=this;
h=function(){k[f].dir=k.rtl[f]?"rtl":"ltr";e(f,k[f])};this[f]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+f+".js"),h,this)},detect:function(f,h){var e=this.languages;h=h||navigator.userLanguage||navigator.language||f;var k=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=k[1],k=k[2];e[d+"-"+k]?d=d+"-"+k:e[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(d){return d};return d||f}}}(),CKEDITOR.scriptLoader=function(){var f={},h={};return{load:function(e,k,d,l){var m="string"==
typeof e;m&&(e=[e]);d||(d=CKEDITOR);var b=e.length,g=[],c=[],a=function(a){k&&(m?k.call(d,a):k.call(d,g,c))};if(0===b)a(!0);else{var n=function(d,e){(e?g:c).push(d);0>=--b&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(e))},w=function(a,c){f[a]=1;var b=h[a];delete h[a];for(var d=0;d<b.length;d++)b[d](a,c)},v=function(a){if(f[a])n(a,!0);else{var c=h[a]||(h[a]=[]);c.push(n);if(!(1<c.length)){var b=new CKEDITOR.dom.element("script");b.setAttributes({type:"text/javascript",src:a});
k&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?b.$.onreadystatechange=function(){if("loaded"==b.$.readyState||"complete"==b.$.readyState)b.$.onreadystatechange=null,w(a,!0)}:(b.$.onload=function(){setTimeout(function(){w(a,!0)},0)},b.$.onerror=function(){w(a,!1)}));b.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<b;t++)v(e[t])}},queue:function(){function e(){var d;(d=f[0])&&this.load(d.scriptUrl,d.callback,
CKEDITOR,0)}var f=[];return function(d,h){var m=this;f.push({scriptUrl:d,callback:function(){h&&h.apply(this,arguments);f.shift();e.call(m)}});1==f.length&&e.call(this)}}()}}(),CKEDITOR.resourceManager=function(f,h){this.basePath=f;this.fileName=h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(f,h){if(this.registered[f])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+f+'" is already registered.');var e=
this.registered[f]=h||{};e.name=f;e.path=this.getPath(f);CKEDITOR.fire(f+CKEDITOR.tools.capitalize(this.fileName)+"Ready",e);return this.get(f)},get:function(f){return this.registered[f]||null},getPath:function(f){var h=this.externals[f];return CKEDITOR.getUrl(h&&h.dir||this.basePath+f+"/")},getFilePath:function(f){var h=this.externals[f];return CKEDITOR.getUrl(this.getPath(f)+(h?h.file:this.fileName+".js"))},addExternal:function(f,h,e){f=f.split(",");for(var k=0;k<f.length;k++){var d=f[k];e||(h=
h.replace(/[^\/]+$/,function(d){e=d;return""}));this.externals[d]={dir:h,file:e||this.fileName+".js"}}},load:function(f,h,e){CKEDITOR.tools.isArray(f)||(f=f?[f]:[]);for(var k=this.loaded,d=this.registered,l=[],m={},b={},g=0;g<f.length;g++){var c=f[g];if(c)if(k[c]||d[c])b[c]=this.get(c);else{var a=this.getFilePath(c);l.push(a);a in m||(m[a]=[]);m[a].push(c)}}CKEDITOR.scriptLoader.load(l,function(a,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+m[c[0]].join(",")+'" was not found at "'+
c[0]+'".');for(var d=0;d<a.length;d++)for(var g=m[a[d]],f=0;f<g.length;f++){var l=g[f];b[l]=this.get(l);k[l]=1}h.call(e,b)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(f){var h={};return function(e,k,d){var l={},m=function(b){f.call(this,b,function(b){CKEDITOR.tools.extend(l,b);var c=[],a;for(a in b){var e=b[a],f=e&&e.requires;if(!h[a]){if(e.icons)for(var v=e.icons.split(","),t=v.length;t--;)CKEDITOR.skin.addIcon(v[t],
e.path+"icons/"+(CKEDITOR.env.hidpi&&e.hidpi?"hidpi/":"")+v[t]+".png");h[a]=1}if(f)for(f.split&&(f=f.split(",")),e=0;e<f.length;e++)l[f[e]]||c.push(f[e])}if(c.length)m.call(this,c);else{for(a in l)e=l[a],e.onLoad&&!e.onLoad._called&&(!1===e.onLoad()&&delete l[a],e.onLoad._called=1);k&&k.call(d||window,l)}},this)};m.call(this,e)}}),CKEDITOR.plugins.setLang=function(f,h,e){var k=this.get(f);f=k.langEntries||(k.langEntries={});k=k.lang||(k.lang=[]);k.split&&(k=k.split(","));-1==CKEDITOR.tools.indexOf(k,
h)&&k.push(h);f[h]=e},CKEDITOR.ui=function(f){if(f.ui)return f.ui;this.items={};this.instances={};this.editor=f;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(f,h,e){e.name=f.toLowerCase();var k=this.items[f]={type:h,command:e.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(k,e)},get:function(f){return this.instances[f]},create:function(f){var h=this.items[f],e=h&&this._.handlers[h.type],k=h&&h.command&&this.editor.getCommand(h.command),e=e&&
e.create.apply(this,h.args);this.instances[f]=e;k&&k.uiItems.push(e);e&&!e.type&&(e.type=h.type);return e},addHandler:function(f,h){this._.handlers[f]=h},space:function(f){return CKEDITOR.document.getById(this.spaceId(f))},spaceId:function(f){return this.editor.id+"_"+f}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function f(a,c,d){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==c){if(!(c 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(!e(c,d))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=d;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};
this.templates={};this.name=this.name||h();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",k);this.on("selectionChange",function(a){l(this,a.data.path)});this.on("activeFilterChange",function(){l(this,this.elementPath(),!0)});this.on("mode",k);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(){"destroyed"!==this.status?b(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function h(){do var a="editor"+ ++t;while(CKEDITOR.instances[a]);return a}function e(a,c){return c==CKEDITOR.ELEMENT_MODE_INLINE?
a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):c==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function k(){var a=this.commands,c;for(c in a)d(this,a[c])}function d(a,c){c[c.startDisabled?"disable":a.readOnly&&!c.readOnly?"disable":c.modes[a.mode]?"enable":"disable"]()}function l(a,c,b){if(c){var d,g,e=a.commands;for(g in e)d=e[g],(b||d.contextSensitive)&&d.refresh(a,c)}}function m(a){var c=a.config.customConfig;if(!c)return!1;var c=CKEDITOR.getUrl(c),b=p[c]||(p[c]={});b.fn?
(b.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=c&&m(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(c,function(){b.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};m(a)});return!0}function b(a,c){a.on("customConfigLoaded",function(){if(c){if(c.on)for(var b in c.on)a.on(b,c.on[b]);CKEDITOR.tools.extend(a.config,c,!0);delete a.config.on}b=a.config;a.readOnly=b.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=b.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:b.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:
b.shiftEnterMode;b.skin&&(CKEDITOR.skinName=b.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);g(a)});c&&null!=c.customConfig&&(a.config.customConfig=c.customConfig);m(a)||a.fireOnce("customConfigLoaded")}function g(a){CKEDITOR.skin.loadPart("editor",function(){c(a)})}function c(c){CKEDITOR.lang.load(c.config.language,c.config.defaultLanguage,function(b,d){var g=c.config.title;c.langCode=b;c.lang=CKEDITOR.tools.prototypedCopy(d);
c.title="string"==typeof g||!1===g?g:[c.lang.editor,c.name].join(", ");c.config.contentsLangDirection||(c.config.contentsLangDirection=c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?c.element.getDirection(1):c.lang.dir);c.fire("langLoaded");a(c)})}function a(a){a.getStylesSet(function(c){a.once("loaded",function(){a.fire("stylesSet",{styles:c})},null,null,1);n(a)})}function n(a){function c(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var b=a.config,d=c(b.plugins),
g=c(b.extraPlugins),e=c(b.removePlugins);if(g)var f=new RegExp("(?:^|,)(?:"+g.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(f,""),d=d+(","+g);if(e)var k=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),d=d.replace(k,"");CKEDITOR.env.air&&(d+=",adobeair");CKEDITOR.plugins.load(d.split(","),function(c){var d=[],g=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,c);for(var f in c){var h=c[f],n=h.lang,l=null,m=h.requires,u;CKEDITOR.tools.isArray(m)&&(m=m.join(","));if(m&&(u=m.match(k)))for(;m=
u.pop();)CKEDITOR.error("editor-plugin-required",{plugin:m.replace(",",""),requiredBy:f});n&&!a.lang[f]&&(n.split&&(n=n.split(",")),0<=CKEDITOR.tools.indexOf(n,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(n,l)?l:0<=CKEDITOR.tools.indexOf(n,"en")?"en":n[0]),h.langEntries&&h.langEntries[l]?(a.lang[f]=h.langEntries[l],l=null):e.push(CKEDITOR.getUrl(h.path+"lang/"+l+".js")));g.push(l);d.push(h)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit",
"init","afterInit"],e=0;e<c.length;e++)for(var f=0;f<d.length;f++){var k=d[f];0===e&&g[f]&&k.lang&&k.langEntries&&(a.lang[k.name]=k.langEntries[g[f]]);if(k[c[e]])k[c[e]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(f=0;f<a.config.blockedKeystrokes.length;f++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[f]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function w(){var a=this.element;if(a&&this.elementMode!=
CKEDITOR.ELEMENT_MODE_APPENDTO){var c=this.getData();this.config.htmlEncodeOutput&&(c=CKEDITOR.tools.htmlEncode(c));a.is("textarea")?a.setValue(c):a.setHtml(c);return!0}return!1}function v(a,c){function b(a){var c=a.startContainer,d=a.endContainer;return c.is&&(c.is("tr")||c.is("td")&&c.equals(d)&&a.endOffset===c.getChildCount())?!0:!1}function d(a){var c=a.startContainer;return c.is("tr")?a.cloneContents():c.clone(!0)}for(var g=new CKEDITOR.dom.documentFragment,e,f,k,h=0;h<a.length;h++){var n=a[h],
l=n.startContainer.getAscendant("tr",!0);b(n)?(e||(e=l.getAscendant("table").clone(),e.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),g.append(e),e=e.findOne("thead, tbody, tfoot")),f&&f.equals(l)||(f=l,k=l.clone(),e.append(k)),k.append(d(n))):g.append(n.cloneContents())}return e?g:c.getHtmlFromRange(a[0])}f.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=f;var t=0,p={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,c){for(var b=0;b<c.length;b++){var d=
c[b];if(this[d])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:d}),!0}return!1}},addCommand:function(a,c){c.name=a.toLowerCase();var b=c instanceof CKEDITOR.command?c:new CKEDITOR.command(this,c);this.mode&&d(this,b);return this.commands[a]=b},_attachToForm:function(){function a(c){b.updateElement();b._.required&&!d.getValue()&&!1===b.fire("required")&&c.data.preventDefault()}function c(a){return!!(a&&a.call&&a.apply)}var b=this,d=b.element,g=new CKEDITOR.dom.element(d.$.form);
d.is("textarea")&&g&&(g.on("submit",a),c(g.$.submit)&&(g.$.submit=CKEDITOR.tools.override(g.$.submit,function(c){return function(){a();c.apply?c.apply(this):c()}})),b.on("destroy",function(){g.removeListener("submit",a)}))},destroy:function(a){this.fire("beforeDestroy");!a&&w.call(this);this.editable(null);this.filter&&(this.filter.destroy(),delete this.filter);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,c){var b=this.getCommand(a),d={name:a,commandData:c||{},command:b};return b&&b.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",d)&&(d.returnValue=b.exec(d.commandData),!b.async&&!1!==this.fire("afterCommandExec",
d))?d.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var c=this._.data;"string"!=typeof c&&(c=(c=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?c.is("textarea")?c.getValue():c.getHtml():"");c={dataValue:c};!a&&this.fire("getData",c);return c.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,c,b){var d=!0,g=c;c&&"object"==typeof c&&(b=c.internal,g=c.callback,d=!c.noSnapshot);!b&&d&&this.fire("saveSnapshot");if(g||!b)this.once("dataReady",function(a){!b&&d&&this.fire("saveSnapshot");g&&g.call(a.editor)});a={dataValue:a};!b&&this.fire("setData",a);this._.data=a.dataValue;!b&&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,c,b){this.fire("insertHtml",{dataValue:a,mode:c,range:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var c=this.editable(),b=this.getSelection(),b=b&&b.getRanges();if(!c||!b||0===b.length)return null;c=v(b,c);return a?c.getHtml():c},extractSelectedHtml:function(a,c){var b=this.editable(),d=this.getSelection().getRanges(),g=new CKEDITOR.dom.documentFragment,
e;if(!b||0===d.length)return null;for(e=0;e<d.length;e++)g.append(b.extractHtmlFromRange(d[e],c));c||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 w.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,c=CKEDITOR.tools.isArray(arguments[0])?
arguments[0]:[[].slice.call(arguments,0)],b,d,g=c.length;g--;)b=c[g],d=0,CKEDITOR.tools.isArray(b)&&(d=b[1],b=b[0]),d?a[b]=d:delete a[b]},getCommandKeystroke:function(a){if(a="string"===typeof a?this.getCommand(a):a){var c=CKEDITOR.tools.object.findKey(this.commands,a),b=this.keystrokeHandler.keystrokes,d;if(a.fakeKeystroke)return a.fakeKeystroke;for(d in b)if(b.hasOwnProperty(d)&&b[d]==c)return d}return 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,c){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;c=c?this.blockless?CKEDITOR.ENTER_BR:c:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=c)this.activeEnterMode=a,this.activeShiftEnterMode=
c,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var f=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
h={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(e){for(var k,d,l=0,m;k=this._.htmlPartsRegex.exec(e);){d=k.index;if(d>l)if(l=e.substring(l,d),m)m.push(l);else this.onText(l);l=this._.htmlPartsRegex.lastIndex;if(d=k[1])if(d=d.toLowerCase(),m&&CKEDITOR.dtd.$cdata[d]&&
(this.onCDATA(m.join("")),m=null),!m){this.onTagClose(d);continue}if(m)m.push(k[0]);else if(d=k[3]){if(d=d.toLowerCase(),!/="/.test(d)){var b={},g,c=k[4];k=!!k[5];if(c)for(;g=f.exec(c);){var a=g[1].toLowerCase();g=g[2]||g[3]||g[4]||"";b[a]=!g&&h[a]?a:CKEDITOR.tools.htmlDecodeAttr(g)}this.onTagOpen(d,b,k);!m&&CKEDITOR.dtd.$cdata[d]&&(m=[])}}else if(d=k[2])this.onComment(d)}if(e.length>l)this.onText(e.substring(l,e.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._=
{output:[]}},proto:{openTag:function(f){this._.output.push("\x3c",f)},openTagClose:function(f,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(f,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",f,'\x3d"',h,'"')},closeTag:function(f){this._.output.push("\x3c/",f,"\x3e")},text:function(f){this._.output.push(f)},comment:function(f){this._.output.push("\x3c!--",f,"--\x3e")},write:function(f){this._.output.push(f)},reset:function(){this._.output=
[];this._.indent=!1},getHtml:function(f){var h=this._.output.join("");f&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var f=this.parent.children,h=CKEDITOR.tools.indexOf(f,this),e=this.previous,k=this.next;e&&(e.next=k);k&&(k.previous=e);f.splice(h,1);this.parent=null},replaceWith:function(f){var h=this.parent.children,e=CKEDITOR.tools.indexOf(h,this),k=f.previous=this.previous,d=f.next=this.next;k&&(k.next=
f);d&&(d.previous=f);h[e]=f;f.parent=this.parent;this.parent=null},insertAfter:function(f){var h=f.parent.children,e=CKEDITOR.tools.indexOf(h,f),k=f.next;h.splice(e+1,0,this);this.next=f.next;this.previous=f;f.next=this;k&&(k.previous=this);this.parent=f.parent},insertBefore:function(f){var h=f.parent.children,e=CKEDITOR.tools.indexOf(h,f);h.splice(e,0,this);this.next=f;(this.previous=f.previous)&&(f.previous.next=this);f.previous=this;this.parent=f.parent},getAscendant:function(f){var h="function"==
typeof f?f:"string"==typeof f?function(e){return e.name==f}:function(e){return e.name in f},e=this.parent;for(;e&&e.type==CKEDITOR.NODE_ELEMENT;){if(h(e))return e;e=e.parent}return null},wrapWith:function(f){this.replaceWith(f);f.add(this);return f},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(f){return f||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(f){this.value=f;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=
CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(f,h){var e=this.value;if(!(e=f.onComment(h,e,this)))return this.remove(),!1;if("string"!=typeof e)return this.replaceWith(e),!1;this.value=e;return!0},writeHtml:function(f,h){h&&this.filter(h);f.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(f){this.value=f;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,
filter:function(f,h){if(!(this.value=f.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(f,h){h&&this.filter(h);f.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(f){this.value=f};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(f){f.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;
this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function f(d){return d.attributes["data-cke-survive"]?!1:"a"==d.name&&d.attributes.href||CKEDITOR.dtd.$removeEmpty[d.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),e={ol:1,ul:1},k=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};
CKEDITOR.htmlParser.fragment.fromHtml=function(l,m,b){function g(a){var b;if(0<q.length)for(var d=0;d<q.length;d++){var g=q[d],e=g.name,f=CKEDITOR.dtd[e],k=r.name&&CKEDITOR.dtd[r.name];k&&!k[e]||a&&f&&!f[a]&&CKEDITOR.dtd[a]?e==r.name&&(n(r,r.parent,1),d--):(b||(c(),b=1),g=g.clone(),g.parent=r,r=g,q.splice(d,1),d--)}}function c(){for(;A.length;)n(A.shift(),r)}function a(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var c=a.children.length,b=a.children[c-1],d;b&&b.type==CKEDITOR.NODE_TEXT&&
((d=CKEDITOR.tools.rtrim(b.value))?b.value=d:a.children.length=c-1)}}function n(c,d,g){d=d||r||p;var e=r;void 0===c.previous&&(w(d,c)&&(r=d,t.onTagOpen(b,{}),c.returnPoint=d=r),a(c),f(c)&&!c.children.length||d.add(c),"pre"==c.name&&(B=!1),"textarea"==c.name&&(C=!1));c.returnPoint?(r=c.returnPoint,delete c.returnPoint):r=g?d:e}function w(a,c){if((a==p||"body"==a.name)&&b&&(!a.name||CKEDITOR.dtd[a.name][b])){var d,g;return(d=c.attributes&&(g=c.attributes["data-cke-real-element-type"])?g:c.name)&&d in
CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!c.isOrphan||c.type==CKEDITOR.NODE_TEXT}}function v(a,c){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==c||"dt"==a&&"dd"==c||"dd"==a&&"dt"==c:!1}var t=new CKEDITOR.htmlParser,p=m instanceof CKEDITOR.htmlParser.element?m:"string"==typeof m?new CKEDITOR.htmlParser.element(m):new CKEDITOR.htmlParser.fragment,q=[],A=[],r=p,C="textarea"==p.name,B="pre"==p.name;t.onTagOpen=function(a,b,d,l){b=new CKEDITOR.htmlParser.element(a,b);b.isUnknown&&
d&&(b.isEmpty=!0);b.isOptionalClose=l;if(f(b))q.push(b);else{if("pre"==a)B=!0;else{if("br"==a&&B){r.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==a&&(C=!0)}if("br"==a)A.push(b);else{for(;!(l=(d=r.name)?CKEDITOR.dtd[d]||(r._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):k,b.isUnknown||r.isUnknown||l[a]);)if(r.isOptionalClose)t.onTagClose(d);else if(a in e&&d in e)d=r.children,(d=d[d.length-1])&&"li"==d.name||n(d=new CKEDITOR.htmlParser.element("li"),r),!b.returnPoint&&(b.returnPoint=
r),r=d;else if(a in CKEDITOR.dtd.$listItem&&!v(a,d))t.onTagOpen("li"==a?"ul":"dl",{},0,1);else if(d in h&&!v(a,d))!b.returnPoint&&(b.returnPoint=r),r=r.parent;else if(d in CKEDITOR.dtd.$inline&&q.unshift(r),r.parent)n(r,r.parent,1);else{b.isOrphan=1;break}g(a);c();b.parent=r;b.isEmpty?n(b):r=b}}};t.onTagClose=function(a){for(var d=q.length-1;0<=d;d--)if(a==q[d].name){q.splice(d,1);return}for(var g=[],e=[],f=r;f!=p&&f.name!=a;)f._.isBlockLike||e.unshift(f),g.push(f),f=f.returnPoint||f.parent;if(f!=
p){for(d=0;d<g.length;d++){var k=g[d];n(k,k.parent)}r=f;f._.isBlockLike&&c();n(f,f.parent);f==r&&(r=r.parent);q=q.concat(e)}"body"==a&&(b=!1)};t.onText=function(a){if(!(r._.hasInlineStarted&&!A.length||B||C)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var e=r.name,f=e?CKEDITOR.dtd[e]||(r._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):k;if(!C&&!f["#"]&&e in h)t.onTagOpen(d[e]||""),t.onText(a);else{c();g();B||C||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);
if(w(r,a))this.onTagOpen(b,{},0,1);r.add(a)}};t.onCDATA=function(a){r.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){c();g();r.add(new CKEDITOR.htmlParser.comment(a))};t.parse(l);for(c();r!=p;)n(r,r.parent,1);a(p);return p};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(d,e){isNaN(e)&&(e=this.children.length);var b=0<e?this.children[e-1]:null;if(b){if(d._.isBlockLike&&b.type==CKEDITOR.NODE_TEXT&&(b.value=CKEDITOR.tools.rtrim(b.value),0===
b.value.length)){this.children.pop();this.add(d);return}b.next=d}d.previous=b;d.parent=this;this.children.splice(e,0,d);this._.hasInlineStarted||(this._.hasInlineStarted=d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&!d._.isBlockLike)},filter:function(d,e){e=this.getFilterContext(e);d.onRoot(e,this);this.filterChildren(d,!1,e)},filterChildren:function(d,e,b){if(this.childrenFilteredBy!=d.id){b=this.getFilterContext(b);if(e&&!this.parent)d.onRoot(b,this);this.childrenFilteredBy=d.id;for(e=
0;e<this.children.length;e++)!1===this.children[e].filter(d,b)&&e--}},writeHtml:function(d,e){e&&this.filter(e);this.writeChildrenHtml(d)},writeChildrenHtml:function(d,e,b){var g=this.getFilterContext();if(b&&!this.parent&&e)e.onRoot(g,this);e&&this.filterChildren(e,!1,g);e=0;b=this.children;for(g=b.length;e<g;e++)b[e].writeHtml(d)},forEach:function(d,e,b){if(!(b||e&&this.type!=e))var g=d(this);if(!1!==g){b=this.children;for(var c=0;c<b.length;c++)g=b[c],g.type==CKEDITOR.NODE_ELEMENT?g.forEach(d,
e):e&&g.type!=e||d(g)}},getFilterContext:function(d){return d||{}}}}(),"use strict",function(){function f(){this.rules=[]}function h(e,k,d,h){var m,b;for(m in k)(b=e[m])||(b=e[m]=new f),b.add(k[m],d,h)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new f;this.attributeNameRules=new f;this.elementsRules={};this.attributesRules={};this.textRules=new f;this.commentRules=new f;this.rootRules=new f;e&&this.addRules(e,10)},
proto:{addRules:function(e,f){var d;"number"==typeof f?d=f:f&&"priority"in f&&(d=f.priority);"number"!=typeof d&&(d=10);"object"!=typeof f&&(f={});e.elementNames&&this.elementNameRules.addMany(e.elementNames,d,f);e.attributeNames&&this.attributeNameRules.addMany(e.attributeNames,d,f);e.elements&&h(this.elementsRules,e.elements,d,f);e.attributes&&h(this.attributesRules,e.attributes,d,f);e.text&&this.textRules.add(e.text,d,f);e.comment&&this.commentRules.add(e.comment,d,f);e.root&&this.rootRules.add(e.root,
d,f)},applyTo:function(e){e.filter(this)},onElementName:function(e,f){return this.elementNameRules.execOnName(e,f)},onAttributeName:function(e,f){return this.attributeNameRules.execOnName(e,f)},onText:function(e,f,d){return this.textRules.exec(e,f,d)},onComment:function(e,f,d){return this.commentRules.exec(e,f,d)},onRoot:function(e,f){return this.rootRules.exec(e,f)},onElement:function(e,f){for(var d=[this.elementsRules["^"],this.elementsRules[f.name],this.elementsRules.$],h,m=0;3>m;m++)if(h=d[m]){h=
h.exec(e,f,this);if(!1===h)return null;if(h&&h!=f)return this.onNode(e,h);if(f.parent&&!f.name)break}return f},onNode:function(e,f){var d=f.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(e,f):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,f.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,f.value)):null},onAttribute:function(e,f,d,h){return(d=this.attributesRules[d])?d.exec(e,h,f,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=f;f.prototype=
{add:function(e,f,d){this.rules.splice(this.findIndex(f),0,{value:e,priority:f,options:d})},addMany:function(e,f,d){for(var h=[this.findIndex(f),0],m=0,b=e.length;m<b;m++)h.push({value:e[m],priority:f,options:d});this.rules.splice.apply(this.rules,h)},findIndex:function(e){for(var f=this.rules,d=f.length-1;0<=d&&e<f[d].priority;)d--;return d+1},exec:function(e,f){var d=f instanceof CKEDITOR.htmlParser.node||f instanceof CKEDITOR.htmlParser.fragment,h=Array.prototype.slice.call(arguments,1),m=this.rules,
b=m.length,g,c,a,n;for(n=0;n<b;n++)if(d&&(g=f.type,c=f.name),a=m[n],!(e.nonEditable&&!a.options.applyToAll||e.nestedEditable&&a.options.excludeNestedEditable)){a=a.value.apply(null,h);if(!1===a||d&&a&&(a.name!=c||a.type!=g))return a;null!=a&&(h[0]=f=a)}return f},execOnName:function(e,f){for(var d=0,h=this.rules,m=h.length,b;f&&d<m;d++)b=h[d],e.nonEditable&&!b.options.applyToAll||e.nestedEditable&&b.options.excludeNestedEditable||(f=f.replace(b.value[0],b.value[1]));return f}}}(),function(){function f(a,
c){function b(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function g(a,c){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],h=e(d),m,D;if(h)for(f(h,1)&&g.push(h);h;)l(h)&&(m=k(h))&&f(m)&&((D=k(m))&&!l(D)?g.push(m):(b(n).insertAfter(m),m.remove())),h=h.previous;for(h=0;h<g.length;h++)g[h].remove();if(g=!a||!1!==("function"==typeof c?c(d):c))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=e(d),g=!g||"form"==d.name&&"input"==g.name):g=!1:g=!1;g&&d.add(b(a))}}}function f(a,c){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var b;return a.type==CKEDITOR.NODE_TEXT&&(b=a.value.match(q))&&(b.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,b.index))).insertBefore(a),a.value=b[0]),!CKEDITOR.env.needsBrFiller&&
n&&(!c||a.parent.name in D)||!n&&((b=a.previous)&&"br"==b.name||!b||l(b)))?!0:!1}var h={elements:{}},n="html"==c,D=CKEDITOR.tools.extend({},B),u;for(u in D)"#"in r[u]||delete D[u];for(u in D)h.elements[u]=g(n,a.config.fillEmptyBlocks);h.root=g(n,!1);h.elements.br=function(a){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=c.attributes;if("data-cke-bogus"in g||"data-cke-eol"in g)delete g["data-cke-bogus"];else{for(g=c.next;g&&d(g);)g=g.next;var e=k(c);!g&&l(c.parent)?m(c.parent,
b(a)):l(g)&&e&&!l(e)&&b(a).insertBefore(g)}}}}(n);return h}function h(a,c){return a!=CKEDITOR.ENTER_BR&&!1!==c?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function e(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function k(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function l(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
B||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function m(a,c){var b=a.children[a.children.length-1];a.children.push(c);c.parent=a;b&&(b.next=c,c.previous=b)}function b(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function g(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function c(a){return a.replace(I,function(a,c,b){return"\x3c"+c+b.replace(F,
function(a,c){return E.test(c)&&-1==b.indexOf("data-cke-saved-"+c)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function a(a,c){return a.replace(c,function(a,c,b){0===a.indexOf("\x3ctextarea")&&(a=c+v(b).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(L,function(a,c){return decodeURIComponent(c)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
function(a){return"\x3c!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function t(a,c){var b=c._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return b&&b[c]||""})}function p(a,c){var b=[],d=c.config.protectedSource,g=c._.dataStore||(c._.dataStore=
{id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(b.push(a)-1)+"--\x3e"});for(var f=0;f<d.length;f++)a=a.replace(d[f],function(a){a=a.replace(e,function(a,c,d){return b[d]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(b.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,c,d){return"\x3c!--"+A+(c?"{C}":
"")+encodeURIComponent(b[d]).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,c){g[g.id]=decodeURIComponent(c);return"{cke_protected_"+g.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,b,d,g){return"\x3c"+b+d+"\x3e"+t(v(g),c)+"\x3c/"+b+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var d,
g,e=this;this.editor=b;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=g=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(u);d.addRules(y,{applyToAll:!0});d.addRules(f(b,"data"),{applyToAll:!0});g.addRules(x);g.addRules(z,{applyToAll:!0});g.addRules(f(b,"html"),{applyToAll:!0});b.on("toHtml",function(d){d=d.data;var g=d.dataValue,e,g=p(g,b),g=a(g,G),g=c(g),g=a(g,H),g=g.replace(O,"$1cke:$2"),g=g.replace(S,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),
g=g.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),g=g.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=d.context||b.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",g="\x3cpre\x3e"+g+"\x3c/pre\x3e",f=1);e=b.document.createElement(e);e.setHtml("a"+g);g=e.getHtml().substr(1);g=g.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(g=g.replace(/^<pre>|<\/pre>$/gi,""));g=g.replace(D,"$1$2");g=n(g);g=v(g);e=!1===d.fixForBody?!1:
h(d.enterMode,b.config.autoParagraph);g=CKEDITOR.htmlParser.fragment.fromHtml(g,d.context,e);e&&(f=g,!f.children.length&&CKEDITOR.dtd[f.name][e]&&(e=new CKEDITOR.htmlParser.element(e),f.add(e)));d.dataValue=g},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var c=a.dataValue,
b=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(b);c=b.getHtml(!0);a.dataValue=w(c)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,h(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,
!1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=v(c);c=t(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,b,d){var g=this.editor,e,f,k,h;c&&"object"==typeof c?(e=c.context,b=c.fixForBody,d=c.dontFilter,f=c.filter,k=c.enterMode,h=c.protectedWhitespaces):e=c;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:b,dontFilter:d,
filter:f||g.filter,enterMode:k||g.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,c){var b,d,g;c&&(b=c.context,d=c.filter,g=c.enterMode);b||null===b||(b=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:b,enterMode:g||this.editor.enterMode}).dataValue}};var q=/(?:&nbsp;|\xa0)$/,A="{cke_protected}",r=CKEDITOR.dtd,C="caption colgroup col thead tfoot tbody".split(" "),B=CKEDITOR.tools.extend({},r.$blockLimit,
r.$block),u={elements:{input:b,textarea:b}},y={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 c=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===c.indexOf("javascript")||0===c.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},x={elements:{embed:function(a){var c=a.parent;if(c&&"object"==c.name){var b=c.attributes.width,c=c.attributes.height;
b&&(a.attributes.width=b);c&&(a.attributes.height=c)}},a:function(a){var c=a.attributes;if(!(a.children.length||c.name||c.id||a.attributes["data-cke-saved-name"]))return!1}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return!1;for(var b=["name","href","src"],d,g=0;g<b.length;g++)d="data-cke-saved-"+b[g],d in c&&delete c[b[g]]}return a},
table:function(a){a.children.slice(0).sort(function(a,c){var b,d;a.type==CKEDITOR.NODE_ELEMENT&&c.type==a.type&&(b=CKEDITOR.tools.indexOf(C,a.name),d=CKEDITOR.tools.indexOf(C,c.name));-1<b&&-1<d&&b!=d||(b=a.parent?a.getIndex():-1,d=c.parent?c.getIndex():-1);return b>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 c=a.children[0];c&&c.value&&(c.value=CKEDITOR.tools.trim(c.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var c=a.children[0];!c&&m(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:g,textarea:g},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,
function(a){return a.toLowerCase()})});var I=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/^(href|src|name)$/i,H=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,L=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,D=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,S=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),
"use strict",CKEDITOR.htmlParser.element=function(f,h){this.name=f;this.attributes=h||{};this.children=[];var e=f||"",k=e.match(/^cke:(.*)/);k&&(e=k[1]);e=!!(CKEDITOR.dtd.$nonBodyContent[e]||CKEDITOR.dtd.$block[e]||CKEDITOR.dtd.$listItem[e]||CKEDITOR.dtd.$tableContent[e]||CKEDITOR.dtd.$nonEditable[e]||"br"==e);this.isEmpty=!!CKEDITOR.dtd.$empty[f];this.isUnknown=!CKEDITOR.dtd[f];this._={isBlockLike:e,hasInlineStarted:this.isEmpty||!e}},CKEDITOR.htmlParser.cssStyle=function(f){var h={};((f instanceof
CKEDITOR.htmlParser.element?f.attributes.style:f)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,f,d){"font-family"==f&&(d=d.replace(/["']/g,""));h[f.toLowerCase()]=d});return{rules:h,populate:function(e){var f=this.toString();f&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",f):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=f:e.style=f)},toString:function(){var e=[],f;for(f in h)h[f]&&e.push(f,":",h[f],";");return e.join("")}}},function(){function f(e){return function(d){return d.type==
CKEDITOR.NODE_ELEMENT&&("string"==typeof e?d.name==e:d.name in e)}}var h=function(e,d){e=e[0];d=d[0];return e<d?-1:e>d?1:0},e=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:e.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,d){var f=this,h,b;d=f.getFilterContext(d);if(d.off)return!0;if(!f.parent)e.onRoot(d,f);for(;;){h=f.name;if(!(b=
e.onElementName(d,h)))return this.remove(),!1;f.name=b;if(!(f=e.onElement(d,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==h)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f),!1;if(!f.name)return this.replaceWithChildren(),!1}h=f.attributes;var g,c;for(g in h){for(b=h[g];;)if(c=e.onAttributeName(d,g))if(c!=g)delete h[g],g=c;else break;else{delete h[g];break}c&&(!1===(b=e.onAttribute(d,f,c,b))?delete h[c]:h[c]=b)}f.isEmpty||this.filterChildren(e,!1,
d);return!0},filterChildren:e.filterChildren,writeHtml:function(e,d){d&&this.filter(d);var f=this.name,m=[],b=this.attributes,g,c;e.openTag(f,b);for(g in b)m.push([g,b[g]]);e.sortAttributes&&m.sort(h);g=0;for(c=m.length;g<c;g++)b=m[g],e.attribute(b[0],b[1]);e.openTagClose(f,this.isEmpty);this.writeChildrenHtml(e);this.isEmpty||e.closeTag(f)},writeChildrenHtml:e.writeChildrenHtml,replaceWithChildren:function(){for(var e=this.children,d=e.length;d;)e[--d].insertAfter(this);this.remove()},forEach:e.forEach,
getFirst:function(e){if(!e)return this.children.length?this.children[0]:null;"function"!=typeof e&&(e=f(e));for(var d=0,h=this.children.length;d<h;++d)if(e(this.children[d]))return this.children[d];return null},getHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(e);return e.getHtml()},setHtml:function(e){e=this.children=CKEDITOR.htmlParser.fragment.fromHtml(e).children;for(var d=0,f=e.length;d<f;++d)e[d].parent=this},getOuterHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;
this.writeHtml(e);return e.getHtml()},split:function(e){for(var d=this.children.splice(e,this.children.length-e),f=this.clone(),h=0;h<d.length;++h)d[h].parent=f;f.children=d;d[0]&&(d[0].previous=null);0<e&&(this.children[e-1].next=null);this.parent.add(f,this.getIndex()+1);return f},find:function(e,d){void 0===d&&(d=!1);var f=[],h;for(h=0;h<this.children.length;h++){var b=this.children[h];"function"==typeof e&&e(b)?f.push(b):"string"==typeof e&&b.name===e&&f.push(b);d&&b.find&&(f=f.concat(b.find(e,
d)))}return f},addClass:function(e){if(!this.hasClass(e)){var d=this.attributes["class"]||"";this.attributes["class"]=d+(d?" ":"")+e}},removeClass:function(e){var d=this.attributes["class"];d&&((d=CKEDITOR.tools.trim(d.replace(new RegExp("(?:\\s+|^)"+e+"(?:\\s+|$)")," ")))?this.attributes["class"]=d:delete this.attributes["class"])},hasClass:function(e){var d=this.attributes["class"];return d?(new RegExp("(?:^|\\s)"+e+"(?\x3d\\s|$)")).test(d):!1},getFilterContext:function(e){var d=[];e||(e={off:!1,
nonEditable:!1,nestedEditable:!1});e.off||"off"!=this.attributes["data-cke-processor"]||d.push("off",!0);e.nonEditable||"false"!=this.attributes.contenteditable?e.nonEditable&&!e.nestedEditable&&"true"==this.attributes.contenteditable&&d.push("nestedEditable",!0):d.push("nonEditable",!0);if(d.length){e=CKEDITOR.tools.copy(e);for(var f=0;f<d.length;f+=2)e[d[f]]=d[f+1]}return e}},!0)}(),function(){var f=/{([^}]+)}/g;CKEDITOR.template=function(f){this.source=String(f)};CKEDITOR.template.prototype.output=
function(h,e){var k=this.source.replace(f,function(d,e){return void 0!==h[e]?h[e]:d});return e?e.push(k):k}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(f){CKEDITOR.instances[f.name]=f;f.on("focus",function(){CKEDITOR.currentInstance!=f&&(CKEDITOR.currentInstance=f,CKEDITOR.fire("currentInstance"))});f.on("blur",function(){CKEDITOR.currentInstance==f&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});
CKEDITOR.fire("instance",null,f)},CKEDITOR.remove=function(f){delete CKEDITOR.instances[f.name]},function(){var f={};CKEDITOR.addTemplate=function(h,e){var k=f[h];if(k)return k;k={name:h,source:e};CKEDITOR.fire("template",k);return f[h]=new CKEDITOR.template(k.source)};CKEDITOR.getTemplate=function(h){return f[h]}}(),function(){var f=[];CKEDITOR.addCss=function(h){f.push(h)};CKEDITOR.getCss=function(){return f.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(f,h){if(!CKEDITOR.env.isCompatible)return null;f=CKEDITOR.dom.element.get(f);if(f.getEditor())throw'The editor instance "'+f.getEditor().name+'" is already attached to the provided element.';var e=new CKEDITOR.editor(h,f,CKEDITOR.ELEMENT_MODE_INLINE),k=f.is("textarea")?f:null;k?(e.setData(k.getValue(),null,!0),f=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+
!!e.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+k.getValue()+"\x3c/div\x3e",CKEDITOR.document),f.insertAfter(k),k.hide(),k.$.form&&e._attachToForm()):e.setData(f.getHtml(),null,!0);e.on("loaded",function(){e.fire("uiReady");e.editable(f);e.container=f;e.ui.contentsElement=f;e.setData(e.getData(1));e.resetDirty();e.fire("contentDom");e.mode="wysiwyg";e.fire("mode");e.status="ready";e.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,e)},null,null,1E4);e.on("destroy",function(){k&&(e.container.clearCustomData(),
e.container.remove(),k.show());e.element.clearCustomData();delete e.element});return e};CKEDITOR.inlineAll=function(){var f,h,e;for(e in CKEDITOR.dtd.$editable)for(var k=CKEDITOR.document.getElementsByTag(e),d=0,l=k.count();d<l;d++)f=k.getItem(d),"true"==f.getAttribute("contenteditable")&&(h={element:f,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(f,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function f(f,
d,l,m){if(!CKEDITOR.env.isCompatible)return null;f=CKEDITOR.dom.element.get(f);if(f.getEditor())throw'The editor instance "'+f.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,f,m);m==CKEDITOR.ELEMENT_MODE_REPLACE&&(f.setStyle("visibility","hidden"),b._.required=f.hasAttribute("required"),f.removeAttribute("required"));l&&b.setData(l,null,!0);b.on("loaded",function(){e(b);m==CKEDITOR.ELEMENT_MODE_REPLACE&&b.config.autoUpdateElement&&f.$.form&&b._attachToForm();
b.setMode(b.config.startupMode,function(){b.resetDirty();b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)})});b.on("destroy",h);return b}function h(){var e=this.container,d=this.element;e&&(e.clearCustomData(),e.remove());d&&(d.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(d.show(),this._.required&&d.setAttribute("required","required")),delete this.element)}function e(e){var d=e.name,f=e.element,h=e.elementMode,b=e.fire("uiSpace",{space:"top",
html:""}).html,g=e.fire("uiSpace",{space:"bottom",html:""}).html,c=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"'+(e.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(e.title?'\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'),
d=CKEDITOR.dom.element.createFromHtml(c.output({id:e.id,name:d,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.title,topHtml:b?'\x3cspan id\x3d"'+e.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+b+"\x3c/span\x3e":"",contentId:e.ui.spaceId("contents"),bottomHtml:g?'\x3cspan id\x3d"'+e.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+g+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));h==CKEDITOR.ELEMENT_MODE_REPLACE?
(f.hide(),d.insertAfter(f)):f.append(d);e.container=d;e.ui.contentsElement=e.ui.space("contents");b&&e.ui.space("top").unselectable();g&&e.ui.space("bottom").unselectable();f=e.config.width;h=e.config.height;f&&d.setStyle("width",CKEDITOR.tools.cssLength(f));h&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(h));d.disableContextMenu();CKEDITOR.env.webkit&&d.on("focus",function(){e.focus()});e.fireOnce("uiReady")}CKEDITOR.replace=function(e,d){return f(e,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
CKEDITOR.appendTo=function(e,d,h){return f(e,d,h,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var e=document.getElementsByTagName("textarea"),d=0;d<e.length;d++){var f=null,h=e[d];if(h.name||h.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(h.className))continue}else if("function"==typeof arguments[0]&&(f={},!1===arguments[0](h,f)))continue;this.replace(h,f)}}};CKEDITOR.editor.prototype.addMode=function(e,d){(this._.modes||(this._.modes=
{}))[e]=d};CKEDITOR.editor.prototype.setMode=function(e,d){var f=this,h=this._.modes;if(e!=f.mode&&h&&h[e]){f.fire("beforeSetMode",e);if(f.mode){var b=f.checkDirty(),h=f._.previousModeData,g,c=0;f.fire("beforeModeUnload");f.editable(0);f._.previousMode=f.mode;f._.previousModeData=g=f.getData(1);"source"==f.mode&&h==g&&(f.fire("lockSnapshot",{forceUpdate:!0}),c=1);f.ui.space("contents").setHtml("");f.mode=""}else f._.previousModeData=f.getData(1);this._.modes[e](function(){f.mode=e;void 0!==b&&!b&&
f.resetDirty();c?f.fire("unlockSnapshot"):"wysiwyg"==e&&f.fire("saveSnapshot");setTimeout(function(){f.fire("mode");d&&d.call(f)},0)})}};CKEDITOR.editor.prototype.resize=function(e,d,f,h){var b=this.container,g=this.ui.space("contents"),c=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;h=h?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):b;h.setSize("width",e,!0);c&&(c.style.width="1%");var a=(h.$.offsetHeight||0)-(g.$.clientHeight||
0),b=Math.max(d-(f?0:a),0);d=f?d+a:d;g.setStyle("height",b+"px");c&&(c.style.width="100%");this.fire("resize",{outerHeight:d,contentsHeight:b,outerWidth:e||h.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(e){return e?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function f(a){var c=a.editor,b=a.data.path,d=b.blockLimit,g=a.data.selection,
e=g.getRanges()[0],f;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=h(g,b))g.appendBogus(),f=CKEDITOR.env.ie;m(c,b.block,d)&&e.collapsed&&!e.getCommonAncestor().isReadOnly()&&(b=e.clone(),b.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),d=new CKEDITOR.dom.walker(b),d.guard=function(a){return!k(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!d.checkForward()||b.checkStartOfBlock()&&b.checkEndOfBlock())&&(c=e.fixBlock(!0,c.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
(c=c.getFirst(k))&&c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?:&nbsp;|\xa0)$/)&&c.remove(),f=1,a.cancel());f&&e.select()}function h(a,c){if(a.isFake)return 0;var b=c.block||c.blockLimit,d=b&&b.getLast(k);if(!(!b||!b.isBlockBoundary()||d&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||b.is("pre")||b.getBogus()))return b}function e(a){var c=a.data.getTarget();c.is("input")&&(c=c.getAttribute("type"),"submit"!=c&&"reset"!=c||a.data.preventDefault())}function k(c){return a(c)&&
n(c)}function d(a,c){return function(b){var d=b.data.$.toElement||b.data.$.fromElement||b.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(c.equals(d)||c.contains(d))||a.call(this,b)}}function l(a){function c(a){return function(c,d){d&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(g)&&(b=c);if(!(d||!k(c)||a&&v(c)))return!1}}var b,d=a.getRanges()[0];a=a.root;var g={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(g)){var e=d.clone();e.collapse(1);e.setStartAt(a,
CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(e);a.guard=c();a.checkBackward();if(b)return e=d.clone(),e.collapse(),e.setEndAt(b,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(e),a.guard=c(!0),b=!1,a.checkForward(),b}return null}function m(a,c,b){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(b)&&!c||c&&"true"==c.getAttribute("contenteditable"))}function b(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?
a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){var c=a.editor;c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}function c(a,c,b){var d=a.getCommonAncestor(c);for(c=a=b?c:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)c=a;c.remove()}var a,n,w,v,t,p,q,A,r,C;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,c){this.base(c.$||c);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 c=this.$.scrollTop;this.$.focus();this.$.scrollTop=c}else this.$.focus();
else this.$.setActive()}catch(b){if(!CKEDITOR.env.ie)throw b;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,c){var b=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",c=d(c,this),b[0]=a,b[1]=c);return CKEDITOR.dom.element.prototype.on.apply(this,b)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var c=Array.prototype.slice.call(arguments,
1),c=a.on.apply(a,c);this._.listeners.push(c);return c},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(c){}},restoreAttrs:function(){var a=this._.attrChanges,c,b;for(b in a)a.hasOwnProperty(b)&&(c=a[b],null!==c?this.setAttribute(b,c):this.removeAttribute(b))},attachClass:function(a){var c=this.getCustomData("classes");this.hasClass(a)||(!c&&(c=[]),c.push(a),this.setCustomData("classes",c),this.addClass(a))},changeAttr:function(a,c){var b=this.getAttribute(a);
c!==b&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=b),this.setAttribute(a,c))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var c=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,c)},insertHtml:function(a,c,b){var d=this.editor;d.focus();d.fire("saveSnapshot");
b||(b=d.getSelection().getRanges()[0]);p(this,c||"html",a,b);b.select();g(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,c,b){p(this,b||"html",a,c);this.editor.fire("afterInsertHtml",{intoRange:c})},insertElement:function(a,c){var b=this.editor;b.focus();b.fire("saveSnapshot");var d=b.activeEnterMode,b=b.getSelection(),e=a.getName(),e=CKEDITOR.dtd.$block[e];c||(c=b.getRanges()[0]);this.insertElementIntoRange(a,c)&&(c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),e&&((e=
a.getNext(function(a){return k(a)&&!v(a)}))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)?e.getDtd()["#"]?c.moveToElementEditStart(e):c.moveToElementEditEnd(a):e||d==CKEDITOR.ENTER_BR||(e=c.fixBlock(!0,d==CKEDITOR.ENTER_DIV?"div":"p"),c.moveToElementEditStart(e))));b.selectRanges([c]);g(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,c){var b=this.editor,d=b.config.enterMode,g=a.getName(),e=CKEDITOR.dtd.$block[g];if(c.checkReadOnly())return!1;
c.deleteContents(1);c.startContainer.type==CKEDITOR.NODE_ELEMENT&&(c.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?q(c):c.startContainer.is(CKEDITOR.dtd.$list)&&A(c));var f,h;if(e)for(;(f=c.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[f.getName()])&&(!h||!h[g]);)f.getName()in CKEDITOR.dtd.span?c.splitElement(f):c.checkStartOfBlock()&&c.checkEndOfBlock()?(c.setStartBefore(f),c.collapse(!0),f.remove()):c.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",b.editable());c.insertNode(a);return!0},setData:function(a,
c){c||(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 c=this.getHtml();a||(c=this.editor.dataProcessor.toDataFormat(c));return c},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},
fixInitialSelection:function(){function a(){var c=b.getDocument().$,d=c.getSelection(),g;a:if(d.anchorNode&&d.anchorNode==b.$)g=!0;else{if(CKEDITOR.env.webkit&&(g=b.getDocument().getActive())&&g.equals(b)&&!d.anchorNode){g=!0;break a}g=void 0}g&&(g=new CKEDITOR.dom.range(b),g.moveToElementEditStart(b),c=c.createRange(),c.setStart(g.startContainer.$,g.startOffset),c.collapse(!0),d.removeAllRanges(),d.addRange(c))}function c(){var a=b.getDocument().$,d=a.selection,g=b.getDocument().getActive();"None"==
d.type&&g.equals(b)&&(d=new CKEDITOR.dom.range(b),a=a.body.createTextRange(),d.moveToElementEditStart(b),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var b=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),c());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()};r.eol.detect(a,this);r.bogus.exclude(a);r.cell.shrink(a);a.fragment=a.range.cloneContents();r.tree.rebuild(a,this);r.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var b=C,d={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var e=this.editor.createRange();
e.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=e.createBookmark();b.list.detectMerge(d,this);b.table.detectRanges(d,this);b.block.detectMerge(d,this);d.tableContentsRanges?(b.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(b.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();b.fixUneditableRangePosition(a);b.list.merge(d,this);b.table.purge(d,this);b.block.merge(d,this);
if(c){b=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&b.block&&!a.root.equals(b.block)){a:{var d=b.block.getElementsByTag("span"),e=0,f;if(d)for(;f=d.getItem(e++);)if(!n(f)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(b.block,CKEDITOR.POSITION_BEFORE_START),b.block.remove())}else b.autoParagraph(this.editor,a),w(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return g},setup:function(){var b=this.editor;this.attachListener(b,"beforeGetData",function(){var a=
this.getData();this.is("textarea")||!1!==b.config.ignoreEmptyParagraph&&(a=a.replace(t,function(a,c){return c}));b.setData(a,null,1)},this);this.attachListener(b,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(b,"afterSetData",function(){this.setData(b.getData(1))},this);this.attachListener(b,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(b,"beforeFocus",function(){var a=b.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},
this);this.attachListener(b,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(b,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(b,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(b.readOnly);this.attachClass("cke_editable");b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):b.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||
this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+b.config.contentsLangDirection);b.keystrokeHandler.blockedKeystrokes[8]=+b.readOnly;b.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(){b._.previousScrollTop=b.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var d=function(){var a=b.editable();
null!=b._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=b._.previousScrollTop,b._.previousScrollTop=null,this.removeListener("scroll",d))};this.on("scroll",d)}b.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,b.once("contentDom",function(){b.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",b.tabIndex);if(!this.is("textarea")){b.document=this.getDocument();b.window=this.getWindow();var g=b.document;this.changeAttr("spellcheck",
!b.config.disableNativeSpellChecker);var f=b.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var h=CKEDITOR.getCss();if(h){var f=g.getHead(),n=f.getCustomData("stylesheet");n?h!=n.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?n.$.styleSheet.cssText=h:n.setText(h)):(h=g.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),f.setCustomData("stylesheet",h),h.data("cke-temp",1))}f=g.getCustomData("stylesheet_ref")||0;g.setCustomData("stylesheet_ref",
f+1);this.setCustomData("cke_includeReadonly",!b.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var c=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");c&&2!=a.$.button&&c.isReadOnly()&&a.preventDefault()});var m={8:1,46:1};this.attachListener(b,"key",function(c){if(b.readOnly)return!0;var d=c.data.domEvent.getKey(),g;c=b.getSelection();if(0!==c.getRanges().length){if(d in m){var e,f=c.getRanges()[0],h=f.startPath(),k,n,q,d=8==d;CKEDITOR.env.ie&&
11>CKEDITOR.env.version&&(e=c.getSelectedElement())||(e=l(c))?(b.fire("saveSnapshot"),f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),f.select(),b.fire("saveSnapshot"),g=1):f.collapsed&&((k=h.block)&&(q=k[d?"getPrevious":"getNext"](a))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&f[d?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),f[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),f["moveToElementEdit"+(d?"End":"Start")](q),f.select(),b.fire("saveSnapshot"),
g=1):h.blockLimit&&h.blockLimit.is("td")&&(n=h.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(n,d?CKEDITOR.START:CKEDITOR.END)&&(q=n[d?"getPrevious":"getNext"](a))?(b.fire("saveSnapshot"),f["moveToElementEdit"+(d?"End":"Start")](q),f.checkStartOfBlock()&&f.checkEndOfBlock()?q.remove():f.select(),b.fire("saveSnapshot"),g=1):(n=h.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(n,d?CKEDITOR.START:CKEDITOR.END)&&(g=1))}return!g}});b.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
this.attachListener(this,"keyup",function(a){a.data.getKeystroke()in m&&!this.getFirst(k)&&(this.appendBogus(),a=b.createRange(),a.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),a.select())});this.attachListener(this,"dblclick",function(a){if(b.readOnly)return!1;a={element:a.data.getTarget()};b.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",e);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var c=a.data.getTarget();c.is("img","hr",
"input","textarea","select")&&!c.isReadOnly()&&(b.getSelection().selectElement(c),c.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&b.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(t,""))){var c=b.createRange();c.moveToElementEditStart(a);
c.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(b,"key",function(a){if(b.readOnly)return!0;var d=a.data.domEvent.getKey();if(d in m&&(a=b.getSelection(),0!==a.getRanges().length)){var d=8==d,g=a.getRanges()[0];a=g.startPath();if(g.collapsed)a:{var e=
a.block;if(e&&g[d?"checkStartOfBlock":"checkEndOfBlock"]()&&g.moveToClosestEditablePosition(e,!d)&&g.collapsed){if(g.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=g.startContainer.getChild(g.startOffset-(d?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){b.fire("saveSnapshot");f.remove();a=!0;break a}}g=g.startPath().block;if(!g||g&&g.contains(e))a=void 0;else{b.fire("saveSnapshot");var h;(h=(d?g:e).getBogus())&&h.remove();h=b.getSelection();f=h.createBookmarks();(d?e:g).moveChildren(d?
g:e,!1);a.lastElement.mergeSiblings();c(e,g,!d);h.selectBookmarks(f);a=!0}}else a=!1}else d=g,h=a.block,g=d.endPath().block,h&&g&&!h.equals(g)?(b.fire("saveSnapshot"),(e=h.getBogus())&&e.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),g.getParent()&&(g.moveChildren(h,!1),a.lastElement.mergeSiblings(),c(h,g,!0)),d=b.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),a=!0):a=!1;if(!a)return;b.getSelection().scrollIntoView();
b.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var c=a.getHead();if(c.getCustomData("stylesheet")){var b=a.getCustomData("stylesheet_ref");--b?a.setCustomData("stylesheet_ref",b):(a.removeCustomData("stylesheet_ref"),c.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");
delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var c=this._.editable;if(c&&a)return 0;arguments.length&&(c=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),null));return c};CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.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))});c.on("selectionChange",function(a){if(!c.readOnly){var b=c.getSelection();b&&!b.isLocked&&(b=c.checkDirty(),c.fire("lockSnapshot"),f(a),c.fire("unlockSnapshot"),!b&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var c=a.editor;c.on("mode",function(){var a=c.editable();if(a&&a.isInline()){var b=c.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",b);b&&a.changeAttr("title",b);var d=
c.fire("ariaEditorHelpLabel",{}).label;if(d&&(b=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");b.append(d);a.changeAttr("aria-describedby",g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");a=CKEDITOR.dom.walker.whitespaces(!0);n=CKEDITOR.dom.walker.bookmark(!1,
!0);w=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();t=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT}function c(b,d){var g,e,f,h,k=[],l=d.range.startContainer;g=d.range.startPath();for(var l=n[l.getName()],m=0,q=b.getChildren(),p=q.count(),w=-1,t=-1,r=0,F=g.contains(n.$list);m<p;++m)g=q.getItem(m),a(g)?(f=g.getName(),F&&f in CKEDITOR.dtd.$list?
k=k.concat(c(g,d)):(h=!!l[f],"br"!=f||!g.data("cke-eol")||m&&m!=p-1||(r=(e=m?k[m-1].node:q.getItem(m+1))&&(!a(e)||!e.is("br")),e=e&&a(e)&&n.$block[e.getName()]),-1!=w||h||(w=m),h||(t=m),k.push({isElement:1,isLineBreak:r,isBlock:g.isBlockBoundary(),hasBlockSibling:e,node:g,name:f,allowed:h}),e=r=0)):k.push({isElement:0,node:g,allowed:1});-1<w&&(k[w].firstNotAllowed=1);-1<t&&(k[t].lastNotAllowed=1);return k}function d(c,b){var g=[],e=c.getChildren(),f=e.count(),h,k=0,m=n[b],l=!c.is(n.$inline)||c.is("br");
for(l&&g.push(" ");k<f;k++)h=e.getItem(k),a(h)&&!h.is(m)?g=g.concat(d(h,b)):g.push(h);l&&g.push(" ");return g}function g(c){return a(c.startContainer)&&c.startContainer.getChild(c.startOffset-1)}function e(c){return c&&a(c)&&(c.is(n.$removeEmpty)||c.is("a")&&!c.isBlockBoundary())}function f(c,b,d,g){var e=c.clone(),h,k;e.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(e)).next())&&a(h)&&l[h.getName()]&&(k=h.getPrevious())&&a(k)&&!k.getParent().equals(c.startContainer)&&d.contains(k)&&
g.contains(h)&&h.isIdentical(k)&&(h.moveChildren(k),h.remove(),f(c,b,d,g))}function h(c,b){function d(c,b){if(b.isBlock&&b.isElement&&!b.node.is("br")&&a(c)&&c.is("br"))return c.remove(),1}var g=b.endContainer.getChild(b.endOffset),e=b.endContainer.getChild(b.endOffset-1);g&&d(g,c[c.length-1]);e&&d(e,c[0])&&(b.setEnd(b.endContainer,b.endOffset-1),b.collapse())}var n=CKEDITOR.dtd,l={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},q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,
h6:1},p=CKEDITOR.tools.extend({},n.$inline);delete p.br;return function(l,D,w,t){var r=l.editor,A=!1;"unfiltered_html"==D&&(D="html",A=!0);if(!t.checkReadOnly()){var H=(new CKEDITOR.dom.elementPath(t.startContainer,t.root)).blockLimit||t.root;l={type:D,dontFilter:A,editable:l,editor:r,range:t,blockLimit:H,mergeCandidates:[],zombies:[]};D=l.range;t=l.mergeCandidates;var v,C;"text"==l.type&&D.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(v=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
D.document),D.insertNode(v),D.setStartAfter(v));A=new CKEDITOR.dom.elementPath(D.startContainer);l.endPath=H=new CKEDITOR.dom.elementPath(D.endContainer);if(!D.collapsed){var r=H.block||H.blockLimit,Z=D.getCommonAncestor();r&&!r.equals(Z)&&!r.contains(Z)&&D.checkEndOfBlock()&&l.zombies.push(r);D.deleteContents()}for(;(C=g(D))&&a(C)&&C.isBlockBoundary()&&A.contains(C);)D.moveToPosition(C,CKEDITOR.POSITION_BEFORE_END);f(D,l.blockLimit,A,H);v&&(D.setEndBefore(v),D.collapse(),v.remove());v=D.startPath();
if(r=v.contains(e,!1,1))D.splitElement(r),l.inlineStylesRoot=r,l.inlineStylesPeak=v.lastElement;v=D.createBookmark();(r=v.startNode.getPrevious(k))&&a(r)&&e(r)&&t.push(r);(r=v.startNode.getNext(k))&&a(r)&&e(r)&&t.push(r);for(r=v.startNode;(r=r.getParent())&&e(r);)t.push(r);D.moveToBookmark(v);if(v=w){v=l.range;if("text"==l.type&&l.inlineStylesRoot){C=l.inlineStylesPeak;D=C.getDocument().createText("{cke-peak}");for(t=l.inlineStylesRoot.getParent();!C.equals(t);)D=D.appendTo(C.clone()),C=C.getParent();
w=D.getOuterHtml().split("{cke-peak}").join(w)}C=l.blockLimit.getName();if(/^\s+|\s+$/.test(w)&&"span"in CKEDITOR.dtd[C]){var M='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';w=M+w+M}w=l.editor.dataProcessor.toHtml(w,{context:null,fixForBody:!1,protectedWhitespaces:!!M,dontFilter:l.dontFilter,filter:l.editor.activeFilter,enterMode:l.editor.activeEnterMode});C=v.document.createElement("body");C.setHtml(w);M&&(C.getFirst().remove(),C.getLast().remove());if((M=v.startPath().block)&&(1!=
M.getChildCount()||!M.getBogus()))a:{var Q;if(1==C.getChildCount()&&a(Q=C.getFirst())&&Q.is(q)&&!Q.hasAttribute("contenteditable")){M=Q.getElementsByTag("*");v=0;for(t=M.count();v<t;v++)if(D=M.getItem(v),!D.is(p))break a;Q.moveChildren(Q.getParent(1));Q.remove()}}l.dataWrapper=C;v=w}if(v){Q=l.range;v=Q.document;var N;C=l.blockLimit;t=0;var V,M=[],T,P;w=r=0;var W,ba;D=Q.startContainer;var A=l.endPath.elements[0],ca,H=A.getPosition(D),Z=!!A.getCommonAncestor(D)&&H!=CKEDITOR.POSITION_IDENTICAL&&!(H&
CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);D=c(l.dataWrapper,l);for(h(D,Q);t<D.length;t++){H=D[t];if(N=H.isLineBreak){N=Q;W=C;var aa=void 0,da=void 0;H.hasBlockSibling?N=1:(aa=N.startContainer.getAscendant(n.$block,1))&&aa.is({div:1,p:1})?(da=aa.getPosition(W),da==CKEDITOR.POSITION_IDENTICAL||da==CKEDITOR.POSITION_CONTAINS?N=0:(W=N.splitElement(aa),N.moveToPosition(W,CKEDITOR.POSITION_AFTER_START),N=1)):N=0}if(N)w=0<t;else{N=Q.startPath();!H.isBlock&&m(l.editor,N.block,N.blockLimit)&&
(P=b(l.editor))&&(P=v.createElement(P),P.appendBogus(),Q.insertNode(P),CKEDITOR.env.needsBrFiller&&(V=P.getBogus())&&V.remove(),Q.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END));if((N=Q.startPath().block)&&!N.equals(T)){if(V=N.getBogus())V.remove(),M.push(N);T=N}H.firstNotAllowed&&(r=1);if(r&&H.isElement){N=Q.startContainer;for(W=null;N&&!n[N.getName()][H.name];){if(N.equals(C)){N=null;break}W=N;N=N.getParent()}if(N)W&&(ba=Q.splitElement(W),l.zombies.push(ba),l.zombies.push(W));else{W=C.getName();
ca=!t;N=t==D.length-1;W=d(H.node,W);for(var aa=[],da=W.length,ea=0,ha=void 0,ia=0,fa=-1;ea<da;ea++)ha=W[ea]," "==ha?(ia||ca&&!ea||(aa.push(new CKEDITOR.dom.text(" ")),fa=aa.length),ia=1):(aa.push(ha),ia=0);N&&fa==aa.length&&aa.pop();ca=aa}}if(ca){for(;N=ca.pop();)Q.insertNode(N);ca=0}else Q.insertNode(H.node);H.lastNotAllowed&&t<D.length-1&&((ba=Z?A:ba)&&Q.setEndAt(ba,CKEDITOR.POSITION_AFTER_START),r=0);Q.collapse()}}1!=D.length?V=!1:(V=D[0],V=V.isElement&&"false"==V.node.getAttribute("contenteditable"));
V&&(w=!0,N=D[0].node,Q.setStartAt(N,CKEDITOR.POSITION_BEFORE_START),Q.setEndAt(N,CKEDITOR.POSITION_AFTER_END));l.dontMoveCaret=w;l.bogusNeededBlocks=M}V=l.range;var ga;ba=l.bogusNeededBlocks;for(ca=V.createBookmark();T=l.zombies.pop();)T.getParent()&&(P=V.clone(),P.moveToElementEditStart(T),P.removeEmptyBlocksAtEnd());if(ba)for(;T=ba.pop();)CKEDITOR.env.needsBrFiller?T.appendBogus():T.append(V.document.createText(" "));for(;T=l.mergeCandidates.pop();)T.mergeSiblings();V.moveToBookmark(ca);if(!l.dontMoveCaret){for(T=
g(V);T&&a(T)&&!T.is(n.$empty);){if(T.isBlockBoundary())V.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END);else{if(e(T)&&T.getHtml().match(/(\s|&nbsp;)$/g)){ga=null;break}ga=V.clone();ga.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END)}T=T.getLast(k)}ga&&V.moveToRange(ga)}}}}();q=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};
return c}function c(a,b,d){b=a.getDocument().createElement(b);a.append(b,d);return b}function b(a){var c=a.count(),d;for(c;0<c--;)d=a.getItem(c),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,e=g.getAscendant("table",1),f=!1;b(e.getElementsByTag("td"));b(e.getElementsByTag("th"));e=d.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=d.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),
e=a(e).lastForward(),f=!0);e||(e=g);e.is("table")?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=c(e,"tr",f)),e.is("tr")&&(e=c(e,e.getParent().is("thead")?"th":"td",f)),(g=e.getBogus())&&g.remove(),d.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();A=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||
a.is(CKEDITOR.dtd.$listItem)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return c}return function(c){var b=c.startContainer,d=!1,g;g=c.clone();g.setStart(b,0);g=a(g).lastBackward();g||(g=c.clone(),g.setEndAt(b,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),d=!0);g||(g=b);g.is(CKEDITOR.dtd.$list)?(c.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),g.remove()):((b=g.getBogus())&&b.remove(),c.moveToPosition(g,d?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_BEFORE_END),c.select())}}();r={eol:{detect:function(a,c){var b=a.range,d=b.clone(),g=b.clone(),e=new CKEDITOR.dom.elementPath(b.startContainer,c),f=new CKEDITOR.dom.elementPath(b.endContainer,c);d.collapse(1);g.collapse();e.block&&d.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(b.setStartAfter(e.block),a.prependEolBr=1);f.block&&g.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(b.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,c){var b=c.getDocument(),d;a.appendEolBr&&(d=
this.createEolBr(b),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(b),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var c=a.range.getBoundaryNodes(),b=c.startNode,c=c.endNode;!c||!v(c)||b&&b.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var b=a.range,d=b.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(d,c),e=new CKEDITOR.dom.elementPath(b.startContainer,c),
b=new CKEDITOR.dom.elementPath(b.endContainer,c),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)&&(e=e.contains(CKEDITOR.dtd.$list),b=b.contains(CKEDITOR.dtd.$list),!e.equals(b))){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,
c,d,f)},rebuildFragment:function(a,c,b,d){for(var g;b&&!b.equals(c)&&d(b);)g=b.clone(0,1),a.fragment.appendTo(g),a.fragment=g,b=b.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,b=a.endContainer,d=a.startOffset,g=a.endOffset;c.type==CKEDITOR.NODE_ELEMENT&&c.equals(b)&&c.is("tr")&&++d==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};C=function(){function a(c,b){var d=c.getParent();if(d.is(CKEDITOR.dtd.$inline))c[b?"insertBefore":"insertAfter"](d)}function c(b,d,g){a(d);a(g,1);for(var e;e=
g.getNext();)e.insertAfter(d),d=e;w(b)&&b.remove()}function d(a,c){var b=new CKEDITOR.dom.range(a);b.setStartAfter(c.startNode);b.setEndBefore(c.endNode);return b}return{list:{detectMerge:function(a,c){var b=d(c,a.bookmark),g=b.startPath(),e=b.endPath(),f=g.contains(CKEDITOR.dtd.$list),h=e.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||
a.mergeListItems)b=b.clone(),b.setStartBefore(a.bookmark.startNode),b.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=b.createBookmark()},merge:function(a,b){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(g,b);if(a.mergeList){var h=e.contains(CKEDITOR.dtd.$list),k=f.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),
f=f.contains(CKEDITOR.dtd.$listItem),e.equals(f)||c(f,d,g));d.remove();g.remove()}}},block:{detectMerge:function(a,c){if(!a.tableContentsRanges&&!a.mergeListBookmark){var b=new CKEDITOR.dom.range(c);b.setStartBefore(a.bookmark.startNode);b.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=b.createBookmark()}},merge:function(a,b){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(g,
b),e=e.block,f=f.block;e&&f&&!e.equals(f)&&c(f,d,g);d.remove();g.remove()}}},table:function(){function a(d){var g=[],e,f=new CKEDITOR.dom.walker(d),h=d.startPath().contains(b),k=d.endPath().contains(b),n={};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(n,a,l,1)}if(f&&h&&a.equals(h))e=d.clone(),e.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!f&&k&&a.equals(k))e=d.clone(),e.setStartAt(k,
CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&(!h||c(a,h))&&(!k||c(a,k));if(!l&&(l=f))if(a.is(b))var l=h&&h.getAscendant("table",!0),m=k&&k.getAscendant("table",!0),q=a.getAscendant("table",!0),l=l&&l.contains(q)||m&&m.contains(q);else l=void 0;l&&(e=d.clone(),e.selectNodeContents(a),g.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return g}function c(a,b){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(b);
return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&d)}var b={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,d=c.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(b)&&++g};d.checkForward();if(1<g){var d=c.startPath().contains("table"),e=c.endPath().contains("table");d&&e&&c.checkBoundaryOfElement(d,CKEDITOR.START)&&c.checkBoundaryOfElement(e,CKEDITOR.END)&&(c=a.range.clone(),c.setStartBefore(d),
c.setEndAfter(e),a.purgeTableBookmark=c.createBookmark())}},detectRanges:function(g,e){var f=d(e,g.bookmark),h=f.clone(),k,n,l=f.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(b)&&(l=l.getAscendant("table",!0));n=l;l=new CKEDITOR.dom.elementPath(f.startContainer,n);n=new CKEDITOR.dom.elementPath(f.endContainer,n);l=l.contains("table");n=n.contains("table");if(l||n)l&&n&&c(l,n)?(g.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),h.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),
h=f.clone(),h.setEndAt(l,CKEDITOR.POSITION_AFTER_END),k=f.clone(),k.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),k=a(h).concat(a(k))):l?n||(g.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),f.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(g.tableSurroundingRange=h,h.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(n,CKEDITOR.POSITION_AFTER_START)),g.tableContentsRanges=k?k:a(f)},deleteRanges:function(a){for(var c;c=a.tableContentsRanges.pop();)c.extractContents(),w(c.startContainer)&&
c.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var c=a.doc,b=a.range.clone(),c=c.createElement("p");c.insertBefore(a.purgeTableBookmark.startNode);b.moveToBookmark(a.purgeTableBookmark);b.deleteContents();a.range.moveToPosition(c,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,c){var d=c.startPath(),g;m(a,d.block,d.blockLimit)&&(g=b(a))&&(g=c.document.createElement(g),g.appendBogus(),c.insertNode(g),c.moveToPosition(g,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function f(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,c){if(0===a.length||f(a[0].getEnclosedNode()))return!1;var b,d;if((b=!c&&
1===a.length)&&!(b=a[0].collapsed)){var g=a[0];b=g.startContainer.getAscendant({td:1,th:1},!0);var e=g.endContainer.getAscendant({td:1,th:1},!0);d=CKEDITOR.tools.trim;b&&b.equals(e)&&!b.findOne("td, th, tr, tbody, table")?(g=g.cloneContents(),b=g.getFirst()?d(g.getFirst().getText())!==d(b.getText()):!0):b=!1}if(b)return!1;for(d=0;d<a.length;d++)if(b=a[d]._getTableElement(),!b)return!1;return!0}function e(a){function c(a){a=a.find("td, th");var b=[],d;for(d=0;d<a.count();d++)b.push(a.getItem(d));return b}
var b=[],d,g;for(g=0;g<a.length;g++)d=a[g]._getTableElement(),d.is&&d.is({td:1,th:1})?b.push(d):b=b.concat(c(d));return b}function k(a){a=e(a);var c="",b=[],d,g;for(g=0;g<a.length;g++)d&&!d.equals(a[g].getAscendant("tr"))?(c+=b.join("\t")+"\n",d=a[g].getAscendant("tr"),b=[]):0===g&&(d=a[g].getAscendant("tr")),b.push(a[g].getText());return c+=b.join("\t")}function d(a){var c=this.root.editor,b=c.getSelection(1);this.reset();B=!0;b.root.once("selectionchange",function(a){a.cancel()},null,null,0);b.selectRanges([a[0]]);
b=this._.cache;b.ranges=new CKEDITOR.dom.rangeList(a);b.type=CKEDITOR.SELECTION_TEXT;b.selectedElement=a[0]._getTableElement();b.selectedText=k(a);b.nativeSel=null;this.isFake=1;this.rev=A++;c._.fakeSelection=this;B=!1;this.root.fire("selectionchange")}function l(){var a=this._.fakeSelection,c;if(a){c=this.getSelection(1);var b;if(!(b=!c)&&(b=!c.isHidden())){b=a;var d=c.getRanges(),g=b.getRanges(),e=d.length&&d[0]._getTableElement()&&d[0]._getTableElement().getAscendant("table",!0),k=g.length&&g[0]._getTableElement()&&
g[0]._getTableElement().getAscendant("table",!0),n=1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table"),l=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table");if(f(b.getSelectedElement()))b=!1;else{var m=1===d.length&&d[0].collapsed,g=h(d,!!CKEDITOR.env.webkit)&&h(g);e=e&&k?e.equals(k)||k.contains(e):!1;e&&(m||g)?(n&&!l&&b.selectRanges(d),b=!0):b=!1}b=!b}b&&(a.reset(),a=0)}if(!a&&(a=c||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",a);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(b=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),CKEDITOR.env.webkit&&!b&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:a,path:c}))}function m(){y=!0;u||(b.call(this),u=CKEDITOR.tools.setTimeout(b,200,this))}function b(){u=null;y&&(CKEDITOR.tools.setTimeout(l,0,this),y=!1)}function g(a){return x(a)||
a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function c(a){function c(b,d){return b&&b.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](b):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var b=a.startContainer,d=a.getPreviousNode(g,null,b),e=a.getNextNode(g,null,b);return c(d)||c(e,1)||!(d||e||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()&&b.getBogus())?!0:!1}function a(a){n(a,!1);var c=a.getDocument().createText(r);a.setCustomData("cke-fillingChar",
c);return c}function n(a,c){var b=a&&a.removeCustomData("cke-fillingChar");if(b){if(!1!==c){var d=a.getDocument().getSelection().getNative(),g=d&&"None"!=d.type&&d.getRangeAt(0),e=r.length;if(b.getLength()>e&&g&&g.intersectsNode(b.$)){var f=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==b.$&&d.anchorOffset>e&&(f[0].offset-=e);d.focusNode==b.$&&d.focusOffset>e&&(f[1].offset-=e)}}b.setText(w(b.getText(),1));f&&(b=a.getDocument().$,d=b.getSelection(),
b=b.createRange(),b.setStart(f[0].node,f[0].offset),b.collapse(!0),d.removeAllRanges(),d.addRange(b),d.extend(f[1].node,f[1].offset))}}function w(a,c){return c?a.replace(C,function(a,c){return c?" ":""}):a.replace(r,"")}function v(a,c){var b=c&&CKEDITOR.tools.htmlEncode(c)||"\x26nbsp;",b=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")+'"\x3e'+b+"\x3c/div\x3e",
a.document);a.fire("lockSnapshot");a.editable().append(b);var d=a.getSelection(1),g=a.createRange(),e=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);g.setStartAt(b,CKEDITOR.POSITION_AFTER_START);g.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([g]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function t(a){var c={37:1,39:1,8:1,46:1};return function(b){var d=b.data.getKeystroke();if(c[d]){var g=a.getSelection().getRanges(),e=g[0];1==g.length&&
e.collapsed&&(d=e[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),b.data.preventDefault(),b.cancel())}}}function p(a){for(var c=0;c<a.length;c++){var b=a[c];b.getCommonAncestor().isReadOnly()&&a.splice(c,1);if(!b.collapsed){if(b.startContainer.isReadOnly())for(var d=b.startContainer,g;d&&!((g=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)g&&"false"==d.getAttribute("contentEditable")&&
b.setStartAfter(d),d=d.getParent();d=b.startContainer;g=b.endContainer;var e=b.startOffset,f=b.endOffset,h=b.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(e>=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=b.clone();b.setEndBefore(d);b.collapsed&&a.splice(c--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(d),
g.collapsed||a.splice(c+1,0,g));return!0}return!1};d.next()}}return a}var q="function"!=typeof window.getSelection,A=1,r=CKEDITOR.tools.repeat("​",7),C=new RegExp(r+"( )?","g"),B,u,y,x=CKEDITOR.dom.walker.invisible(1),z=function(){function a(c){return function(a){var b=a.editor.createRange();b.moveToClosestEditablePosition(a.selected,c)&&a.editor.getSelection().selectRanges([b]);return!1}}function c(a){return function(c){var b=c.editor,d=b.createRange(),g;if(!b.readOnly)return(g=d.moveToClosestEditablePosition(c.selected,
a))||(g=d.moveToClosestEditablePosition(c.selected,!a)),g&&b.getSelection().selectRanges([d]),b.fire("saveSnapshot"),c.selected.remove(),g||(d.moveToElementEditablePosition(b.editable()),b.getSelection().selectRanges([d])),b.fire("saveSnapshot"),!1}}var b=a(),d=a(1);return{37:b,38:b,39:d,40:d,8:c(),46:c(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=b.getSelection();a&&a.removeAllRanges()}var b=a.editor;b.on("contentDom",function(){function a(){r=new CKEDITOR.dom.selection(b.getSelection());
r.lock()}function c(){e.removeListener("mouseup",c);k.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement()&&b.parentElement().ownerDocument==g.$&&b.select()}function d(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 g=b.document,e=CKEDITOR.document,f=b.editable(),h=g.getBody(),
k=g.getDocumentElement(),w=f.isInline(),p,r;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();0!==p&&(a=b.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==f.$&&(a=b.createRange(),a.moveToElementEditStart(f),a.select())},null,null,-2);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){p&&CKEDITOR.env.webkit&&(p=b._.previousActive&&b._.previousActive.equals(g.getActive()))&&null!=b._.previousScrollTop&&b._.previousScrollTop!=f.$.scrollTop&&(f.$.scrollTop=
b._.previousScrollTop);b.unlockSelection(p);p=0},null,null,-1);f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie||w)q?f.attachListener(f,"beforedeactivate",a,null,null,-1):f.attachListener(b,"selectionCheck",a,null,null,-1),f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){b.lockSelection(r);p=1},null,null,-1),f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!w){var u;f.attachListener(f,"mousedown",function(a){2==a.data.$.button&&((a=b.document.getSelection())&&
a.getType()!=CKEDITOR.SELECTION_NONE||(u=b.window.getScrollPosition()))});f.attachListener(f,"mouseup",function(a){2==a.data.$.button&&u&&(b.document.$.documentElement.scrollLeft=u.x,b.document.$.documentElement.scrollTop=u.y);u=null});if("BackCompat"!=g.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var A,v;k.on("mousedown",function(a){function c(a){a=a.data.$;if(A){var b=h.$.createTextRange();try{b.moveToPoint(a.clientX,a.clientY)}catch(d){}A.setEndPoint(0>v.compareEndPoints("StartToStart",
b)?"EndToEnd":"StartToStart",b);A.select()}}function b(){k.removeListener("mousemove",c);e.removeListener("mouseup",b);k.removeListener("mouseup",b);A.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<k.$.clientHeight&&a.$.x<k.$.clientWidth){A=h.$.createTextRange();try{A.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}v=A.duplicate();k.on("mousemove",c);e.on("mouseup",b);k.on("mouseup",b)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)k.on("mousedown",function(a){a.data.getTarget().is("html")&&
(e.on("mouseup",c),k.on("mouseup",c))})}}f.attachListener(f,"selectionchange",l,b);f.attachListener(f,"keyup",m,b);CKEDITOR.env.ie&&f.attachListener(f,"keydown",function(a){var c=this.getSelection(1),b=d(c);b&&!b.equals(f)&&(c.selectElement(b),a.data.preventDefault())},b);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){b.forceNextSelectionCheck();b.selectionChange(1)});if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var B;f.attachListener(f,"mousedown",function(){B=1});f.attachListener(g.getDocumentElement(),
"mouseup",function(){B&&m.call(b);B=0})}else f.attachListener(CKEDITOR.env.ie?f:g.getDocumentElement(),"mouseup",m,b);CKEDITOR.env.webkit&&f.attachListener(g,"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:f.hasFocus&&n(f)}},null,null,-1);f.attachListener(f,"keydown",t(b),null,null,-1)});b.on("setData",function(){b.unlockSelection();CKEDITOR.env.webkit&&c()});b.on("contentDomUnload",function(){b.unlockSelection()});if(CKEDITOR.env.ie9Compat)b.on("beforeDestroy",
c,null,null,9);b.on("dataReady",function(){delete b._.fakeSelection;delete b._.hiddenSelectionContainer;b.selectionChange(1)});b.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),c=b.editable().getLast(a);c&&c.hasAttribute("data-cke-hidden-sel")&&(c.remove(),CKEDITOR.env.gecko&&(a=b.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);b.on("key",function(a){if("wysiwyg"==b.mode){var c=b.getSelection();if(c.isFake){var d=
z[a.data.keyCode];if(d)return d({editor:b,selected:c.getSelectedElement(),selection:c,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var c=a.editor;c.on("selectionChange",function(){var a=c.editable(),b=a.getCustomData("cke-fillingChar");b&&(b.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):b.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",function(){n(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},
c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?l:m).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};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 c=this._.savedSelection;return c?(c.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 c=a;a=a.root}var b=a instanceof CKEDITOR.dom.element;this.rev=c?c.rev:A++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(c)return CKEDITOR.tools.extend(this._.cache,c._.cache),
this.isFake=c.isFake,this.isLocked=c.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(e){}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 I={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:w,_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:r});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=
q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE;try{var b=this.getNative(),d=b.type;"Text"==d&&(c=CKEDITOR.SELECTION_TEXT);"Control"==d&&(c=CKEDITOR.SELECTION_ELEMENT);b.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(g){}return a.type=c}:function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_TEXT,b=this.getNative();if(!b||!b.rangeCount)c=CKEDITOR.SELECTION_NONE;
else if(1==b.rangeCount){var b=b.getRangeAt(0),d=b.startContainer;d==b.endContainer&&1==d.nodeType&&1==b.endOffset-b.startOffset&&I[d.childNodes[b.startOffset].nodeName.toLowerCase()]&&(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=q?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,b){c=c.duplicate();c.collapse(b);var d=c.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var g=d.children,e,f,h=c.duplicate(),k=0,
n=g.length-1,l=-1,m,q;k<=n;)if(l=Math.floor((k+n)/2),e=g[l],h.moveToElementText(e),m=h.compareEndPoints("StartToStart",c),0<m)n=l-1;else if(0>m)k=l+1;else return{container:d,offset:a(e)};if(-1==l||l==g.length-1&&0>m){h.moveToElementText(d);h.setEndPoint("StartToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;g=d.childNodes;if(!h)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:g.length}:{container:e,offset:e.nodeValue.length};for(d=g.length;0<h&&0<d;)f=g[--d],f.nodeType==
CKEDITOR.NODE_TEXT&&(q=f,h-=f.nodeValue.length);return{container:q,offset:-h}}h.collapse(0<m?!0:!1);h.setEndPoint(0<m?"StartToStart":"EndToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(e)+(0<m?0:1)};for(;0<h;)try{f=e[0<m?"previousSibling":"nextSibling"],f.nodeType==CKEDITOR.NODE_TEXT&&(h-=f.nodeValue.length,q=f),e=f}catch(w){return{container:d,offset:a(e)}}return{container:q,offset:0<m?-h:q.nodeValue.length+h}};return function(){var a=this.getNative(),b=a&&
a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=c(b,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=c(b),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<b.length;g++){for(var e=b.item(g),f=e.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<
f.childNodes.length&&f.childNodes[h]!=e;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=[],c,b=this.getNative();if(!b)return a;for(var d=0;d<b.rangeCount;d++){var g=b.getRangeAt(d);c=new CKEDITOR.dom.range(this.root);c.setStart(new CKEDITOR.dom.node(g.startContainer),g.startOffset);c.setEnd(new CKEDITOR.dom.node(g.endContainer),g.endOffset);a.push(c)}return a};return function(c){var b=this._.cache,d=b.ranges;d||(b.ranges=
d=new CKEDITOR.dom.rangeList(a.call(this)));return c?p(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var c;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var b=this.getRanges()[0];if(b){if(b.collapsed)c=b.startContainer,c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent());else{for(b.optimize();c=b.startContainer,b.startOffset==(c.getChildCount?
c.getChildCount():c.getLength())&&!c.isBlockBoundary();)b.setStartAfter(c);c=b.startContainer;if(c.type!=CKEDITOR.NODE_ELEMENT)return c.getParent();if((c=c.getChild(b.startOffset))&&c.type==CKEDITOR.NODE_ELEMENT)for(b=c.getFirst();b&&b.type==CKEDITOR.NODE_ELEMENT;)c=b,b=b.getFirst();else c=b.startContainer}c=c.$}}return a.startElement=c?new CKEDITOR.dom.element(c):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var c=this,b=CKEDITOR.tools.tryThese(function(){return c.getNative().createRange().item(0)},
function(){for(var a=c.getRanges()[0].clone(),b,d,g=2;g&&!((b=a.getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&I[b.getName()]&&(d=b));g--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=b?new CKEDITOR.dom.element(b):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var c=this.getNative(),c=q?"Control"==c.type?"":c.createRange().text:c.toString();return a.selectedText=c},lock:function(){this.getRanges();this.getStartElement();
this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var c=this.getSelectedElement(),b=this.getRanges(),g=this.isFake;this.isLocked=0;this.reset();a&&(a=c||b[0]&&b[0].getCommonAncestor())&&a.getAscendant("body",1)&&(h(b)?d.call(this,b):g?this.fake(c):c?this.selectElement(c):this.selectRanges(b))}},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 c=a._.hiddenSelectionContainer;if(c){var b=a.checkDirty();a.fire("lockSnapshot");c.remove();a.fire("unlockSnapshot");!b&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=A++},selectElement:function(a){var c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(b){var g=this.root.editor,e=g&&g._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,f,k=0;k<b.length;++k)f=
b[k],f.endContainer.equals(e)&&(f.endOffset=Math.min(f.endOffset,e.getChildCount()));if(b.length)if(this.isLocked){var l=CKEDITOR.document.getActive();this.unlock();this.selectRanges(b);this.lock();l&&!l.equals(this.root)&&l.focus()}else{var m;a:{var w,p;if(1==b.length&&!(p=b[0]).collapsed&&(m=p.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(w=p.getEnclosedNode())&&w.type==CKEDITOR.NODE_ELEMENT&&(m=w),"false"==m.getAttribute("contenteditable")))break a;
m=void 0}if(m)this.fake(m);else if(g&&g.plugins.tableselection&&CKEDITOR.plugins.tableselection.isSupportedEnvironment&&h(b)&&!B)d.call(this,b);else{if(q){w=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;p={table:1,tbody:1,tr:1};1<b.length&&(g=b[b.length-1],b[0].setEnd(g.endContainer,g.endOffset));g=b[0];b=g.collapsed;var t,r,u;if((e=g.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in I&&(!e.is("a")||!e.getText()))try{u=e.$.createControlRange();u.addElement(e.$);u.select();return}catch(A){}if(g.startContainer.type==
CKEDITOR.NODE_ELEMENT&&g.startContainer.getName()in p||g.endContainer.type==CKEDITOR.NODE_ELEMENT&&g.endContainer.getName()in p)g.shrink(CKEDITOR.NODE_ELEMENT,!0),b=g.collapsed;u=g.createBookmark();p=u.startNode;b||(l=u.endNode);u=g.document.$.body.createTextRange();u.moveToElementText(p.$);u.moveStart("character",1);l?(m=g.document.$.body.createTextRange(),m.moveToElementText(l.$),u.setEndPoint("EndToEnd",m),u.moveEnd("character",-1)):(t=p.getNext(w),r=p.hasAscendant("pre"),t=!(t&&t.getText&&t.getText().match(m))&&
(r||!p.hasPrevious()||p.getPrevious().is&&p.getPrevious().is("br")),r=g.document.createElement("span"),r.setHtml("\x26#65279;"),r.insertBefore(p),t&&g.document.createText("﻿").insertBefore(p));g.setStartBefore(p);p.remove();b?(t?(u.moveStart("character",-1),u.select(),g.document.$.selection.clear()):u.select(),g.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START),r.remove()):(g.setEndBefore(l),l.remove(),u.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(u=0;u<b.length;u++){if(u<
b.length-1&&(t=b[u],r=b[u+1],m=t.clone(),m.setStart(t.endContainer,t.endOffset),m.setEnd(r.startContainer,r.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),g=m.getCommonAncestor(),m=m.getEnclosedNode(),g.isReadOnly()||m&&m.isReadOnly()))){r.setStart(t.startContainer,t.startOffset);b.splice(u--,1);continue}g=b[u];r=this.document.$.createRange();g.collapsed&&CKEDITOR.env.webkit&&c(g)&&(m=a(this.root),g.insertNode(m),(t=m.getNext())&&!m.getPrevious()&&t.type==CKEDITOR.NODE_ELEMENT&&"br"==
t.getName()?(n(this.root),g.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START)):g.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));r.setStart(g.startContainer.$,g.startOffset);try{r.setEnd(g.endContainer.$,g.endOffset)}catch(v){if(0<=v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))g.collapse(1),r.setEnd(g.endContainer.$,g.endOffset);else throw v;}l.addRange(r)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,c){var b=this.root.editor;void 0===c&&a.hasAttribute("aria-label")&&(c=a.getAttribute("aria-label"));
this.reset();v(b,c);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=A++;b._.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 h(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 c=[],b,d=0;d<a.length;d++){var g=new CKEDITOR.dom.range(this.root);g.moveToBookmark(a[d]);c.push(g)}a.isFake&&(b=h(c)?c[0]._getTableElement():c[0].getEnclosedNode(),b&&b.type==
CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(c)?this.fake(b):this.selectRanges(c);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[q?"empty":"removeAllRanges"]()}catch(c){}this.reset()}}}}(),
"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function f(a,c){for(var b,d;(a=a.getParent())&&!a.equals(c);)if(a.getAttribute("data-nostyle"))b=a;else if(!d){var g=a.getAttribute("contentEditable");"false"==g?b=a:"true"==g&&(d=1)}return b}function h(a,c,b,d){return(a.getPosition(c)|d)==d&&(!b.childRule||b.childRule(a))}function e(a){var c=a.document;if(a.collapsed)c=A(this,c),a.insertNode(c),a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var b=
this.element,g=this._.definition,k,n=g.ignoreReadonly,l=n||g.includeReadonly;null==l&&(l=a.root.getCustomData("cke_includeReadonly"));var m=CKEDITOR.dtd[b];m||(k=!0,m=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var q=a.createBookmark(),p=q.startNode,w=q.endNode,r=p,u;if(!n){var v=a.getCommonAncestor(),n=f(p,v),v=f(w,v);n&&(r=n.getNextSourceNode(!0));v&&(w=v)}for(r.getPosition(w)==CKEDITOR.POSITION_FOLLOWING&&(r=0);r;){n=!1;if(r.equals(w))r=null,n=!0;else{var P=r.type==CKEDITOR.NODE_ELEMENT?
r.getName():null,v=P&&"false"==r.getAttribute("contentEditable"),B=P&&r.getAttribute("data-nostyle");if(P&&r.data("cke-bookmark")){r=r.getNextSourceNode(!0);continue}if(v&&l&&CKEDITOR.dtd.$block[P])for(var C=r,y=d(C),z=void 0,x=y.length,ea=0,C=x&&new CKEDITOR.dom.range(C.getDocument());ea<x;++ea){var z=y[ea],I=CKEDITOR.filter.instances[z.data("cke-filter")];if(I?I.check(this):1)C.selectNodeContents(z),e.call(this,C)}y=P?!m[P]||B?0:v&&!l?0:h(r,w,g,L):1;if(y)if(z=r.getParent(),y=g,x=b,ea=k,!z||!(z.getDtd()||
CKEDITOR.dtd.span)[x]&&!ea||y.parentRule&&!y.parentRule(z))n=!0;else{if(u||P&&CKEDITOR.dtd.$removeEmpty[P]&&(r.getPosition(w)|L)!=L||(u=a.clone(),u.setStartBefore(r)),P=r.type,P==CKEDITOR.NODE_TEXT||v||P==CKEDITOR.NODE_ELEMENT&&!r.getChildCount()){for(var P=r,F;(n=!P.getNext(H))&&(F=P.getParent(),m[F.getName()])&&h(F,p,g,O);)P=F;u.setEndAfter(P)}}else n=!0;r=r.getNextSourceNode(B||v)}if(n&&u&&!u.collapsed){for(var n=A(this,c),v=n.hasAttributes(),B=u.getCommonAncestor(),P={},y={},z={},x={},fa,G,E;n&&
B;){if(B.getName()==b){for(fa in g.attributes)!x[fa]&&(E=B.getAttribute(G))&&(n.getAttribute(fa)==E?y[fa]=1:x[fa]=1);for(G in g.styles)!z[G]&&(E=B.getStyle(G))&&(n.getStyle(G)==E?P[G]=1:z[G]=1)}B=B.getParent()}for(fa in y)n.removeAttribute(fa);for(G in P)n.removeStyle(G);v&&!n.hasAttributes()&&(n=null);n?(u.extractContents().appendTo(n),u.insertNode(n),t.call(this,n),n.mergeSiblings(),CKEDITOR.env.ie||n.$.normalize()):(n=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(n),u.insertNode(n),
t.call(this,n),n.remove(!0));u=null}}a.moveToBookmark(q);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function k(a){function c(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),b=new CKEDITOR.dom.elementPath(l.getParent()),g=null,e=null,f=0;f<a.elements.length;f++){var h=a.elements[f];if(h==a.block||h==a.blockLimit)break;m.checkElementRemovable(h,!0)&&(g=h)}for(f=0;f<b.elements.length;f++){h=b.elements[f];if(h==b.block||h==b.blockLimit)break;m.checkElementRemovable(h,!0)&&
(e=h)}e&&l.breakParent(e);g&&d.breakParent(g)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var b=a.createBookmark(),d=b.startNode,g=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,h=0,k;h<e.elements.length&&(k=e.elements[h])&&k!=e.block&&k!=e.blockLimit;h++)if(this.checkElementRemovable(k)){var n;!g&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(n=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(f=k,f.match=n?"start":"end"):(k.mergeSiblings(),
k.is(this.element)?v.call(this,k):p(k,B(this)[k.getName()]))}if(f){g=d;for(h=0;;h++){k=e.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=b.endNode,m=this;c();for(e=d;!e.equals(l);)f=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?v.call(this,e):p(e,B(this)[e.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(c(),f=d.getNext())),
e=f}a.moveToBookmark(b);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function d(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function l(a){var c=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1))&&!a.isReadOnly()&&r(a,this)}function m(a){var c=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1)){var c=this._.definition,
b=c.attributes;if(b)for(var d in b)a.removeAttribute(d,b[d]);if(c.styles)for(var g in c.styles)c.styles.hasOwnProperty(g)&&a.removeStyle(g)}}function b(a){var b=a.createBookmark(!0),d=a.createIterator();d.enforceRealBlocks=!0;this._.enterMode&&(d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var g,e=a.document,f;g=d.getNextParagraph();)!g.isReadOnly()&&(d.activeFilter?d.activeFilter.check(this):1)&&(f=A(this,e,g),c(g,f));a.moveToBookmark(b)}function g(a){var b=a.createBookmark(1),d=a.createIterator();
d.enforceRealBlocks=!0;d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var g,e;g=d.getNextParagraph();)this.checkElementRemovable(g)&&(g.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&g.copyAttributes(e),c(g,e)):v.call(this,g));a.moveToBookmark(b)}function c(c,b){var d=!b;d&&(b=c.getDocument().createElement("div"),c.copyAttributes(b));var g=b&&b.is("pre"),e=c.is("pre"),f=!g&&e;if(g&&!e){e=b;(f=c.getBogus())&&f.remove();
f=c.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=c.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);b=e}else f?b=w(d?[c.getHtml()]:a(c),b):c.moveChildren(b);b.replace(c);if(g){var d=b,k;(k=d.getPrevious(G))&&k.type==CKEDITOR.NODE_ELEMENT&&
k.is("pre")&&(g=n(k.getHtml(),/\n$/,"")+"\n\n"+n(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e":d.setHtml(g),k.remove())}else d&&q(b)}function a(a){var c=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,c,b){return c+"\x3c/pre\x3e"+b+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,b){c.push(b)});return c}function n(a,c,b){var d="",g="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,
function(a,c,b){c&&(d=c);b&&(g=b);return""});return d+a.replace(c,b)+g}function w(a,c){var b;1<a.length&&(b=new CKEDITOR.dom.documentFragment(c.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,c){return 1==a.length?"\x26nbsp;":c?" "+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(b){var e=c.clone();e.setHtml(g);b.append(e)}else c.setHtml(g)}return b||c}function v(a,c){var b=this._.definition,d=b.attributes,b=b.styles,g=B(this)[a.getName()],e=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(b),f;for(f in d)if("class"!=f&&!this._.definition.fullMatch||a.getAttribute(f)==u(f,d[f]))c&&"data-"==f.slice(0,5)||(e=a.hasAttribute(f),a.removeAttribute(f));for(var h in b)this._.definition.fullMatch&&a.getStyle(h)!=u(h,b[h],!0)||(e=e||!!a.getStyle(h),a.removeStyle(h));
p(a,g,z[a.getName()]);e&&(this._.definition.alwaysRemoveElement?q(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?q(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function t(a){for(var c=B(this),b=a.getElementsByTag(this.element),d,g=b.count();0<=--g;)d=b.getItem(g),d.isReadOnly()||v.call(this,d,!0);for(var e in c)if(e!=this.element)for(b=a.getElementsByTag(e),g=b.count()-1;0<=g;g--)d=b.getItem(g),d.isReadOnly()||p(d,c[e])}function p(a,
c,b){if(c=c&&c.attributes)for(var d=0;d<c.length;d++){var g=c[d][0],e;if(e=a.getAttribute(g)){var f=c[d][1];(null===f||f.test&&f.test(e)||"string"==typeof f&&e==f)&&a.removeAttribute(g)}}b||q(a)}function q(a,c){if(!a.hasAttributes()||c)if(CKEDITOR.dtd.$block[a.getName()]){var b=a.getPrevious(G),d=a.getNext(G);!b||b.type!=CKEDITOR.NODE_TEXT&&b.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else b=a.getFirst(),d=a.getLast(),
a.remove(!0),b&&(b.type==CKEDITOR.NODE_ELEMENT&&b.mergeSiblings(),d&&!b.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function A(a,c,b){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,c);b&&b.copyAttributes(d);d=r(d,a);c.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):c.setCustomData("doc_processing_style",1);return d}function r(a,c){var b=c._.definition,d=b.attributes,b=CKEDITOR.style.getStyleText(b);if(d)for(var g in d)a.setAttribute(g,
d[g]);b&&a.setAttribute("style",b);a.getDocument().removeCustomData("doc_processing_style");return a}function C(a,c){for(var b in a)a[b]=a[b].replace(E,function(a,b){return c[b]})}function B(a){if(a._.overrides)return a._.overrides;var c=a._.overrides={},b=a._.definition.overrides;if(b){CKEDITOR.tools.isArray(b)||(b=[b]);for(var d=0;d<b.length;d++){var g=b[d],e,f;"string"==typeof g?e=g.toLowerCase():(e=g.element?g.element.toLowerCase():a.element,f=g.attributes);g=c[e]||(c[e]={});if(f){var g=g.attributes=
g.attributes||[],h;for(h in f)g.push([h.toLowerCase(),f[h]])}}}return c}function u(a,c,b){var d=new CKEDITOR.dom.element("span");d[b?"setStyle":"setAttribute"](a,c);return d[b?"getStyle":"getAttribute"](a)}function y(a,c){function b(a,c){return"font-family"==c.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof c&&(c=CKEDITOR.tools.parseCssText(c,!0));for(var d in a)if(!(d in c)||b(c[d],d)!=b(a[d],d)&&"inherit"!=a[d]&&"inherit"!=c[d])return!1;
return!0}function x(a,c,b){var d=a.getRanges();c=c?this.removeFromRange:this.applyToRange;var g,e;if(a.isFake&&a.isInTable())for(g=[],e=0;e<d.length;e++)g.push(d[e].clone());for(var f=d.createIterator();e=f.getNextRange();)c.call(this,e,b);a.selectRanges(g||d)}var z={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},I={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},F=/\s*(?:;\s*|$)/,E=/#\((.+?)\)/g,H=CKEDITOR.dom.walker.bookmark(0,1),G=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,c){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var b=a.attributes;b&&b.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(b.style)),delete b.style);c&&(a=CKEDITOR.tools.clone(a),C(a.attributes,
c),C(a.styles,c));b=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(z[b]?CKEDITOR.STYLE_BLOCK:I[b]?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 x.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);
x.call(this,a.getSelection(),0,a);this._.enterMode=c}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return x.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);x.call(this,a.getSelection(),1,a);this._.enterMode=c}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?b:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=
this.type==CKEDITOR.STYLE_INLINE?k:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.removeFromRange(a)},applyToObject:function(a){r(a,this)},checkActive:function(a,c){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,c);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var b=a.elements,d=0,g;d<b.length;d++)if(g=b[d],this.type!=CKEDITOR.STYLE_INLINE||g!=a.block&&g!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var e=
g.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(g,!0,c))return!0}}return!1},checkApplicable:function(a,c,b){c&&c instanceof CKEDITOR.filter&&(b=c);if(b&&!b.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,c){var b=this._.definition;if(!a||!b.ignoreReadonly&&a.isReadOnly())return!1;
var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!c&&!a.hasAttributes())return!0;if(d=b._AC)b=d;else{var d={},g=0,e=b.attributes;if(e)for(var f in e)g++,d[f]=e[f];if(f=CKEDITOR.style.getStyleText(b))d.style||g++,d.style=f;d._length=g;b=b._AC=d}if(b._length){for(var h in b)if("_length"!=h)if(d=a.getAttribute(h)||"","style"==h?y(b[h],d):b[h]==d){if(!c)return!0}else if(c)return!1;if(c)return!0}else return!0}return!1},checkElementRemovable:function(a,c,b){if(this.checkElementMatch(a,
c,b))return!0;if(c=B(this)[a.getName()]){var d;if(!(c=c.attributes))return!0;for(b=0;b<c.length;b++)if(d=c[b][0],d=a.getAttribute(d)){var g=c[b][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 c=this._.definition,b=[],d=c.element;"bdo"==d&&(d="span");var b=["\x3c",d],g=c.attributes;if(g)for(var e in g)b.push(" ",e,'\x3d"',g[e],'"');(g=CKEDITOR.style.getStyleText(c))&&b.push(' style\x3d"',g,'"');b.push("\x3e",a||c.name,
"\x3c/",d,"\x3e");return b.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var c=a._ST;if(c)return c;var c=a.styles,b=a.attributes&&a.attributes.style||"",d="";b.length&&(b=b.replace(F,";"));for(var g in c){var e=c[g],f=(g+":"+e).replace(F,";");"inherit"==e?d+=f:b+=f}b.length&&(b=CKEDITOR.tools.normalizeCssText(b,!0));return a._ST=b+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var c=function(a){this._={definition:a};
this.setup&&this.setup(a)};c.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=c};var L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,O=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(f,h){this.requiredContent=this.allowedContent=this.style=f;CKEDITOR.tools.extend(this,h,!0)},
CKEDITOR.styleCommand.prototype.exec=function(f){f.focus();this.state==CKEDITOR.TRISTATE_OFF?f.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&f.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(f,h,e){CKEDITOR.stylesSet.addExternal(f,h,"");CKEDITOR.stylesSet.load(f,e)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(f,
h){var e=this._.styleStateChangeCallbacks;e||(e=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(f){for(var d=0;d<e.length;d++){var h=e[d],m=h.style.checkActive(f.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;h.fn.call(this,m)}}));e.push({style:f,fn:h})},applyStyle:function(f){f.apply(this)},removeStyle:function(f){f.remove(this)},getStylesSet:function(f){if(this._.stylesDefinitions)f(this._.stylesDefinitions);else{var h=this,e=h.config.stylesCombo_stylesSet||h.config.stylesSet;
if(!1===e)f(null);else if(e instanceof Array)h._.stylesDefinitions=e,f(e);else{e||(e="default");var e=e.split(":"),k=e[0];CKEDITOR.stylesSet.addExternal(k,e[1]?e.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(k,function(d){h._.stylesDefinitions=d[k];f(h._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createComment(f));CKEDITOR.dom.domObject.call(this,f)},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 f={},h={},e;for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(f[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(h[e]=1);CKEDITOR.dom.elementPath=function(e,d){var l=null,m=null,b=[],g=e,c;d=d||e.getDocument().getBody();g||(g=d);do if(g.type==CKEDITOR.NODE_ELEMENT){b.push(g);if(!this.lastElement&&(this.lastElement=g,g.is(CKEDITOR.dtd.$object)||
"false"==g.getAttribute("contenteditable")))continue;if(g.equals(d))break;if(!m&&(c=g.getName(),"true"==g.getAttribute("contenteditable")?m=g:!l&&h[c]&&(l=g),f[c])){if(c=!l&&"div"==c){a:{c=g.getChildren();for(var a=0,n=c.count();a<n;a++){var w=c.getItem(a);if(w.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[w.getName()]){c=!0;break a}}c=!1}c=!c}c?l=g:m=g}}while(g=g.getParent());m||(m=d);this.block=l;this.blockLimit=m;this.root=d;this.elements=b}}(),CKEDITOR.dom.elementPath.prototype={compare:function(f){var h=
this.elements;f=f&&f.elements;if(!f||h.length!=f.length)return!1;for(var e=0;e<h.length;e++)if(!h[e].equals(f[e]))return!1;return!0},contains:function(f,h,e){var k=0,d;"string"==typeof f&&(d=function(b){return b.getName()==f});f instanceof CKEDITOR.dom.element?d=function(b){return b.equals(f)}:CKEDITOR.tools.isArray(f)?d=function(b){return-1<CKEDITOR.tools.indexOf(f,b.getName())}:"function"==typeof f?d=f:"object"==typeof f&&(d=function(b){return b.getName()in f});var l=this.elements,m=l.length;h&&
(e?k+=1:--m);e&&(l=Array.prototype.slice.call(l,0),l.reverse());for(;k<m;k++)if(d(l[k]))return l[k];return null},isContextFor:function(f){var h;return f in CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!h.getDtd()[f]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createTextNode(f));this.$=f},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(f){this.$.nodeValue=f},split:function(f){var h=this.$.parentNode,e=h.childNodes.length,k=this.getLength(),d=this.getDocument(),l=new CKEDITOR.dom.text(this.$.splitText(f),d);h.childNodes.length==e&&(f>=k?(l=d.createText(""),l.insertAfter(this)):(f=d.createText(""),f.insertAfter(l),f.remove()));
return l},substring:function(f,h){return"number"!=typeof h?this.$.nodeValue.substr(f):this.$.nodeValue.substring(f,h)}}),function(){function f(e,f,d){var h=e.serializable,m=f[d?"endContainer":"startContainer"],b=d?"endOffset":"startOffset",g=h?f.document.getById(e.startNode):e.startNode;e=h?f.document.getById(e.endNode):e.endNode;m.equals(g.getPrevious())?(f.startOffset=f.startOffset-m.getLength()-e.getPrevious().getLength(),m=e.getNext()):m.equals(e.getPrevious())&&(f.startOffset-=m.getLength(),
m=e.getNext());m.equals(g.getParent())&&f[b]++;m.equals(e.getParent())&&f[b]++;f[d?"endContainer":"startContainer"]=m;return f}CKEDITOR.dom.rangeList=function(e){if(e instanceof CKEDITOR.dom.rangeList)return e;e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[];return CKEDITOR.tools.extend(e,h)};var h={createIterator:function(){var e=this,f=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(m){h=void 0===h?0:h+1;var b=e[h];if(b&&1<e.length){if(!h)for(var g=e.length-1;0<=g;g--)d.unshift(e[g].createBookmark(!0));
if(m)for(var c=0;e[h+c+1];){var a=b.document;m=0;g=a.getById(d[c].endNode);for(a=a.getById(d[c+1].startNode);;){g=g.getNextSourceNode(!1);if(a.equals(g))m=1;else if(f(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary())continue;break}if(!m)break;c++}for(b.moveToBookmark(d.shift());c--;)g=e[++h],g.moveToBookmark(d.shift()),b.setEnd(g.endContainer,g.endOffset)}return b}}},createBookmarks:function(e){for(var h=[],d,l=0;l<this.length;l++){h.push(d=this[l].createBookmark(e,!0));for(var m=l+1;m<this.length;m++)this[m]=
f(d,this[m]),this[m]=f(d,this[m],!0)}return h},createBookmarks2:function(e){for(var f=[],d=0;d<this.length;d++)f.push(this[d].createBookmark2(e));return f},moveToBookmarks:function(e){for(var f=0;f<this.length;f++)this[f].moveToBookmark(e[f])}}}(),function(){function f(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(c){var a=CKEDITOR.skin["ua_"+c],b=CKEDITOR.env;if(a)for(var a=a.split(",").sort(function(a,c){return a>c?-1:1}),d=0,
g;d<a.length;d++)if(g=a[d],b.ie&&(g.replace(/^ie/,"")==b.version||b.quirks&&"iequirks"==g)&&(g="ie"),b[g]){c+="_"+a[d];break}return CKEDITOR.getUrl(f()+c+".css")}function e(c,a){l[c]||(CKEDITOR.document.appendStyleSheet(h(c)),l[c]=1);a&&a()}function k(c){var a=c.getById(m);a||(a=c.getHead().append("style"),a.setAttribute("id",m),a.setAttribute("type","text/css"));return a}function d(c,a,b){var d,g,e;if(CKEDITOR.env.webkit)for(a=a.split("}").slice(0,-1),g=0;g<a.length;g++)a[g]=a[g].split("{");for(var f=
0;f<c.length;f++)if(CKEDITOR.env.webkit)for(g=0;g<a.length;g++){e=a[g][1];for(d=0;d<b.length;d++)e=e.replace(b[d][0],b[d][1]);c[f].$.sheet.addRule(a[g][0],e)}else{e=a;for(d=0;d<b.length;d++)e=e.replace(b[d][0],b[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?c[f].$.styleSheet.cssText+=e:c[f].$.innerHTML+=e}}var l={};CKEDITOR.skin={path:f,loadPart:function(c,a){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f()+"skin.js"),function(){e(c,a)}):e(c,a)},
getPath:function(c){return CKEDITOR.getUrl(h(c))},icons:{},addIcon:function(c,a,b,d){c=c.toLowerCase();this.icons[c]||(this.icons[c]={path:a,offset:b||0,bgsize:d||"16px"})},getIconStyle:function(c,a,b,d,g){var e;c&&(c=c.toLowerCase(),a&&(e=this.icons[c+"-rtl"]),e||(e=this.icons[c]));c=b||e&&e.path||"";d=d||e&&e.offset;g=g||e&&e.bgsize||"16px";c&&(c=c.replace(/'/g,"\\'"));return c&&"background-image:url('"+CKEDITOR.getUrl(c)+"');background-position:0 "+d+"px;background-size:"+g+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{getUiColor:function(){return this.uiColor},setUiColor:function(c){var a=k(CKEDITOR.document);return(this.setUiColor=function(c){this.uiColor=c;var e=CKEDITOR.skin.chameleon,f="",h="";"function"==typeof e&&(f=e(this,"editor"),h=e(this,"panel"));c=[[g,c]];d([a],f,c);d(b,h,c)}).call(this,c)}});var m="cke_ui_color",b=[],g=/\$color/g;CKEDITOR.on("instanceLoaded",function(c){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var a=c.editor;c=function(c){c=(c.data[0]||c.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
if(!c.getById("cke_ui_color")){c=k(c);b.push(c);var e=a.getUiColor();e&&d([c],CKEDITOR.skin.chameleon(a,"panel"),[[g,e]])}};a.on("panelShow",c);a.on("menuShow",c);a.config.uiColor&&a.setUiColor(a.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var f=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);f.appendTo(CKEDITOR.document.getHead());
try{var h=f.getComputedStyle("border-top-color"),e=f.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=e)}catch(k){CKEDITOR.env.hc=!1}f.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(f=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<f.length;h++)CKEDITOR.editor.prototype.constructor.apply(f[h][0],f[h][1]),CKEDITOR.add(f[h][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 f=function(){return function(e,f){for(var d=e.match(/[^#]./g),h=0;3>h;h++){var m=h,b;b=parseInt(d[h],16);b=("0"+(0>f?0|b*(1+f):0|b+(255-b)*f).toString(16)).slice(-2);d[m]=b}return"#"+d.join("")}}(),h={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(e,k){var d=f(e.uiColor,.4),d={id:"."+e.id,defaultBorder:f(d,-.2),toolbarElementsBorder:f(d,-.25),defaultBackground:d,lightBackground:f(d,.8),darkBackground:f(d,-.15),ckeButtonOn:f(d,.4),ckeResizer:f(d,-.4),ckeColorauto:f(d,.8),dialogBody:f(d,.7),dialogTab:f(d,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:f(d,-.6),menubuttonHover:f(d,.1),menubuttonIcon:f(d,.5),menubuttonIconHover:f(d,.3)};return h[k].output(d).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var f=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var c=[this._],a=1;a<arguments.length;a++)c.push(arguments[a]);c.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,c);return this._},h={build:function(b,c,a){return new CKEDITOR.ui.dialog.textInput(b,c,a)}},e={build:function(b,c,a){return new CKEDITOR.ui.dialog[c.type](b,c,a)}},k={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},d=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,c){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
this)},this),this._.domOnChangeRegistered=!0);this.on("change",c)}},!0),l=/^on([A-Z]\w+)/,m=function(b){for(var c in b)(l.test(c)||"title"==c||"type"==c)&&delete b[c];return b},b=function(b){b=b.data.getKeystroke();b==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):b==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,a,d){if(!(4>arguments.length)){var e=f.call(this,c);e.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var h={role:c.role||"presentation"};c.includeLabel&&(h["aria-labelledby"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,a,"div",null,h,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+e.labelId+'"',e.inputId?' for\x3d"'+e.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',d.call(this,b,c),"\x3c/div\x3e"):(f={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" id\x3d"'+e.labelId+'" for\x3d"'+e.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(c.controlStyle?' style\x3d"'+c.controlStyle+
'"':"")+"\x3e"+d.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(d,c,a){if(!(3>arguments.length)){f.call(this,c);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+c.type,id:e,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(h.maxlength=c.maxLength);c.size&&(h.size=c.size);c.inputStyle&&(h.style=c.inputStyle);var k=this,l=!1;d.on("load",function(){k.getInputElement().on("keydown",
function(a){13==a.data.getKeystroke()&&(l=!0)});k.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(d.getButton("ok")&&setTimeout(function(){d.getButton("ok").click()},0),l=!1);k.bidi&&b.call(k,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,d,c,a,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&&
(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(d,c,a){if(!(3>arguments.length)){f.call(this,c);var e=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};c.validate&&(this.validate=c.validate);k.rows=c.rows||5;k.cols=c.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(k.style=c.inputStyle);c.dir&&(k.dir=c.dir);if(e.bidi)d.on("load",
function(){e.getInputElement().on("keyup",b)},e);CKEDITOR.ui.dialog.labeledElement.call(this,d,c,a,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,'" '],c;for(c in k)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(k[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,
c,a){if(!(3>arguments.length)){var d=f.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,a,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],f=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};m(a);c["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);
d.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,e,"input",null,h);e.push(' \x3clabel id\x3d"',f,'" for\x3d"',h.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,c,a){if(!(3>arguments.length)){f.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var d=[],e=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,a,function(){for(var a=[],f=[],h=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<c.items.length;k++){var l=c.items[k],r=void 0!==l[2]?l[2]:l[0],C=void 0!==l[1]?l[1]:l[0],B=CKEDITOR.tools.getNextId()+"_radio_input",u=B+"_label",B=CKEDITOR.tools.extend({},c,{id:B,title:null,type:null},!0),r=CKEDITOR.tools.extend({},B,{title:r},!0),y={type:"radio","class":"cke_dialog_ui_radio_input",name:h,value:C,"aria-labelledby":u},x=[];e._["default"]==C&&(y.checked="checked");m(B);m(r);"undefined"!=typeof B.inputStyle&&
(B.style=B.inputStyle);B.keyboardFocusable=!0;d.push(new CKEDITOR.ui.dialog.uiElement(b,B,x,"input",null,y));x.push(" ");new CKEDITOR.ui.dialog.uiElement(b,r,x,"label",null,{id:u,"for":y.id},l[0]);a.push(x.join(""))}new CKEDITOR.ui.dialog.hbox(b,d,a,f);return f.join("")});this._.children=d}},button:function(b,c,a){if(arguments.length){"function"==typeof c&&(c=c(b.getParentEditor()));f.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);var d=this;b.on("load",function(){var a=this.getElement();
(function(){a.on("click",function(a){d.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(d.click(),a.data.preventDefault())})})();a.unselectable()},this);var e=CKEDITOR.tools.extend({},c);delete e.style;var h=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,e,a,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":h},'\x3cspan id\x3d"'+h+'" class\x3d"cke_dialog_ui_button"\x3e'+
CKEDITOR.tools.htmlEncode(c.label)+"\x3c/span\x3e")}},select:function(b,c,a){if(!(3>arguments.length)){var d=f.call(this,c);c.validate&&(this.validate=c.validate);d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],f=[],h={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_',
c.type,'" role\x3d"presentation"');c.width&&e.push('style\x3d"width:'+c.width+'" ');e.push("\x3e");void 0!==c.size&&(h.size=c.size);void 0!==c.multiple&&(h.multiple=c.multiple);m(a);for(var k=0,l;k<c.items.length&&(l=c.items[k]);k++)f.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(l[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);d.select=new CKEDITOR.ui.dialog.uiElement(b,a,e,"select",null,
h,f.join(""));e.push("\x3c/div\x3e");return e.join("")})}},file:function(b,c,a){if(!(3>arguments.length)){void 0===c["default"]&&(c["default"]="");var d=CKEDITOR.tools.extend(f.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",function(){CKEDITOR.document.getById(d.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){d.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"',
d.frameId,'" title\x3d"',c.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(b,c,a){var d=this;if(!(3>arguments.length)){f.call(this,c);c.validate&&(this.validate=c.validate);var e=CKEDITOR.tools.extend({},c),h=e.onClick;e.className=(e.className?e.className+" ":"")+"cke_dialog_ui_button";e.onClick=function(a){var d=
c["for"];a=h?h.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(d)});CKEDITOR.ui.dialog.button.call(this,b,e,a)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,c=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,a=/\/$/;return function(d,e,f){if(!(3>arguments.length)){var h=[],k=e.html;"\x3c"!=k.charAt(0)&&(k="\x3cspan\x3e"+k+"\x3c/span\x3e");var l=e.focus;if(l){var m=this.focus;
this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,d,e,h,"span",null,null,"");h=h.join("").match(b);k=k.match(c)||["","",""];a.test(k[1])&&(k[1]=k[1].slice(0,-1),k[2]="/"+k[2]);f.push([k[1]," ",h[1]||"",k[2]].join(""))}}}(),fieldset:function(b,c,a,d,e){var f=e.label;this._={children:c};CKEDITOR.ui.dialog.uiElement.call(this,b,e,d,"fieldset",null,null,function(){var c=
[];f&&c.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;b<a.length;b++)c.push(a[b]);return c.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(b){var c=CKEDITOR.document.getById(this._.labelId);1>c.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(c):c.getChild(0).$.nodeValue=
b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:d},!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 b=this.getElement();b&&b.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(b,c){this.on("click",function(){c.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 b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&c.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&(c.$.focus(),c.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var c=b&&b.charAt(0);(c="‪"==c?"ltr":"‫"==c?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(c)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},
getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var c=this.getDirectionMarker();c&&(b=("ltr"==c?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var c=this.getInputElement();b?c.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&c.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},k,!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(b,c,a){var d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;d.$.text=b;d.$.value=void 0===c||null===c?b:c;void 0===a||null===a?CKEDITOR.env.ie?e.add(d.$):e.add(d.$,null):e.add(d.$,a);return this},remove:function(b){this.getInputElement().$.remove(b);
return this},clear:function(){for(var b=this.getInputElement().$;0<b.length;)b.remove(0);return this},keyboardFocusable:!0},k,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,c){this.getInputElement().$.checked=b;!c&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,
c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.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",c);return null}},keyboardFocusable:!0},k,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,c){for(var a=this._.children,d,e=0;e<a.length&&(d=a[e]);e++)d.getElement().$.checked=
d.getValue()==b;!c&&this.fire("change",{value:b})},getValue:function(){for(var b=this._.children,c=0;c<b.length;c++)if(b[c].getElement().$.checked)return b[c].getValue();return null},accessKeyUp:function(){var b=this._.children,c;for(c=0;c<b.length;c++)if(b[c].getElement().$.checked){b[c].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);b.on("load",function(){for(var a=
this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",c);return null}}},k,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,k,{getInputElement:function(){var b=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<b.$.forms.length?new CKEDITOR.dom.element(b.$.forms[0].elements[0]):
this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var c=/^on([A-Z]\w+)/,a,d=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},e;for(e in b)if(a=e.match(c))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,b[e]):d(this,this._.dialog,a[1].toLowerCase(),b[e]);return this},reset:function(){function b(){a.$.open();
var g="";d.size&&(g=d.size-(CKEDITOR.env.ie?7:0));var m=c.frameId+"_input";a.$.write(['\x3chtml dir\x3d"'+k+'" lang\x3d"'+l+'"\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"'+k+'" lang\x3d"'+l+'" action\x3d"',CKEDITOR.tools.htmlEncode(d.action),'"\x3e\x3clabel id\x3d"',c.labelId,'" for\x3d"',m,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(d.label),
'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',m,'" aria-labelledby\x3d"',c.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(d.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<g?g:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+f+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+h+")}","\x3c/script\x3e"].join(""));
a.$.close();for(g=0;g<e.length;g++)e[g].enable()}var c=this._,a=CKEDITOR.document.getById(c.frameId).getFrameDocument(),d=c.definition,e=c.buttons,f=this.formLoadedNumber,h=this.formUnloadNumber,k=c.dialog._.editor.lang.dir,l=c.dialog._.editor.langCode;f||(f=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),h=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(f);
CKEDITOR.tools.removeFunction(h)}));CKEDITOR.env.gecko?setTimeout(b,500):b()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(b,c){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",c)}},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",h);CKEDITOR.dialog.addUIElement("password",h);CKEDITOR.dialog.addUIElement("textarea",e);CKEDITOR.dialog.addUIElement("checkbox",e);CKEDITOR.dialog.addUIElement("radio",e);CKEDITOR.dialog.addUIElement("button",e);CKEDITOR.dialog.addUIElement("select",e);CKEDITOR.dialog.addUIElement("file",e);CKEDITOR.dialog.addUIElement("fileButton",e);CKEDITOR.dialog.addUIElement("html",
e);CKEDITOR.dialog.addUIElement("fieldset",{build:function(b,c,a){for(var d=c.children,e,f=[],h=[],k=0;k<d.length&&(e=d[k]);k++){var l=[];f.push(l);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(b,e,l))}return new CKEDITOR.ui.dialog[c.type](b,h,f,a,c)}})}}),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 f(){for(var a=this._.tabIdList.length,
b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function h(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function e(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var g=new CKEDITOR.dom.element(c[d]);
"text"==g.getAttribute("type").toLowerCase()&&(b?(g.setAttribute("value",g.getCustomData("fake_value")||""),g.removeCustomData("fake_value")):(g.setCustomData("fake_value",g.getAttribute("value")),g.setAttribute("value","")))}}function k(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function d(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}
function l(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",p).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":""})),c=b.getChild([0,0,0,0,0]),d=c.getChild(0),g=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!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(c.getParent()));d.unselectable();g.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:g,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function m(a,
b,c){this.element=b;this.focusIndex=c;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 b(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",
b)})}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function c(a){function b(c){var k=a.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,m=c.data.$.screenY,q=l-d.x,r=m-d.y;d={x:l,y:m};g.x+=q;g.y+=r;a.move(g.x+h[3]<f?-h[3]:g.x-h[1]>n.width-k.width-f?n.width-k.width+("rtl"==e.lang.dir?0:h[1]):g.x,g.y+h[0]<f?-h[0]:g.y-h[2]>n.height-k.height-f?n.height-k.height+h[2]:g.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",
b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=x.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,g=null,e=a.getParentEditor(),f=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(e){d={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);g=a.getPosition();if(CKEDITOR.env.ie6Compat){var f=
x.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",c)}e.data.preventDefault()},a)}function a(a){function b(c){var m="rtl"==e.lang.dir,q=l.width,r=l.height,p=q+(c.data.$.screenX-n.x)*(m?-1:1)*(a._.moved?1:2),u=r+(c.data.$.screenY-n.y)*(a._.moved?1:2),w=a._.element.getFirst(),w=m&&w.getComputedStyle("right"),t=a.getPosition();t.y+u>k.height&&(u=k.height-t.y);(m?w:t.x)+p>k.width&&(p=k.width-(m?w:t.x));if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(d.minWidth||
0,p-f);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minHeight||0,u-h);a.resize(q,r);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);m&&(m.remove(),m=null);if(CKEDITOR.env.ie6Compat){var a=x.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var d=a.definition,g=d.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),
f,h,k,n,l,m,q=CKEDITOR.tools.addFunction(function(d){l=a.getSize();var g=a.parts.contents;g.$.getElementsByTagName("iframe").length&&(m=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),g.append(m));h=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));f=l.width-a.parts.contents.getSize("width",1);n={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();
CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(g=x.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",c));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_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+
'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(q)})}}function n(a){a.data.preventDefault(1)}function w(a){var b=CKEDITOR.document.getWindow(),c=a.config,d=CKEDITOR.skinName||a.config.skin,g=c.dialog_backgroundCoverColor||("moono-lisa"==d?"black":"white"),d=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(g,d,e),f=y[c];f?f.show():
(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+g,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(g="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+g+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+g+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(e.join("")),f.setOpacity(void 0!==d?d:.5),f.on("keydown",n),f.on("keypress",n),f.on("keyup",n),f.appendTo(CKEDITOR.document.getBody()),y[c]=f);a.focusManager.add(f);x=f;a=function(){var a=b.getViewPaneSize();
f.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;f.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};u=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||f.focus();if(CKEDITOR.env.ie6Compat){var k=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};
window.onscroll=k},0);h()}}function v(a){x&&(a.focusManager.remove(x),a=CKEDITOR.document.getWindow(),x.hide(),a.removeListener("resize",u),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),u=null)}var t=CKEDITOR.tools.cssLength,p='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" 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"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(b,g){function e(){var a=z._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function n(a){var b=z._.focusList;a=a||0;if(!(1>b.length)){var c=z._.currentFocusIndex;z._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var g=c,e=1<z._.pageCount;do{g+=a;if(e&&!z._.tabBarMode&&(g==b.length||-1==g)){z._.tabBarMode=!0;z._.tabs[z._.currentTabId][0].focus();
z._.currentFocusIndex=-1;return}g=(g+b.length)%b.length;if(g==c)break}while(a&&!b[g].isFocusable());b[g].focus();"text"==b[g].type&&b[g].select()}}function m(a){if(z==CKEDITOR.dialog._.currentTop){var c=a.data.getKeystroke(),d="rtl"==b.lang.dir,g=[37,38,39,40];C=v=0;if(9==c||c==CKEDITOR.SHIFT+9)n(c==CKEDITOR.SHIFT+9?-1:1),C=1;else if(c==CKEDITOR.ALT+121&&!z._.tabBarMode&&1<z.getPageCount())z._.tabBarMode=!0,z._.tabs[z._.currentTabId][0].focus(),z._.currentFocusIndex=-1,C=1;else if(-1!=CKEDITOR.tools.indexOf(g,
c)&&z._.tabBarMode)c=-1!=CKEDITOR.tools.indexOf([d?39:37,38],c)?f.call(z):h.call(z),z.selectPage(c),z._.tabs[c][0].focus(),C=1;else if(13!=c&&32!=c||!z._.tabBarMode)if(13==c)c=a.data.getTarget(),c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||((c=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(c.click,0,c),C=1),v=1;else if(27==c)(c=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(c.click,0,c):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),v=1;else return;else this.selectPage(this._.currentTabId),
this._.tabBarMode=!1,this._.currentFocusIndex=-1,n(1),C=1;r(a)}}function r(a){C?a.data.preventDefault(1):v&&a.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[g],u=CKEDITOR.tools.clone(q),w=b.config.dialog_buttonsOrder||"OS",t=b.lang.dir,A={},C,v;("OS"==w&&CKEDITOR.env.mac||"rtl"==w&&"ltr"==t||"ltr"==w&&"rtl"==t)&&u.buttons.reverse();p=CKEDITOR.tools.extend(p(b),u);p=CKEDITOR.tools.clone(p);p=new B(this,p);u=l(b);this._={editor:b,element:u.element,name:g,contentSize:{width:0,height:0},
size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=u.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);u={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};u["rtl"==t?"right":"left"]=0;this.parts.dialog.setStyles(u);CKEDITOR.event.call(this);this.definition=p=CKEDITOR.fire("dialogDefinition",
{name:g,definition:p},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){u=b.config.removeDialogTabs.split(";");for(t=0;t<u.length;t++)if(w=u[t].split(":"),2==w.length){var y=w[0];A[y]||(A[y]=[]);A[y].push(w[1])}b._.removeDialogTabs=A}if(b._.removeDialogTabs&&(A=b._.removeDialogTabs[g]))for(t=0;t<A.length;t++)p.removeContents(A[t]);if(p.onLoad)this.on("load",p.onLoad);if(p.onShow)this.on("show",p.onShow);if(p.onHide)this.on("hide",p.onHide);if(p.onOk)this.on("ok",function(a){b.fire("saveSnapshot");
setTimeout(function(){b.fire("saveSnapshot")},0);!1===p.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(p.onCancel)this.on("cancel",function(a){!1===p.onCancel.call(this,a)&&(a.data.hide=!1)});var z=this,P=function(a){var b=z._.contents,c=!1,d;for(d in b)for(var g in b[d])if(c=a.call(this,b[d][g]))return};this.on("ok",function(a){P(function(b){if(b.validate){var c=b.validate(this),d="string"==typeof c||!1===c;d&&(a.data.hide=!1,a.stop());k.call(b,!d,"string"==typeof c?
c:void 0);return d}})},this,null,0);this.on("cancel",function(a){P(function(c){if(c.isChanged())return b.config.dialog_noConfirmCancel||confirm(b.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=n;var W=this._.element;b.focusManager.add(W,1);this.on("show",function(){W.on("keydown",m,this);if(CKEDITOR.env.gecko)W.on("keypress",r,this)});this.on("hide",
function(){W.removeListener("keydown",m);CKEDITOR.env.gecko&&W.removeListener("keypress",r);P(function(a){d.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",m,this,null,0)});this.on("show",function(){e();var a=1<z._.pageCount;b.config.dialog_startupFocusTab&&a?(z._.tabBarMode=!0,z._.tabs[z._.currentTabId][0].focus(),z._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-1,p.onFocus?
(a=p.onFocus.call(this))&&a.focus():n(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);c(this);a(this);(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(t=0;t<p.contents.length;t++)(A=p.contents[t])&&this.addPage(A);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("_"))),
this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,n(1)),a.data.preventDefault())},this);t=[];A=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:p.buttons},t).getChild();this.parts.footer.setHtml(t.join(""));for(t=0;t<A.length;t++)this._.buttons[A[t].id]=A[t]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){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"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-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,c){var d=this._.element.getFirst(),g="rtl"==this._.editor.lang.dir,e="fixed"==d.getComputedStyle("position");CKEDITOR.env.ie&&d.setStyle("zoom","100%");e&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},e||(e=CKEDITOR.document.getWindow().getScrollPosition(),a+=e.x,b+=e.y),g&&(e=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-e.width-a),b={top:(0<b?b:0)+"px"},
b[g?"right":"left"]=(0<a?a:0)+"px",d.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,c=this.definition;a.getParent()&&a.getParent().equals(CKEDITOR.document.getBody())?a.setStyle("display","block"):a.appendTo(CKEDITOR.document.getBody());this.resize(this._.contentSize&&this._.contentSize.width||c.width||c.minWidth,this._.contentSize&&this._.contentSize.height||c.height||c.minHeight);this.reset();null===
this._.currentTabId&&this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,w(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/
2),CKEDITOR.dialog._.currentTop=this);a.on("keydown",I);a.on("keyup",F);this._.hasFocus=!1;for(var d in c.contents)if(c.contents[d]){var a=c.contents[d],g=this._.tabs[a.id],e=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||e&&!this._.editor.activeFilter.check(e)?g[0].addClass("cke_dialog_tab_disabled"):
g[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();b(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,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d=
(c.width-b.width)/2,g=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<g?g:0)>c.height||b.width+(0<d?d:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:d,this._.moved?this._.position.y:g)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);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(H(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",I);a.removeListener("keyup",F);var c=this._.editor;
c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.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=[],c=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]={},e=d.getChild(),f=0;d=e.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||f++,g[d.id]=d,"function"==typeof d.getChild&&e.push.apply(e,d.getChild());f||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");d=CKEDITOR.env;g="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',
0<this._.pageCount?" cke_last":"cke_first",c,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]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&
(E(this,this,"CTRL+"+a.accessKey,L,G),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 c=this._.tabs[b][0],d=this._.tabs[b][1];b!=a&&(c.removeClass("cke_dialog_tab_selected"),d.hide());d.setAttribute("aria-hidden",b!=a)}var g=this._.tabs[a];g[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||
CKEDITOR.env.ie7Compat?(e(g[1]),g[1].show(),setTimeout(function(){e(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(f.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 c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},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 m(this,a,b));else{this._.focusList.splice(b,0,new m(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].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,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]="8px";this.parts.spinner=CKEDITOR.document.createElement("div",c);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok").disable()}else a==
CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",a)}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{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,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+c+"(?:$|;)",
"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(c){return a(c,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(c){return a(c,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);
var q={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},A=function(a,b,c){for(var d=0,g;g=a[d];d++)if(g.id==b||c&&g[c]&&(g=A(g[c],b,c)))return g;return null},r=function(a,b,c,d,g){if(c){for(var e=0,f;f=a[e];e++){if(f.id==c)return a.splice(e,0,b),b;if(d&&f[d]&&(f=r(f[d],b,c,d,!0)))return f}if(g)return null}a.push(b);return b},C=function(a,b,c){for(var d=0,g;g=a[d];d++){if(g.id==b)return a.splice(d,1);if(c&&g[c]&&(g=C(g[c],
b,c)))return g}return null},B=function(a,b){this.dialog=a;for(var c=b.contents,d=0,e;e=c[d];d++)c[d]=e&&new g(a,e);CKEDITOR.tools.extend(this,b)};B.prototype={getContents:function(a){return A(this.contents,a)},getButton:function(a){return A(this.buttons,a)},addContents:function(a,b){return r(this.contents,a,b)},addButton:function(a,b){return r(this.buttons,a,b)},removeContents:function(a){C(this.contents,a)},removeButton:function(a){C(this.buttons,a)}};g.prototype={get:function(a){return A(this.elements,
a,"children")},add:function(a,b){return r(this.elements,a,b,"children")},remove:function(a){C(this.elements,a,"children")}};var u,y={},x,z={},I=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,g=String.fromCharCode(a.data.$.keyCode);(b=z[(b?"CTRL+":"")+(c?"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())},F=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,
d=a.data.$.shiftKey,g=String.fromCharCode(a.data.$.keyCode);(b=z[(b?"CTRL+":"")+(c?"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()))},E=function(a,b,c,d,g){(z[c]||(z[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:g||a.accessKeyUp,keydown:d||a.accessKeyDown})},H=function(a){for(var b in z){for(var c=z[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete z[b]}},G=function(a,
b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},L=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,g,e,f){if(!(4>arguments.length)){var h=(d.call?d(b):d)||"div",k=["\x3c",h," "],n=(g&&g.call?g(b):g)||{},l=(e&&e.call?e(b):e)||{},m=(f&&f.call?f.call(this,a,b):f)||"",q=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(n.display="none",this.notAllowed=!0);l.id=q;var p={};b.type&&(p["cke_dialog_ui_"+
b.type]=1);b.className&&(p[b.className]=1);b.disabled&&(p.cke_disabled=1);for(var r=l["class"]&&l["class"].split?l["class"].split(" "):[],q=0;q<r.length;q++)r[q]&&(p[r[q]]=1);r=[];for(q in p)r.push(q);l["class"]=r.join(" ");b.title&&(l.title=b.title);p=(b.style||"").split(";");b.align&&(r=b.align,n["margin-left"]="left"==r?0:"auto",n["margin-right"]="right"==r?0:"auto");for(q in n)p.push(q+":"+n[q]);b.hidden&&p.push("display:none");for(q=p.length-1;0<=q;q--)""===p[q]&&p.splice(q,1);0<p.length&&(l.style=
(l.style?l.style+"; ":"")+p.join("; "));for(q in l)k.push(q+'\x3d"'+CKEDITOR.tools.htmlEncode(l[q])+'" ');k.push("\x3e",m,"\x3c/",h,"\x3e");c.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(c){a.call(this,b.setValue.call(this,c))}}));"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&&E(this,a,"CTRL+"+b.accessKey);var u=this;a.on("load",function(){var b=u.getInputElement();if(b){var c=u.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;u.fire("focus");
c&&this.addClass(c)});b.on("blur",function(){u.fire("blur");c&&this.removeClass(c)})}});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=u.focusIndex}))}},hbox:function(a,b,c,d,g){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,f=g&&g.widths||null,h=g&&g.height||null,k,n={role:"presentation"};g&&g.align&&(n.align=g.align);CKEDITOR.ui.dialog.uiElement.call(this,
a,g||{type:"hbox"},d,"table",{},n,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<c.length;k++){var b="cke_dialog_ui_hbox_child",d=[];0===k&&(b="cke_dialog_ui_hbox_first");k==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');f?f[k]&&d.push("width:"+t(f[k])):d.push("width:"+Math.floor(100/c.length)+"%");h&&d.push("height:"+t(h));g&&void 0!==g.padding&&d.push("padding:"+t(g.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&
e[k].align&&d.push("text-align:"+e[k].align);0<d.length&&a.push('style\x3d"'+d.join("; ")+'" ');a.push("\x3e",c[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,d,g){if(!(3>arguments.length)){this._||(this._={});var e=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:"+t(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<c.length;d++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');f&&k.push("width:"+t(f||"100%"));h?k.push("height:"+t(h[d])):g&&g.expand&&k.push("height:"+Math.floor(100/c.length)+"%");
g&&void 0!==g.padding&&k.push("padding:"+t(g.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[d].align&&k.push("text-align:"+e[d].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[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+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},g;for(g in a)if(c=g.match(b))this.eventProcessors[g]?this.eventProcessors[g].call(this,this._.dialog,a[g]):d(this,this._.dialog,c[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,c){for(var d=b.children,g,e=[],f=[],h=0;h<d.length&&(g=d[h]);h++){var k=[];e.push(k);f.push(CKEDITOR.dialog._.uiElementBuilders[g.type].build(a,g,k))}return new CKEDITOR.ui.dialog[b.type](a,
f,e,c,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=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,g=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
e=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c,d=CKEDITOR.VALIDATE_AND,g=[],e;for(e=0;e<a.length;e++)if("function"==typeof a[e])g.push(a[e]);else break;e<a.length&&"string"==typeof a[e]&&(c=a[e],e++);e<a.length&&"number"==typeof a[e]&&(d=a[e]);var f=d==CKEDITOR.VALIDATE_AND?!0:!1;for(e=0;e<g.length;e++)f=d==CKEDITOR.VALIDATE_AND?f&&
g[e](b):f||g[e](b);return f?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return g.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return e.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 c in y)y[c].remove();y={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,d=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&w(this);if("function"==typeof d)c=this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,c),c.show();else{if("failed"==d)throw v(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof d&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,
b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(f){f.on("doubleclick",function(h){h.data.dialog&&f.openDialog(h.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(f){var h=this;f.addCommand("a11yHelp",{exec:function(){var e=f.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+e+".js"),function(){f.lang.a11yhelp=h.langEntries[e];f.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},
readOnly:1,canUndo:!1});f.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");f.on("ariaEditorHelpLabel",function(e){e.data.label=f.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(f){var h=f.addCommand("about",new CKEDITOR.dialogCommand("about"));h.modes={wysiwyg:1,source:1};h.canUndo=!1;h.readOnly=1;f.ui.addButton&&f.ui.addButton("About",{label:f.lang.about.dlgTitle,command:"about",toolbar:"about"});
CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),"use strict",function(){function f(f){function e(){l=f.document;m=l[CKEDITOR.env.ie?"getBody":"getDocumentElement"]();b=CKEDITOR.env.quirks?l.getBody():l.getDocumentElement();var a=CKEDITOR.env.quirks?b:b.findOne("body");a&&(a.setStyle("height","auto"),a.setStyle("min-height",CKEDITOR.env.safari?"0%":"auto"));g=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",l)}function k(){w&&b.setStyle("overflow-y","hidden");var e=f.window.getViewPaneSize().height,k;m.append(g);k=g.getDocumentPosition(l).y+g.$.offsetHeight;g.remove();k+=c;k=Math.max(k,a);k=Math.min(k,n);k!=e&&d!=k&&(k=f.fire("autoGrow",{currentHeight:e,newHeight:k}).newHeight,f.resize(f.container.getStyle("width"),k,!0),d=k);w||(k<n&&b.$.scrollHeight>b.$.clientHeight?b.setStyle("overflow-y","hidden"):b.removeStyle("overflow-y"))}var d,l,m,b,g,c=f.config.autoGrow_bottomSpace||
0,a=void 0!==f.config.autoGrow_minHeight?f.config.autoGrow_minHeight:200,n=f.config.autoGrow_maxHeight||Infinity,w=!f.config.autoGrow_maxHeight;f.addCommand("autogrow",{exec:k,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var v={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},t;for(t in v)f.on(t,function(a){"wysiwyg"==a.editor.mode&&setTimeout(function(){var a=f.getCommand("maximize");!f.window||a&&a.state==CKEDITOR.TRISTATE_ON?d=null:(k(),w||k())},100)});f.on("afterCommandExec",
function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?b.removeStyle("overflow-y"):k())});f.on("contentDom",e);e();f.config.autoGrow_onStartup&&f.editable().isVisible()&&f.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(h){if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)h.on("instanceReady",function(){h.editable().isInline()?h.ui.space("contents").setStyle("height","auto"):f(h)})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(f){var h=
0,e=function(d,b,g,c){if(c){c=new CKEDITOR.style(c);var a=k[g];a.unshift(c);f.attachStyleStateChange(c,function(a){!f.readOnly&&f.getCommand(g).setState(a)});f.addCommand(g,new CKEDITOR.styleCommand(c,{contentForms:a}));f.ui.addButton&&f.ui.addButton(d,{label:b,command:g,toolbar:"basicstyles,"+(h+=10)})}},k={bold:["strong","b",["span",function(d){d=d.styles["font-weight"];return"bold"==d||700<=+d}]],italic:["em","i",["span",function(d){return"italic"==d.styles["font-style"]}]],underline:["u",["span",
function(d){return"underline"==d.styles["text-decoration"]}]],strike:["s","strike",["span",function(d){return"line-through"==d.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},d=f.config,l=f.lang.basicstyles;e("Bold",l.bold,"bold",d.coreStyles_bold);e("Italic",l.italic,"italic",d.coreStyles_italic);e("Underline",l.underline,"underline",d.coreStyles_underline);e("Strike",l.strike,"strike",d.coreStyles_strike);e("Subscript",l.subscript,"subscript",d.coreStyles_subscript);e("Superscript",
l.superscript,"superscript",d.coreStyles_superscript);f.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),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"},
function(){var f={exec:function(f){var e=f.getCommand("blockquote").state,k=f.getSelection(),d=k&&k.getRanges()[0];if(d){var l=k.createBookmarks();if(CKEDITOR.env.ie){var m=l[0].startNode,b=l[0].endNode,g;if(m&&"blockquote"==m.getParent().getName())for(g=m;g=g.getNext();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){m.move(g,!0);break}if(b&&"blockquote"==b.getParent().getName())for(g=b;g=g.getPrevious();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){b.move(g);break}}var c=d.createIterator();
c.enlargeBr=f.config.enterMode!=CKEDITOR.ENTER_BR;if(e==CKEDITOR.TRISTATE_OFF){for(m=[];e=c.getNextParagraph();)m.push(e);1>m.length&&(e=f.document.createElement(f.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=l.shift(),d.insertNode(e),e.append(new CKEDITOR.dom.text("﻿",f.document)),d.moveToBookmark(b),d.selectNodeContents(e),d.collapse(!0),b=d.createBookmark(),m.push(e),l.unshift(b));g=m[0].getParent();d=[];for(b=0;b<m.length;b++)e=m[b],g=g.getCommonAncestor(e.getParent());for(e={table:1,tbody:1,
tr:1,ol:1,ul:1};e[g.getName()];)g=g.getParent();for(b=null;0<m.length;){for(e=m.shift();!e.getParent().equals(g);)e=e.getParent();e.equals(b)||d.push(e);b=e}for(;0<d.length;)if(e=d.shift(),"blockquote"==e.getName()){for(b=new CKEDITOR.dom.documentFragment(f.document);e.getFirst();)b.append(e.getFirst().remove()),m.push(b.getLast());b.replace(e)}else m.push(e);d=f.document.createElement("blockquote");for(d.insertBefore(m[0]);0<m.length;)e=m.shift(),d.append(e)}else if(e==CKEDITOR.TRISTATE_ON){b=[];
for(g={};e=c.getNextParagraph();){for(m=d=null;e.getParent();){if("blockquote"==e.getParent().getName()){d=e.getParent();m=e;break}e=e.getParent()}d&&m&&!m.getCustomData("blockquote_moveout")&&(b.push(m),CKEDITOR.dom.element.setMarker(g,m,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(g);e=[];m=[];for(g={};0<b.length;)c=b.shift(),d=c.getParent(),c.getPrevious()?c.getNext()?(c.breakParent(c.getParent()),m.push(c.getNext())):c.remove().insertAfter(d):c.remove().insertBefore(d),d.getCustomData("blockquote_processed")||
(m.push(d),CKEDITOR.dom.element.setMarker(g,d,"blockquote_processed",!0)),e.push(c);CKEDITOR.dom.element.clearAllMarkers(g);for(b=m.length-1;0<=b;b--){d=m[b];a:{g=d;for(var c=0,a=g.getChildCount(),n=void 0;c<a&&(n=g.getChild(c));c++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){g=!1;break a}g=!0}g&&d.remove()}if(f.config.enterMode==CKEDITOR.ENTER_BR)for(d=!0;e.length;)if(c=e.shift(),"div"==c.getName()){b=new CKEDITOR.dom.documentFragment(f.document);!d||!c.getPrevious()||c.getPrevious().type==
CKEDITOR.NODE_ELEMENT&&c.getPrevious().isBlockBoundary()||b.append(f.document.createElement("br"));for(d=c.getNext()&&!(c.getNext().type==CKEDITOR.NODE_ELEMENT&&c.getNext().isBlockBoundary());c.getFirst();)c.getFirst().remove().appendTo(b);d&&b.append(f.document.createElement("br"));b.replace(c);d=!1}}k.selectBookmarks(l);f.focus()}},refresh:function(f,e){this.setState(f.elementPath(e.block||e.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",
requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(h){h.blockless||(h.addCommand("blockquote",f),h.ui.addButton&&h.ui.addButton("Blockquote",{label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function f(e,f){CKEDITOR.tools.extend(this,f,{editor:e,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:e._.notificationArea});f.type||(this.type="info");this.element=this._createElement();e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}
function h(e){var f=this;this.editor=e;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);e.on("destroy",function(){f._removeListeners();f.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(e){function f(d){var e=new CKEDITOR.dom.element("div");e.setStyles({position:"fixed","margin-left":"-9999px"});e.setAttributes({"aria-live":"assertive",
"aria-atomic":"true"});e.setText(d);CKEDITOR.document.getBody().append(e);setTimeout(function(){e.remove()},100)}e._.notificationArea=new h(e);e.showNotification=function(d,f,h){var b,g;"progress"==f?b=h:g=h;d=new CKEDITOR.plugins.notification(e,{message:d,type:f,progress:b,duration:g});d.show();return d};e.on("key",function(d){if(27==d.data.keyCode){var h=e._.notificationArea.notifications;h.length&&(f(e.lang.notification.closed),h[h.length-1].hide(),d.cancel())}})}});f.prototype={show:function(){!1!==
this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(e){var f=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:e})&&(f=!1);var d=this.element,h=d.findOne(".cke_notification_message"),m=d.findOne(".cke_notification_progress"),b=e.type;d.removeAttribute("role");e.progress&&"progress"!=this.type&&(b="progress");b&&(d.removeClass(this._getClass()),d.removeAttribute("aria-label"),this.type=b,d.addClass(this._getClass()),
d.setAttribute("aria-label",this.type),"progress"!=this.type||m?"progress"!=this.type&&m&&m.remove():(m=this._createProgressElement(),m.insertBefore(h)));void 0!==e.message&&(this.message=e.message,h.setHtml(this.message));void 0!==e.progress&&(this.progress=e.progress,m&&m.setStyle("width",this._getPercentageProgress()));f&&e.important&&(d.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=e.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 e=this,f,d,h=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());d=new CKEDITOR.dom.element("p");d.addClass("cke_notification_message");d.setHtml(this.message);
f.append(d);d=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+h+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');f.append(d);d.on("click",function(){e.editor.focus();e.hide()});return f},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var e=new CKEDITOR.dom.element("span");e.addClass("cke_notification_progress");
e.setStyle("width",this._getPercentageProgress());return e},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var e=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&&(e._hideTimeoutId=setTimeout(function(){e.hide()},f))}};h.prototype=
{add:function(e){this.notifications.push(e);this.element.append(e.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(e){var f=CKEDITOR.tools.indexOf(this.notifications,e);0>f||(this.notifications.splice(f,1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,f=e.config,d=new CKEDITOR.dom.element("div");d.addClass("cke_notifications_area");
d.setAttribute("id","cke_notifications_area_"+e.name);d.setStyle("z-index",f.baseFloatZIndex-2);return d},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),f=this.editor;e.on("scroll",this._uiBuffer.input);e.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 e=CKEDITOR.document.getWindow(),f=this.editor;e.removeListener("scroll",this._uiBuffer.input);
e.removeListener("resize",this._uiBuffer.input);f.removeListener("change",this._changeBuffer.input);f.removeListener("floatingSpaceLayout",this._layout);f.removeListener("blur",this._layout)},_layout:function(){function e(){f.setStyle("left",A(r+h.width-n-w))}var f=this.element,d=this.editor,h=d.ui.contentsElement.getClientRect(),m=d.ui.contentsElement.getDocumentPosition(),b,g,c=f.getClientRect(),a,n=this._notificationWidth,w=this._notificationMargin;a=CKEDITOR.document.getWindow();var v=a.getScrollPosition(),
t=a.getViewPaneSize(),p=CKEDITOR.document.getBody(),q=p.getDocumentPosition(),A=CKEDITOR.tools.cssLength;n&&w||(a=this.element.getChild(0),n=this._notificationWidth=a.getClientRect().width,w=this._notificationMargin=parseInt(a.getComputedStyle("margin-left"),10)+parseInt(a.getComputedStyle("margin-right"),10));d.toolbar&&(b=d.ui.space("top"),g=b.getClientRect());b&&b.isVisible()&&g.bottom>h.top&&g.bottom<h.bottom-c.height?f.setStyles({position:"fixed",top:A(g.bottom)}):0<h.top?f.setStyles({position:"absolute",
top:A(m.y)}):m.y+h.height-c.height>v.y?f.setStyles({position:"fixed",top:0}):f.setStyles({position:"absolute",top:A(m.y+h.height-c.height)});var r="fixed"==f.getStyle("position")?h.left:"static"!=p.getComputedStyle("position")?m.x-q.x:m.x;h.width<n+w?m.x+n+w>v.x+t.width?e():f.setStyle("left",A(r)):m.x+n+w>v.x+t.width?f.setStyle("left",A(r)):m.x+h.width/2+n/2+w>v.x+t.width?f.setStyle("left",A(r-m.x+v.x+t.width-n-w)):0>h.left+h.width-n-w?e():0>h.left+h.width/2-n/2?f.setStyle("left",A(r-m.x+v.x)):f.setStyle("left",
A(r+h.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=f}(),function(){var f='\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}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(f+=
' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),f=f+'\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{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"),e=CKEDITOR.addTemplate("button",f);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(d){d.execCommand(e.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}};
CKEDITOR.ui.button.prototype={render:function(f,d){function l(){var a=f.mode;a&&(a=this.modes[a]?void 0!==m[a]?m[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=f.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var m=null,b=CKEDITOR.env,g=this._.id=CKEDITOR.tools.getNextId(),c="",a=this.command,n,w,v;this._.editor=f;var t={id:g,button:this,editor:f,focus:function(){CKEDITOR.document.getById(g).focus()},execute:function(){this.button.click(f)},
attach:function(a){this.button.attach(a)}},p=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t,a.getKeystroke())}),q=CKEDITOR.tools.addFunction(function(a){var b;t.onfocus&&(b=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return b}),A=0;t.clickFn=n=CKEDITOR.tools.addFunction(function(){A&&(f.unlockSelection(1),A=0);t.execute();b.iOS&&f.focus()});this.modes?(m={},f.on("beforeModeUnload",function(){f.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[f.mode]=
this._.state)},this),f.on("activeFilterChange",l,this),f.on("mode",l,this),!this.readOnly&&f.on("readOnly",l,this)):a&&(a=f.getCommand(a))&&(a.on("state",function(){this.setState(a.state)},this),c+=a.state==CKEDITOR.TRISTATE_ON?"on":a.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var r;if(this.directional)f.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),c=b.getFirst();a=a.data;a!=f.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",
CKEDITOR.skin.getIconStyle(r,"rtl"==a,this.icon,this.iconOffset))},this);a?(w=f.getCommandKeystroke(a))&&(v=CKEDITOR.tools.keystrokeToString(f.lang.common.keyboard,w)):c+="off";w=this.name||this.command;var C=null,B=this.icon;r=w;this.icon&&!/\./.test(this.icon)?(r=this.icon,B=null):(this.icon&&(C=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(C=this.iconHiDpi));C?(CKEDITOR.skin.addIcon(C,C),B=null):C=r;c={id:g,name:w,iconName:r,label:this.label,cls:this.className||"",state:c,ariaDisabled:"disabled"==
c?"true":"false",title:this.title+(v?" ("+v.display+")":""),ariaShortcut:v?f.lang.common.keyboardShortcut+" "+v.aria:"",titleJs:b.gecko&&!b.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:p,focusFn:q,clickFn:n,style:CKEDITOR.skin.getIconStyle(C,"rtl"==f.lang.dir,B,this.iconOffset),arrowHtml:this.hasArrow?h.output():""};e.output(c,d);if(this.onRender)this.onRender();return t},setState:function(e){if(this._.state==e)return!1;this._.state=e;var d=CKEDITOR.document.getById(this._.id);
return d?(d.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?d.setAttribute("aria-pressed",!0):d.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;
var d=this;this.allowedContent||this.requiredContent||!this.command||(d=e.getCommand(this.command)||d);return this._.feature=d}};CKEDITOR.ui.prototype.addButton=function(e,d){this.add(e,CKEDITOR.UI_BUTTON,d)}}(),function(){function f(d){function e(){for(var a=f(),c=CKEDITOR.tools.clone(d.config.toolbarGroups)||h(d),g=0;g<c.length;g++){var k=c[g];if("/"!=k){"string"==typeof k&&(k=c[g]={name:k});var l,q=k.groups;if(q)for(var A=0;A<q.length;A++)l=q[A],(l=a[l])&&b(k,l);(l=a[k.name])&&b(k,l)}}return c}
function f(){var a={},b,c,g;for(b in d.ui.items)c=d.ui.items[b],g=c.toolbar||"others",g=g.split(","),c=g[0],g=parseInt(g[1]||-1,10),a[c]||(a[c]=[]),a[c].push({name:b,order:g});for(c in a)a[c]=a[c].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 a}function b(a,b){if(b.length){a.items?a.items.push(d.ui.create("-")):a.items=[];for(var g;g=b.shift();)g="string"==typeof g?g:g.name,c&&-1!=CKEDITOR.tools.indexOf(c,g)||(g=d.ui.create(g))&&d.addFeature(g)&&
a.items.push(g)}}function g(a){var c=[],d,g,e;for(d=0;d<a.length;++d)g=a[d],e={},"/"==g?c.push(g):CKEDITOR.tools.isArray(g)?(b(e,CKEDITOR.tools.clone(g)),c.push(e)):g.items&&(b(e,CKEDITOR.tools.clone(g.items)),e.name=g.name,c.push(e));return c}var c=d.config.removeButtons,c=c&&c.split(","),a=d.config.toolbar;"string"==typeof a&&(a=d.config["toolbar_"+a]);return d.toolbar=a?g(a):e()}function h(d){return d._.toolbarGroups||(d._.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 e=function(){this.toolbars=[];this.focusCommandExecuted=!1};e.prototype.focus=function(){for(var d=0,e;e=this.toolbars[d++];)for(var f=
0,b;b=e.items[f++];)if(b.focus){b.focus();return}};var k={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(d){d.toolbox&&(d.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){d.toolbox.focus()},100):d.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(d){var h,m=function(b,g){var c,a="rtl"==d.lang.dir,e=d.config.toolbarGroupCycling,f=a?37:39,a=a?39:37,e=void 0===e||e;switch(g){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=
9==g?(c?c.next:b.toolbar.next)||d.toolbox.toolbars[0]:(c?c.previous:b.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1],c.items.length)for(b=c.items[h?c.items.length-1:0];b&&!b.focus;)(b=h?b.previous:b.next)||(c=0);b&&b.focus();return!1;case f:c=b;do c=c.next,!c&&e&&(c=b.toolbar.items[0]);while(c&&!c.focus);c?c.focus():m(b,9);return!1;case 40:return b.button&&b.button.hasArrow?b.execute():m(b,40==g?f:a),!1;case a:case 38:c=b;do c=c.previous,!c&&e&&(c=b.toolbar.items[b.toolbar.items.length-
1]);while(c&&!c.focus);c?c.focus():(h=1,m(b,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return d.focus(),!1;case 13:case 32:return b.execute(),!1}return!0};d.on("uiSpace",function(b){if(b.data.space==d.config.toolbarLocation){b.removeListener();d.toolbox=new e;var g=CKEDITOR.tools.getNextId(),c=['\x3cspan id\x3d"',g,'" class\x3d"cke_voice_label"\x3e',d.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+d.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',g,'" onmousedown\x3d"return false;"\x3e'],
g=!1!==d.config.toolbarStartupExpanded,a,h;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&c.push('\x3cspan class\x3d"cke_toolbox_main"'+(g?"\x3e":' style\x3d"display:none"\x3e'));for(var k=d.toolbox.toolbars,l=f(d),t=l.length,p=0;p<t;p++){var q,A=0,r,C=l[p],B="/"!==C&&("/"===l[p+1]||p==t-1),u;if(C)if(a&&(c.push("\x3c/span\x3e"),h=a=0),"/"===C)c.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{u=C.items||C;for(var y=0;y<u.length;y++){var x=u[y],z;if(x){var I=
function(a){a=a.render(d,c);F=A.items.push(a)-1;0<F&&(a.previous=A.items[F-1],a.previous.next=a);a.toolbar=A;a.onkey=m;a.onfocus=function(){d.toolbox.focusCommandExecuted||d.focus()}};if(x.type==CKEDITOR.UI_SEPARATOR)h=a&&x;else{z=!1!==x.canGroup;if(!A){q=CKEDITOR.tools.getNextId();A={id:q,items:[]};r=C.name&&(d.lang.toolbar.toolbarGroups[C.name]||C.name);c.push('\x3cspan id\x3d"',q,'" class\x3d"cke_toolbar'+(B?' cke_toolbar_last"':'"'),r?' aria-labelledby\x3d"'+q+'_label"':"",' role\x3d"toolbar"\x3e');
r&&c.push('\x3cspan id\x3d"',q,'_label" class\x3d"cke_voice_label"\x3e',r,"\x3c/span\x3e");c.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var F=k.push(A)-1;0<F&&(A.previous=k[F-1],A.previous.next=A)}z?a||(c.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),a=1):a&&(c.push("\x3c/span\x3e"),a=0);h&&(I(h),h=0);I(x)}}}a&&(c.push("\x3c/span\x3e"),h=a=0);A&&c.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}d.config.toolbarCanCollapse&&c.push("\x3c/span\x3e");
if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var E=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});d.on("destroy",function(){CKEDITOR.tools.removeFunction(E)});d.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),g=c.getParent(),e=parseInt(d.$.style.height,10),f=g.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");h?(c.show(),b.removeClass("cke_toolbox_collapser_min"),
b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(h?"▲":"◀");d.setStyle("height",e-(g.$.offsetHeight-f)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});d.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");c.push('\x3ca title\x3d"'+
(g?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'" id\x3d"'+d.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');g||c.push(" cke_toolbox_collapser_min");c.push('" onclick\x3d"CKEDITOR.tools.callFunction('+E+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}c.push("\x3c/span\x3e");b.data.html+=c.join("")}});d.on("destroy",function(){if(this.toolbox){var b,d=0,c,a,e;for(b=this.toolbox.toolbars;d<b.length;d++)for(a=b[d].items,
c=0;c<a.length;c++)e=a[c],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});d.on("uiReady",function(){var b=d.ui.space("toolbox");b&&d.focusManager.add(b,1)});d.addCommand("toolbarFocus",k);d.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");d.ui.add("-",CKEDITOR.UI_SEPARATOR,{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(b,d){d.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');
return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(d,e,f){var b=h(this.editor),g=0===e,c={name:d};if(f){if(f=CKEDITOR.tools.search(b,function(a){return a.name==f})){!f.groups&&(f.groups=[]);if(e&&(e=CKEDITOR.tools.indexOf(f.groups,e),0<=e)){f.groups.splice(e+1,0,d);return}g?f.groups.splice(0,0,d):f.groups.push(d);return}e=null}e&&(e=CKEDITOR.tools.indexOf(b,function(a){return a.name==e}));g?b.splice(0,0,d):"number"==typeof e?b.splice(e+1,0,c):b.push(d)}}(),CKEDITOR.UI_SEPARATOR="separator",
CKEDITOR.config.toolbarLocation="top","use strict",function(){function f(a,b,c){b.type||(b.type="auto");if(c&&!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()});return a.fire("paste",b)}function h(a){function b(){var c=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(b){a.getSelection().isCollapsed()||(a.readOnly&&
"cut"==b.name||z.initPasteDataTransfer(b,a),b.data.preventDefault())};c.on("copy",d);c.on("cut",d);c.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}c.on(z.mainPasteEvent,function(a){"beforepaste"==z.mainPasteEvent&&I||u(a)});"beforepaste"==z.mainPasteEvent&&(c.on("paste",function(a){F||(g(),a.data.preventDefault(),u(a),h("paste"))}),c.on("contextmenu",e,null,null,0),c.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||e()},null,null,0));c.on("beforecut",
function(){!I&&k(a)});var f;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){f=setTimeout(function(){y()},0)});a.on("destroy",function(){clearTimeout(f)});c.on("keyup",y)}function c(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&k();var b;var c=this.type;if(CKEDITOR.env.ie)b=h(c);else try{b=a.document.$.execCommand(c,!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 c(b,e){e="undefined"!==typeof e?e:!0;b?(b.method="paste",b.dataTransfer||(b.dataTransfer=z.initPasteDataTransfer()),f(a,b,e)):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,e=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;e&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=e:delete a._.nextPasteType;"string"===typeof h?c({dataValue:h}):a.getClipboardData(c)}}}function g(){F=1;setTimeout(function(){F=
0},100)}function e(){I=1;setTimeout(function(){I=0},10)}function h(b){var c=a.document,d=c.getBody(),g=!1,e=function(){g=!0};d.on(b,e);7<CKEDITOR.env.version?c.$.execCommand(b):c.$.selection.createRange().execCommand(b);d.removeListener(b,e);return g}function k(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,d,g;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())&&(d=b.getRanges()[0],g=a.document.createText(""),g.insertBefore(c),d.setStartBefore(g),d.setEndAfter(c),
b.selectRanges([d]),setTimeout(function(){c.getParent()&&(g.remove(),b.selectElement(c))},0))}}function l(b,c){var d=a.document,g=a.editable(),e=function(a){a.cancel()},f;if(!d.getById("cke_pastebin")){var h=a.getSelection(),k=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!g.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var m=0,d=d.getWindow();CKEDITOR.env.webkit?(g.append(n),
n.addClass("cke_editable"),g.is("body")||(m="static"!=g.getComputedStyle("position")?g:CKEDITOR.dom.element.get(g.$.offsetParent),m=m.getDocumentPosition().y)):g.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(n);n.setStyles({position:"absolute",top:d.getScrollPosition().y-m+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"));(m=n.getParent().isReadOnly())?
(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",e,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)f=g.once("blur",e,null,null,-100);m&&n.focus();m=new CKEDITOR.dom.range(n);m.selectNodeContents(n);var q=m.select();CKEDITOR.env.ie&&(f=g.once("blur",function(){a.lockSelection(q)}));var r=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=
r);f&&f.removeListener();CKEDITOR.env.ie&&g.focus();h.selectBookmarks(k);n.remove();var b;CKEDITOR.env.webkit&&(b=n.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&(n=b);a.removeListener("selectionChange",e);c(n.getHtml())},0)}}function m(){if("paste"==z.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();g();var b=a.focusManager;b.lock();if(a.editable().fire(z.mainPasteEvent)&&!h("paste"))return b.unlock(),!1;b.unlock();return!0}function B(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+
86:case CKEDITOR.SHIFT+45:b=a.editable();g();"paste"==z.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function u(b){var c={type:"auto",method:"paste",dataTransfer:z.initPasteDataTransfer(b)};c.dataTransfer.cacheData();var d=!1!==a.fire("beforePaste",c);d&&z.canClipboardApiBeTrusted(c.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){f(a,c)},0)):l(b,function(b){c.dataValue=
b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&f(a,c)})}function y(){if("wysiwyg"==a.mode){var b=x("paste");a.getCommand("cut").setState(x("cut"));a.getCommand("copy").setState(x("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function x(b){if(E&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();var c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:
CKEDITOR.TRISTATE_OFF}var z=CKEDITOR.plugins.clipboard,I=0,F=0,E=0;(function(){a.on("key",B);a.on("contentDom",b);a.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly();y()});if(a.contextMenu){a.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:x("cut"),copy:x("copy"),paste:x("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=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(c,d,g,e,f){var h=a.lang.clipboard[d];a.addCommand(d,g);a.ui.addButton&&a.ui.addButton(c,{label:h,command:d,toolbar:"clipboard,"+e});a.addMenuItems&&a.addMenuItem(d,{label:h,command:d,group:"clipboard",
order:f})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",d(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function g(a){a.removeListener();a.cancel();c({type:f,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var e=!1,f="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();e=!0;f=a.data.type},null,
null,1E3);a.on("paste",d,null,null,0);!1===m()&&(a.removeListener("paste",d),a._.forcePasteDialog&&e&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",g),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",g);a.data._.committed||c(null)})):c(null))}}function e(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 k(a,b){function c(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 c(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 c(a.length/4)})+"\x3c/p\x3e"));return m(a,b)}function d(){function a(){var a=
{},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var b={};return{get:function(c){return"plain-text"==c?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=b.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),c=b.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function l(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,
a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function m(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 b(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function g(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,d,g){d.select();f(a,{dataTransfer:g,
method:"drop"},1);g.sourceEditor.fire("saveSnapshot");g.sourceEditor.editable().extractHtmlFromRange(b);g.sourceEditor.getSelection().selectRanges([b]);g.sourceEditor.fire("saveSnapshot")}function d(c,g){c.select();f(a,{dataTransfer:g,method:"drop"},1);b.resetDragDataTransfer()}function g(b,c,d){var e={$:b.data.$,target:b.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===a.fire(b.name,e)&&b.data.preventDefault()}function e(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
var h=a.editable(),k=CKEDITOR.plugins.clipboard.getDropTarget(a),l=a.ui.space("top"),m=a.ui.space("bottom");b.preventDefaultDropOnElement(l);b.preventDefaultDropOnElement(m);h.attachListener(k,"dragstart",g);h.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);h.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);h.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=
c?e(c.startContainer):null,b.dragEndContainerChildCount=c?e(c.endContainer):null)},null,null,100);h.attachListener(k,"dragend",g);h.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);h.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);h.attachListener(k,"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()}});h.attachListener(k,"drop",function(c){if(!c.data.$.defaultPrevented){c.data.preventDefault();var d=c.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=b.getRangeAtDropPosition(c,a),e=b.dragRange;d&&g(c,e,d)}}},null,null,9999);h.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);h.attachListener(a,"drop",function(g){if(g=g.data){var e=g.dropRange,f=g.dragRange,h=g.dataTransfer;h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?
setTimeout(function(){b.internalDrop(f,e,h,a)},0):h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,e,h):d(e,h)}},null,null,9999)})}var c;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){var b,c=d();a.config.forcePasteAsPlainText?b="plain-text":a.config.pasteFilter?b=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(b="semantic-content");a.pasteFilter=c.get(b);h(a);g(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+
"dialogs/paste.js"));if(CKEDITOR.env.gecko){var f=["image/png","image/jpeg","image/gif"],m;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d&&1==d.getFilesCount()&&m!=d.id&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(f,d.type))){var g=new FileReader;g.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+g.result+'" /\x3e';a.fire("paste",b.data)},!1);g.addEventListener("abort",function(){a.fire("paste",b.data)},!1);g.addEventListener("error",
function(){a.fire("paste",b.data)},!1);g.readAsDataURL(d);m=c.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,
c=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,g,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)e=g=d;g&&(b=g.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in
c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(b){b=b.data;var d=a._.nextPasteType||b.type,g=b.dataValue,f,h=a.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;f="html"==d||"html"==b.preSniffing?"html":e(g);delete a._.nextPasteType;"htmlifiedtext"==f&&(g=k(a.config,g));if("text"==d&&"html"==f)g=
l(a,g,c.get("plain-text"));else if(m&&a.pasteFilter&&!b.dontFilter||n)g=l(a,g,a.pasteFilter);b.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);b.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==f||"html"==h?"html":"text");b.type=d;b.dataValue=g;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,
1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:(!CKEDITOR.env.ie||16<=CKEDITOR.env.version)&&!CKEDITOR.env.iOS,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,c){a.ui.addButton&&(a.ui.addButton(b,c),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.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,c,d){function g(a,c,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var e=b.startContainer;"number"==typeof d&&"number"==typeof c&&e.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,e,c)||g(a.endContainer,
e,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(a,b,c,d){var g=CKEDITOR.plugins.clipboard,e=d.editable(),h,k;d.fire("saveSnapshot");d.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,g.dragStartContainerChildCount,
g.dragEndContainerChildCount);(k=this.isDropRangeAffectedByDragRange(a,b))||(h=a.createBookmark(!1));g=b.clone().createBookmark(!1);k&&(h=a.createBookmark(!1));a=h.startNode;b=h.endNode;k=g.startNode;b&&a.getPosition(k)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(k)&CKEDITOR.POSITION_FOLLOWING&&k.insertBefore(a);a=d.createRange();a.moveToBookmark(h);e.extractHtmlFromRange(a,1);b=d.createRange();b.moveToBookmark(g);f(d,{dataTransfer:c,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,
b){var c=a.data.$,d=c.clientX,g=c.clientY,e=b.getSelection(!0).getRanges()[0],f=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,g))c=b.document.$.caretRangeFromPoint(d,g),f.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),f.collapse(!0);else if(c.rangeParent)f.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&e&&b.editable().hasFocus)return e;
if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var h=!1,k=0;20>k&&!h;k++){if(!h)try{c.moveToPoint(d,g-k),h=!0}catch(l){}if(!h)try{c.moveToPoint(d,g+k),h=!0}catch(m){}}if(h){var u="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+u+'"\x3e​\x3c/span\x3e');var y=b.document.getById(u);f.moveToPosition(y,CKEDITOR.POSITION_BEFORE_START);y.remove()}else{var x=b.document.$.elementFromPoint(d,g),z=new CKEDITOR.dom.element(x),I;if(z.equals(b.editable())||
"html"==z.getName())return e&&e.startContainer&&!e.startContainer.equals(b.editable())?e:null;I=z.getClientRect();d<I.left?f.setStartAt(z,CKEDITOR.POSITION_AFTER_START):f.setStartAt(z,CKEDITOR.POSITION_BEFORE_END);f.collapse(!0)}}catch(F){return null}}else return null}return f},initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);"dragstart"===a.name&&d.storeId();c?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 c=a.data.$.clipboardData,d=new this.dataTransfer(c,b);"copy"!==a.name&&"cut"!==a.name||d.storeId();this.copyCutData&&d.id==this.copyCutData.id?(d=this.copyCutData,d.$=c):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",b)}};c=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?
"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(c);this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==c||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 c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var g=c.indexOf("\x3c/html\x3e"),c=-1!==g?c.substring(0,g+7):c;return c},
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"==c&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(d){}},storeId:function(){"Text"!==c&&this.setData(c,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(a){a=b._.normalizeType(a);var c=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a,!0),c=b._stripHtml(c));c&&(b._.data[a]=c)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");d=this._getImageFromClipboard();if(this.$&&this.$.files||
d){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length?this.$.files[a]:0===a?this._getImageFromClipboard():
void 0},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.objectKeys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var d=0;d<this.$.types.length;d++)a[this.$.types[d]]=1}else a.Text=1,a.URL=1;"Text"!=c&&(a[c]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},_getImageFromClipboard:function(){var a;if(this.$&&this.$.items&&this.$.items[0])try{if((a=this.$.items[0].getAsFile())&&
a.type)return a}catch(b){}},_stripHtml:function(a){if(a&&a.length){a=a.replace(this._.metaRegExp,"");var b=this._.bodyRegExp.exec(a);b&&b.length&&(a=b[1],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(c){}}else return!1;return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,
!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,g=this._dataTransfer.$;try{g.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(e){if(this._isUnsupportedMimeTypeError(e)){c=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,
a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),f=this._getFallbackTypeData();f[a]=d;try{d=this._applyDataComment(c,f),g.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(h){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[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||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[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 c;(c=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&c[1]&&(b.data=JSON.parse(decodeURIComponent(c[1])),b.content=a.replace(c[0],""))}return b},_applyDataComment:function(a,b){var c="";b&&CKEDITOR.tools.objectKeys(b).length&&(c="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return c+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});
CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(e,d){d&&CKEDITOR.tools.extend(this,d);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=e;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var f=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'),
h=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'),e=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(k,
d){this.getHolderElement=function(){var b=this._.holder;if(!b){if(this.isFramed){var b=this.document.getById(this.id+"_frame"),d=b.getParent(),b=b.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));b.write(e.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+
d+");"},l)));b.getWindow().$.CKEDITOR=CKEDITOR;b.on("keydown",function(b){var a=b.data.getKeystroke(),d=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(a)?b.data.preventDefault():(27==a||a==("rtl"==d?39:37))&&this.onEscape&&!1===this.onEscape(a)&&b.data.preventDefault()},this);b=b.getBody();b.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(d)}else b=this.document.getById(this.id);this._.holder=b}return b};var l={editorId:k.id,id:this.id,langCode:k.langCode,
dir:k.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":k.config.baseFloatZIndex+1};if(this.isFramed){var m=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";l.frame=h.output({id:this.id+"_frame",src:m})}m=f.output(l);d&&d.push(m);return m},addBlock:function(e,d){d=this._.blocks[e]=d instanceof CKEDITOR.ui.panel.block?d:new CKEDITOR.ui.panel.block(this.getHolderElement(),
d);this._.currentBlock||this.showBlock(e);return d},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var d=this._.currentBlock,f=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");d&&d.hide();this._.currentBlock=e;CKEDITOR.fire("ariaWidget",f);e._.focusIndex=-1;this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e);e.show();return e},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=
CKEDITOR.tools.createClass({$:function(e,d){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));d&&CKEDITOR.tools.extend(this,d);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(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=
e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))},markFirstDisplayed:function(e){for(var d=function(b){return b.type==CKEDITOR.NODE_ELEMENT&&"none"==b.getStyle("display")},f=this._.getItems(),h,b,g=f.count()-1;0<=g;g--)if(h=f.getItem(g),h.getAscendant(d)||(b=h,this._.focusIndex=g),"true"==h.getAttribute("aria-selected")){b=h;this._.focusIndex=g;break}b&&(e&&e(),CKEDITOR.env.webkit&&b.getDocument().getWindow().focus(),b.focus(),this.onMark&&this.onMark(b))},
getItems:function(){return this.element.getElementsByTag("a")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,d){var f=this.keys[e];switch(f){case "next":for(var h=this._.focusIndex,f=this.element.getElementsByTag("a"),b;b=f.getItem(++h);)if(b.getAttribute("_cke_focus")&&b.$.offsetWidth){this._.focusIndex=h;b.focus();break}return b||d?!1:(this._.focusIndex=-1,this.onKeyDown(e,
1));case "prev":h=this._.focusIndex;for(f=this.element.getElementsByTag("a");0<h&&(b=f.getItem(--h));){if(b.getAttribute("_cke_focus")&&b.$.offsetWidth){this._.focusIndex=h;b.focus();break}b=null}return b||d?!1:(this._.focusIndex=f.count(),this.onKeyDown(e,1));case "click":case "mouseup":return h=this._.focusIndex,(b=0<=h&&this.element.getElementsByTag("a").getItem(h))&&(b.$[f]?b.$[f]():b.$["on"+f]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function f(e,
f,d,l,m){m=CKEDITOR.tools.genKey(f.getUniqueId(),d.getUniqueId(),e.lang.dir,e.uiColor||"",l.css||"",m||"");var b=h[m];b||(b=h[m]=new CKEDITOR.ui.panel(f,l),b.element=d.append(CKEDITOR.dom.element.createFromHtml(b.render(e),f)),b.element.setStyles({display:"none",position:"absolute"}));return b}var h={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,h,d,l){function m(){a.hide()}d.forceIFrame=1;d.toolbarRelated&&e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h=CKEDITOR.document.getById("cke_"+
e.name));var b=h.getDocument();l=f(e,b,h,d,l||0);var g=l.element,c=g.getFirst(),a=this;g.disableContextMenu();this.element=g;this._={editor:e,panel:l,parentElement:h,definition:d,document:b,iframe:c,children:[],dir:e.lang.dir,showBlockParams:null};e.on("mode",m);e.on("resize",m);b.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(e,f){return this._.panel.addBlock(e,f)},addListBlock:function(e,f){return this._.panel.addListBlock(e,f)},getBlock:function(e){return this._.panel.getBlock(e)},
showBlock:function(e,f,d,h,m,b){var g=this._.panel,c=g.showBlock(e);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,a=this._.iframe,a=CKEDITOR.env.ie&&!CKEDITOR.env.edge?a:new CKEDITOR.dom.window(a.$.contentWindow),w=n.getDocument(),v=this._.parentElement.getPositionedAncestor(),t=f.getDocumentPosition(w),w=v?v.getDocumentPosition(w):
{x:0,y:0},p="rtl"==this._.dir,q=t.x+(h||0)-w.x,A=t.y+(m||0)-w.y;!p||1!=d&&4!=d?p||2!=d&&3!=d||(q+=f.$.offsetWidth-1):q+=f.$.offsetWidth;if(3==d||4==d)A+=f.$.offsetHeight-1;this._.panel._.offsetParentId=f.getId();n.setStyles({top:A+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(a);this._.blurSet||(CKEDITOR.event.useCapture=!0,a.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),a.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),a.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);g.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(c.autoSize){var d=c.element.getDocument(),d=(CKEDITOR.env.webkit||CKEDITOR.env.edge?c.element:d.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",d+10+"px");d=c.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetHeight||0)-(a.$.clientHeight||
0)+3);a.setStyle("height",d+"px");g._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");p&&(q-=n.$.offsetWidth);n.setStyle("left",q+"px");var d=g.element.getWindow(),a=n.$.getBoundingClientRect(),d=d.getViewPaneSize(),e=a.width||a.right-a.left,f=a.height||a.bottom-a.top,h=p?a.right:d.width-a.left,k=p?d.width-a.right:a.left;p?h<e&&(q=k>e?q+e:d.width>e?q-a.left:q-a.right+d.width):h<e&&(q=k>e?q-e:d.width>e?q-a.right+d.width:q-a.left);e=a.top;d.height-
a.top<f&&(A=e>f?A-f:d.height>f?A-a.bottom+d.height:A-a.top);CKEDITOR.env.ie&&(d=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==d.getName()&&(d=d.getDocument().getBody()),"rtl"==d.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*n.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:A+"px",left:q+"px"});n.setOpacity(1);
b&&b()},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();c.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed()},0):c.markFirstDisplayed?c.markFirstDisplayed():c._.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 e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=
e)},hide:function(e){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(e=e&&this._.returnFocus)CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(e){var f=this._.panel;
void 0!==e&&(f.allowBlur=e);return f.allowBlur},showAsChild:function(e,f,d,h,m,b){if(this._.activeChild!=e||e._.panel._.offsetParentId!=d.getId())this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(f,d,h,m,b),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(e){var f=
this._.activeChild;f&&(delete f.onHide,delete this._.activeChild,f.hide(),e&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var e=CKEDITOR.tools.isEmpty(CKEDITOR.instances),f;for(f in h){var d=h[f];e?d.destroy():d.element.hide()}e&&(h={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(f){for(var h=f.config.menu_groups.split(","),e=f._.menuGroups={},k=f._.menuItems={},d=0;d<h.length;d++)e[h[d]]=d+1;f.addMenuGroup=function(d,f){e[d]=f||100};f.addMenuItem=function(d,
f){e[f.group]&&(k[d]=new CKEDITOR.menuItem(this,d,f))};f.addMenuItems=function(d){for(var e in d)this.addMenuItem(e,d[e])};f.getMenuItem=function(d){return k[d]};f.removeMenuItem=function(d){delete k[d]}}}),function(){function f(d){d.sort(function(d,b){return d.group<b.group?-1:d.group>b.group?1:d.order<b.order?-1:d.order>b.order?1:0})}var h='\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"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"';
CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),e=CKEDITOR.addTemplate("menuItem",
h+'\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'),k=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),
d=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(d,e){e=this._.definition=e||{};this.id=CKEDITOR.tools.getNextId();this.editor=d;this.items=[];this._.listeners=[];this._.level=e.level||1;var b=CKEDITOR.tools.extend({},e.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),g=b.block.attributes=b.attributes||{};!g.role&&(g.role="menu");this._.panelDefinition=
b},_:{onShow:function(){var d=this.editor.getSelection(),e=d&&d.getStartElement(),b=this.editor.elementPath(),g=this._.listeners;this.removeAll();for(var c=0;c<g.length;c++){var a=g[c](e,d,b);if(a)for(var f in a){var h=this.editor.getMenuItem(f);!h||h.command&&!this.editor.getCommand(h.command).state||(h.state=a[f],this.add(h))}}},onClick:function(d){this.hide();if(d.onClick)d.onClick();else d.command&&this.editor.execCommand(d.command)},onEscape:function(d){var e=this.parent;e?e._.panel.hideChild(1):
27==d&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(d){var e=this._.subMenu,b=this.items[d];if(b=b.getItems&&b.getItems()){e?e.removeAll():(e=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),e.parent=this,e._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var g in b){var c=this.editor.getMenuItem(g);c&&(c.state=b[g],e.add(c))}var a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
String(d));setTimeout(function(){e.show(a,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(d){d.order||(d.order=this.items.length);this.items.push(d)},removeAll:function(){this.items=[]},show:function(d,e,b,g){if(!this.parent&&(this._.onShow(),!this.items.length))return;e=e||("rtl"==this.editor.lang.dir?2:1);var c=this.items,a=this.editor,h=this._.panel,k=this._.element;if(!h){h=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
h.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);h.onShow=function(){h._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};h.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);k=h.addBlock(this.id,this._.panelDefinition.block);k.autoSize=!0;var v=k.keys;v[40]="next";v[9]="next";v[38]="prev";v[CKEDITOR.SHIFT+9]="prev";v["rtl"==a.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";v[32]=CKEDITOR.env.ie?"mouseup":
"click";CKEDITOR.env.ie&&(v[13]="mouseup");k=this._.element=k.element;v=k.getDocument();v.getBody().setStyle("overflow","hidden");v.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(b){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,a.config.menu_subMenuDelay||400,this,[b])},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)}f(c);for(var v=a.elementPath(),v=['\x3cdiv class\x3d"cke_menu'+(v&&v.direction()!=a.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],t=c.length,p=t&&c[0].group,q=0;q<t;q++){var A=c[q];p!=A.group&&(v.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),
p=A.group);A.render(this,q,v)}v.push("\x3c/div\x3e");k.setHtml(v.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,d,e,b,g):h.showBlock(this.id,d,e,b,g);a.fire("menuShow",[h])},addListener:function(d){this._.listeners.push(d)},hide:function(d){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(d)},findItemByCommandName:function(d){var e=CKEDITOR.tools.array.filter(this.items,function(b){return d===b.command});return e.length?(e=e[0],{item:e,
element:this._.element.findOne("."+e.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(d,e,b){CKEDITOR.tools.extend(this,b,{order:0,className:"cke_menubutton__"+e});this.group=d._.menuGroups[this.group];this.editor=d;this.name=e},proto:{render:function(f,h,b){var g=f.id+String(h),c="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,a="",n=this.editor,w,v,t=c==CKEDITOR.TRISTATE_ON?"on":c==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,
menuitemradio:1}&&(a=' aria-checked\x3d"'+(c==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var p=this.getItems,q="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",A=this.name;this.icon&&!/\./.test(this.icon)&&(A=this.icon);this.command&&(w=n.getCommand(this.command),(w=n.getCommandKeystroke(w))&&(v=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,w)));f={id:g,name:this.name,iconName:A,label:this.label,cls:this.className||"",state:t,hasPopup:p?"true":"false",disabled:c==CKEDITOR.TRISTATE_DISABLED,
title:this.label+(v?" ("+v.display+")":""),ariaShortcut:v?n.lang.common.keyboardShortcut+" "+v.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:f._.itemOverFn,moveOutFn:f._.itemOutFn,clickFn:f._.itemClickFn,index:h,iconStyle:CKEDITOR.skin.getIconStyle(A,"rtl"==this.editor.lang.dir,A==this.icon?null:this.icon,this.iconOffset),shortcutHtml:v?d.output({shortcut:v.display}):"",arrowHtml:p?k.output({label:q}):"",role:this.role?this.role:"menuitem",ariaChecked:a};e.output(f,b)}}})}(),
CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,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(f){this.base.call(this,f,{panel:{className:"cke_menu_panel",attributes:{"aria-label":f.lang.contextmenu.options}}})},proto:{addTarget:function(f,
h){f.on("contextmenu",function(d){d=d.data;var f=CKEDITOR.env.webkit?e:CKEDITOR.env.mac?d.$.metaKey:d.$.ctrlKey;if(!h||!f){d.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var f=this.editor,k=(new CKEDITOR.dom.elementPath(d.getTarget(),f.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);k&&"false"==k.getAttribute("contenteditable")&&f.getSelection().fake(k)}var k=d.getTarget().getDocument(),b=d.getTarget().getDocument().getDocumentElement(),f=!k.equals(CKEDITOR.document),
k=k.getWindow().getScrollPosition(),g=f?d.$.clientX:d.$.pageX||k.x+d.$.clientX,c=f?d.$.clientY:d.$.pageY||k.y+d.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(b,null,g,c)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var e,k=function(){e=0};f.on("keydown",function(d){e=CKEDITOR.env.mac?d.data.$.metaKey:d.data.$.ctrlKey});f.on("keyup",k);f.on("contextmenu",k)}},open:function(f,h,e,k){!1!==this.editor.config.enableContextMenu&&(this.editor.focus(),f=f||CKEDITOR.document.getDocumentElement(),
this.editor.selectionChange(1),this.show(f,h,e,k))}}})},beforeInit:function(f){var h=f.contextMenu=new CKEDITOR.plugins.contextMenu(f);f.on("contentDom",function(){h.addTarget(f.editable(),!1!==f.config.browserContextMenuOnCtrl)});f.addCommand("contextMenu",{exec:function(){f.contextMenu.open(f.document.getBody())}});f.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");f.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function f(d,e){function f(b){b=a.list[b];var c;b.equals(d.editable())||
"true"==b.getAttribute("contenteditable")?(c=d.createRange(),c.selectNodeContents(b),c=c.select()):(c=d.getSelection(),c.selectElement(b));CKEDITOR.env.ie&&d.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(b)});d.focus()}function b(){c&&c.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete a.list}var g=d.ui.spaceId("path"),c,a=d._.elementsPath,n=a.idBase;e.html+='\x3cspan id\x3d"'+g+'_label" class\x3d"cke_voice_label"\x3e'+d.lang.elementspath.eleLabel+
'\x3c/span\x3e\x3cspan id\x3d"'+g+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+g+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';d.on("uiReady",function(){var a=d.ui.space("path");a&&d.focusManager.add(a,1)});a.onClick=f;var w=CKEDITOR.tools.addFunction(f),v=CKEDITOR.tools.addFunction(function(b,c){var e=a.idBase,g;c=new CKEDITOR.dom.event(c);g="rtl"==d.lang.dir;switch(c.getKeystroke()){case g?39:37:case 9:return(g=CKEDITOR.document.getById(e+
(b+1)))||(g=CKEDITOR.document.getById(e+"0")),g.focus(),!1;case g?37:39:case CKEDITOR.SHIFT+9:return(g=CKEDITOR.document.getById(e+(b-1)))||(g=CKEDITOR.document.getById(e+(a.list.length-1))),g.focus(),!1;case 27:return d.focus(),!1;case 13:case 32:return f(b),!1}return!0});d.on("selectionChange",function(b){for(var e=[],f=a.list=[],h=[],l=a.filters,m=!0,B=b.data.path.elements,u=B.length;u--;){var y=B[u],x=0;b=y.data("cke-display-name")?y.data("cke-display-name"):y.data("cke-real-element-type")?y.data("cke-real-element-type"):
y.getName();(m=y.hasAttribute("contenteditable")?"true"==y.getAttribute("contenteditable"):m)||y.hasAttribute("contenteditable")||(x=1);for(var z=0;z<l.length;z++){var I=l[z](y,b);if(!1===I){x=1;break}b=I||b}x||(f.unshift(y),h.unshift(b))}f=f.length;for(l=0;l<f;l++)b=h[l],m=d.lang.elementspath.eleTitle.replace(/%1/,b),b=k.output({id:n+l,label:m,text:b,jsTitle:"javascript:void('"+b+"')",index:l,keyDownFn:v,clickFn:w}),e.unshift(b);c||(c=CKEDITOR.document.getById(g));h=c;h.setHtml(e.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');
d.fire("elementsPathUpdate",{space:h})});d.on("readOnly",b);d.on("contentDomUnload",b);d.addCommand("elementsPathFocus",h.toolbarFocus);d.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var h={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(d){(d=CKEDITOR.document.getById(d._.elementsPath.idBase+"0"))&&d.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');
var k=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+e+' hidefocus\x3d"true"  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(d){d._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+
"_",filters:[]};d.on("uiSpace",function(e){"bottom"==e.data.space&&f(d,e.data)})}})}(),function(){function f(c,a,d){d=c.config.forceEnterMode||d;if("wysiwyg"==c.mode){a||(a=c.activeEnterMode);var e=c.elementPath();e&&!e.isContextFor("p")&&(a=CKEDITOR.ENTER_BR,d=1);c.fire("saveSnapshot");a==CKEDITOR.ENTER_BR?m(c,a,null,d):b(c,a,null,d);c.fire("saveSnapshot")}}function h(b){b=b.getSelection().getRanges(!0);for(var a=b.length-1;0<a;a--)b[a].deleteContents();return b[0]}function e(b){var a=b.startContainer.getAscendant(function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(b.root.equals(a))return b;a=new CKEDITOR.dom.range(a);a.moveToRange(b);return a}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){f(a)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){f(a,a.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var k=CKEDITOR.dom.walker.whitespaces(),d=
CKEDITOR.dom.walker.bookmark(),l,m,b,g;CKEDITOR.plugins.enterkey={enterBlock:function(b,a,f,l){function v(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],A.lastElement.getName())||1!==A.lastElement.getChildCount())return!1;a=A.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(f=f||h(b)){f=e(f);var t=f.document,p=f.checkStartOfBlock(),q=f.checkEndOfBlock(),A=b.elementPath(f.startContainer),r=A.block,C=a==CKEDITOR.ENTER_DIV?
"div":"p",B;if(p&&q){if(r&&(r.is("li")||r.getParent().is("li"))){r.is("li")||(r=r.getParent());f=r.getParent();B=f.getParent();l=!r.hasPrevious();var q=!r.hasNext(),C=b.getSelection(),p=C.createBookmarks(),u=r.getDirection(1),y=r.getAttribute("class"),x=r.getAttribute("style"),z=B.getDirection(1)!=u;b=b.enterMode!=CKEDITOR.ENTER_BR||z||x||y;if(B.is("li"))l||q?(l&&q&&f.remove(),r[q?"insertAfter":"insertBefore"](B)):r.breakParent(B);else{if(b)if(A.block.is("li")?(B=t.createElement(a==CKEDITOR.ENTER_P?
"p":"div"),z&&B.setAttribute("dir",u),x&&B.setAttribute("style",x),y&&B.setAttribute("class",y),r.moveChildren(B)):B=A.block,l||q)B[l?"insertBefore":"insertAfter"](f);else r.breakParent(f),B.insertAfter(f);else if(r.appendBogus(!0),l||q)for(;t=r[l?"getFirst":"getLast"]();)t[l?"insertBefore":"insertAfter"](f);else for(r.breakParent(f);t=r.getLast();)t.insertAfter(f);r.remove()}C.selectBookmarks(p);return}if(r&&r.getParent().is("blockquote")){r.breakParent(r.getParent());r.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||
r.getPrevious().remove();r.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||r.getNext().remove();f.moveToElementEditStart(r);f.select();return}}else if(r&&r.is("pre")&&!q){m(b,a,f,l);return}if(x=f.splitBlock(C)){b=x.previousBlock;r=x.nextBlock;p=x.wasStartOfBlock;q=x.wasEndOfBlock;r?(u=r.getParent(),u.is("li")&&(r.breakParent(u),r.move(r.getNext(),1))):b&&(u=b.getParent())&&u.is("li")&&(b.breakParent(u),u=b.getNext(),f.moveToElementEditStart(u),b.move(b.getPrevious()));if(p||q)if(v(a))f.moveToElementEditStart(f.getTouchedStartNode());
else{if(b){if(b.is("li")||!g.test(b.getName())&&!b.is("pre"))B=b.clone()}else r&&(B=r.clone());B?l&&!B.is("li")&&B.renameNode(C):u&&u.is("li")?B=u:(B=t.createElement(C),b&&(y=b.getDirection())&&B.setAttribute("dir",y));if(t=x.elementPath)for(a=0,l=t.elements.length;a<l;a++){C=t.elements[a];if(C.equals(t.block)||C.equals(t.blockLimit))break;CKEDITOR.dtd.$removeEmpty[C.getName()]&&(C=C.clone(),B.moveChildren(C),B.append(C))}B.appendBogus();B.getParent()||f.insertNode(B);B.is("li")&&B.removeAttribute("value");
!CKEDITOR.env.ie||!p||q&&b.getChildCount()||(f.moveToElementEditStart(q?b:B),f.select());f.moveToElementEditStart(p&&!q?r:B)}else r.is("li")&&(B=f.clone(),B.selectNodeContents(r),B=new CKEDITOR.dom.walker(B),B.evaluator=function(a){return!(d(a)||k(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(u=B.next())&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?t.createElement("br"):t.createText(" ")).insertBefore(u)),
r&&f.moveToElementEditStart(r);f.select();f.scrollIntoView()}}},enterBr:function(c,a,d,e){if(d=d||h(c)){var f=d.document,k=d.checkEndOfBlock(),l=new CKEDITOR.dom.elementPath(c.getSelection().getStartElement()),m=l.block,A=m&&l.block.getName();e||"li"!=A?(!e&&k&&g.test(A)?(k=m.getDirection())?(f=f.createElement("div"),f.setAttribute("dir",k),f.insertAfter(m),d.setStart(f,0)):(f.createElement("br").insertAfter(m),CKEDITOR.env.gecko&&f.createText("").insertAfter(m),d.setStartAt(m.getNext(),CKEDITOR.env.ie?
CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(c="pre"==A&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?f.createText("\r"):f.createElement("br"),d.deleteContents(),d.insertNode(c),CKEDITOR.env.needsBrFiller?(f.createText("﻿").insertAfter(c),k&&(m||l.blockLimit).appendBogus(),c.getNext().$.nodeValue="",d.setStartAt(c.getNext(),CKEDITOR.POSITION_AFTER_START)):d.setStartAt(c,CKEDITOR.POSITION_AFTER_END)),d.collapse(!0),d.select(),d.scrollIntoView()):b(c,a,d,e)}}};l=CKEDITOR.plugins.enterkey;
m=l.enterBr;b=l.enterBlock;g=/^h[1-6]$/}(),function(){function f(f,e){var k={},d=[],l={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};f=f.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,a){var g=e?"\x26"+a+";":l[a];k[g]=e?l[a]:"\x26"+a+";";d.push(g);return""});if(!e&&f){f=f.split(",");var m=document.createElement("div"),b;m.innerHTML="\x26"+f.join(";\x26")+";";b=m.innerHTML;m=null;for(m=0;m<b.length;m++){var g=b.charAt(m);k[g]="\x26"+f[m]+";";d.push(g)}}k.regex=d.join(e?
"|":"");return k}CKEDITOR.plugins.add("entities",{afterInit:function(h){function e(a){return g[a]}function k(a){return"force"!=d.entities_processNumerical&&m[a]?m[a]:"\x26#"+a.charCodeAt(0)+";"}var d=h.config;if(h=(h=h.dataProcessor)&&h.htmlFilter){var l=[];!1!==d.basicEntities&&l.push("nbsp,gt,lt,amp");d.entities&&(l.length&&l.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"),
d.entities_latin&&l.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"),d.entities_greek&&l.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"),
d.entities_additional&&l.push(d.entities_additional));var m=f(l.join(",")),b=m.regex?"["+m.regex+"]":"a^";delete m.regex;d.entities&&d.entities_processNumerical&&(b="[^ -~]|"+b);var b=new RegExp(b,"g"),g=f("nbsp,gt,lt,amp,shy",!0),c=new RegExp(g.regex,"g");h.addRules({text:function(a){return a.replace(c,e).replace(b,k)}},{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",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(f,h,e,k){h=h||"80%";e=e||"70%";"string"==typeof h&&1<h.length&&"%"==h.substr(h.length-1,1)&&(h=parseInt(window.screen.width*parseInt(h,10)/100,10));"string"==typeof e&&1<e.length&&"%"==e.substr(e.length-1,1)&&(e=parseInt(window.screen.height*parseInt(e,10)/100,10));640>h&&(h=640);420>e&&(e=420);var d=parseInt((window.screen.height-e)/2,10),l=parseInt((window.screen.width-
h)/2,10);k=(k||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+h+",height\x3d"+e+",top\x3d"+d+",left\x3d"+l;var m=window.open("",null,k,!0);if(!m)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(m.moveTo(l,d),m.resizeTo(h,e)),m.focus(),m.location.href=f}catch(b){window.open(f,null,k,!0)}return!0}}),"use strict",function(){function f(d){this.editor=d;this.loaders=
[]}function h(d,f,h){var b=d.config.fileTools_defaultFileName;this.editor=d;this.lang=d.lang;"string"===typeof f?(this.data=f,this.file=e(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=f,this.total=this.file.size,this.loaded=0);h?this.fileName=h:this.file.name?this.fileName=this.file.name:(d=this.file.type.split("/"),b&&(d[0]=b),this.fileName=d.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}
function e(d){var e=d.match(k)[1];d=d.replace(k,"");d=atob(d);var f=[],b,g,c,a;for(b=0;b<d.length;b+=512){g=d.slice(b,b+512);c=Array(g.length);for(a=0;a<g.length;a++)c[a]=g.charCodeAt(a);g=new Uint8Array(c);f.push(g)}return new Blob(f,{type:e})}CKEDITOR.plugins.add("filetools",{beforeInit:function(d){d.uploadRepository=new f(d);d.on("fileUploadRequest",function(d){var e=d.data.fileLoader;e.xhr.open("POST",e.uploadUrl,!0);d.data.requestData.upload={file:e.file,name:e.fileName}},null,null,5);d.on("fileUploadRequest",
function(e){var f=e.data.fileLoader,b=new FormData;e=e.data.requestData;var g=d.config.fileTools_requestHeaders,c,a;for(a in e){var h=e[a];"object"===typeof h&&h.file?b.append(a,h.file,h.name):b.append(a,h)}b.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(g)for(c in g)f.xhr.setRequestHeader(c,g[c]);f.xhr.send(b)},null,null,999);d.on("fileUploadResponse",function(d){var e=d.data.fileLoader,b=e.xhr,g=d.data;try{var c=JSON.parse(b.responseText);c.error&&c.error.message&&(g.message=c.error.message);
if(c.uploaded)for(var a in c)g[a]=c[a];else d.cancel()}catch(f){g.message=e.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:b.responseText}),d.cancel()}},null,null,999)}});f.prototype={create:function(d,e,f){f=f||h;var b=this.loaders.length;d=new f(this.editor,d,e);d.id=b;this.loaders[b]=d;this.fire("instanceCreated",d);return d},isFinished:function(){for(var d=0;d<this.loaders.length;++d)if(!this.loaders[d].isFinished())return!1;return!0}};h.prototype={loadAndUpload:function(d,
e){var f=this;this.once("loaded",function(b){b.cancel();f.once("update",function(b){b.cancel()},null,null,0);f.upload(d,e)},null,null,0);this.load()},load:function(){var d=this,e=this.reader=new FileReader;d.changeStatus("loading");this.abort=function(){d.reader.abort()};e.onabort=function(){d.changeStatus("abort")};e.onerror=function(){d.message=d.lang.filetools.loadError;d.changeStatus("error")};e.onprogress=function(e){d.loaded=e.loaded;d.update()};e.onload=function(){d.loaded=d.total;d.data=e.result;
d.changeStatus("loaded")};e.readAsDataURL(this.file)},upload:function(d,e){var f=e||{};d?(this.uploadUrl=d,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:f})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function d(){"error"!=f.status&&(f.message=f.lang.filetools.networkError,f.changeStatus("error"))}function e(){"abort"!=f.status&&
f.changeStatus("abort")}var f=this,b=this.xhr;f.abort=function(){b.abort();e()};b.onerror=d;b.onabort=e;b.upload?(b.upload.onprogress=function(b){b.lengthComputable&&(f.uploadTotal||(f.uploadTotal=b.total),f.uploaded=b.loaded,f.update())},b.upload.onerror=d,b.upload.onabort=e):(f.uploadTotal=f.total,f.update());b.onload=function(){f.update();if("abort"!=f.status)if(f.uploaded=f.uploadTotal,200>b.status||299<b.status)f.message=f.lang.filetools["httpError"+b.status],f.message||(f.message=f.lang.filetools.httpError.replace("%1",
b.status)),f.changeStatus("error");else{for(var d={fileLoader:f},c=["message","fileName","url"],a=f.editor.fire("fileUploadResponse",d),e=0;e<c.length;e++){var h=c[e];"string"===typeof d[h]&&(f[h]=d[h])}f.responseData=d;delete f.responseData.fileLoader;!1===a?f.changeStatus("error"):f.changeStatus("uploaded")}}},changeStatus:function(d){this.status=d;if("error"==d||"abort"==d||"loaded"==d||"uploaded"==d)this.abort=function(){};this.fire(d);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};
CKEDITOR.event.implementOn(f.prototype);CKEDITOR.event.implementOn(h.prototype);var k=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:f,fileLoader:h,getUploadUrl:function(d,e){var f=CKEDITOR.tools.capitalize;return e&&d[e+"UploadUrl"]?d[e+"UploadUrl"]:d.uploadUrl?d.uploadUrl:e&&d["filebrowser"+f(e,1)+"UploadUrl"]?d["filebrowser"+f(e,1)+"UploadUrl"]+"\x26responseType\x3djson":d.filebrowserUploadUrl?d.filebrowserUploadUrl+
"\x26responseType\x3djson":null},isTypeSupported:function(d,e){return!!d.type.match(e)},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 f(a,b){var c=[];if(b)for(var d in b)c.push(d+"\x3d"+encodeURIComponent(b[d]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function h(a){return!a.match(/command=QuickUpload/)||
a.match(/(\?|&)responseType=json/)?a:f(a,{responseType:"json"})}function e(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function k(){var a=this.getDialog(),b=a.getParentEditor();b._.filebrowserSe=this;var c=b.config["filebrowser"+e(a.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",a=b.config["filebrowser"+e(a.getName())+"WindowHeight"]||b.config.filebrowserWindowHeight||"70%",d=this.filebrowser.params||{};d.CKEditor=b.name;d.CKEditorFuncNum=b._.filebrowserFn;d.langCode||
(d.langCode=b.langCode);d=f(this.filebrowser.url,d);b.popup(d,c,a,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function d(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 l(){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 m(a,b,c){var d=c.params||{};d.CKEditor=a.name;d.CKEditorFuncNum=a._.filebrowserFn;d.langCode||(d.langCode=a.langCode);b.action=f(c.url,d);b.filebrowser=c}function b(c,f,v,t){if(t&&t.length)for(var p,q=t.length;q--;)if(p=t[q],"hbox"!=p.type&&"vbox"!=p.type&&"fieldset"!=p.type||b(c,f,v,p.children),p.filebrowser)if("string"==typeof p.filebrowser&&(p.filebrowser={action:"fileButton"==
p.type?"QuickUpload":"Browse",target:p.filebrowser}),"Browse"==p.filebrowser.action){var A=p.filebrowser.url;void 0===A&&(A=c.config["filebrowser"+e(f)+"BrowseUrl"],void 0===A&&(A=c.config.filebrowserBrowseUrl));A&&(p.onClick=k,p.filebrowser.url=A,p.hidden=!1)}else if("QuickUpload"==p.filebrowser.action&&p["for"]&&(A=p.filebrowser.url,void 0===A&&(A=c.config["filebrowser"+e(f)+"UploadUrl"],void 0===A&&(A=c.config.filebrowserUploadUrl)),A)){var r=p.onClick;p.onClick=function(b){var e=b.sender,f=e.getDialog().getContentElement(this["for"][0],
this["for"][1]).getInputElement(),k=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(r&&!1===r.call(e,b))return!1;if(l.call(e,b)){if("form"!==c.config.filebrowserUploadMethod&&k)return b=c.uploadRepository.create(f.$.files[0]),b.on("uploaded",function(b){var c=b.sender.responseData;a.call(b.sender.editor,c.url,c.message)}),b.on("error",g.bind(this)),b.on("abort",g.bind(this)),b.loadAndUpload(h(A)),"xhr";d(f);return!0}return!1};p.filebrowser.url=A;p.hidden=!1;m(c,v.getContents(p["for"][0]).get(p["for"][1]),
p.filebrowser)}}function g(a){var b={};try{b=JSON.parse(a.sender.xhr.response)||{}}catch(c){}this.enable();alert(b.error?b.error.message:a.sender.message)}function c(a,b,d){if(-1!==d.indexOf(";")){d=d.split(";");for(var e=0;e<d.length;e++)if(c(a,b,d[e]))return!0;return!1}return(a=a.getContents(b).get(d).filebrowser)&&a.url}function a(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],e=this._.filebrowserSe.filebrowser.onSelect;d&&c.getContentElement(d[0],d[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&&(d=this._.filebrowserSe,c=d.getDialog(),d=d.filebrowser.target||null))if(d=d.split(":"),e=c.getContentElement(d[0],d[1]))e.setValue(a),c.selectPage(d[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(b){b._.filebrowserFn=CKEDITOR.tools.addFunction(a,b);b.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",
function(a){if(a.editor.plugins.filebrowser)for(var d=a.data.definition,e,g=0;g<d.contents.length;++g)if(e=d.contents[g])b(a.editor,a.data.name,d,e.elements),e.hidden&&e.filebrowser&&(e.hidden=!c(d,e.id,e.filebrowser))})}(),function(){function f(f){var d=f.config,l=f.fire("uiSpace",{space:"top",html:""}).html,m=function(){function a(b,c,d){g.setStyle(c,e(d));g.setStyle("position",b)}function b(d){var e=l.getDocumentPosition();switch(d){case "top":a("absolute","top",e.y-r-u);break;case "pin":a("fixed",
"top",x);break;case "bottom":a("absolute","top",e.y+(q.height||q.bottom-q.top)+u)}c=d}var c,l,p,q,A,r,C,B=d.floatSpaceDockedOffsetX||0,u=d.floatSpaceDockedOffsetY||0,y=d.floatSpacePinnedOffsetX||0,x=d.floatSpacePinnedOffsetY||0;return function(a){if(l=f.editable()){var n=a&&"focus"==a.name;n&&g.show();f.fire("floatingSpaceLayout",{show:n});g.removeStyle("left");g.removeStyle("right");p=g.getClientRect();q=l.getClientRect();A=h.getViewPaneSize();r=p.height;C="pageXOffset"in h.$?h.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;
c?(r+u<=q.top?b("top"):r+u>A.height-q.bottom?b("pin"):b("bottom"),a=A.width/2,a=d.floatSpacePreferRight?"right":0<q.left&&q.right<A.width&&q.width>p.width?"rtl"==d.contentsLangDirection?"right":"left":a-q.left>q.right-a?"left":"right",p.width>A.width?(a="left",n=0):(n="left"==a?0<q.left?q.left:0:q.right<A.width?A.width-q.right:0,n+p.width>A.width&&(a="left"==a?"right":"left",n=0)),g.setStyle(a,e(("pin"==c?y:B)+n+("pin"==c?0:"left"==a?C:-C)))):(c="pin",b("pin"),m(a))}}}();if(l){var b=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}"'+(f.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(f.title?'\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'),g=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(b.output({content:l,
id:f.id,langDir:f.lang.dir,langCode:f.langCode,name:f.name,style:"display:none;z-index:"+(d.baseFloatZIndex-1),topId:f.ui.spaceId("top"),voiceLabel:f.title}))),c=CKEDITOR.tools.eventsBuffer(500,m),a=CKEDITOR.tools.eventsBuffer(100,m);g.unselectable();g.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});f.on("focus",function(b){m(b);f.on("change",c.input);h.on("scroll",a.input);h.on("resize",a.input)});f.on("blur",function(){g.hide();f.removeListener("change",
c.input);h.removeListener("scroll",a.input);h.removeListener("resize",a.input)});f.on("destroy",function(){h.removeListener("scroll",a.input);h.removeListener("resize",a.input);g.clearCustomData();g.remove()});f.focusManager.hasFocus&&g.show();f.focusManager.add(g,1)}}var h=CKEDITOR.document.getWindow(),e=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){f(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var f=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=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}" href\x3d"javascript:void(\'{val}\')"  {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),e=CKEDITOR.addTemplate("panel-list-group",
'\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),k=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(d,e){return this.addBlock(d,new CKEDITOR.ui.listBlock(this.getHolderElement(),e))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(d,e){e=e||{};var f=e.attributes||(e.attributes={});(this.multiSelect=!!e.multiSelect)&&(f["aria-multiselectable"]=!0);!f.role&&(f.role="listbox");this.base.apply(this,arguments);
this.element.setAttribute("role",f.role);f=this.keys;f[40]="next";f[9]="next";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(f[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var d=f.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(d);delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(d){var e=
this.toggle(d);if(this.onClick)this.onClick(d,e)},this));return this._.click}},proto:{add:function(d,e,f){var b=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[d]=b;var g;g=CKEDITOR.tools.htmlEncodeAttr(d).replace(k,"\\'");d={id:b,val:g,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(f||d),text:e||d};this._.pendingList.push(h.output(d))},startGroup:function(d){this._.close();
var f=CKEDITOR.tools.getNextId();this._.groups[d]=f;this._.pendingHtml.push(e.output({id:f,label:d}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(d){var e=this.isMarked(d);e?this.unmark(d):this.mark(d);return!e},hideGroup:function(d){var e=(d=this.element.getDocument().getById(this._.groups[d]))&&d.getNext();d&&(d.setStyle("display","none"),e&&"ul"==e.getName()&&e.setStyle("display","none"))},hideItem:function(d){this.element.getDocument().getById(this._.items[d]).setStyle("display",
"none")},showAll:function(){var d=this._.items,e=this._.groups,f=this.element.getDocument(),b;for(b in d)f.getById(d[b]).setStyle("display","");for(var g in e)d=f.getById(e[g]),b=d.getNext(),d.setStyle("display",""),b&&"ul"==b.getName()&&b.setStyle("display","")},mark:function(d){this.multiSelect||this.unmarkAll();d=this._.items[d];var e=this.element.getDocument().getById(d);e.addClass("cke_selected");this.element.getDocument().getById(d+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(e)},
markFirstDisplayed:function(){var d=this;this._.markFirstDisplayed(function(){d.multiSelect||d.unmarkAll()})},unmark:function(d){var e=this.element.getDocument();d=this._.items[d];var f=e.getById(d);f.removeClass("cke_selected");e.getById(d+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var d=this._.items,e=this.element.getDocument(),f;for(f in d){var b=d[f];e.getById(b).removeClass("cke_selected");e.getById(b+"_option").removeAttribute("aria-selected")}this.onUnmark&&
this.onUnmark()},isMarked:function(d){return this.element.getDocument().getById(this._.items[d]).hasClass("cke_selected")},focus:function(d){this._.focusIndex=-1;var e=this.element.getElementsByTag("a"),f,b=-1;if(d)for(f=this.element.getDocument().getById(this._.items[d]).getFirst();d=e.getItem(++b);){if(d.equals(f)){this._.focusIndex=b;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(f){f.ui.addHandler(CKEDITOR.UI_RICHCOMBO,
CKEDITOR.ui.richCombo.handler)}}),function(){var f='\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"true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&
(f+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"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",f);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1});e=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document;e.className="cke_combopanel";
e.block={multiSelect:e.multiSelect,attributes:e.attributes};e.toolbarRelated=!0;this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var f=[];this.render(e,f);return f.join("")},render:function(e,f){function d(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=
CKEDITOR.env,m="cke_"+this.id,b=CKEDITOR.tools.addFunction(function(a){w&&(e.unlockSelection(1),w=0);c.execute(a)},this),g=this,c={id:m,combo:this,focus:function(){CKEDITOR.document.getById(m).getChild(1).focus()},execute:function(a){var b=g._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(g.createPanel(e),b.on)b.panel.hide();else{g.commit();var c=g.getValue();c?b.list.mark(c):b.list.unmarkAll();b.panel.showBlock(g.id,new CKEDITOR.dom.element(a),4)}},clickFn:b};e.on("activeFilterChange",d,this);e.on("mode",
d,this);e.on("selectionChange",d,this);!this.readOnly&&e.on("readOnly",d,this);var a=CKEDITOR.tools.addFunction(function(a,d){a=new CKEDITOR.dom.event(a);var e=a.getKeystroke();switch(e){case 13:case 32:case 40:CKEDITOR.tools.callFunction(b,d);break;default:c.onkey(c,e)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){c.onfocus&&c.onfocus()}),w=0;c.keyDownFn=a;l={id:m,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||
"").replace("'",""),keydownFn:a,focusFn:n,clickFn:b};h.output(l,f);if(this.onRender)this.onRender();return c},createPanel:function(e){if(!this._.panel){var f=this._.panelDefinition,d=this._.panelDefinition.block,h=f.parent||CKEDITOR.document.getBody(),m="cke_combopanel__"+this.name,b=new CKEDITOR.ui.floatPanel(e,h,f),f=b.addListBlock(this.id,d),g=this;b.onShow=function(){this.element.addClass(m);g.setState(CKEDITOR.TRISTATE_ON);g._.on=1;g.editorFocus&&!e.focusManager.hasFocus&&e.focus();if(g.onOpen)g.onOpen()};
b.onHide=function(b){this.element.removeClass(m);g.setState(g.modes&&g.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g._.on=0;if(!b&&g.onClose)g.onClose()};b.onEscape=function(){b.hide(1)};f.onClick=function(c,a){g.onClick&&g.onClick.call(g,c,a);b.hide()};this._.panel=b;this._.list=f;b.getBlock(this.id).onHide=function(){g._.on=0;g.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(e,f){this._.value=e;var d=this.document.getById("cke_"+this.id+"_text");d&&
(e||f?d.removeClass("cke_combo_inlinelabel"):(f=this.label,d.addClass("cke_combo_inlinelabel")),d.setText("undefined"!=typeof f?f:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,f,d){this._.items[e]=d||e;this._.list.add(e,f,d)},startGroup:function(e){this._.list.startGroup(e)},
commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(e){if(this._.state!=e){var f=this.document.getById("cke_"+this.id);f.setState(e,"cke_combo");e==CKEDITOR.TRISTATE_DISABLED?f.setAttribute("aria-disabled",!0):f.removeAttribute("aria-disabled");this._.state=e}},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))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}});CKEDITOR.ui.prototype.addRichCombo=function(e,f){this.add(e,CKEDITOR.UI_RICHCOMBO,f)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(f){if(!f.blockless){for(var h=f.config,e=f.lang.format,k=h.format_tags.split(";"),d={},l=0,m=[],b=0;b<k.length;b++){var g=k[b],c=new CKEDITOR.style(h["format_"+g]);
if(!f.filter.customConfig||f.filter.check(c))l++,d[g]=c,d[g]._.enterMode=f.config.enterMode,m.push(c)}0!==l&&f.ui.addRichCombo("Format",{label:e.label,title:e.panelTitle,toolbar:"styles,20",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!1,attributes:{"aria-label":e.panelTitle}},init:function(){this.startGroup(e.panelTitle);for(var a in d){var b=e["tag_"+a];this.add(a,d[a].buildPreview(b),b)}},onClick:function(a){f.focus();f.fire("saveSnapshot");a=
d[a];var b=f.elementPath();a.checkActive(b,f)||f.applyStyle(a);setTimeout(function(){f.fire("saveSnapshot")},0)},onRender:function(){f.on("selectionChange",function(a){var b=this.getValue();a=a.data.path;this.refresh();for(var c in d)if(d[c].checkActive(a,f)){c!=b&&this.setValue(c,f.lang.format["tag_"+c]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in d)f.activeFilter.check(d[a])||this.hideItem(a)},refresh:function(){var a=f.elementPath();if(a){if(a.isContextFor("p"))for(var b in d)if(f.activeFilter.check(d[b]))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"},function(){var f={canUndo:!1,exec:function(f){var e=f.document.createElement("hr");f.insertElement(e)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||(h.addCommand("horizontalrule",f),h.ui.addButton&&h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(f){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=
f.config.forceSimpleAmpersand;h.indentationChars=f.config.dataIndentationChars||"\t";f.dataProcessor.writer=h}}),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 f=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},f.$nonBodyContent,f.$block,f.$listItem,f.$tableContent))this.setRules(h,
{indent:!f[h]["#"],breakBeforeOpen:1,breakBeforeClose:!f[h]["#"],breakAfterClose:1,needsSpace:h in f.$block&&!(h 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(f){var h=this._.rules[f];this._.afterCloser&&h&&h.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():h&&h.breakBeforeOpen&&
(this.lineBreak(),this.indentation());this._.output.push("\x3c",f);this._.afterCloser=0},openTagClose:function(f,h){var e=this._.rules[f];h?(this._.output.push(this.selfClosingEnd),e&&e.breakAfterClose&&(this._.needsSpace=e.needsSpace)):(this._.output.push("\x3e"),e&&e.indent&&(this._.indentation+=this.indentationChars));e&&e.breakAfterOpen&&this.lineBreak();"pre"==f&&(this._.inPre=1)},attribute:function(f,h){"string"==typeof h&&(this.forceSimpleAmpersand&&(h=h.replace(/&amp;/g,"\x26")),h=CKEDITOR.tools.htmlEncodeAttr(h));
this._.output.push(" ",f,'\x3d"',h,'"')},closeTag:function(f){var h=this._.rules[f];h&&h.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():h&&h.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",f,"\x3e");"pre"==f&&(this._.inPre=0);h&&h.breakAfterClose&&(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(f){this._.indent&&(this.indentation(),!this._.inPre&&(f=CKEDITOR.tools.ltrim(f)));
this._.output.push(f)},comment:function(f){this._.indent&&this.indentation();this._.output.push("\x3c!--",f,"--\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(f,h){var e=
this._.rules[f];e?CKEDITOR.tools.extend(e,h,!0):this._.rules[f]=h}}}),"use strict",function(){function f(b,c){CKEDITOR.tools.extend(this,{editor:b,editable:b.editable(),doc:b.document,win:b.window},c,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function h(b,c){CKEDITOR.tools.extend(this,c,{editor:b},!0)}function e(b,c){var a=b.editable();CKEDITOR.tools.extend(this,{editor:b,editable:a,inline:a.isInline(),doc:b.document,
win:b.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},c,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var e=CKEDITOR.tools.bind(this.queryViewport,this),f=CKEDITOR.tools.bind(this.hideVisible,this),h=CKEDITOR.tools.bind(this.removeAll,this);a.attachListener(this.winTop,"resize",e);a.attachListener(this.winTop,"scroll",e);a.attachListener(this.winTop,"resize",f);a.attachListener(this.win,"scroll",f);a.attachListener(this.inline?
a: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);a.attachListener(b,"resize",e);a.attachListener(b,"mode",h);b.on("destroy",h);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({},
l,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function k(d){var c;if(c=d&&d.type==CKEDITOR.NODE_ELEMENT)c=!(m[d.getComputedStyle("float")]||m[d.getAttribute("align")]);return c&&
!b[d.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;f.prototype={start:function(b){var c=this,a=this.editor,d=this.doc,e,f,h,k,l=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(c.relations={},(f=d.$.elementFromPoint(h,k))&&f.nodeType&&(e=new CKEDITOR.dom.element(f),c.traverseSearch(e),isNaN(h+k)||c.pixelSearch(e,h,k),b&&b(c.relations,h,k)))});this.listener=this.editable.attachListener(this.target,
"mousemove",function(a){h=a.data.$.clientX;k=a.data.$.clientY;l.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){l.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var b={};b[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;b[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;b[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(c){var a=this.editor.createRange();a.moveToPosition(this.relations[c.uid].element,
b[c.type]);return a}}(),store:function(){function b(c,a,d){var e=c.getUniqueId();e in d?d[e].type|=a:d[e]={element:c,type:a}}return function(c,a){var d;a&CKEDITOR.LINEUTILS_AFTER&&k(d=c.getNext())&&d.isVisible()&&(b(d,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_AFTER);a&CKEDITOR.LINEUTILS_INSIDE&&k(d=c.getFirst())&&d.isVisible()&&(b(d,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_INSIDE);b(c,a,this.relations)}}(),traverseSearch:function(b){var c,a,d;do if(d=b.$["data-cke-expando"],
!(d&&d in this.relations)){if(b.equals(this.editable))break;if(k(b))for(c in this.lookups)(a=this.lookups[c](b))&&this.store(b,a)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(a,d,e,f,g){for(var h=0,l;g(e);){e+=f;if(25==++h)break;if(l=this.doc.$.elementFromPoint(d,e))if(l==a)h=0;else if(c(a,l)&&(h=0,k(l=new CKEDITOR.dom.element(l))))return l}}var c=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:
function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(a,c,d){var e=this.win.getViewPaneSize().height,f=b.call(this,a.$,c,d,-1,function(a){return 0<a});c=b.call(this,a.$,c,d,1,function(a){return a<e});if(f)for(this.traverseSearch(f);!f.getParent().equals(a);)f=f.getParent();if(c)for(this.traverseSearch(c);!c.getParent().equals(a);)c=c.getParent();for(;f||c;){f&&(f=f.getNext(k));if(!f||f.equals(c))break;this.traverseSearch(f);c&&(c=c.getPrevious(k));if(!c||c.equals(f))break;this.traverseSearch(c)}}}(),
greedySearch:function(){this.relations={};for(var b=this.editable.getElementsByTag("*"),c=0,a,d,e;a=b.getItem(c++);)if(!a.equals(this.editable)&&a.type==CKEDITOR.NODE_ELEMENT&&(a.hasAttribute("contenteditable")||!a.isReadOnly())&&k(a)&&a.isVisible())for(e in this.lookups)(d=this.lookups[e](a))&&this.store(a,d);return this.relations}};h.prototype={locate:function(){function b(c,a){var d=c.element[a===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return d&&k(d)?(c.siblingRect=d.getClientRect(),
a==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):a==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(c){var a;this.locations={};for(var d in c)a=c[d],a.elementRect=a.element.getClientRect(),a.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(d,CKEDITOR.LINEUTILS_BEFORE,b(a,CKEDITOR.LINEUTILS_BEFORE)),a.type&CKEDITOR.LINEUTILS_AFTER&&this.store(d,CKEDITOR.LINEUTILS_AFTER,b(a,CKEDITOR.LINEUTILS_AFTER)),a.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(d,CKEDITOR.LINEUTILS_INSIDE,(a.elementRect.top+a.elementRect.bottom)/2);return this.locations}}(),sort:function(){var b,c,a,d;return function(e,f){b=this.locations;c=[];for(var h in b)for(var k in b[h])if(a=Math.abs(e-b[h][k]),c.length){for(d=0;d<c.length;d++)if(a<c[d].dist){c.splice(d,0,{uid:+h,type:k,dist:a});break}d==c.length&&c.push({uid:+h,type:k,dist:a})}else c.push({uid:+h,type:k,dist:a});return"undefined"!=typeof f?c.slice(0,f):c}}(),store:function(b,
c,a){this.locations[b]||(this.locations[b]={});this.locations[b][c]=a}};var d={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},l={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};e.prototype={removeAll:function(){for(var b in this.hidden)this.hidden[b].remove(),delete this.hidden[b];for(b in this.visible)this.visible[b].remove(),delete this.visible[b]},hideLine:function(b){var c=b.getUniqueId();
b.hide();this.hidden[c]=b;delete this.visible[c]},showLine:function(b){var c=b.getUniqueId();b.show();this.visible[c]=b;delete this.hidden[c]},hideVisible:function(){for(var b in this.visible)this.hideLine(this.visible[b])},placeLine:function(b,c){var a,d,e;if(a=this.getStyle(b.uid,b.type)){for(e in this.visible)if(this.visible[e].getCustomData("hash")!==this.hash){d=this.visible[e];break}if(!d)for(e in this.hidden)if(this.hidden[e].getCustomData("hash")!==this.hash){this.showLine(d=this.hidden[e]);
break}d||this.showLine(d=this.addLine());d.setCustomData("hash",this.hash);this.visible[d.getUniqueId()]=d;d.setStyles(a);c&&c(d)}},getStyle:function(b,c){var a=this.relations[b],d=this.locations[b][c],e={};e.width=a.siblingRect?Math.max(a.siblingRect.width,a.elementRect.width):a.elementRect.width;e.top=this.inline?d+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+d;if(e.top-this.winTopScroll.y<this.rect.top||e.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
e.left=a.elementRect.left-this.rect.relativeX:(0<a.elementRect.left?e.left=this.rect.left+a.elementRect.left:(e.width+=a.elementRect.left,e.left=this.rect.left),0<(a=e.left+e.width-(this.rect.left+this.winPane.width))&&(e.width-=a));e.left+=this.winTopScroll.x;for(var f in e)e[f]=CKEDITOR.tools.cssLength(e[f]);return e},addLine:function(){var b=CKEDITOR.dom.element.createFromHtml(this.lineTpl);b.appendTo(this.container);return b},prepare:function(b,c){this.relations=b;this.locations=c;this.hash=Math.random()},
cleanup:function(){var b,c;for(c in this.visible)b=this.visible[c],b.getCustomData("hash")!==this.hash&&this.hideLine(b)},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(b){b=b.getClientRect();var c=this.container.getDocumentPosition(),a=this.container.getComputedStyle("position");b.relativeX=b.relativeY=
0;"static"!=a&&(b.relativeY=c.y,b.relativeX=c.x,b.top-=b.relativeY,b.bottom-=b.relativeY,b.left-=b.relativeX,b.right-=b.relativeX);return b}};var m={left:1,right:1,center:1},b={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:f,locator:h,liner:e}}(),function(){function f(f){return f.getName&&!f.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(f){if(CKEDITOR.env.webkit){var e=CKEDITOR.plugins.widgetselection;f.on("contentDom",function(f){f=f.editor;var d=f.editable();
d.attachListener(d,"keydown",function(f){f.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){e.addFillers(d)||e.removeFillers(d)},0)},null,null,-1);f.on("selectionCheck",function(d){e.removeFillers(d.editor.editable())});f.on("paste",function(d){d.data.dataValue=e.cleanPasteData(d.data.dataValue)});"selectall"in f.plugins&&e.addSelectAllIntegration(f)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",
fillerTagName:"div",addFillers:function(h){var e=h.editor;if(!this.isWholeContentSelected(h)&&0<h.getChildCount()){var k=h.getFirst(f),d=h.getLast(f);k&&k.type==CKEDITOR.NODE_ELEMENT&&!k.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));d&&d.type==CKEDITOR.NODE_ELEMENT&&!d.isEditable()&&(this.endFiller=this.createFiller(!0),h.append(this.endFiller,0));if(this.hasFiller(h))return e=e.createRange(),e.selectNodeContents(h),e.select(),!0}return!1},removeFillers:function(f){if(this.hasFiller(f)&&
!this.isWholeContentSelected(f)){var e=f.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),k=f.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&e&&this.startFiller.equals(e)?this.removeFiller(this.startFiller,f):this.startFiller=e;this.endFiller&&k&&this.endFiller.equals(k)?this.removeFiller(this.endFiller,f):this.endFiller=k}},cleanPasteData:function(f){f&&f.length&&(f=f.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));
return f},isWholeContentSelected:function(f){var e=f.editor.getSelection().getRanges()[0];return!e||e&&e.collapsed?!1:(e=e.clone(),e.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(e&&f&&e.startContainer&&e.endContainer&&0===e.startOffset&&e.endOffset===f.getChildCount()&&e.startContainer.equals(f)&&e.endContainer.equals(f)))},hasFiller:function(f){return 0<f.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(f){var e=new CKEDITOR.dom.element(this.fillerTagName);e.setHtml(this.fillerContent);
e.setAttribute(this.fillerAttribute,f?"end":"start");e.setAttribute("data-cke-temp",1);e.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return e},removeFiller:function(f,e){if(f){var k=e.editor,d=e.editor.getSelection().getRanges()[0].startPath(),l=k.createRange(),m,b;d.contains(f)&&(m=f.getHtml(),b=!0);d="start"==f.getAttribute(this.fillerAttribute);f.remove();m&&0<m.length&&m!=this.fillerContent?(e.insertHtmlIntoRange(m,
k.getSelection().getRanges()[0]),l.setStartAt(e.getChild(e.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),k.getSelection().selectRanges([l])):b&&(d?l.setStartAt(e.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):l.setEndAt(e.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),e.editor.getSelection().selectRanges([l]))}},createFillerRegex:function(f){var e=this.createFiller(f).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((f?
"":"^")+e+(f?"$":""))},addSelectAllIntegration:function(f){var e=this;f.editable().attachListener(f,"beforeCommandExec",function(k){var d=f.editable();"selectAll"==k.data.name&&d&&e.addFillers(d)},null,null,9999)}}}(),"use strict",function(){function f(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};I(this);z(this);this.on("checkWidgets",m);this.editor.on("contentDomInvalidated",
this.checkWidgets,this);x(this);B(this);u(this);C(this);y(this)}function h(a,b,c,d,e){var f=a.editor;CKEDITOR.tools.extend(this,d,{editor:f,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:h.prototype.edit,focusedEditable:null,definition:d,repository:a,draggable:!1!==d.draggable,_:{downcastFn:d.downcast&&"string"==typeof d.downcast?d.downcasts[d.downcast]:d.downcast}},!0);
a.fire("instanceCreated",this);Z(this,d);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;Q(this);this.fire("data",this.data);this.isInited()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function e(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.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 k(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(h)}var e=a.widgets.focused;if(e&&e.name==b.name)e.edit();else if(b.insert)b.insert();else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.dom.element.createFromHtml(b.template.output(e)),
f,g=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(e,b,c&&c.startupData))?(e=f.once("edit",function(b){if(b.data.dialog)f.once("dialog",function(b){b=b.data;var c,e;c=b.once("ok",d,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(f,!0)});b.once("hide",function(){c.removeListener();e.removeListener()})});else d()},null,null,999),f.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent,
requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function d(a,b){function c(a,d){var e=b.upcast.split(","),f,g;for(g=0;g<e.length;g++)if(f=e[g],f===a.name)return b.upcasts[f].call(this,a,d);return!1}function d(b,c,e){var f=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c,
b,f):d(e,b,f))}function l(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function m(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,g;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();d<e;d++){f=k.getItem(d);if(g=!this.getByElement(f,
!0)){a:{g=p;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"),c.push(this.initOn(f.getFirst(h.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function b(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=g(a),d=c(a),e=!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;"),e=!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;"),e=!0);e&&(a.attributes["data-cke-widget-white-space"]=1)}}function g(a){return a.find(function(a){return 3===a.type},!0).shift()}function c(a){return a.find(function(a){return 3===a.type},!0).pop()}function a(a,b,c){if(!c.allowedContent&&!c.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[b];a||(a=c.allowedContent?new CKEDITOR.filter(c.allowedContent):this.editor.filter.clone(),d[b]=a,c.disallowedContent&&a.disallow(c.disallowedContent));
return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,f,g,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(h.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(e=d.length;k<e;++k)if(!1===d[k](a))return;for(k=0;k<l;++k)if(e=c[k],g={},f=e[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,e[1]]),!1}}}}function w(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,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||
d.remove();return v(e,b,c)}}a.add(c,b)}function t(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function p(a){return a.hasAttribute("data-cke-temp")}function q(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),
b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function A(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function r(a,b){return CKEDITOR.tools.trim(b)}function C(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;h.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id",
d.id),b.focus(),d.focus())});b.on("drop",function(c){var d=c.data.dataTransfer,e=d.getData("cke/widget-id"),f=d.getTransferType(b),d=b.createRange();""!==e&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c.cancel():""!==e&&f==CKEDITOR.DATA_TRANSFER_INTERNAL&&(e=a.instances[e])&&(d.setStartBefore(e.wrapper),d.setEndAfter(e.wrapper),c.data.dragRange=d,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",
b.editable().getHtmlFromRange(d).getHtml()),b.widgets.destroy(e,!0))});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!h.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=h.getNestedEditable(d,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|
CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function B(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,f;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();e=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;f=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&
d.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=e&&b.getSelection().removeAllRanges()):h.getNestedEditable(e.wrapper,d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){f&&e&&e.wrapper&&(f=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!h.getNestedEditable(c.wrapper,
b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function u(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&
d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function y(a){function b(c){a.focused&&G(a.focused,"cut"==c.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function x(a){var b=a.editor;b.on("selectionCheck",function(){a.fire("checkSelection")});a.on("checkSelection",a.checkSelection,a);b.on("selectionChange",function(c){var d=(c=h.getNestedEditable(b.editable(),c.data.selection.getStartElement()))&&
a.getByElement(c),e=a.widgetHoldingFocusedEditable;e?e===d&&e.focusedEditable.equals(c)||(q(a,e,null),d&&c&&q(a,d,c)):d&&c&&q(a,d,c)});b.on("dataReady",function(){F(a).commit()});b.on("blur",function(){var b;(b=a.focused)&&l(a,b);(b=a.widgetHoldingFocusedEditable)&&q(a,b,null)})}function z(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=e;d[e]=f;b.data.dataValue.forEach(function(b){var d=b.attributes,e;if("data-cke-widget-white-space"in
d){e=g(b);var k=c(b);e.parent.attributes["data-cke-white-space-first"]&&(e.value=e.value.replace(/^&nbsp;/g," "));k.parent.attributes["data-cke-white-space-last"]&&(k.value=k.value.replace(/&nbsp;$/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])e=b.getFirst(h.isParserWidgetElement),f.push({wrapper:b,element:e,widget:d,editables:{}}),"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in d)return 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){a=d[a.data.downcastingSessionId];for(var b,c,e,f,g,h;b=a.shift();){c=b.widget;e=b.element;f=c._.downcastFn&&c._.downcastFn.call(c,e);for(h in b.editables)g=b.editables[h],delete g.attributes.contenteditable,g.setHtml(c.editables[h].getData());f||(f=e);b.wrapper.replaceWith(f)}}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}
function I(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=n(a),e;for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);e=d.toBeWrapped.pop();){var f=e[0],g=f.parent;g.type==CKEDITOR.NODE_ELEMENT&&g.attributes["data-cke-widget-wrapper"]&&g.replaceWith(f);a.wrapElement(e[0],e[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[0])},
null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),e,f,g=0,k=c.count();g<k;++g)e=c.getItem(g),f=e.getFirst(h.isDomWidgetElement),f.type==CKEDITOR.NODE_ELEMENT&&f.data("widget")?(f.replace(e),a.wrapElement(f)):e.remove();d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(V,r);a.range&&(a=h.getNestedEditable(b.editable(),
a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}function F(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},
commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&l(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function E(a,b,c){var d=0;b=L(b);var e=a.data.classes||{},f;if(b){for(e=
CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function H(a){a.cancel()}function G(a,b){var c=a.editor,d=c.document,e=CKEDITOR.env.edge&&16<=CKEDITOR.env.version;if(!d.getById("cke_copybin")){var f=!c.blockless&&!CKEDITOR.env.ie||e?"div":"span",e=d.createElement(f),g=d.createElement(f),f=CKEDITOR.env.ie&&9>CKEDITOR.env.version;g.setAttributes({id:"cke_copybin","data-cke-temp":"1"});e.setStyles({position:"absolute",width:"1px",height:"1px",
overflow:"hidden"});e.setStyle("ltr"==c.config.contentsLangDirection?"left":"right","-5000px");var h=c.createRange();h.setStartBefore(a.wrapper);h.setEndAfter(a.wrapper);e.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+c.editable().getHtmlFromRange(h).getHtml()+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("saveSnapshot");c.fire("lockSnapshot");g.append(e);c.editable().append(g);var k=c.on("selectionChange",H,null,null,0),l=a.repository.on("checkSelection",H,
null,null,0);if(f)var m=d.getDocumentElement().$,q=m.scrollTop;h=c.createRange();h.selectNodeContents(e);h.select();f&&(m.scrollTop=q);setTimeout(function(){b||a.focus();g.remove();k.removeListener();l.removeListener();c.fire("unlockSnapshot");b&&!c.readOnly&&(a.repository.del(a),c.fire("saveSnapshot"))},100)}}function L(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function O(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&
b.focusManager.focus(c)}function D(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function S(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function J(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 R(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.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)"}),d=new CKEDITOR.dom.element("img",b.document),d.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&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));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&&(d.on("mousedown",K,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",
function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function K(a){function b(){var c;for(r.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=
this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var q=c.greedySearch(),r=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(q);k=d.sort(m,1);k.length&&(e.prepare(q,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;r.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 U(a){var b,c,d=a.editables;a.editables={};if(a.editables)for(b in d)c=d[b],a.initEditable(b,"string"==typeof c?{selector:c}:c)}function X(a){if(a.mask){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 Y(a){if(a.parts){var b={},c,d;for(d in a.parts)c=a.wrapper.findOne(a.parts[d]),
b[d]=c;a.parts=b}}function Z(a,b){M(a);Y(a);U(a);X(a);R(a);S(a);J(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||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(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){G(a,b==CKEDITOR.CTRL+88);return}if(b in T||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 M(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function Q(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function N(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}var c={};CKEDITOR.style.addCustomHandler({type:"widget",
setup:function(a){this.widget=a.widget;if(this.group="string"==typeof a.group?[a.group]:a.group){a=this.widget;var b;c[a]||(c[a]={});for(var d=0,e=this.group.length;d<e;d++)b=this.group[d],c[a][b]||(c[a][b]=[]),c[a][b].push(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,d,e=!1;if(!(a instanceof CKEDITOR.editor))return!1;d=a.elementPath();if(this.checkApplicable(d,a))for(var f=0,g=this.group.length;f<g;f++){b=c[this.widget][this.group[f]];for(var h=0;h<b.length;h++)b[h]!==this&&b[h].checkActive(d,a)&&(a.widgets.focused.removeStyle(b[h]),e=!0)}return e},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 h.isDomWidgetWrapper(a)?(a=a.getFirst(h.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,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;c[a.styleableElements]={classes:b,propertiesOnly:!0};
return c}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:none;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}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_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}"),
N())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new f(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});A(a)}}});f.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,b){b=CKEDITOR.tools.prototypedCopy(b);b.name=a;b._=b._||{};this.editor.fire("widgetDefinition",
b);b.template&&(b.template=new CKEDITOR.template(b.template));k(this.editor,b);d(this,b);return this.registered[a]=b},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=F(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=h.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));
c.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&q(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,
b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f<e;++f)(c=this.getByElement(d.getItem(f),!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&h.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;
var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(),initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new h(this,this._.nextId++,a,b,c),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=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(h.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?
c:null},wrapElement:function(a,c){var d=null,e,f;if(a instanceof CKEDITOR.dom.element){c=c||a.data("widget");e=this.registered[c];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",c);(f=t(e,a.getName()))&&b(a);d=new CKEDITOR.dom.element(f?"span":"div");d.setAttributes(w(f,c));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){c=c||a.attributes["data-widget"];e=this.registered[c];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);c&&(a.attributes["data-widget"]=c);(f=t(e,a.name))&&b(a);d=new CKEDITOR.htmlParser.element(f?"span":"div",w(f,c));d.attributes["data-cke-display-name"]=
e.pathName?e.pathName:a.name;e=a.parent;var g;e&&(g=a.getIndex(),a.remove());d.add(a);e&&v(e,g,d)}return d},_tests_createEditableFilter:a};CKEDITOR.event.implementOn(f.prototype);h.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(h.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){E(this,a,1)},checkStyleActive:function(a){a=L(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 c=this.editables[a];c.removeListener("focus",D);c.removeListener("blur",O);this.editor.focusManager.remove(c);b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),
c.removeClass("cke_widget_editable_focused"),c.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 c,d;!1!==b.fire("dialog",a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);
d.removeListener();c&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){c.removeListener();d.removeListener()}))});return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(b,c){var d=this._findOneNotNested(c.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new e(this.editor,d,{filter:a.call(this.repository,this.name,b,c)}),this.editables[b]=
d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":b,"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"),c.pathName&&d.data("cke-display-name",c.pathName),this.editor.focusManager.add(d),d.on("focus",D,this),CKEDITOR.env.ie&&d.on("blur",O,this),d._.initialSetData=!0,d.setData(d.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=
a.getItem(d),c=b.getAscendant(h.isDomWidgetWrapper),this.wrapper.equals(c))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()},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(h.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){E(this,
a,0)},setData:function(a,b){var c=this.data,d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=e[a])}d&&this.dataReady&&(Q(this),this.fire("data",c));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.$,c=this._.dragHandlerOffset,b={x:b.offsetLeft,y:b.offsetTop-15};c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px",display:"block"}),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(h.prototype);h.getNestedEditable=function(a,b){return!b||b.equals(a)?null:h.isDomNestedEditable(b)?b:h.getNestedEditable(a,b.getParent())};h.isDomDragHandler=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};h.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};h.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};h.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};h.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};
h.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};h.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};h.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};h.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";e.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.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 V=/^(?:<(?: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,
T={37:1,38:1,39:1,40:1,8:1,46:1};CKEDITOR.plugins.widget=h;h.repository=f;h.nestedEditable=e}(),"use strict",function(){function f(b){function d(){this.deflated||(b.widgets.focused==this.widget&&(this.focused=!0),b.widgets.destroy(this.widget),this.deflated=!0)}function f(){var a=b.editable(),c=b.document;if(this.deflated)this.widget=b.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,a)).block&&(a=c.createElement(b.activeEnterMode==
CKEDITOR.ENTER_P?"p":"div"),a.replace(this.widget.wrapper),this.widget.wrapper.move(a)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var d=this.widget,a=g,c=d.wrapper,e=d.data.align,d=d.data.hasCaption;if(a){for(var h=3;h--;)c.removeClass(a[h]);"center"==e?d&&c.addClass(a[1]):"none"!=e&&c.addClass(a[v[e]])}else"center"==e?(d?c.setStyle("text-align","center"):c.removeStyle("text-align"),c.removeStyle("float")):("none"==e?c.removeStyle("float"):c.setStyle("float",
e),c.removeStyle("text-align"))}}var g=b.config.image2_alignClasses,k=b.config.image2_captionedClass;return{allowedContent:c(b),requiredContent:"img[src,alt]",features:a(b),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 a=this.features;
this.data.hasCaption&&!b.filter.checkFeature(a.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||b.filter.checkFeature(a.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:d,inflate:f});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 c in this.data.classes)this.parts.image.removeClass(c);if(b.filter.checkFeature(a.dimension)){a=this.data;a={width:a.width,height:a.height};c=this.parts.image;for(var e in a)a[e]?c.setAttribute(e,a[e]):c.removeAttribute(e)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var a=CKEDITOR.plugins.image2,c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.getAttribute("width")||
"",height:c.getAttribute("height")||"",lock:this.ready?a.checkHasNaturalRatio(c):!0},e=c.getAscendant("a");e&&this.wrapper.contains(e)&&(this.parts.link=e);d.align||(c=d.hasCaption?this.element:c,g?(c.hasClass(g[0])?d.align="left":c.hasClass(g[2])&&(d.align="right"),d.align?c.removeClass(g[v[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float")));b.plugins.link&&this.parts.link&&(d.link=a.getLinkAttributesParser()(b,this.parts.link),(c=d.link.advanced)&&c.advCSSClasses&&
(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(d);b.filter.checkFeature(this.features.dimension)&&!0!==b.config.image2_disableResizer&&1!=b.readOnly&&l(this);this.shiftState=a.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});this.on("dialog",
function(a){a.data.widget=this},this)},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(k,g).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:h(b),downcast:e(b),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||
"")+" "+this.pathName)}}}function h(a){var b=k(a),c=a.config.image2_captionedClass;return function(a,e){var f={width:1,height:1},g=a.name,h;if(!a.attributes["data-cke-realelement"]&&(b(a)?("div"==g&&(h=a.getFirst("figure"))&&(a.replaceWith(h),a=h),e.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==g&&a.hasClass(c)?h=a.getFirst("img")||a.getFirst("a").getFirst("img"):d(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in f)(f=h.attributes[k])&&f.match(t)&&delete h.attributes[k];
return a}}}function e(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 k(a){var b=a.config.image2_captionedClass,c=a.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(!d(g))return!1}else if("figure"==g.name){if(!g.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!d(g))return!1;return(c?f.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(f.attributes.style||
"",!0)["text-align"])?!0:!1}}function d(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function l(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(){U=t+m*Z;X=Math.round(U/y)}function k(){X=B-M;U=Math.round(X*y)}var l=a.parts.image,m="right"==a.data.align?-1:1,n=f.data.$.screenX,u=f.data.$.screenY,t=l.$.clientWidth,B=l.$.clientHeight,y=t/B,w=[],v="cke_image_s"+(~m?"e":"w"),K,U,X,Y,Z,M,Q;b.fire("saveSnapshot");g("mousemove",
function(a){K=a.data.$;Z=K.screenX-n;M=u-K.screenY;Q=Math.abs(Z/M);1==m?0>=Z?0>=M?h():Q>=y?h():k():0>=M?Q>=y?k():h():k():0>=Z?0>=M?Q>=y?k():h():k():0>=M?h():Q>=y?h():k();15<=U&&15<=X?(l.setAttributes({width:U,height:X}),Y=!0):Y=!1},w);g("mouseup",function(){for(var d;d=w.pop();)d.removeListener();c.removeClass(v);e.removeClass("cke_image_resizing");Y&&(a.setData({width:U,height:X}),b.fire("saveSnapshot"));Y=!1},w);c.addClass(v);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==
a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function m(a){var b=[],c;return function(d){var e=a.getCommand("justify"+d);if(e){b.push(function(){e.refresh(a,a.elementPath())});if(d in{right:1,left:1,center:1})e.on("exec",function(c){var e=g(a);if(e){e.setData("align",d);for(e=b.length;e--;)b[e]();c.cancel()}});e.on("refresh",function(b){var e=g(a),f={right:1,left:1,center:1};e&&(void 0===c&&(c=a.filter.checkFeature(a.widgets.registered.image.features.align)),c?this.setState(e.data.align==
d?CKEDITOR.TRISTATE_ON:d in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function b(a){a.plugins.link&&(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=g(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=g(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.getCommand("unlink").on("exec",function(b){var c=g(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=g(a);c&&(this.setState(c.data.link||c.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())}))}
function g(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function c(a){var b=a.config.image2_alignClasses;a={div:{match:k(a)},p:{match:k(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 a(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 w=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},t=/^\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_widget_wrapper\x3ea{display:inline-block}")},
init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,c=a.lang.image2,d=f(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;d.pathName=c.pathName;d.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",d);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:c.menu,command:"image",
group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var c={left:1,right:1,center:1,block:1},d=m(a),e;for(e in c)d(e);b(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(w.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 f(f,d){var l,m;d.on("refresh",function(b){var d=[h],c;for(c in b.data.states)d.push(b.data.states[c]);this.setState(CKEDITOR.tools.search(d,e)?e:h)},d,null,100);d.on("exec",function(b){l=f.getSelection();
m=l.createBookmarks(1);b.data||(b.data={});b.data.done=!1},d,null,0);d.on("exec",function(){f.forceNextSelectionCheck();l.selectBookmarks(m)},d,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,e=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(e){var d=CKEDITOR.plugins.indent.genericDefinition;f(e,e.addCommand("indent",new d(!0)));f(e,e.addCommand("outdent",new d));e.ui.addButton&&(e.ui.addButton("Indent",{label:e.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),
e.ui.addButton("Outdent",{label:e.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));e.on("dirChanged",function(d){var f=e.createRange(),b=d.data.node;f.setStartBefore(b);f.setEndAfter(b);for(var g=new CKEDITOR.dom.walker(f),c;c=g.next();)if(c.type==CKEDITOR.NODE_ELEMENT)if(!c.equals(b)&&c.getDirection())f.setStartAfter(c),g=new CKEDITOR.dom.walker(f);else{var a=e.config.indentClasses;if(a)for(var h="ltr"==d.data.dir?["_rtl",""]:["","_rtl"],w=0;w<a.length;w++)c.hasClass(a[w]+
h[0])&&(c.removeClass(a[w]+h[0]),c.addClass(a[w]+h[1]));a=c.getStyle("margin-right");h=c.getStyle("margin-left");a?c.setStyle("margin-left",a):c.removeStyle("margin-left");h?c.setStyle("margin-right",h):c.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(e){this.isIndent=!!e;this.startDisabled=!this.isIndent},specificDefinition:function(e,d,f){this.name=d;this.editor=e;this.jobs={};this.enterBr=e.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!f;this.relatedGlobal=
f?"indent":"outdent";this.indentKey=f?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(e,d){e.on("pluginsLoaded",function(){for(var e in d)(function(d,b){var e=d.getCommand(b.relatedGlobal),c;for(c in b.jobs)e.on("exec",function(a){a.data.done||(d.fire("lockSnapshot"),b.execJob(d,c)&&(a.data.done=!0),d.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,c),e.on("refresh",function(a){a.data.states||(a.data.states={});a.data.states[b.name+"@"+c]=b.refreshJob(d,
c,a.data.path)},this,null,c);d.addFeature(b)})(this,d[e])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(e,d){var f=this.jobs[d];if(f.state!=h)return f.exec.call(this,e)},refreshJob:function(e,d,f){d=this.jobs[d];e.activeFilter.checkFeature(this)?d.state=d.refresh.call(this,e,f):d.state=h;return d.state},getContext:function(e){return e.contains(this.context)}}}(),function(){function f(b){function d(g){for(var h=
k.startContainer,l=k.endContainer;h&&!h.getParent().equals(g);)h=h.getParent();for(;l&&!l.getParent().equals(g);)l=l.getParent();if(!h||!l)return!1;for(var m=[],t=!1;!t;)h.equals(l)&&(t=!0),m.push(h),h=h.getNext();if(1>m.length)return!1;h=g.getParents(!0);for(l=0;l<h.length;l++)if(h[l].getName&&f[h[l].getName()]){g=h[l];break}for(var h=c.isIndent?1:-1,l=m[0],m=m[m.length-1],t=CKEDITOR.plugins.list.listToArray(g,a),u=t[m.getCustomData("listarray_index")].indent,l=l.getCustomData("listarray_index");l<=
m.getCustomData("listarray_index");l++)if(t[l].indent+=h,0<h){for(var p=t[l].parent,x=l-1;0<=x;x--)if(t[x].indent===h){p=t[x].parent;break}t[l].parent=new CKEDITOR.dom.element(p.getName(),p.getDocument())}for(l=m.getCustomData("listarray_index")+1;l<t.length&&t[l].indent>u;l++)t[l].indent+=h;h=CKEDITOR.plugins.list.arrayToList(t,a,null,b.config.enterMode,g.getDirection());if(!c.isIndent){var z;if((z=g.getParent())&&z.is("li"))for(var m=h.listNode.getChildren(),v=[],F,l=m.count()-1;0<=l;l--)(F=m.getItem(l))&&
F.is&&F.is("li")&&v.push(F)}h&&h.listNode.replace(g);if(v&&v.length)for(l=0;l<v.length;l++){for(F=g=v[l];(F=F.getNext())&&F.is&&F.getName()in f;)CKEDITOR.env.needsNbspFiller&&!g.getFirst(e)&&g.append(k.document.createText(" ")),g.append(F);g.insertAfter(z)}h&&b.fire("contentDomInvalidated");return!0}for(var c=this,a=this.database,f=this.context,k,l=b.getSelection(),l=(l&&l.getRanges()).createIterator();k=l.getNextRange();){for(var m=k.getCommonAncestor();m&&(m.type!=CKEDITOR.NODE_ELEMENT||!f[m.getName()]);){if(b.editable().equals(m)){m=
!1;break}m=m.getParent()}m||(m=k.startPath().contains(f))&&k.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);if(!m){var p=k.getEnclosedNode();p&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()in f&&(k.setStartAt(p,CKEDITOR.POSITION_AFTER_START),k.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),m=p)}m&&k.startContainer.type==CKEDITOR.NODE_ELEMENT&&k.startContainer.getName()in f&&(p=new CKEDITOR.dom.walker(k),p.evaluator=h,k.startContainer=p.next());m&&k.endContainer.type==CKEDITOR.NODE_ELEMENT&&k.endContainer.getName()in
f&&(p=new CKEDITOR.dom.walker(k),p.evaluator=h,k.endContainer=p.previous());if(m)return d(m)}return 0}function h(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.is("li")}function e(b){return k(b)&&d(b)}var k=CKEDITOR.dom.walker.whitespaces(!0),d=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function d(a){c.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,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?m:l}:function(a,b){return!this.getContext(b)||this.isIndent?l:m},
exec:CKEDITOR.tools.bind(f,this)}}var c=CKEDITOR.plugins.indent;c.registerCommands(b,{indentlist:new d(b,"indentlist",!0),outdentlist:new d(b,"outdentlist")});CKEDITOR.tools.extend(d.prototype,c.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(b,d,c){var a=d.contains(h);c||(c=d.contains(b));return c&&a&&a.equals(c.getFirst(h))}}(),function(){function f(e,d){d=void 0===d||d;var f;if(d)f=e.getComputedStyle("text-align");
else{for(;!e.hasAttribute||!e.hasAttribute("align")&&!e.getStyle("text-align");){f=e.getParent();if(!f)break;e=f}f=e.getStyle("text-align")||e.getAttribute("align")||""}f&&(f=f.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!f&&d&&(f="rtl"==e.getComputedStyle("direction")?"right":"left");return f}function h(e,d,f){this.editor=e;this.name=d;this.value=f;this.context="p";d=e.config.justifyClasses;var h=e.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(d){switch(f){case "left":this.cssClassName=
d[0];break;case "center":this.cssClassName=d[1];break;case "right":this.cssClassName=d[2];break;case "justify":this.cssClassName=d[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+d.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=h+"{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}};e.config.enterMode==CKEDITOR.ENTER_BR&&
(this.allowedContent.div=!0)}function e(e){var d=e.editor,f=d.createRange();f.setStartBefore(e.data.node);f.setEndAfter(e.data.node);for(var h=new CKEDITOR.dom.walker(f),b;b=h.next();)if(b.type==CKEDITOR.NODE_ELEMENT)if(!b.equals(e.data.node)&&b.getDirection())f.setStartAfter(b),h=new CKEDITOR.dom.walker(f);else{var g=d.config.justifyClasses;g&&(b.hasClass(g[0])?(b.removeClass(g[0]),b.addClass(g[2])):b.hasClass(g[2])&&(b.removeClass(g[2]),b.addClass(g[0])));g=b.getStyle("text-align");"left"==g?b.setStyle("text-align",
"right"):"right"==g&&b.setStyle("text-align","left")}}h.prototype={exec:function(e){var d=e.getSelection(),h=e.config.enterMode;if(d){for(var m=d.createBookmarks(),b=d.getRanges(),g=this.cssClassName,c,a,n=e.config.useComputedState,n=void 0===n||n,w=b.length-1;0<=w;w--)for(c=b[w].createIterator(),c.enlargeBr=h!=CKEDITOR.ENTER_BR;a=c.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){var v=a.getName(),t;t=e.activeFilter.check(v+"{text-align}");if((v=e.activeFilter.check(v+"("+g+")"))||
t){a.removeAttribute("align");a.removeStyle("text-align");var p=g&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),q=this.state==CKEDITOR.TRISTATE_OFF&&(!n||f(a,!0)!=this.value);g&&v?q?a.addClass(g):p||a.removeAttribute("class"):q&&t&&a.setStyle("text-align",this.value)}}e.focus();e.forceNextSelectionCheck();d.selectBookmarks(m)}},refresh:function(e,d){var h=d.block||d.blockLimit,m=h.getName(),b=h.equals(e.editable()),m=this.cssClassName?e.activeFilter.check(m+"("+
this.cssClassName+")"):e.activeFilter.check(m+"{text-align}");b&&1===d.elements.length?this.setState(CKEDITOR.TRISTATE_OFF):!b&&m?this.setState(f(h,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(f){if(!f.blockless){var d=new h(f,"justifyleft","left"),l=new h(f,"justifycenter","center"),m=new h(f,"justifyright","right"),b=new h(f,"justifyblock","justify");f.addCommand("justifyleft",
d);f.addCommand("justifycenter",l);f.addCommand("justifyright",m);f.addCommand("justifyblock",b);f.ui.addButton&&(f.ui.addButton("JustifyLeft",{label:f.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),f.ui.addButton("JustifyCenter",{label:f.lang.common.center,command:"justifycenter",toolbar:"align,20"}),f.ui.addButton("JustifyRight",{label:f.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),f.ui.addButton("JustifyBlock",{label:f.lang.common.justify,command:"justifyblock",
toolbar:"align,40"}));f.on("dirChanged",e)}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var f=function(f){var e=this._,k=e.menu;e.state!==CKEDITOR.TRISTATE_DISABLED&&(e.on&&k?k.hide():(e.previousState=e.state,k||(k=e.menu=new CKEDITOR.menu(f,{panel:{className:"cke_menu_panel",attributes:{"aria-label":f.lang.common.options}}}),k.onHide=CKEDITOR.tools.bind(function(){var d=this.command?f.getCommand(this.command).modes:this.modes;this.setState(!d||d[f.mode]?e.previousState:
CKEDITOR.TRISTATE_DISABLED);e.on=0},this),this.onMenu&&k.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),e.on=1,setTimeout(function(){k.show(CKEDITOR.document.getById(e.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){delete h.panel;this.base(h);this.hasArrow=!0;this.click=f},statics:{handler:{create:function(f){return new CKEDITOR.ui.menuButton(f)}}}})},beforeInit:function(f){f.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),
CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(f){var h=f.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],e=this,k=f.lang.language,d={},l,m,b,g;f.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(b,a){var e=d["language_"+a];if(e)b[e.style.checkActive(b.elementPath(),b)?"removeStyle":"applyStyle"](e.style)},refresh:function(b){this.setState(e.getCurrentLangElement(b)?
CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(g=0;g<h.length;g++)l=h[g].split(":"),m=l[0],b="language_"+m,d[b]={label:l[1],langId:m,group:"language",order:g,ltr:"rtl"!=(""+l[2]).toLowerCase(),onClick:function(){f.execCommand("language",this.langId)},role:"menuitemcheckbox"},d[b].style=new CKEDITOR.style({element:"span",attributes:{lang:m,dir:d[b].ltr?"ltr":"rtl"}});d.language_remove={label:k.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:d.length,onClick:function(){var b=
e.getCurrentLangElement(f);b&&f.execCommand("language",b.getAttribute("lang"))}};f.addMenuGroup("language",1);f.addMenuGroup("language_remove");f.addMenuItems(d);f.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:k.button,allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",toolbar:"bidi,30",command:"language",onMenu:function(){var b={},a=e.getCurrentLangElement(f),g;for(g in d)b[g]=CKEDITOR.TRISTATE_OFF;b.language_remove=a?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a&&(b["language_"+
a.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return b}});f.addRemoveFormatFilter&&f.addRemoveFormatFilter(function(b){return!(b.is("span")&&b.getAttribute("dir")&&b.getAttribute("lang"))})},getCurrentLangElement:function(f){var h=f.elementPath();f=h&&h.elements;var e;if(h)for(var k=0;k<f.length;k++)h=f[k],!e&&"span"==h.getName()&&h.hasAttribute("dir")&&h.hasAttribute("lang")&&(e=h);return e}})}(),function(){function f(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 h(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function e(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](v);)(f=e.getDirection(1))!==
b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d)}function k(b){function c(d){var f=b[d?"getPrevious":"getNext"](a);f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(b.getName())&&(e(b,f,null,!d),b.remove(),b=f)}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(b,c,d){b.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);
var f=d.extractContents();c.trim(!1,!0);var g=c.createBookmark(),h=new CKEDITOR.dom.elementPath(c.startContainer),l=h.block,h=h.lastElement.getAscendant("li",1)||l,u=new CKEDITOR.dom.elementPath(d.startContainer),y=u.contains(CKEDITOR.dtd.$listItem),u=u.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():u&&(l=u.getPrevious(a))&&n(l)&&l.remove();(l=f.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=c.startContainer.getChild(c.startOffset))?f.insertBefore(l):c.startContainer.append(f);
y&&(f=m(y))&&(h.contains(y)?(e(f,y.getParent(),y),f.remove()):h.append(f));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){u=d.startPath();f=u.block;if(!f)break;f.is("li")&&(h=f.getParent(),f.equals(h.getLast(a))&&f.equals(h.getFirst(a))&&(f=h));d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=b.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(b){return a(b)&&!n(b)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in
CKEDITOR.dtd.$list&&k(d);c.moveToBookmark(g);c.select();b.fire("saveSnapshot")}function m(c){return(c=c.getLast(a))&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in b?c:null}var b={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),a=function(a){return!(g(a)||c(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,c,d,e,f){if(!b[a.getName()])return[];e||(e=0);d||(d=[]);for(var g=0,h=a.getChildCount();g<h;g++){var k=a.getChild(g);k.type==CKEDITOR.NODE_ELEMENT&&
k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,c,d,e+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:k,contents:[]};f?l.grandparent=f:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));c&&CKEDITOR.dom.element.setMarker(c,k,"listarray_index",d.length);d.push(l);for(var m=0,n=k.getChildCount(),w;m<n;m++)w=k.getChild(m),w.type==CKEDITOR.NODE_ELEMENT&&b[w.getName()]?CKEDITOR.plugins.list.listToArray(w,
c,d,e+1,l.grandparent):l.contents.push(w)}}return d},arrayToList:function(d,e,f,g,h){f||(f=0);if(!d||d.length<f+1)return null;for(var k,l=d[f].parent.getDocument(),m=new CKEDITOR.dom.documentFragment(l),n=null,x=f,z=Math.max(d[f].indent,0),w=null,v,E,H=g==CKEDITOR.ENTER_P?"p":"div";;){var G=d[x];k=G.grandparent;v=G.element.getDirection(1);if(G.indent==z){n&&d[x].parent.getName()==n.getName()||(n=d[x].parent.clone(!1,1),h&&n.setAttribute("dir",h),m.append(n));w=n.append(G.element.clone(0,1));v!=n.getDirection(1)&&
w.setAttribute("dir",v);for(k=0;k<G.contents.length;k++)w.append(G.contents[k].clone(1,1));x++}else if(G.indent==Math.max(z,0)+1)G=d[x-1].element.getDirection(1),x=CKEDITOR.plugins.list.arrayToList(d,null,x,g,G!=v?v:null),!w.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=l.$.documentMode&&w.append(l.createText(" ")),w.append(x.listNode),x=x.nextIndex;else if(-1==G.indent&&!f&&k){b[k.getName()]?(w=G.element.clone(!1,!0),v!=k.getDirection(1)&&w.setAttribute("dir",v)):w=new CKEDITOR.dom.documentFragment(l);
var n=k.getDirection(1)!=v,L=G.element,O=L.getAttribute("class"),D=L.getAttribute("style"),S=w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(g!=CKEDITOR.ENTER_BR||n||D||O),J,R=G.contents.length,K;for(k=0;k<R;k++)if(J=G.contents[k],c(J)&&1<R)S?K=J.clone(1,1):w.append(J.clone(1,1));else if(J.type==CKEDITOR.NODE_ELEMENT&&J.isBlockBoundary()){n&&!J.getDirection()&&J.setAttribute("dir",v);E=J;var U=L.getAttribute("style");U&&E.setAttribute("style",U.replace(/([^;])$/,"$1;")+(E.getAttribute("style")||""));O&&
J.addClass(O);E=null;K&&(w.append(K),K=null);w.append(J.clone(1,1))}else S?(E||(E=l.createElement(H),w.append(E),n&&E.setAttribute("dir",v)),D&&E.setAttribute("style",D),O&&E.setAttribute("class",O),K&&(E.append(K),K=null),E.append(J.clone(1,1))):w.append(J.clone(1,1));K&&((E||w).append(K),K=null);w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&x!=d.length-1&&(CKEDITOR.env.needsBrFiller&&(v=w.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("br")&&v.remove(),(v=w.getLast(a))&&v.type==CKEDITOR.NODE_ELEMENT&&
v.is(CKEDITOR.dtd.$block)||w.append(l.createElement("br")));v=w.$.nodeName.toLowerCase();"div"!=v&&"p"!=v||w.appendBogus();m.append(w);n=null;x++}else return null;E=null;if(d.length<=x||Math.max(d[x].indent,0)<z)break}if(e)for(d=m.getFirst();d;){if(d.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(e,d),d.getName()in CKEDITOR.dtd.$listItem&&(f=d,l=h=g=void 0,g=f.getDirection()))){for(h=f.getParent();h&&!(l=h.getDirection());)h=h.getParent();g==l&&f.removeAttribute("dir")}d=d.getNextSourceNode()}return{listNode:m,
nextIndex:x}}};var w=/^h[1-6]$/,v=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);h.prototype={exec:function(c){this.refresh(c,c.elementPath());var d=c.config,e=c.getSelection(),g=e&&e.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var h=c.editable();if(h.getFirst(a)){var l=1==g.length&&g[0];(d=l&&l.getEnclosedNode())&&d.is&&this.type==d.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else d.enterMode==CKEDITOR.ENTER_BR?h.appendBogus():g[0].fixBlock(1,d.enterMode==CKEDITOR.ENTER_P?"p":"div"),
e.selectRanges(g)}for(var d=e.createBookmarks(!0),h=[],m={},g=g.createIterator(),n=0;(l=g.getNextRange())&&++n;){var y=l.getBoundaryNodes(),x=y.startNode,z=y.endNode;x.type==CKEDITOR.NODE_ELEMENT&&"td"==x.getName()&&l.setStartAt(y.startNode,CKEDITOR.POSITION_AFTER_START);z.type==CKEDITOR.NODE_ELEMENT&&"td"==z.getName()&&l.setEndAt(y.endNode,CKEDITOR.POSITION_BEFORE_END);l=l.createIterator();for(l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;y=l.getNextParagraph();)if(!y.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(m,
y,"list_block",1);for(var v=c.elementPath(y),x=v.elements,z=0,v=v.blockLimit,F,E=x.length-1;0<=E&&(F=x[E]);E--)if(b[F.getName()]&&v.contains(F)){v.removeCustomData("list_group_object_"+n);(x=F.getCustomData("list_group_object"))?x.contents.push(y):(x={root:F,contents:[y]},h.push(x),CKEDITOR.dom.element.setMarker(m,F,"list_group_object",x));z=1;break}z||(z=v,z.getCustomData("list_group_object_"+n)?z.getCustomData("list_group_object_"+n).contents.push(y):(x={root:z,contents:[y]},CKEDITOR.dom.element.setMarker(m,
z,"list_group_object_"+n,x),h.push(x)))}}for(F=[];0<h.length;)if(x=h.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(b[x.root.getName()]){g=c;n=x;x=m;l=F;z=CKEDITOR.plugins.list.listToArray(n.root,x);v=[];for(y=0;y<n.contents.length;y++)E=n.contents[y],(E=E.getAscendant("li",!0))&&!E.getCustomData("list_item_processed")&&(v.push(E),CKEDITOR.dom.element.setMarker(x,E,"list_item_processed",!0));for(var E=n.root.getDocument(),H=void 0,G=void 0,y=0;y<v.length;y++){var L=v[y].getCustomData("listarray_index"),
H=z[L].parent;H.is(this.type)||(G=E.createElement(this.type),H.copyAttributes(G,{start:1,type:1}),G.removeStyle("list-style-type"),z[L].parent=G)}x=CKEDITOR.plugins.list.arrayToList(z,x,null,g.config.enterMode);z=void 0;v=x.listNode.getChildCount();for(y=0;y<v&&(z=x.listNode.getChild(y));y++)z.getName()==this.type&&l.push(z);x.listNode.replace(n.root);g.fire("contentDomInvalidated")}else{z=c;l=x;y=F;v=l.contents;g=l.root.getDocument();n=[];1==v.length&&v[0].equals(l.root)&&(x=g.createElement("div"),
v[0].moveChildren&&v[0].moveChildren(x),v[0].append(x),v[0]=x);l=l.contents[0].getParent();for(E=0;E<v.length;E++)l=l.getCommonAncestor(v[E].getParent());H=z.config.useComputedState;z=x=void 0;H=void 0===H||H;for(E=0;E<v.length;E++)for(G=v[E];L=G.getParent();){if(L.equals(l)){n.push(G);!z&&G.getDirection()&&(z=1);G=G.getDirection(H);null!==x&&(x=x&&x!=G?null:G);break}G=L}if(!(1>n.length)){v=n[n.length-1].getNext();E=g.createElement(this.type);y.push(E);for(H=y=void 0;n.length;)y=n.shift(),H=g.createElement("li"),
G=y,G.is("pre")||w.test(G.getName())||"false"==G.getAttribute("contenteditable")?y.appendTo(H):(y.copyAttributes(H),x&&y.getDirection()&&(H.removeStyle("direction"),H.removeAttribute("dir")),y.moveChildren(H),y.remove()),H.appendTo(E);x&&z&&E.setAttribute("dir",x);v?E.insertBefore(v):E.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&b[x.root.getName()]&&f.call(this,c,x,m);for(E=0;E<F.length;E++)k(F[E]);CKEDITOR.dom.element.clearAllMarkers(m);e.selectBookmarks(d);c.focus()},refresh:function(a,
c){var d=c.contains(b,1),e=c.blockLimit||c.root;d&&e.contains(d)?this.setState(d.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(c){c.blockless||(c.addCommand("numberedlist",new h("numberedlist","ol")),c.addCommand("bulletedlist",new h("bulletedlist","ul")),c.ui.addButton&&(c.ui.addButton("NumberedList",{label:c.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),
c.ui.addButton("BulletedList",{label:c.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),c.on("key",function(e){var f=e.data.domEvent.getKey(),g;if("wysiwyg"==c.mode&&f in{8:1,46:1}){var h=c.getSelection().getRanges()[0],k=h&&h.startPath();if(h&&h.collapsed){var w=8==f,u=c.editable(),y=new CKEDITOR.dom.walker(h.clone());y.evaluator=function(b){return a(b)&&!n(b)};y.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};f=h.clone();if(w){var x;
(x=k.contains(b))&&h.checkBoundaryOfElement(x,CKEDITOR.START)&&(x=x.getParent())&&x.is("li")&&(x=m(x))?(g=x,x=x.getPrevious(a),f.moveToPosition(x&&n(x)?x:g,CKEDITOR.POSITION_BEFORE_START)):(y.range.setStartAt(u,CKEDITOR.POSITION_AFTER_START),y.range.setEnd(h.startContainer,h.startOffset),(x=y.previous())&&x.type==CKEDITOR.NODE_ELEMENT&&(x.getName()in b||x.is("li"))&&(x.is("li")||(y.range.selectNodeContents(x),y.reset(),y.evaluator=d,x=y.previous()),g=x,f.moveToElementEditEnd(g),f.moveToPosition(f.endPath().block,
CKEDITOR.POSITION_BEFORE_END)));if(g)l(c,f,h),e.cancel();else{var v=k.contains(b);v&&h.checkBoundaryOfElement(v,CKEDITOR.START)&&(g=v.getFirst(a),h.checkBoundaryOfElement(g,CKEDITOR.START)&&(x=v.getPrevious(a),m(g)?x&&(h.moveToElementEditEnd(x),h.select()):c.execCommand("outdent"),e.cancel()))}}else if(g=k.contains("li")){if(y.range.setEndAt(u,CKEDITOR.POSITION_BEFORE_END),w=(u=g.getLast(a))&&d(u)?u:g,k=0,(x=y.next())&&x.type==CKEDITOR.NODE_ELEMENT&&x.getName()in b&&x.equals(u)?(k=1,x=y.next()):h.checkBoundaryOfElement(w,
CKEDITOR.END)&&(k=2),k&&x){h=h.clone();h.moveToElementEditStart(x);if(1==k&&(f.optimize(),!f.startContainer.equals(g))){for(g=f.startContainer;g.is(CKEDITOR.dtd.$inline);)v=g,g=g.getParent();v&&f.moveToPosition(v,CKEDITOR.POSITION_AFTER_END)}2==k&&(f.moveToPosition(f.endPath().block,CKEDITOR.POSITION_BEFORE_END),h.endPath().block&&h.moveToPosition(h.endPath().block,CKEDITOR.POSITION_AFTER_START));l(c,f,h);e.cancel()}}else y.range.setEndAt(u,CKEDITOR.POSITION_BEFORE_END),(x=y.next())&&x.type==CKEDITOR.NODE_ELEMENT&&
x.is(b)&&(x=x.getFirst(a),k.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(k.block.remove(),h.moveToElementEditStart(x),h.select()):m(x)?(h.moveToElementEditStart(x),h.select()):(h=h.clone(),h.moveToElementEditStart(x),l(c,f,h)),e.cancel());setTimeout(function(){c.selectionChange(1)})}}}))}})}(),"use strict",function(){function f(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(ba(a)||ca(a)||w(a))}))}function h(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}
function e(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=m(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function k(a,b,c){B(a,b);B(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function d(b,c,d){return c=c[d?"getPrevious":"getNext"](function(c){return c&&c.type==CKEDITOR.NODE_TEXT&&!ba(c)||n(c)&&!w(c)&&!a(b,c)})}function l(a,b,c){return a>b&&a<c}function m(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 b(a){var b=a.doc,c=F('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+V+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),d=CKEDITOR.getUrl(this.path+"images/"+(E.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");z(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[z(F('\x3cspan title\x3d"'+
a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:V+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+d+") center no-repeat "+a.boxColor+";cursor:pointer;"+(E.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(E.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;"]}),z(F(P,b),{base:T+
"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"]}),z(F(P,b),{base:T+"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(){B(a,this);var b=a.holdDistance,c=this.size;return c&&l(a.mouse.y,
c.top-b,c.bottom+b)&&l(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,e=d.upper,f=d.lower,g=e||f,h=g.getParent(),k={};this.trigger=d;e&&B(a,e,!0);f&&B(a,f,!0);B(a,h,!0);a.inInlineMode&&u(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x,k.right="");e&&f?
k.top=e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top:e?f||(k.top=e.size.bottom+e.size.margin.bottom):k.top=f.size.top-f.size.margin.top;d.is(R)||l(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(R)):d.is(K)||l(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+
b.editable.padding.bottom:b.pane.bottom-1,this.look(K)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(U));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var m in k)k[m]=CKEDITOR.tools.cssLength(k[m]);this.setStyles(k)},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 I("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);
c.look(U);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();g(a,function(b){var c=a.line.trigger;b[c.is(O)?"insertBefore":"insertAfter"](c.is(O)?c.lower:c.upper)},!0);a.editor.focus();E.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});c.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=c}function g(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,f;E.ie&&a.enterMode==CKEDITOR.ENTER_BR?f=a.doc.createText(X):
(f=(f=m(a.element,!0))&&f.data("cke-enter-mode")||a.enterMode,f=new I(L[f],a.doc),f.is("br")||a.doc.createText(X).appendTo(f));c&&e.fire("saveSnapshot");b(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=f;c&&e.fire("saveSnapshot")}function c(a,b){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function c(d){var e=E.ie&&9>E.version?" ":X,f=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;g(a,function(c){f&&
a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](d);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});E.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(f){f=f.getSelection().getStartElement();var g;f=f.getAscendant(Q,1);if(!p(a,f)&&f&&!f.equals(a.editable)&&!f.contains(a.editable)){(g=m(f))&&"false"==g.getAttribute("contenteditable")&&(f=g);a.element=f;g=d(a,f,!b);var h;n(g)&&g.is(a.triggers)&&
g.is(M)&&(!d(a,g,!b)||(h=d(a,g,!b))&&n(h)&&h.is(a.triggers))?c(g):(h=e(a,f),n(h)&&(d(a,h,!b)?(f=d(a,h,!b))&&n(f)&&f.is(a.triggers)&&c(h):c(h)))}}}()}}function a(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 w(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 t(a,b){return n(b)?b.is(a.triggers):null}function p(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 q(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(Z)});if(!b)return!1;B(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function A(b){var c=b.editable,d=b.mouse,e=b.view,f=b.triggerOffset;u(b);var g=d.y>
(b.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),c=c[g?"getLast":"getFirst"](function(a){return!(ba(a)||ca(a))});if(!c)return null;a(b,c)&&(c=b.line.wrap[g?"getPrevious":"getNext"](function(a){return!(ba(a)||ca(a))}));if(!n(c)||w(c)||!t(b,c))return null;B(b,c);return!g&&0<=c.size.top&&l(d.y,0,c.size.top+f)?(b=b.inInlineMode||0===e.scroll.y?R:U,new h([null,c,O,J,b])):g&&c.size.bottom<=e.pane.height&&l(d.y,c.size.bottom-f,e.pane.height)?(b=b.inInlineMode||
l(c.size.bottom,e.pane.height-f,e.pane.height)?K:U,new h([c,null,D,J,b])):null}function r(a){var b=a.mouse,c=a.view,f=a.triggerOffset,g=e(a);if(!g)return null;B(a,g);var f=Math.min(f,0|g.size.outerHeight/2),k=[],m,r;if(l(b.y,g.size.top-1,g.size.top+f))r=!1;else if(l(b.y,g.size.bottom-f,g.size.bottom+1))r=!0;else return null;if(w(g)||q(a,g,r)||g.getParent().is(Y))return null;var p=d(a,g,!r);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(w(p)||!t(a,p)||p.getParent().is(Y))return null;
k=[p,g][r?"reverse":"concat"]().concat([S,J])}}else g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?(u(a),r&&l(b.y,g.size.bottom-f,c.pane.height)&&l(g.size.bottom,c.pane.height-f,c.pane.height)?m=K:l(b.y,0,g.size.top+f)&&(m=R)):m=U,k=[null,g][r?"reverse":"concat"]().concat([r?D:O,J,m,g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?r?K:R:U]);return 0 in k?new h(k):null}function C(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=da.length;l--;)f[da[l]]=parseInt(b.getComputedStyle.call(b,
"border-"+da[l]+"-width"),10)||0,h[da[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+da[l]),10)||0,g[da[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+da[l]),10)||0;c&&!d||y(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 z({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function B(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-N)return null;return z(b.size,C(a,b,c),{date:+new Date},!0)}function u(a,b){a.view.editable=C(a,a.editable,b,!0)}function y(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-N)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();z(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 x(a,b,c,d){for(var e=d,f=d,g=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+g<m&&0<n.y-g;){k||(k=b(e,d));l||(l=b(f,d));!k&&0<n.y-g&&(e=c(a,{x:n.x,y:n.y-g}));!l&&n.y+g<m&&(f=c(a,{x:n.x,y:n.y+g}));if(k&&l)break;g+=2}return new h([e,f,null,null])}CKEDITOR.plugins.add("magicline",{init:function(f){var k=f.config,l=k.magicline_triggerOffset||30,m={editor:f,
enterMode:k.enterMode,triggerOffset:l,holdDistance:0|l*(k.magicline_holdDistance||.5),boxColor:k.magicline_color||"#ff0000",rtl:"rtl"==k.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(k.magicline_tabuList||[]),triggers:k.magicline_everywhere?Q:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},q,t,x;m.isRelevant=function(b){return n(b)&&!a(m,b)&&!w(b)};f.on("contentDom",function(){var l=f.editable(),n=f.document,w=f.window;z(m,{editable:l,inInlineMode:l.isInline(),doc:n,win:w,
hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();l.is(G.$inline)||(m.inInlineMode&&!v(l)&&l.setStyles({position:"relative",top:null,left:null}),b.call(this,m),y(m),l.attachListener(f,"beforeUndoImage",function(){m.line.detach()}),l.attachListener(f,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),f.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),l.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(a){if("wysiwyg"==
f.mode)if(m.inInlineMode){var b=a.data.$.clientX;a=a.data.$.clientY;y(m);u(m,!0);var c=m.view.editable,d=m.view.scroll;b>c.left-d.x&&b<c.right-d.x&&a>c.top-d.y&&a<c.bottom-d.y||(clearTimeout(x),x=null,m.line.detach())}else clearTimeout(x),x=null,m.line.detach()}),l.attachListener(l,"keyup",function(){m.hiddenMode=0}),l.attachListener(l,"keydown",function(a){if("wysiwyg"==f.mode)switch(a.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),l.attachListener(m.inInlineMode?l:n,
"mousemove",function(a){t=!0;if("wysiwyg"==f.mode&&!f.readOnly&&!x){var b={x:a.data.$.clientX,y:a.data.$.clientY};x=setTimeout(function(){m.mouse=b;x=m.trigger=null;y(m);t&&!m.hiddenMode&&f.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=W(m,!0))&&((m.trigger=A(m)||r(m)||aa(m))&&!p(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),t=!1)},30)}}),l.attachListener(w,"scroll",function(){"wysiwyg"==f.mode&&(m.line.detach(),E.webkit&&(m.hiddenMode=1,clearTimeout(q),
q=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),l.attachListener(H?n:w,"mousedown",function(){"wysiwyg"==f.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),l.attachListener(H?n:w,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),f.addCommand("accessPreviousSpace",c(m)),f.addCommand("accessNextSpace",c(m,!0)),f.setKeystroke([[k.magicline_keystrokePrevious,"accessPreviousSpace"],[k.magicline_keystrokeNext,"accessNextSpace"]]),f.on("loadSnapshot",function(){var a,b,c,d;for(d in{p:1,
br:1,div:1})for(a=f.document.getElementsByTag(d),c=a.count();c--;)if((b=a.getItem(c)).data("cke-magicline-hot")){m.hotNode=b;m.lastCmdDirection="true"===b.data("cke-magicline-dir")?!0:!1;return}}),this.backdoor={accessFocusSpace:g,boxTrigger:h,isLine:a,getAscendantTrigger:e,getNonEmptyNeighbour:d,getSize:C,that:m,triggerEdge:r,triggerEditable:A,triggerExpand:aa})},this)}});var z=CKEDITOR.tools.extend,I=CKEDITOR.dom.element,F=I.createFromHtml,E=CKEDITOR.env,H=CKEDITOR.env.ie&&9>CKEDITOR.env.version,
G=CKEDITOR.dtd,L={},O=128,D=64,S=32,J=16,R=4,K=2,U=1,X=" ",Y=G.$listItem,Z=G.$tableContent,M=z({},G.$nonEditable,G.$empty),Q=G.$block,N=100,V="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",T=V+"border-color:transparent;display:block;border-style:solid;",P="\x3cspan\x3e"+X+"\x3c/span\x3e";L[CKEDITOR.ENTER_BR]="br";L[CKEDITOR.ENTER_P]="p";L[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties=
a+b+(c||U);return this},is:function(a){return(this.properties&a)==a}};var W=function(){function b(a,c){var d=a.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(c,d,e){if(!c.mouse)return null;var f=c.doc,g=c.line.wrap;e=e||c.mouse;var h=b(f,e);d&&a(c,h)&&(g.hide(),h=b(f,e),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||E.ie&&9>E.version&&!c.boundary.equals(h)&&!c.boundary.contains(h)?null:h}}(),ba=CKEDITOR.dom.walker.whitespaces(),ca=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
aa=function(){function b(a){var d=a.element,e,g,h;if(!n(d)||d.contains(a.editable)||d.isReadOnly())return null;h=x(a,function(a,b){return!b.equals(a)},function(a,b){return W(a,!0,b)},d);e=h.upper;g=h.lower;if(f(a,e,g))return h.set(S,8);if(e&&d.contains(e))for(;!e.getParent().equals(d);)e=e.getParent();else e=d.getFirst(function(b){return c(a,b)});if(g&&d.contains(g))for(;!g.getParent().equals(d);)g=g.getParent();else g=d.getLast(function(b){return c(a,b)});if(!e||!g)return null;B(a,e);B(a,g);if(!l(a.mouse.y,
e.size.top,g.size.bottom))return null;for(var d=Number.MAX_VALUE,m,q,u,r;g&&!g.equals(e)&&(q=e.getNext(a.isRelevant));)m=Math.abs(k(a,e,q)-a.mouse.y),m<d&&(d=m,u=e,r=q),e=q,B(a,e);if(!u||!r||!l(a.mouse.y,u.size.top,r.size.bottom))return null;h.upper=u;h.lower=r;return h.set(S,8)}function c(b,d){return!(d&&d.type==CKEDITOR.NODE_TEXT||ca(d)||w(d)||a(b,d)||d.type==CKEDITOR.NODE_ELEMENT&&d.$&&d.is("br"))}return function(a){var c=b(a),d;if(d=c){d=c.upper;var e=c.lower;d=!d||!e||w(e)||w(d)||e.equals(d)||
d.equals(e)||e.contains(d)||d.contains(e)?!1:t(a,d)&&t(a,e)&&f(a,d,e)?!0:!1}return d?c:null}}(),da=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function f(d){if(!d||d.type!=CKEDITOR.NODE_ELEMENT||"form"!=d.getName())return[];for(var e=[],b=["style","className"],f=0;f<b.length;f++){var c=d.$.elements.namedItem(b[f]);c&&(c=new CKEDITOR.dom.element(c),e.push([c,
c.nextSibling]),c.remove())}return e}function h(d,e){if(d&&d.type==CKEDITOR.NODE_ELEMENT&&"form"==d.getName()&&0<e.length)for(var b=e.length-1;0<=b;b--){var f=e[b][0],c=e[b][1];c?f.insertBefore(c):f.appendTo(d)}}function e(d,e){var b=f(d),g={},c=d.$;e||(g["class"]=c.className||"",c.className="");g.inline=c.style.cssText||"";e||(c.style.cssText="position: static; overflow: visible");h(b);return g}function k(d,e){var b=f(d),g=d.$;"class"in e&&(g.className=e["class"]);"inline"in e&&(g.style.cssText=
e.inline);h(b)}function d(d){if(!d.editable().isInline()){var e=CKEDITOR.instances,b;for(b in e){var f=e[b];"wysiwyg"!=f.mode||f.readOnly||(f=f.document.getBody(),f.setAttribute("contentEditable",!1),f.setAttribute("contentEditable",!0))}d.editable().hasFocus&&(d.toolbox.focus(),d.focus())}}CKEDITOR.plugins.add("maximize",{init:function(f){function h(){var a=c.getViewPaneSize();f.resize(a.width,a.height,null,!0)}if(f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=f.lang,g=CKEDITOR.document,c=g.getWindow(),
a,n,w,v=CKEDITOR.TRISTATE_OFF;f.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var t=f.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),p=f.ui.space("contents");if("wysiwyg"==f.mode){var q=f.getSelection();a=q&&q.getRanges();n=c.getScrollPosition()}else{var A=f.editable().$;a=!CKEDITOR.env.ie&&[A.selectionStart,A.selectionEnd];n=[A.scrollLeft,A.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){c.on("resize",
h);w=c.getScrollPosition();for(q=f.container;q=q.getParent();)q.setCustomData("maximize_saved_styles",e(q)),q.setStyle("z-index",f.config.baseFloatZIndex-5);p.setCustomData("maximize_saved_styles",e(p,!0));t.setCustomData("maximize_saved_styles",e(t,!0));p={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};g.getDocumentElement().setStyles(p);!CKEDITOR.env.gecko&&g.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||g.getBody().setStyles(p);CKEDITOR.env.ie?
setTimeout(function(){c.$.scrollTo(0,0)},0):c.$.scrollTo(0,0);t.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");t.$.offsetLeft;t.setStyles({"z-index":f.config.baseFloatZIndex-5,left:"0px",top:"0px"});t.addClass("cke_maximized");h();p=t.getDocumentPosition();t.setStyles({left:-1*p.x+"px",top:-1*p.y+"px"});CKEDITOR.env.gecko&&d(f)}else if(this.state==CKEDITOR.TRISTATE_ON){c.removeListener("resize",h);for(var q=[p,t],r=0;r<q.length;r++)k(q[r],q[r].getCustomData("maximize_saved_styles")),
q[r].removeCustomData("maximize_saved_styles");for(q=f.container;q=q.getParent();)k(q,q.getCustomData("maximize_saved_styles")),q.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){c.$.scrollTo(w.x,w.y)},0):c.$.scrollTo(w.x,w.y);t.removeClass("cke_maximized");CKEDITOR.env.webkit&&(t.setStyle("display","inline"),setTimeout(function(){t.setStyle("display","block")},0));f.fire("resize",{outerHeight:f.container.$.offsetHeight,contentsHeight:p.$.offsetHeight,outerWidth:f.container.$.offsetWidth})}this.toggleState();
if(q=this.uiItems[0])p=this.state==CKEDITOR.TRISTATE_OFF?b.maximize.maximize:b.maximize.minimize,q=CKEDITOR.document.getById(q._.id),q.getChild(1).setHtml(p),q.setAttribute("title",p),q.setAttribute("href",'javascript:void("'+p+'");');"wysiwyg"==f.mode?a?(CKEDITOR.env.gecko&&d(f),f.getSelection().selectRanges(a),(A=f.getSelection().getStartElement())&&A.scrollIntoView(!0)):c.$.scrollTo(n.x,n.y):(a&&(A.selectionStart=a[0],A.selectionEnd=a[1]),A.scrollLeft=n[0],A.scrollTop=n[1]);a=n=null;v=this.state;
f.fire("maximize",this.state)},canUndo:!1});f.ui.addButton&&f.ui.addButton("Maximize",{label:b.maximize.maximize,command:"maximize",toolbar:"tools,10"});f.on("mode",function(){var a=f.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:v)},null,null,100)}}})}(),function(){function f(f,e,k){var d=CKEDITOR.cleanWord;d?k():(f=CKEDITOR.getUrl(f.config.pasteFromWordCleanupFile||e+"filter/default.js"),CKEDITOR.scriptLoader.load(f,k,null,!0));return!d}CKEDITOR.plugins.add("pastefromword",
{requires:"clipboard",init:function(h){function e(d){var b=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,e,c=[];if(b&&d.editor.filter.check("img[src]")&&(e=b.extractTagsFromHtml(d.data.dataValue),0!==e.length&&(b=b.extractFromRtf(d.data.dataTransfer["text/rtf"]),0!==b.length&&(CKEDITOR.tools.array.forEach(b,function(a){c.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),e.length===c.length))))for(b=
0;b<e.length;b++)0===e[b].indexOf("file://")&&c[b]&&(d.data.dataValue=d.data.dataValue.replace(e[b],c[b]))}var k=0,d=this.path,l=void 0===h.config.pasteFromWord_inlineImages?!0:h.config.pasteFromWord_inlineImages;h.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(d,b){k=1;d.execCommand("paste",{type:"html",notification:b&&"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteFromWord",{label:h.lang.pastefromword.toolbar,command:"pastefromword",
toolbar:"clipboard,50"});h.on("paste",function(e){var b=e.data,g=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?b.dataTransfer.getData("text/html",!0):null,c=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?b.dataTransfer.getData("text/rtf"):null,g=g||b.dataValue,a={dataValue:g,dataTransfer:{"text/rtf":c}},c=/(class=\"?Mso|style=(?:\"|\')[^\"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,c=/<meta\s*name=(?:\"|\')?generator(?:\"|\')?\s*content=(?:\"|\')?microsoft/gi.test(g)||c.test(g);if(g&&
(k||c)&&(!1!==h.fire("pasteFromWord",a)||k)){b.dontFilter=!0;var l=f(h,d,function(){if(l)h.fire("paste",b);else if(!h.config.pasteFromWordPromptCleanup||k||confirm(h.lang.pastefromword.confirmCleanup))a.dataValue=CKEDITOR.cleanWord(a.dataValue,h),h.fire("afterPasteFromWord",a),b.dataValue=a.dataValue,!0===h.config.forcePasteAsPlainText?b.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==h.config.forcePasteAsPlainText||(b.type="html");k=0});l&&e.cancel()}},null,null,3);
if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&l)h.on("afterPasteFromWord",e)}})}(),function(){var f={canUndo:!1,async:!0,exec:function(f,e){var k=f.lang,d=CKEDITOR.tools.keystrokeToString(k.common.keyboard,f.getCommandKeystroke(CKEDITOR.env.ie?f.commands.paste:this)),l=e&&"undefined"!==typeof e.notification?e.notification:!e||!e.from||"keystrokeHandler"===e.from&&CKEDITOR.env.ie,k=l&&"string"===typeof l?l:k.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+d.aria+'"\x3e'+
d.display+"\x3c/kbd\x3e");f.execCommand("paste",{type:"text",notification:l?k:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var e=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",f);h.setKeystroke(e,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",
function(e){"html"!=e.data.type&&(e.data.type="text")});h.on("pasteState",function(e){h.getCommand("pastetext").setState(e.data)})}})}(),CKEDITOR.plugins.add("removeformat",{init:function(f){f.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);f.ui.addButton&&f.ui.addButton("RemoveFormat",{label:f.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(f){for(var h=f._.removeFormatRegex||
(f._.removeFormatRegex=new RegExp("^(?:"+f.config.removeFormatTags.replace(/,/g,"|")+")$","i")),e=f._.removeAttributes||(f._.removeAttributes=f.config.removeFormatAttributes.split(",")),k=CKEDITOR.plugins.removeformat.filter,d=f.getSelection().getRanges(),l=d.createIterator(),m=function(a){return a.type==CKEDITOR.NODE_ELEMENT},b;b=l.getNextRange();){b.collapsed||b.enlarge(CKEDITOR.ENLARGE_ELEMENT);var g=b.createBookmark(),c=g.startNode,a=g.endNode,n=function(a){for(var b=f.elementPath(a),c=b.elements,
d=1,e;(e=c[d])&&!e.equals(b.block)&&!e.equals(b.blockLimit);d++)h.test(e.getName())&&k(f,e)&&a.breakParent(e)};n(c);if(a)for(n(a),c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);c&&!c.equals(a);)if(c.isReadOnly()){if(c.getPosition(a)&CKEDITOR.POSITION_CONTAINS)break;c=c.getNext(m)}else n=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==c.getName()&&c.data("cke-realelement")||!k(f,c)||(h.test(c.getName())?c.remove(1):(c.removeAttributes(e),f.fire("removeFormatCleanup",c))),c=n;b.moveToBookmark(g)}f.forceNextSelectionCheck();
f.getSelection().selectRanges(d)}}},filter:function(f,h){for(var e=f._.removeFormatFilters||[],k=0;k<e.length;k++)if(!1===e[k](h))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(f){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(f)},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",
function(){function f(e,f,d){var l,m;if(d="string"==typeof d?CKEDITOR.document.getById(d):new CKEDITOR.dom.element(d))if(l=e.fire("uiSpace",{space:f,html:""}).html)e.on("uiSpace",function(b){b.data.space==f&&b.cancel()},null,null,1),m=d.append(CKEDITOR.dom.element.createFromHtml(h.output({id:e.id,name:e.name,langDir:e.lang.dir,langCode:e.langCode,space:f,spaceId:e.ui.spaceId(f),content:l}))),d.getCustomData("cke_hasshared")?m.hide():d.setCustomData("cke_hasshared",1),m.unselectable(),m.on("mousedown",
function(b){b=b.data;b.getTarget().hasAscendant("a",1)||b.preventDefault()}),e.focusManager.add(m,1),e.on("focus",function(){for(var b=0,e,c=d.getChildren();e=c.getItem(b);b++)e.type==CKEDITOR.NODE_ELEMENT&&!e.equals(m)&&e.hasClass("cke_shared")&&e.hide();m.show()}),e.on("destroy",function(){m.remove()})}var h=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(e){e.on("loaded",function(){var h=e.config.sharedSpaces;if(h)for(var d in h)f(e,d,h[d])},null,null,9)}})}(),function(){var f={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(f){this.toggleState();
this.refresh(f)},refresh:function(f){if(f.document){var e=this.state!=CKEDITOR.TRISTATE_ON||f.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!f.focusManager.hasFocus?"removeClass":"attachClass";f.editable()[e]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var f="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),e,k,d,l,m=CKEDITOR.getUrl(this.path),b=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),g=b?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",c,a;
for(e=k=d=l="";c=f.pop();)a=f.length?",":"",e+=".cke_show_blocks "+c+g+a,d+=".cke_show_blocks.cke_contents_ltr "+c+g+a,l+=".cke_show_blocks.cke_contents_rtl "+c+g+a,k+=".cke_show_blocks "+c+g+"{background-image:url("+CKEDITOR.getUrl(m+"images/block_"+c+".png")+")}";CKEDITOR.addCss((e+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(k,d+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));b||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(h){function e(){k.refresh(h)}if(!h.blockless){var k=h.addCommand("showblocks",f);k.canUndo=!1;h.config.startupOutlineBlocks&&k.setState(CKEDITOR.TRISTATE_ON);h.ui.addButton&&h.ui.addButton("ShowBlocks",{label:h.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});h.on("mode",function(){k.state!=CKEDITOR.TRISTATE_DISABLED&&k.refresh(h)});h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h.on("focus",e),h.on("blur",e));h.on("contentDom",function(){k.state!=CKEDITOR.TRISTATE_DISABLED&&
k.refresh(h)})}}})}(),function(){var f={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(f){this.toggleState();this.refresh(f)},refresh:function(f){if(f.document){var e=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";f.editable()[e]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var f;f=(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(f)},init:function(h){var e=h.addCommand("showborders",f);e.canUndo=!1;!1!==h.config.startupShowBorders&&e.setState(CKEDITOR.TRISTATE_ON);h.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)},null,null,100);h.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)});h.on("removeFormatCleanup",function(e){e=e.data;h.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||
0>=parseInt(e.getAttribute("border"),10))&&e.addClass("cke_show_border")})},afterInit:function(f){var e=f.dataProcessor;f=e&&e.dataFilter;e=e&&e.htmlFilter;f&&f.addRules({elements:{table:function(e){e=e.attributes;var d=e["class"],f=parseInt(e.border,10);f&&!(0>=f)||d&&-1!=d.indexOf("cke_show_border")||(e["class"]=(d||"")+" cke_show_border")}}});e&&e.addRules({elements:{table:function(e){e=e.attributes;var d=e["class"];d&&(e["class"]=d.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(f){var e=f.data.name;if("table"==e||"tableProperties"==e)if(f=f.data.definition,e=f.getContents("info").get("txtBorder"),e.commit=CKEDITOR.tools.override(e.commit,function(e){return function(d,f){e.apply(this,arguments);var h=parseInt(this.getValue(),10);f[!h||0>=h?"addClass":"removeClass"]("cke_show_border")}}),f=(f=f.getContents("advanced"))&&f.get("advCSSClasses"))f.setup=CKEDITOR.tools.override(f.setup,function(e){return function(){e.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),f.commit=CKEDITOR.tools.override(f.commit,function(e){return function(d,f){e.apply(this,arguments);parseInt(f.getAttribute("border"),10)||f.addClass("cke_show_border")}})})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(h){function e(){var e=d&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+
"px");this.show();e&&this.focus()}if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var k=CKEDITOR.plugins.sourcearea;h.addMode("source",function(d){var k=h.ui.space("contents").getDocument().createElement("textarea");k.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",h.config.sourceAreaTabSize||4)));k.setAttribute("dir","ltr");k.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");
h.ui.space("contents").append(k);k=h.editable(new f(h,k));k.setData(h.getData(1));CKEDITOR.env.ie&&(k.attachListener(h,"resize",e,k),k.attachListener(CKEDITOR.document.getWindow(),"resize",e,k),CKEDITOR.tools.setTimeout(e,0,k));h.fire("ariaWidget",this);d()});h.addCommand("source",k.commands.source);h.ui.addButton&&h.ui.addButton("Source",{label:h.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});h.on("mode",function(){h.getCommand("source").setState("source"==h.mode?CKEDITOR.TRISTATE_ON:
CKEDITOR.TRISTATE_OFF)});var d=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var f=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(f){this.setValue(f);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(f){this[(f?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){f.baseProto.detach.call(this);this.clearCustomData();
this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(f){"wysiwyg"==f.mode&&f.fire("saveSnapshot");f.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);f.setMode("source"==f.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("sourcedialog",{requires:"dialog",init:function(f){f.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js");
f.ui.addButton&&f.ui.addButton("Sourcedialog",{label:f.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,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},
requires:"dialog",init:function(f){var h=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");f.addCommand("specialchar",{exec:function(){var e=f.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+e+".js"),function(){CKEDITOR.tools.extend(f.lang.specialchar,h.langEntries[e]);f.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});f.ui.addButton&&f.ui.addButton("SpecialChar",
{label:f.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(" "),
function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(f){var h=f.config,e=f.lang.stylescombo,k={},d=[],l=[];f.on("stylesSet",function(e){if(e=e.data.styles){for(var b,g,c,a=0,n=e.length;a<n;a++)(b=e[a],f.blockless&&b.element in CKEDITOR.dtd.$block||"string"==typeof b.type&&!CKEDITOR.style.customHandlers[b.type]||(g=b.name,b=new CKEDITOR.style(b),f.filter.customConfig&&!f.filter.check(b)))||(b._name=g,b._.enterMode=h.enterMode,b._.type=c=b.assignedTo||b.type,b._.weight=
a+1E3*(c==CKEDITOR.STYLE_OBJECT?1:c==CKEDITOR.STYLE_BLOCK?2:3),k[g]=b,d.push(b),l.push(b));d.sort(function(a,b){return a._.weight-b._.weight})}});f.ui.addRichCombo("Styles",{label:e.label,title:e.panelTitle,toolbar:"styles,10",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!0,attributes:{"aria-label":e.panelTitle}},init:function(){var f,b,g,c,a,h;a=0;for(h=d.length;a<h;a++)f=d[a],b=f._name,c=f._.type,c!=g&&(this.startGroup(e["panelTitle"+String(c)]),
g=c),this.add(b,f.type==CKEDITOR.STYLE_OBJECT?b:f.buildPreview(),b);this.commit()},onClick:function(d){f.focus();f.fire("saveSnapshot");d=k[d];var b=f.elementPath();if(d.group&&d.removeStylesFromSameGroup(f))f.applyStyle(d);else f[d.checkActive(b,f)?"removeStyle":"applyStyle"](d);f.fire("saveSnapshot")},onRender:function(){f.on("selectionChange",function(d){var b=this.getValue();d=d.data.path.elements;for(var e=0,c=d.length,a;e<c;e++){a=d[e];for(var h in k)if(k[h].checkElementRemovable(a,!0,f)){h!=
b&&this.setValue(h);return}}this.setValue("")},this)},onOpen:function(){var d=f.getSelection(),d=d.getSelectedElement()||d.getStartElement()||f.editable(),d=f.elementPath(d),b=[0,0,0,0];this.showAll();this.unmarkAll();for(var g in k){var c=k[g],a=c._.type;c.checkApplicable(d,f,f.activeFilter)?b[a]++:this.hideItem(g);c.checkActive(d,f)&&this.mark(g)}b[CKEDITOR.STYLE_BLOCK]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);b[CKEDITOR.STYLE_INLINE]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
b[CKEDITOR.STYLE_OBJECT]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var d=f.elementPath();if(d){for(var b in k)if(k[b].checkApplicable(d,f,f.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){k={};d=[]}})}})}(),function(){function f(d){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(e){if(e.editable().hasFocus){var f=e.getSelection(),b;if(b=(new CKEDITOR.dom.elementPath(f.getCommonAncestor(),f.root)).contains({td:1,
th:1},1)){var f=e.createRange(),g=CKEDITOR.tools.tryThese(function(){var a=b.getParent().$.cells[b.$.cellIndex+(d?-1:1)];a.parentNode.parentNode;return a},function(){var a=b.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(d?-1:1)];return a.cells[d?a.cells.length-1:0]});if(g||d)if(g)g=new CKEDITOR.dom.element(g),f.moveToElementEditStart(g),f.checkStartOfBlock()&&f.checkEndOfBlock()||f.selectNodeContents(g);else return!0;else{for(var c=b.getAscendant("table").$,g=b.getParent().$.cells,c=
new CKEDITOR.dom.element(c.insertRow(-1),e.document),a=0,h=g.length;a<h;a++)c.append((new CKEDITOR.dom.element(g[a],e.document)).clone(!1,!1)).appendBogus();f.moveToElementEditStart(c)}f.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},e={exec:function(d){d.container.focusNext(!0,d.tabIndex)}},k={exec:function(d){d.container.focusPrevious(!0,d.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(d){for(var l=!1!==d.config.enableTabKeyTools,m=d.config.tabSpaces||0,
b="";m--;)b+=" ";if(b)d.on("key",function(e){9==e.data.keyCode&&(d.insertText(b),e.cancel())});if(l)d.on("key",function(b){(9==b.data.keyCode&&d.execCommand("selectNextCell")||b.data.keyCode==CKEDITOR.SHIFT+9&&d.execCommand("selectPreviousCell"))&&b.cancel()});d.addCommand("blur",CKEDITOR.tools.extend(e,h));d.addCommand("blurBack",CKEDITOR.tools.extend(k,h));d.addCommand("selectNextCell",f());d.addCommand("selectPreviousCell",f(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(f,h){var e=
void 0===h?this.getTabIndex():h,k,d,l,m,b,g;if(0>=e)for(b=this.getNextSourceNode(f,CKEDITOR.NODE_ELEMENT);b;){if(b.isVisible()&&0===b.getTabIndex()){l=b;break}b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(b=this.getDocument().getBody().getFirst();b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!k)if(!d&&b.equals(this)){if(d=!0,f){if(!(b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;k=1}}else d&&!this.contains(b)&&(k=1);if(b.isVisible()&&!(0>(g=b.getTabIndex()))){if(k&&g==e){l=
b;break}g>e&&(!l||!m||g<m)?(l=b,m=g):l||0!==g||(l=b,m=g)}}l&&l.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(f,h){for(var e=void 0===h?this.getTabIndex():h,k,d,l,m=0,b,g=this.getDocument().getBody().getLast();g=g.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!k)if(!d&&g.equals(this)){if(d=!0,f){if(!(g=g.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;k=1}}else d&&!this.contains(g)&&(k=1);if(g.isVisible()&&!(0>(b=g.getTabIndex())))if(0>=e){if(k&&0===b){l=g;break}b>m&&
(l=g,m=b)}else{if(k&&b==e){l=g;break}b<e&&(!l||b>m)&&(l=g,m=b)}}l&&l.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(f){function h(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(d,e){this.setState(e.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!f.blockless){var e=f.lang.table;f.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+
(f.plugins.dialogadvtab?"table"+f.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(e){if(e.styles){var d;if(e.styles.border)d=CKEDITOR.tools.style.parse.border(e.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var f=e.styles;f["border-left"]&&f["border-left"]===f["border-right"]&&f["border-right"]===f["border-top"]&&
f["border-top"]===f["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(f["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(e.attributes.border=1);"collapse"==e.styles["border-collapse"]&&(e.attributes.cellspacing=0)}}}]]}));f.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));f.addCommand("tableDelete",h({exec:function(e){var d=e.elementPath().contains("table",1);if(d){var f=d.getParent(),h=e.editable();1!=f.getChildCount()||f.is("td",
"th")||f.equals(h)||(d=f);e=e.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();e.select()}}}));f.ui.addButton&&f.ui.addButton("Table",{label:e.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");f.addMenuItems&&f.addMenuItems({table:{label:e.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:e.deleteTable,command:"tableDelete",group:"table",
order:1}});f.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")});f.contextMenu&&f.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function f(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!t.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 h(a,b){for(var c=p(a)?a:f(a),d=c[0],e=d.getAscendant("table"),d=d.getDocument(),g=c[0].getParent(),h=g.$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=new CKEDITOR.dom.element(e.$.rows[k]),h=b?h:k,g=b?g:c,c=CKEDITOR.tools.buildTableMap(e),e=c[h],h=b?c[h-1]:c[h+1],c=c[0].length,d=d.createElement("tr"),k=0;e[k]&&k<c;k++){var l;1<e[k].rowSpan&&h&&e[k]==h[k]?(l=e[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(e[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),d.append(l),
l=l.$);k+=l.colSpan-1}b?d.insertBefore(g):d.insertAfter(g);return d}function e(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),c=f(a),d=c[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(d),h=c[0].getParent().$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=[];a.reset();for(a=h;a<=k;a++){for(var l=g[a],m=new CKEDITOR.dom.element(d.$.rows[a]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),t=p.getParent().$.rowIndex;1==p.$.rowSpan?p.remove():(--p.$.rowSpan,
t==a&&(t=g[a+1],t[n-1]?p.insertAfter(new CKEDITOR.dom.element(t[n-1])):(new CKEDITOR.dom.element(d.$.rows[a+1])).append(p,1)));n+=p.$.colSpan-1}c.push(m)}g=d.$.rows;b[0].moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||d.$.parentNode);for(a=c.length;0<=a;a--)e(c[a]);return d.$.parentNode?h:(b[0].select(),null)}a instanceof CKEDITOR.dom.element&&(d=a.getAscendant("table"),1==d.$.rows.length?d.remove():a.remove());return null}function k(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 d(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e=k(a[d]);if(b?e<c:e>c)c=e}return c}function l(a,b){for(var c=p(a)?a:f(a),e=c[0].getAscendant("table"),g=d(c,1),c=d(c),h=b?g:c,k=CKEDITOR.tools.buildTableMap(e),e=[],g=[],c=[],l=k.length,m=0;m<l;m++)e.push(k[m][h]),g.push(b?k[m][h-1]:k[m][h+1]);for(m=0;m<l;m++)e[m]&&(1<e[m].colSpan&&g[m]==e[m]?(k=e[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(e[m]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[b?"insertBefore":"insertAfter"].call(k,h),c.push(k),k=k.$),m+=k.rowSpan-1);return c}function m(a){function b(a){var c,d,e;c=a.getRanges();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 c=a.getRanges(),d=f(a),e=d[0],g=d[d.length-1],d=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(d),k,l,m=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var p=0,t=h[n].length;p<t;p++)void 0===k&&h[n][p]==e.$&&(k=p),h[n][p]==g.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<h.length;p++)g=h[p],e=new CKEDITOR.dom.element(d.$.rows[p]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,
p+=g.$.rowSpan-1,e.$.cells.length||m.push(e));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(d.$.parentNode);m.length==a&&(c[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),c[0].select(),d.remove());return k}function b(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 g(a){if(a instanceof CKEDITOR.dom.selection){var b=
a.getRanges(),d=f(a),e=d[0]&&d[0].getAscendant("table"),h;a:{var k=0;h=d.length-1;for(var l={},m,n;m=d[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=d[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=d[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=d[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a=
d.length-1;0<=a;a--)g(d[a]);h?c(h,!0):e&&(b[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),b[0].select(),e.remove())}else a instanceof CKEDITOR.dom.element&&(b=a.getParent(),1==b.getChildCount()?b.remove():a.remove())}function c(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 a(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(b,c,d){var e=f(b),g;if((c?1!=e.length:2>e.length)||(g=b.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;var h;b=e[0];g=b.getAscendant("table");var k=CKEDITOR.tools.buildTableMap(g),l=k.length,m=k[0].length,n=b.getParent().$.rowIndex,p=a(k,n,b);if(c){var t;try{var v=parseInt(b.getAttribute("rowspan"),10)||1;
h=parseInt(b.getAttribute("colspan"),10)||1;t=k["up"==c?n-v:"down"==c?n+v:n]["left"==c?p-h:"right"==c?p+h:p]}catch(w){return!1}if(!t||b.$==t)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(t))}c=b.getDocument();var L=n,v=t=0,O=!d&&new CKEDITOR.dom.documentFragment(c),D=0;for(c=0;c<e.length;c++){h=e[c];var S=h.getParent(),J=h.getFirst(),R=h.$.colSpan,K=h.$.rowSpan,S=S.$.rowIndex,U=a(k,S,h),D=D+R*K,v=Math.max(v,U-p+R);t=Math.max(t,S-n+K);d||(R=h,(K=R.getBogus())&&K.remove(),
R.trim(),h.getChildren().count()&&(S==L||!J||J.isBlockBoundary&&J.isBlockBoundary({br:1})||(L=O.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!L||L.is&&L.is("br")||O.append("br")),h.moveChildren(O)),c?h.remove():h.setHtml(""));L=S}if(d)return t*v==D;O.moveChildren(b);b.appendBogus();v>=m?b.removeAttribute("rowSpan"):b.$.rowSpan=t;t>=l?b.removeAttribute("colSpan"):b.$.colSpan=v;d=new CKEDITOR.dom.nodeList(g.$.rows);e=d.count();for(c=e-1;0<=c;c--)g=d.getItem(c),g.$.cells.length||(g.remove(),e++);return b}
function w(b,c){var d=f(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=e.$.rowIndex,l=a(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,g=new CKEDITOR.dom.element(g.$.rows[e]),h=a(h,e),p,e=d.clone(),k=0;k<h.length;k++)if(p=h[k],p.parentNode==g.$&&k>l){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||g.append(e)}else for(m=n=1,g=e.clone(),g.insertAfter(e),g.append(e=d.clone()),
p=a(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(b,c){var d=f(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=a(g,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<g.length;m++){var n=g[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(g=
0;g<l.length;g++)l[g].colSpan++}g=d.clone();g.insertAfter(d);g.appendBogus();d.$.colSpan=e;g.$.colSpan=k;1==e&&d.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var t=/^(?:td|th)$/,p=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function d(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 k(b,
c){var d=a.addCommand(b,c);a.addFeature(d)}var p=a.lang.table,t=CKEDITOR.tools.style.parse;k("cellProperties",new CKEDITOR.dialogCommand("cellProperties",d({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table",contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&t.background(a.styles.background).color},right:function(a){a.styles["background-color"]=t.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");k("rowDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=e(a))&&c(a)}}));k("rowInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);h(a,!0)}}));k("rowInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);
h(a)}}));k("columnDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=m(a))&&c(a,!0)}}));k("columnInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);l(a,!0)}}));k("columnInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);l(a)}}));k("cellDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();g(a)}}));k("cellMerge",d({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,
b){b.cell=n(a.getSelection());c(b.cell,!0)}}));k("cellMergeRight",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");c(b.cell,!0)}}));k("cellMergeDown",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");c(b.cell,!0)}}));k("cellVerticalSplit",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){c(v(a.getSelection()))}}));k("cellHorizontalSplit",
d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){c(w(a.getSelection()))}}));k("cellInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();b(a,!0)}}));k("cellInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();b(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",order:1,getItems:function(){var b=a.getSelection(),c=f(b);return{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:w(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<c.length?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",
order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.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:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.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:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.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:k,insertRow:h,insertColumn:l,getSelectedCells:f};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(f,h,e,k,d){f=f.$.rows;e=e||0;k="number"===typeof k?k:f.length-1;d="number"===typeof d?d:-1;var l=-1,m=[];for(h=h||0;h<=k;h++){l++;!m[l]&&(m[l]=[]);for(var b=-1,g=e;g<=(-1===d?f[h].cells.length-1:d);g++){var c=
f[h].cells[g];if(!c)break;for(b++;m[l][b];)b++;for(var a=isNaN(c.colSpan)?1:c.colSpan,c=isNaN(c.rowSpan)?1:c.rowSpan,n=0;n<c&&!(h+n>k);n++){m[l+n]||(m[l+n]=[]);for(var w=0;w<a;w++)m[l+n][b+w]=f[h].cells[g]}b+=a-1;if(-1!==d&&b>=d)break}}return m},function(){function f(b){return CKEDITOR.env.ie?b.$.clientWidth:parseInt(b.getComputedStyle("width"),10)}function h(b,c){var a=b.getComputedStyle("border-"+c+"-width"),d={thin:"0px",medium:"1px",thick:"2px"};0>a.indexOf("px")&&(a=a in d&&"none"!=b.getComputedStyle("border-style")?
d[a]:0);return parseInt(a,10)}function e(b){var c=[],a={},d="rtl"==b.getComputedStyle("direction");CKEDITOR.tools.array.forEach(b.$.rows,function(e,f){var k=-1,l=0,m=null;e?(l=new CKEDITOR.dom.element(e),m={height:l.$.offsetHeight,position:l.getDocumentPosition()}):m=void 0;for(var l=m.height,m=m.position,A=0,r=e.cells.length;A<r;A++){var C=new CKEDITOR.dom.element(e.cells[A]),B=e.cells[A+1]&&new CKEDITOR.dom.element(e.cells[A+1]),k=k+(C.$.colSpan||1),u,y,x=C.getDocumentPosition().x;d?y=x+h(C,"left"):
u=x+C.$.offsetWidth-h(C,"right");B?(x=B.getDocumentPosition().x,d?u=x+B.$.offsetWidth-h(B,"right"):y=x+h(B,"left")):(x=b.getDocumentPosition().x,d?u=x:y=x+b.$.offsetWidth);C=Math.max(y-u,3);C={table:b,index:k,x:u,y:m.y,width:C,height:l,rtl:d};a[k]=a[k]||[];a[k].push(C);C.alignedPillars=a[k];c.push(C)}});return c}function k(b){(b.data||b).preventDefault()}function d(d){function c(){A=0;q.setOpacity(0);C&&a();var b=t.table;setTimeout(function(){b.removeCustomData("_cke_table_pillars")},0);p.removeListener("dragstart",
k)}function a(){for(var a=t.rtl,b=a?y.length:u.length,c=0,e=0;e<b;e++){var k=u[e],l=y[e],n=t.table;CKEDITOR.tools.setTimeout(function(e,f,h,k,l,p){e&&e.setStyle("width",m(Math.max(f+p,1)));h&&h.setStyle("width",m(Math.max(k-p,1)));l&&n.setStyle("width",m(l+p*(a?-1:1)));++c==b&&d.fire("saveSnapshot")},0,this,[k,k&&f(k),l,l&&f(l),(!k||!l)&&f(n)+h(n,"left")+h(n,"right"),C])}}function e(a){k(a);d.fire("saveSnapshot");a=t.index;for(var b=CKEDITOR.tools.buildTableMap(t.table),c=[],h=[],m=Number.MAX_VALUE,
n=m,B=t.rtl,D=0,S=b.length;D<S;D++){var J=b[D],R=J[a+(B?1:0)],J=J[a+(B?0:1)],R=R&&new CKEDITOR.dom.element(R),J=J&&new CKEDITOR.dom.element(J);R&&J&&R.equals(J)||(R&&(m=Math.min(m,f(R))),J&&(n=Math.min(n,f(J))),c.push(R),h.push(J))}u=c;y=h;x=t.x-m;z=t.x+n;q.setOpacity(.5);r=parseInt(q.getStyle("left"),10);C=0;A=1;q.on("mousemove",v);p.on("dragstart",k);p.on("mouseup",l,this)}function l(a){a.removeListener();c()}function v(a){B(a.data.getPageOffset().x)}var t,p,q,A,r,C,B,u,y,x,z;p=d.document;q=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:10"\x3e\x3c/div\x3e',
p);d.on("destroy",function(){q.remove()});b||p.getDocumentElement().append(q);this.attachTo=function(a){var c,d,f;A||(b&&(p.getBody().append(q),C=0),t=a,c=t.alignedPillars[0],d=t.alignedPillars[t.alignedPillars.length-1],f=c.y,c=d.height+d.y-c.y,q.setStyles({width:m(a.width),height:m(c),left:m(a.x),top:m(f)}),b&&q.setOpacity(.25),q.on("mousedown",e,this),p.getBody().setStyle("cursor","col-resize"),q.show())};B=this.move=function(a,c){if(!t)return 0;if(!(A||a>=t.x&&a<=t.x+t.width&&c>=t.y&&c<=t.y+t.height))return t=
null,A=C=0,p.removeListener("mouseup",l),q.removeListener("mousedown",e),q.removeListener("mousemove",v),p.getBody().setStyle("cursor","auto"),b?q.remove():q.hide(),0;var d=a-Math.round(q.$.offsetWidth/2);if(A){if(d==x||d==z)return 1;d=Math.max(d,x);d=Math.min(d,z);C=d-r}q.setStyle("left",m(d));return 1}}function l(b){var c=b.data.getTarget();if("mouseout"==b.name){if(!c.is("table"))return;for(var a=new CKEDITOR.dom.element(b.data.$.relatedTarget||b.data.$.toElement);a&&a.$&&!a.equals(c)&&!a.is("body");)a=
a.getParent();if(!a||a.equals(c))return}c.getAscendant("table",1).removeCustomData("_cke_table_pillars");b.removeListener()}var m=CKEDITOR.tools.cssLength,b=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(b){b.on("contentDom",function(){var c,a=b.editable();a.attachListener(a.isInline()?a:b.document,"mousemove",function(a){a=a.data;var f=a.getTarget();if(f.type==CKEDITOR.NODE_ELEMENT){var h=a.getPageOffset().x,
m=a.getPageOffset().y;if(c&&c.move(h,m))k(a);else if(f.is("table")||f.getAscendant({thead:1,tbody:1,tfoot:1},1))if(a=f.getAscendant("table",1),b.editable().contains(a)){(f=a.getCustomData("_cke_table_pillars"))||(a.setCustomData("_cke_table_pillars",f=e(a)),a.on("mouseout",l),a.on("mousedown",l));a:{a=f;for(var f=0,p=a.length;f<p;f++){var q=a[f];if(h>=q.x&&h<=q.x+q.width&&m>=q.y&&m<=q.y+q.height){h=q;break a}}h=null}h&&(!c&&(c=new d(b)),c.attachTo(h))}}})})}})}(),"use strict",function(){var f=[CKEDITOR.CTRL+
90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],h={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function d(b){a.enabled&&!1!==b.data.command.canUndo&&a.save()}function c(){a.enabled=b.readOnly?!1:"wysiwyg"==b.mode;a.onChange()}var a=b.undoManager=new e(b),h=a.editingHandler=new l(a),k=b.addCommand("undo",{exec:function(){a.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=b.addCommand("redo",{exec:function(){a.redo()&&(b.selectionChange(),this.fire("afterRedo"))},
startDisabled:!0,canUndo:!1});b.setKeystroke([[f[0],"undo"],[f[1],"redo"],[f[2],"redo"]]);a.onChange=function(){k.setState(a.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(a.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",d);b.on("afterCommandExec",d);b.on("saveSnapshot",function(b){a.save(b.data&&b.data.contentOnly)});b.on("contentDom",h.attachListeners,h);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload",
function(){"wysiwyg"==b.mode&&a.save(!0)});b.on("mode",c);b.on("readOnly",c);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));b.resetUndo=function(){a.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){a.currentImage&&a.update()});b.on("lockSnapshot",function(b){b=b.data;a.lock(b&&b.dontUpdate,b&&b.forceUpdate)});b.on("unlockSnapshot",a.unlock,a)}});CKEDITOR.plugins.undo=
{};var e=CKEDITOR.plugins.undo.UndoManager=function(b){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=b.config.undoStackSize||20;this.strokesLimit=25;this.editor=b;this.reset()};e.prototype={type:function(b,d){var c=e.getKeyGroup(b),a=this.strokesRecorded[c]+1;d=d||a>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(a=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]=a;this.previousKeyGroup=
c},keyGroupChanged:function(b){return e.getKeyGroup(b)!=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 a=this.editor;if(this.locked||"ready"!=a.status||
"wysiwyg"!=a.mode)return!1;var e=a.editable();if(!e||"ready"!=e.status)return!1;e=this.snapshots;d||(d=new k(a));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&&a.fire("change");e.splice(this.index+1,e.length-this.index-1);e.length==this.limit&&e.shift();this.index=e.push(d)-1;this.currentImage=d;!1!==c&&this.refreshState();return!0},restoreImage:function(b){var d=this.editor,c;b.bookmarks&&(d.focus(),
c=d.getSelection());this.locked={level:999};this.editor.loadSnapshot(b.contents);b.bookmarks?c.selectBookmarks(b.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=b.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();d.fire("change")},getNextImage:function(b){var d=this.snapshots,c=this.currentImage,a;if(c)if(b)for(a=this.index-1;0<=a;a--){if(b=d[a],!c.equalsContent(b))return b.index=
a,b}else for(a=this.index+1;a<d.length;a++)if(b=d[a],!c.equalsContent(b))return b.index=a,b;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 b=this.getNextImage(!0);if(b)return this.restoreImage(b),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var b=this.getNextImage(!1);if(b)return this.restoreImage(b),!0}return!1},update:function(b){if(!this.locked){b||
(b=new k(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(b){if(!this.snapshots.length)return!1;var d=this.snapshots,c=d[d.length-1];return c.equalsContent(b)&&!c.equalsSelection(b)?(this.currentImage=d[d.length-1]=b,!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 a=new k(this.editor,
!0);this.currentImage&&this.currentImage.equalsContent(a)&&(c=a)}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 k(this.editor,!0);b.equalsContent(d)||this.update()}}}};e.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};e.keyGroups={PRINTABLE:0,FUNCTIONAL:1};e.isNavigationKey=function(b){return!!e.navigationKeyCodes[b]};e.getKeyGroup=function(b){var d=e.keyGroups;
return h[b]?d.FUNCTIONAL:d.PRINTABLE};e.getOppositeKeyGroup=function(b){var d=e.keyGroups;return b==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};e.ieFunctionalKeysBug=function(b){return CKEDITOR.env.ie&&e.getKeyGroup(b)==e.keyGroups.FUNCTIONAL};var k=CKEDITOR.plugins.undo.Image=function(b,d){this.editor=b;b.fire("beforeUndoImage");var c=b.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;d||(this.bookmarks=(c=c&&b.getSelection())&&c.createBookmarks2(!0));b.fire("afterUndoImage")},
d=/\b(?:href|src|name)="[^"]*?"/gi;k.prototype={equalsContent:function(b){var e=this.contents;b=b.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(e=e.replace(d,""),b=b.replace(d,""));return e!=b?!1:!0},equalsSelection:function(b){var d=this.bookmarks;b=b.bookmarks;if(d||b){if(!d||!b||d.length!=b.length)return!1;for(var c=0;c<d.length;c++){var a=d[c],e=b[c];if(a.startOffset!=e.startOffset||a.endOffset!=e.endOffset||!CKEDITOR.tools.arrayCompare(a.start,e.start)||!CKEDITOR.tools.arrayCompare(a.end,
e.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=function(b){this.undoManager=b;this.ignoreInputEvent=!1;this.keyEventsStack=new m;this.lastKeydownImage=null};l.prototype={onKeydown:function(b){var d=b.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(f,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 k(b.editor),e.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 b=this.keyEventsStack.getLast();b||(b=this.keyEventsStack.push(0));this.keyEventsStack.increment(b.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(b.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(!(e.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new k(d.editor,!0))))if(0<c)d.type(b);else if(e.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(b){var d=this.undoManager;!b&&d.save(!0,null,!1)||d.updateSelection(new k(d.editor));d.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=
!1},attachListeners:function(){var b=this.undoManager.editor,d=b.editable(),c=this;d.attachListener(d,"keydown",function(a){c.onKeydown(a);if(e.ieFunctionalKeysBug(a.data.getKey()))c.onInput()},null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",c.onInput,c,null,999);d.attachListener(d,"keyup",c.onKeyup,c,null,999);d.attachListener(d,"paste",c.ignoreInputEventListener,c,null,999);d.attachListener(d,"drop",c.ignoreInputEventListener,c,null,999);b.on("afterPaste",c.activateInputEventListener,
c,null,999);d.attachListener(d.isInline()?d:b.document.getDocumentElement(),"click",function(){c.onNavigationKey()},null,null,999);d.attachListener(this.undoManager.editor,"blur",function(){c.keyEventsStack.remove(9)},null,null,999)}};var m=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};m.prototype={push:function(b){b=this.stack.push({keyCode:b,inputs:0});return this.stack[b-1]},getLastIndex:function(b){if("number"!=typeof b)return this.stack.length-1;for(var d=this.stack.length;d--;)if(this.stack[d].keyCode==
b)return d;return-1},getLast:function(b){b=this.getLastIndex(b);return-1!=b?this.stack[b]:null},increment:function(b){this.getLast(b).inputs++},remove:function(b){b=this.getLastIndex(b);-1!=b&&this.stack.splice(b,1)},resetInputs:function(b){if("number"==typeof b)this.getLast(b).inputs=0;else for(b=this.stack.length;b--;)this.stack[b].inputs=0},getTotalInputs:function(){for(var b=this.stack.length,d=0;b--;)d+=this.stack[b].inputs;return d},cleanUp:function(b){b=b.data.$;b.ctrlKey||b.metaKey||this.remove(17);
b.shiftKey||this.remove(16);b.altKey||this.remove(18)}}}(),function(){function f(d){function e(c){var d=!1;a.attachListener(a,"keydown",function(){var a=b.getBody().getElementsByTag(c);if(!d){for(var e=0;e<a.count();e++)a.getItem(e).setCustomData("retain",!0);d=!0}},null,null,1);a.attachListener(a,"keyup",function(){var a=b.getElementsByTag(c);d&&(1==a.count()&&!a.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(a.getItem(0).getAttributes())&&a.getItem(0).remove(1),d=!1)})}var f=this.editor,
b=d.document,g=b.body,c=b.getElementById("cke_actscrpt");c&&c.parentNode.removeChild(c);(c=b.getElementById("cke_shimscrpt"))&&c.parentNode.removeChild(c);(c=b.getElementById("cke_basetagscrpt"))&&c.parentNode.removeChild(c);g.contentEditable=!0;CKEDITOR.env.ie&&(g.hideFocus=!0,g.disabled=!0,g.removeAttribute("disabled"));delete this._.isLoadingData;this.$=g;b=new CKEDITOR.dom.document(b);this.setup();this.fixInitialSelection();var a=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&b.getDocumentElement().addClass(b.$.compatMode);
CKEDITOR.env.ie&&!CKEDITOR.env.edge&&f.enterMode!=CKEDITOR.ENTER_P?e("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&f.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)b.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){f.editable().focus()})});h(f);try{f.document.$.execCommand("2D-position",!1,!0)}catch(k){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==f.document.$.compatMode)&&this.attachListener(this,
"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){f.getSelection().scrollIntoView()},0);else if(f.window.$.innerHeight>this.$.offsetHeight){var c=f.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(b,"blur",function(){try{b.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(b,"touchend",function(){d.focus()});g=f.document.getElementsByTag("title").getItem(0);
g.data("cke-title",g.getText());CKEDITOR.env.ie&&(f.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");f.fire("contentDom");this._.isPendingFocus&&(f.focus(),this._.isPendingFocus=!1);setTimeout(function(){f.fire("dataReady")},0)},0,this)}function h(d){function e(){var b;d.editable().attachListener(d,"selectionChange",function(){var a=d.getSelection().getSelectedElement();a&&(b&&(b.detachEvent("onresizestart",f),b=null),a.$.attachEvent("onresizestart",
f),b=a.$)})}function f(b){b.returnValue=!1}if(CKEDITOR.env.gecko)try{var b=d.document.$;b.execCommand("enableObjectResizing",!1,!d.config.disableObjectResizing);b.execCommand("enableInlineTableEditing",!1,!d.config.disableNativeTableHandles)}catch(g){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&d.config.disableObjectResizing&&e(d)}function e(){var d=[];if(8<=CKEDITOR.document.$.documentMode){d.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var e=[],f;for(f in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+
f+"[contenteditable\x3dfalse]");d.push(e.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(d.push("html{height:100% !important}"),d.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));d.push("html{cursor:text;*cursor:auto}");d.push("img,input,textarea{cursor:default}");return d.join("\n")}var k;CKEDITOR.plugins.add("wysiwygarea",{init:function(d){d.config.fullPage&&d.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});d.addMode("wysiwyg",function(e){function f(a){a&&a.removeListener();d.editable(new k(d,g.$.contentWindow.document.body));d.setData(d.getData(1),e)}var b="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",b=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(b)+"}())":"",g=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+b+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');
g.setStyles({width:"100%",height:"100%"});g.addClass("cke_wysiwyg_frame").addClass("cke_reset");b=d.ui.space("contents");b.append(g);var c=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(c)g.on("load",f);var a=d.title,h=d.fire("ariaEditorHelpLabel",{}).label;a&&(CKEDITOR.env.ie&&h&&(a+=", "+h),g.setAttribute("title",a));if(h){var a=CKEDITOR.tools.getNextId(),w=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+a+'" class\x3d"cke_voice_label"\x3e'+h+"\x3c/span\x3e");b.append(w,1);g.setAttribute("aria-describedby",
a)}d.on("beforeModeUnload",function(a){a.removeListener();w&&w.remove()});g.setAttributes({tabIndex:d.tabIndex,allowTransparency:"true"});!c&&f();d.fire("ariaWidget",g)})}});CKEDITOR.editor.prototype.addContentsCss=function(d){var e=this.config,f=e.contentsCss;CKEDITOR.tools.isArray(f)||(e.contentsCss=f?[f]:[]);e.contentsCss.push(d)};k=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(d){CKEDITOR.tools.setTimeout(f,
0,this,d)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(d,f){var h=this.editor;if(f)this.setHtml(d),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var b=h.config,g=b.fullPage,c=b.docType,a=CKEDITOR.tools.buildStyleHtml(e()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');g||(a+=CKEDITOR.tools.buildStyleHtml(h.config.contentsCss));var k=b.baseHref?'\x3cbase href\x3d"'+
b.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";g&&(d=d.replace(/<!DOCTYPE[^>]*>/i,function(a){h.docType=c=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){h.xmlDeclaration=a;return""}));d=h.dataProcessor.toHtml(d);g?(/<body[\s|>]/.test(d)||(d="\x3cbody\x3e"+d),/<html[\s|>]/.test(d)||(d="\x3chtml\x3e"+d+"\x3c/html\x3e"),/<head[\s|>]/.test(d)?/<title[\s|>]/.test(d)||(d=d.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):d=d.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),
k&&(d=d.replace(/<head[^>]*?>/,"$\x26"+k)),d=d.replace(/<\/head\s*>/,a+"$\x26"),d=c+d):d=b.docType+'\x3chtml dir\x3d"'+b.contentsLangDirection+'" lang\x3d"'+(b.contentsLanguage||h.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+k+a+"\x3c/head\x3e\x3cbody"+(b.bodyId?' id\x3d"'+b.bodyId+'"':"")+(b.bodyClass?' class\x3d"'+b.bodyClass+'"':"")+"\x3e"+d+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(d=d.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&
(d=d.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));b='\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.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&&(b+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
k&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');d=d.replace(/(?=\s*<\/(:?head)>)/,b);this.clearCustomData();this.clearListeners();h.fire("contentDomUnload");var w=this.getDocument();try{w.write(d)}catch(v){setTimeout(function(){w.write(d)},0)}}},getData:function(d){if(d)return this.getHtml();d=this.editor;var e=d.config,f=e.fullPage,b=f&&d.docType,g=f&&d.xmlDeclaration,
c=this.getDocument(),f=f?c.getDocumentElement().getOuterHtml():c.getBody().getHtml();CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(f=f.replace(/<br>(?=\s*(:?$|<\/body>))/,""));f=d.dataProcessor.toDataFormat(f);g&&(f=g+"\n"+f);b&&(f=b+"\n"+f);return f},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:k.baseProto.focus.call(this)},detach:function(){var d=this.editor,e=d.document,f;try{f=d.window.getFrame()}catch(b){}k.baseProto.detach.call(this);this.clearCustomData();e.getDocumentElement().clearCustomData();
CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);f&&f.getParent()?(f.clearCustomData(),(d=f.removeCustomData("onResize"))&&d.removeListener(),f.remove()):CKEDITOR.warn("editor-destroy-iframe")}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,autogrow,basicstyles,blockquote,notification,button,toolbar,clipboard,panel,floatpanel,menu,contextmenu,elementspath,enterkey,entities,popup,filetools,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,lineutils,widgetselection,widget,image2,indent,indentlist,justify,menubutton,language,list,magicline,maximize,pastefromword,pastetext,removeformat,sharedspace,showblocks,showborders,sourcearea,sourcedialog,specialchar,stylescombo,tab,table,tabletools,tableresize,undo,wysiwygarea",
CKEDITOR.config.skin="moono-lisa",function(){var f=function(f,e){var k=CKEDITOR.getUrl("plugins/"+e);f=f.split(",");for(var d=0;d<f.length;d++)CKEDITOR.skin.icons[f[d]]={path:k,offset:-f[++d],bgsize:f[++d]}};CKEDITOR.env.hidpi?f("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,blockquote,168,,copy-rtl,192,,copy,216,,cut-rtl,240,,cut,264,,paste-rtl,288,,paste,312,,horizontalrule,336,,image,360,,indent-rtl,384,,indent,408,,outdent-rtl,432,,outdent,456,,justifyblock,480,,justifycenter,504,,justifyleft,528,,justifyright,552,,language,576,,bulletedlist-rtl,600,,bulletedlist,624,,numberedlist-rtl,648,,numberedlist,672,,maximize,696,,pastefromword-rtl,720,,pastefromword,744,,pastetext-rtl,768,,pastetext,792,,removeformat,816,,showblocks-rtl,840,,showblocks,864,,source-rtl,888,,source,912,,sourcedialog-rtl,936,,sourcedialog,960,,specialchar,984,,table,1008,,redo-rtl,1032,,redo,1056,,undo-rtl,1080,,undo,1104,,simplebox,2256,auto",
"icons_hidpi.png"):f("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,blockquote,168,auto,copy-rtl,192,auto,copy,216,auto,cut-rtl,240,auto,cut,264,auto,paste-rtl,288,auto,paste,312,auto,horizontalrule,336,auto,image,360,auto,indent-rtl,384,auto,indent,408,auto,outdent-rtl,432,auto,outdent,456,auto,justifyblock,480,auto,justifycenter,504,auto,justifyleft,528,auto,justifyright,552,auto,language,576,auto,bulletedlist-rtl,600,auto,bulletedlist,624,auto,numberedlist-rtl,648,auto,numberedlist,672,auto,maximize,696,auto,pastefromword-rtl,720,auto,pastefromword,744,auto,pastetext-rtl,768,auto,pastetext,792,auto,removeformat,816,auto,showblocks-rtl,840,auto,showblocks,864,auto,source-rtl,888,auto,source,912,auto,sourcedialog-rtl,936,auto,sourcedialog,960,auto,specialchar,984,auto,table,1008,auto,redo-rtl,1032,auto,redo,1056,auto,undo-rtl,1080,auto,undo,1104,auto,simplebox,1128,auto",
"icons.png")}())})();