/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom)window.CKEDITOR||(window.CKEDITOR=function(){var c={timestamp:"DAID",version:"4.3 DEV",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var e=document.getElementsByTagName("script"),b=0;b<e.length;b++){var c=e[b].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(c){a=c[1];break}}-1==a.indexOf(":/")&&(a=0===a.indexOf("/")?
location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&("/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a))&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?
(document.removeEventListener("DOMContentLoaded",a,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),e())}catch(b){}}function e(){for(var e;e=b.shift();)e()}var b=[];return function(e){b.push(e);"complete"===document.readyState&&setTimeout(a,1);if(1==b.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",
a);window.attachEvent("onload",a);e=!1;try{e=!window.frameElement}catch(c){}if(document.documentElement.doScroll&&e){var f=function(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(f,1);return}a()};f()}}}}()},d=window.CKEDITOR_GETURL;if(d){var b=c.getUrl;c.getUrl=function(a){return d.call(c,a)||b.call(c,a)}}return c}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(c){var d=CKEDITOR.event.prototype,b;for(b in d)c[b]==void 0&&(c[b]=d[b])},CKEDITOR.event.prototype=
function(){function c(a){var e=d(this);return e[a]||(e[a]=new b(a))}var d=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var e=0,b=this.listeners;e<b.length;e++)if(b[e].fn==a)return e;return-1}};return{define:function(a,e){var b=c.call(this,a);CKEDITOR.tools.extend(b,e,true)},on:function(a,e,b,g,d){function f(c,l,k,f){c={name:a,sender:this,editor:c,data:l,listenerData:g,
stop:k,cancel:f,removeListener:j};return e.call(b,c)===false?false:c.data}function j(){o.removeListener(a,e)}var k=c.call(this,a);if(k.getListenerIndex(e)<0){k=k.listeners;b||(b=this);isNaN(d)&&(d=10);var o=this;f.fn=e;f.priority=d;for(var n=k.length-1;n>=0;n--)if(k[n].priority<=d){k.splice(n+1,0,f);return{removeListener:j}}k.unshift(f)}return{removeListener:j}},once:function(){var a=arguments[1];arguments[1]=function(e){e.removeListener();return a.apply(this,arguments)};return this.on.apply(this,
arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,e=function(){a=1},b=0,c=function(){b=1};return function(h,f,j){var k=d(this)[h],h=a,o=b;a=b=0;if(k){var n=k.listeners;if(n.length)for(var n=n.slice(0),q,l=0;l<n.length;l++){if(k.errorProof)try{q=n[l].call(this,j,f,e,c)}catch(m){}else q=n[l].call(this,j,f,e,c);q===false?b=1:typeof q!="undefined"&&(f=q);if(a||b)break}}f=b?false:typeof f=="undefined"?
true:f;a=h;b=o;return f}}(),fireOnce:function(a,e,b){e=this.fire(a,e,b);delete d(this)[a];return e},removeListener:function(a,e){var b=d(this)[a];if(b){var c=b.getListenerIndex(e);c>=0&&b.listeners.splice(c,1)}},removeAllListeners:function(){var a=d(this),e;for(e in a)delete a[e]},hasListeners:function(a){return(a=d(this)[a])&&a.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(c,d){c in{instanceReady:1,loaded:1}&&(this[c]=true);return CKEDITOR.event.prototype.fire.call(this,c,d,this)},CKEDITOR.editor.prototype.fireOnce=function(c,d){c in{instanceReady:1,loaded:1}&&(this[c]=true);return CKEDITOR.event.prototype.fireOnce.call(this,c,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var c=navigator.userAgent.toLowerCase(),d=window.opera,b={ie:c.indexOf("trident/")>-1,opera:!!d&&d.version,webkit:c.indexOf(" applewebkit/")>
-1,air:c.indexOf(" adobeair/")>-1,mac:c.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:c.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(c),isCustomDomain:function(){if(!this.ie)return false;var e=document.domain,a=window.location.hostname;return e!=a&&e!="["+a+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)c.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var a=0;if(b.ie){a=b.quirks||!document.documentMode?
parseFloat(c.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=a==9;b.ie8Compat=a==8;b.ie7Compat=a==7;b.ie6Compat=a<7||b.quirks&&a<10}if(b.gecko){var e=c.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");a=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}b.opera&&(a=parseFloat(d.version()));b.air&&(a=parseFloat(c.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(a=parseFloat(c.match(/ applewebkit\/(\d+)/)[1]));b.version=a;b.isCompatible=b.iOS&&a>=534||!b.mobile&&(b.ie&&a>6||b.gecko&&a>=10801||b.opera&&a>=9.5||b.air&&
a>=1||b.webkit&&a>=522||false);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&a>10;b.needsNbspFiller=b.ie&&a<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(a<10900)b.cssClass=b.cssClass+" cke_browser_gecko18";
else if(a<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var c=document.createElement("script");c.type="text/javascript";c.src=CKEDITOR.basePath+
"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(c)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(c){(this._.pending||(this._.pending=[])).push(c)};(function(){CKEDITOR.domReady(function(){var c=CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;if(c){CKEDITOR.status="basic_ready";c&&c._load?c():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},d*1E3)}})})();CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var c=[],d=CKEDITOR.env.gecko?
"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){c=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var e=0;e<b.length;e++)if(b[e]!=a[e])return false;return true},clone:function(b){var a;if(b&&b instanceof Array){a=[];for(var e=0;e<b.length;e++)a[e]=CKEDITOR.tools.clone(b[e]);return a}if(b===null||typeof b!="object"||b instanceof String||b instanceof Number||
b instanceof Boolean||b instanceof Date||b instanceof RegExp)return b;a=new b.constructor;for(e in b)a[e]=CKEDITOR.tools.clone(b[e]);return a},capitalize:function(b,a){return b.charAt(0).toUpperCase()+(a?b.slice(1):b.slice(1).toLowerCase())},extend:function(b){var a=arguments.length,e,c;if(typeof(e=arguments[a-1])=="boolean")a--;else if(typeof(e=arguments[a-2])=="boolean"){c=arguments[a-1];a=a-2}for(var g=1;g<a;g++){var d=arguments[g],f;for(f in d)if(e===true||b[f]==void 0)if(!c||f in c)b[f]=d[f]}return b},
prototypedCopy:function(b){var a=function(){};a.prototype=b;return new a},copy:function(b){var a={},e;for(e in b)a[e]=b[e];return a},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isEmpty:function(b){for(var a in b)if(b.hasOwnProperty(a))return false;return true},cssVendorPrefix:function(b,a,e){if(e)return d+b+":"+a+";"+b+":"+a;e={};e[b]=a;e[d+b]=a;return e},cssStyleToDomStyle:function(){var b=document.createElement("div").style,a=typeof b.cssFloat!="undefined"?"cssFloat":
typeof b.styleFloat!="undefined"?"styleFloat":"float";return function(e){return e=="float"?a:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(b){for(var b=[].concat(b),a,e=[],c=0;c<b.length;c++)if(a=b[c])/@import|[{}]/.test(a)?e.push("<style>"+a+"</style>"):e.push('<link type="text/css" rel=stylesheet href="'+a+'">');return e.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")},htmlEncodeAttr:function(b){return b.replace(/"/g,
"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},htmlDecodeAttr:function(b){return b.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var e=a(b);e.prototype=b.prototype;return e},setTimeout:function(b,a,e,c,g){g||(g=window);e||(e=g);return g.setTimeout(function(){c?b.apply(e,[].concat(c)):b.apply(e)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var e=0,c=b.length;e<c;e++){if(a(b[e]))return e}else{if(b.indexOf)return b.indexOf(a);e=0;for(c=b.length;e<c;e++)if(b[e]===a)return e}return-1},search:function(b,a){var e=CKEDITOR.tools.indexOf(b,a);return e>=0?b[e]:null},bind:function(b,
a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,e=b.base,c=b.privates||b._,g=b.proto,b=b.statics;!a&&(a=function(){e&&this.base.apply(this,arguments)});if(c)var d=a,a=function(){var e=this._||(this._={}),a;for(a in c){var b=c[a];e[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}d.apply(this,arguments)};if(e){a.prototype=this.prototypedCopy(e.prototype);a.prototype.constructor=a;a.base=e;a.baseProto=e.prototype;a.prototype.base=function(){this.base=e.prototype.base;
e.apply(this,arguments);this.base=arguments.callee}}g&&this.extend(a.prototype,g,true);b&&this.extend(a,b,true);return a},addFunction:function(b,a){return c.push(function(){return b.apply(a||this,arguments)})-1},removeFunction:function(b){c[b]=null},callFunction:function(b){var a=c[b];return a&&a.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var b=/^-?\d+\.?\d*px$/,a;return function(e){a=CKEDITOR.tools.trim(e+"")+"px";return b.test(a)?a:e||""}}(),convertToPx:function(){var b;
return function(a){if(!b){b=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(b)}if(!/%$/.test(a)){b.setStyle("width",a);return b.$.clientWidth}return a}}(),repeat:function(b,a){return Array(a+1).join(b)},tryThese:function(){for(var b,a=0,e=arguments.length;a<e;a++){var c=arguments[a];try{b=c();break}catch(g){}}return b},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},
defer:function(b){return function(){var a=arguments,e=this;window.setTimeout(function(){b.apply(e,a)},0)}},normalizeCssText:function(b,a){var e=[],c,g=CKEDITOR.tools.parseCssText(b,true,a);for(c in g)e.push(c+":"+g[c]);e.sort();return e.length?e.join(";")+";":""},convertRgbToHex:function(b){return b.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,e,b,c){a=[e,b,c];for(e=0;e<3;e++)a[e]=("0"+parseInt(a[e],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(b,
a,e){var c={};if(e){e=new CKEDITOR.dom.element("span");e.setAttribute("style",b);b=CKEDITOR.tools.convertRgbToHex(e.getAttribute("style")||"")}if(!b||b==";")return c;b.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,b,f){if(a){b=b.toLowerCase();b=="font-family"&&(f=f.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,","));f=CKEDITOR.tools.trim(f)}c[b]=f});return c},writeCssText:function(b,a){var e,c=[];for(e in b)c.push(e+":"+b[e]);a&&c.sort();return c.join("; ")},
objectCompare:function(b,a,e){var c;if(!b&&!a)return true;if(!b||!a)return false;for(c in b)if(b[c]!=a[c])return false;if(!e)for(c in a)if(b[c]!=a[c])return false;return true},objectKeys:function(b){var a=[],e;for(e in b)a.push(e);return a},convertArrayToObject:function(b,a){var e={};arguments.length==1&&(a=true);for(var c=0,g=b.length;c<g;++c)e[b[c]]=a;return e},fixDomain:function(){for(var b;;)try{b=window.parent.document.domain;break}catch(a){b=b?b.replace(/.+?(?:\.|$)/,""):document.domain;if(!b)break;
document.domain=b}return!!b},eventsBuffer:function(b,a){function e(){g=(new Date).getTime();c=false;a()}var c,g=0;return{input:function(){if(!c){var a=(new Date).getTime()-g;a<b?c=setTimeout(e,b-a):e()}},reset:function(){c&&clearTimeout(c);c=g=0}}},enableHtml5Elements:function(b,a){for(var e=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],c=e.length,
g;c--;){g=b.createElement(e[c]);a&&b.appendChild(g)}}}}(),CKEDITOR.dtd=function(){var c=CKEDITOR.tools.extend,d=function(e,a){for(var b=CKEDITOR.tools.clone(e),c=1;c<arguments.length;c++){var a=arguments[c],i;for(i in a)delete b[i]}return b},b={},a={},e={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,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},i={command:1,link:1,meta:1,noscript:1,script:1,
style:1},g={},h={"#":1},f={center:1,dir:1,noframes:1};c(b,{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},h,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});
c(a,e,b,f);d={a:d(b,{a:1,button:1}),abbr:b,address:a,area:g,article:c({style:1},a),aside:c({style:1},a),audio:c({source:1,track:1},a),b:b,base:g,bdi:b,bdo:b,blockquote:a,body:a,br:g,button:d(b,{a:1,button:1}),canvas:b,caption:a,cite:b,code:b,col:g,colgroup:{col:1},command:g,datalist:c({option:1},b),dd:a,del:b,details:c({summary:1},a),dfn:b,div:c({style:1},a),dl:{dt:1,dd:1},dt:a,em:b,embed:g,fieldset:c({legend:1},a),figcaption:a,figure:c({figcaption:1},a),footer:a,form:a,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,
head:c({title:1,base:1},i),header:a,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:g,html:c({head:1,body:1},a,i),i:b,iframe:h,img:g,input:g,ins:b,kbd:b,keygen:g,label:b,legend:b,li:a,link:g,map:a,mark:b,menu:c({li:1},a),meta:g,meter:d(b,{meter:1}),nav:a,noscript:c({link:1,meta:1,style:1},b),object:c({param:1},b),ol:{li:1},optgroup:{option:1},option:h,output:b,p:b,param:g,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:c({rp:1,rt:1},b),s:b,samp:b,script:h,section:c({style:1},a),select:{optgroup:1,option:1},
small:b,source:g,span:b,strong:b,style:h,sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:a,textarea:h,tfoot:{tr:1},th:a,thead:{tr:1},time:d(b,{time:1}),title:h,tr:{th:1,td:1},track:g,u:b,ul:{li:1},"var":b,video:c({source:1,track:1},a),wbr:g,acronym:b,applet:c({param:1},a),basefont:g,big:b,center:a,dialog:g,dir:{li:1},font:b,isindex:g,noframes:a,strike:b,tt:b};c(d,{$block:c({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},e,f),$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,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,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:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:c({body:1,head:1,html:1},d.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 d}(),
CKEDITOR.dom.event=function(c){this.$=c},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var c=this.getKey();if(this.$.ctrlKey||this.$.metaKey)c=c+CKEDITOR.CTRL;this.$.shiftKey&&(c=c+CKEDITOR.SHIFT);this.$.altKey&&(c=c+CKEDITOR.ALT);return c},preventDefault:function(c){var d=this.$;d.preventDefault?d.preventDefault():d.returnValue=false;c&&this.stopPropagation()},stopPropagation:function(){var c=this.$;c.stopPropagation?c.stopPropagation():
c.cancelBubble=true},getTarget:function(){var c=this.$.target||this.$.srcElement;return c?new CKEDITOR.dom.node(c):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var c=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(c.documentElement.scrollLeft||c.body.scrollLeft),y:this.$.pageY||this.$.clientY+(c.documentElement.scrollTop||c.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=
1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(c){if(c)this.$=c},CKEDITOR.dom.domObject.prototype=function(){var c=function(c,b){return function(a){typeof CKEDITOR!="undefined"&&c.fire(b,new CKEDITOR.dom.event(a))}};return{getPrivate:function(){var c;if(!(c=this.getCustomData("_")))this.setCustomData("_",c={});return c},on:function(d){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",b)}if(!b[d]){b=
b[d]=c(this,d);this.$.addEventListener?this.$.addEventListener(d,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+d,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(c){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(c)){var b=this.getCustomData("_cke_nativeListeners"),a=b&&b[c];if(a){this.$.removeEventListener?this.$.removeEventListener(c,a,false):this.$.detachEvent&&this.$.detachEvent("on"+c,a);delete b[c]}}},
removeAllListeners:function(){var c=this.getCustomData("_cke_nativeListeners"),b;for(b in c){var a=c[b];this.$.detachEvent?this.$.detachEvent("on"+b,a):this.$.removeEventListener&&this.$.removeEventListener(b,a,false);delete c[b]}}}}(),function(c){var d={};CKEDITOR.on("reset",function(){d={}});c.equals=function(b){try{return b&&b.$===this.$}catch(a){return false}};c.setCustomData=function(b,a){var e=this.getUniqueId();(d[e]||(d[e]={}))[b]=a;return this};c.getCustomData=function(b){var a=this.$["data-cke-expando"];
return(a=a&&d[a])&&b in a?a[b]:null};c.removeCustomData=function(b){var a=this.$["data-cke-expando"],a=a&&d[a],e,c;if(a){e=a[b];c=b in a;delete a[b]}return c?e:null};c.clearCustomData=function(){this.removeAllListeners();var b=this.$["data-cke-expando"];b&&delete d[b]};c.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(c)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(c){return c?new CKEDITOR.dom[c.nodeType==
CKEDITOR.NODE_DOCUMENT?"document":c.nodeType==CKEDITOR.NODE_ELEMENT?"element":c.nodeType==CKEDITOR.NODE_TEXT?"text":c.nodeType==CKEDITOR.NODE_COMMENT?"comment":c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](c):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=
2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(c,d){c.append(this,d);return c},clone:function(c,d){var b=this.$.cloneNode(c),a=function(e){e["data-cke-expando"]&&(e["data-cke-expando"]=false);if(e.nodeType==CKEDITOR.NODE_ELEMENT){d||e.removeAttribute("id",false);if(c)for(var e=e.childNodes,b=0;b<e.length;b++)a(e[b])}};a(b);return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},
hasNext:function(){return!!this.$.nextSibling},insertAfter:function(c){c.$.parentNode.insertBefore(this.$,c.$.nextSibling);return c},insertBefore:function(c){c.$.parentNode.insertBefore(this.$,c.$);return c},insertBeforeMe:function(c){this.$.parentNode.insertBefore(c.$,this.$);return c},getAddress:function(c){for(var d=[],b=this.getDocument().$.documentElement,a=this.$;a&&a!=b;){var e=a.parentNode;e&&d.unshift(this.getIndex.call({$:a},c));a=e}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||
this.$.parentNode.ownerDocument)},getIndex:function(c){var d=this.$,b=-1,a;if(!this.$.parentNode)return b;do if(!c||!(d!=this.$&&d.nodeType==CKEDITOR.NODE_TEXT&&(a||!d.nodeValue))){b++;a=d.nodeType==CKEDITOR.NODE_TEXT}while(d=d.previousSibling);return b},getNextSourceNode:function(c,d,b){if(b&&!b.call)var a=b,b=function(e){return!e.equals(a)};var c=!c&&this.getFirst&&this.getFirst(),e;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;c=this.getNext()}for(;!c&&(e=(e||
this).getParent());){if(b&&b(e,true)===false)return null;c=e.getNext()}return!c||b&&b(c)===false?null:d&&d!=c.type?c.getNextSourceNode(false,d,b):c},getPreviousSourceNode:function(c,d,b){if(b&&!b.call)var a=b,b=function(e){return!e.equals(a)};var c=!c&&this.getLast&&this.getLast(),e;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;c=this.getPrevious()}for(;!c&&(e=(e||this).getParent());){if(b&&b(e,true)===false)return null;c=e.getPrevious()}return!c||b&&b(c)===false?
null:d&&c.type!=d?c.getPreviousSourceNode(false,d,b):c},getPrevious:function(c){var d=this.$,b;do b=(d=d.previousSibling)&&d.nodeType!=10&&new CKEDITOR.dom.node(d);while(b&&c&&!c(b));return b},getNext:function(c){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&c&&!c(b));return b},getParent:function(c){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||c&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(d):null},getParents:function(c){var d=
this,b=[];do b[c?"push":"unshift"](d);while(d=d.getParent());return b},getCommonAncestor:function(c){if(c.equals(this))return this;if(c.contains&&c.contains(this))return c;var d=this.contains?this:this.getParent();do if(d.contains(c))return d;while(d=d.getParent());return null},getPosition:function(c){var d=this.$,b=c.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&c.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return d.sourceIndex<0||b.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var d=this.getAddress(),c=c.getAddress(),b=Math.min(d.length,c.length),a=0;a<=b-1;a++)if(d[a]!=c[a]){if(a<b)return d[a]<c[a]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return d.length<c.length?
CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(c,d){var b=this.$,a;if(!d)b=b.parentNode;for(;b;){if(b.nodeName&&(a=b.nodeName.toLowerCase(),typeof c=="string"?a==c:a in c))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(e){b=null}}return null},hasAscendant:function(c,d){var b=this.$;if(!d)b=b.parentNode;for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==c)return true;b=b.parentNode}return false},move:function(c,
d){c.append(this.remove(),d)},remove:function(c){var d=this.$,b=d.parentNode;if(b){if(c)for(;c=d.firstChild;)b.insertBefore(d.removeChild(c),d);b.removeChild(d)}return this},replace:function(c){this.insertBefore(c);c.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var c;this.getFirst&&(c=this.getFirst());){if(c.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.ltrim(c.getText()),b=c.getLength();if(d){if(d.length<b){c.split(b-d.length);this.$.removeChild(this.$.firstChild)}}else{c.remove();
continue}}break}},rtrim:function(){for(var c;this.getLast&&(c=this.getLast());){if(c.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.rtrim(c.getText()),b=c.getLength();if(d){if(d.length<b){c.split(d.length);this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{c.remove();continue}}break}if(CKEDITOR.env.needsBrFiller)(c=this.$.lastChild)&&(c.type==1&&c.nodeName.toLowerCase()=="br")&&c.parentNode.removeChild(c)},isReadOnly:function(){var c=this;this.type!=CKEDITOR.NODE_ELEMENT&&(c=this.getParent());
if(c&&typeof c.$.isContentEditable!="undefined")return!(c.$.isContentEditable||c.data("cke-editable"));for(;c;){if(c.data("cke-editable"))break;if(c.getAttribute("contentEditable")=="false")return true;if(c.getAttribute("contentEditable")=="true")break;c=c.getParent()}return!c}}),CKEDITOR.dom.window=function(c){CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var c=
this.$.document,d=c.compatMode=="CSS1Compat";return{width:(d?c.documentElement.clientWidth:c.body.clientWidth)||0,height:(d?c.documentElement.clientHeight:c.body.clientHeight)||0}},getScrollPosition:function(){var c=this.$;if("pageXOffset"in c)return{x:c.pageXOffset||0,y:c.pageYOffset||0};c=c.document;return{x:c.documentElement.scrollLeft||c.body.scrollLeft||0,y:c.documentElement.scrollTop||c.body.scrollTop||0}},getFrame:function(){var c=this.$.frameElement;return c?new CKEDITOR.dom.element.get(c):
null}}),CKEDITOR.dom.document=function(c){CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(c){if(this.$.createStyleSheet)this.$.createStyleSheet(c);else{var d=new CKEDITOR.dom.element("link");d.setAttributes({rel:"stylesheet",type:"text/css",href:c});this.getHead().append(d)}},appendStyleText:function(c){if(this.$.createStyleSheet){var d=this.$.createStyleSheet("");
d.cssText=c}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(c,this));this.getHead().append(b)}return d||b.$.sheet},createElement:function(c,d){var b=new CKEDITOR.dom.element(c,this);if(d){d.attributes&&b.setAttributes(d.attributes);d.styles&&b.setStyles(d.styles)}return b},createText:function(c){return new CKEDITOR.dom.text(c,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(c){return(c=
this.$.getElementById(c))?new CKEDITOR.dom.element(c):null},getByAddress:function(c,d){for(var b=this.$.documentElement,a=0;b&&a<c.length;a++){var e=c[a];if(d)for(var i=-1,g=0;g<b.childNodes.length;g++){var h=b.childNodes[g];if(!(d===true&&h.nodeType==3&&h.previousSibling&&h.previousSibling.nodeType==3)){i++;if(i==e){b=h;break}}}else b=b.childNodes[e]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(c,d){if((!CKEDITOR.env.ie||document.documentMode>8)&&d)c=d+":"+c;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(c))},
getHead:function(){var c=this.$.getElementsByTagName("head")[0];return c=c?new CKEDITOR.dom.element(c):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(c){this.$.open("text/html","replace");CKEDITOR.env.ie&&(c=c.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,
'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();<\/script>"));this.$.write(c);this.$.close()},find:function(c){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c))},findOne:function(c){return(c=this.$.querySelector(c))?new CKEDITOR.dom.element(c):null},_getHtml5ShivFrag:function(){var c=this.getCustomData("html5ShivFrag");if(!c){c=this.$.createDocumentFragment();CKEDITOR.tools.enableHtml5Elements(c,true);this.setCustomData("html5ShivFrag",c)}return c}}),CKEDITOR.dom.nodeList=
function(c){this.$=c},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(c){if(c<0||c>=this.$.length)return null;return(c=this.$[c])?new CKEDITOR.dom.node(c):null}},CKEDITOR.dom.element=function(c,d){typeof c=="string"&&(c=(d?d.$:document).createElement(c));CKEDITOR.dom.domObject.call(this,c)},CKEDITOR.dom.element.get=function(c){return(c=typeof c=="string"?document.getElementById(c)||document.getElementsByName(c)[0]:c)&&(c.$?c:new CKEDITOR.dom.element(c))},CKEDITOR.dom.element.prototype=
new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(c,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(c);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(c,d,b,a){var e=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),i=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");c[e]=d;i[b]=1;return d.setCustomData(b,a)},CKEDITOR.dom.element.clearAllMarkers=
function(c){for(var d in c)CKEDITOR.dom.element.clearMarkers(c,c[d],1)},CKEDITOR.dom.element.clearMarkers=function(c,d,b){var a=d.getCustomData("list_marker_names"),e=d.getCustomData("list_marker_id"),i;for(i in a)d.removeCustomData(i);d.removeCustomData("list_marker_names");if(b){d.removeCustomData("list_marker_id");delete c[e]}},function(){function c(e){var a=true;if(!e.$.id){e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();a=false}return function(){a||e.removeAttribute("id")}}function d(e,a){return"#"+
e.$.id+" "+a.split(/,\s*/).join(", #"+e.$.id+" ")}function b(e){for(var b=0,c=0,d=a[e].length;c<d;c++)b=b+(parseInt(this.getComputedStyle(a[e][c])||0,10)||0);return b}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(e){var a=this.$.className;a&&(RegExp("(?:^|\\s)"+e+"(?:\\s|$)","").test(a)||(a=a+(" "+e)));this.$.className=a||e},removeClass:function(e){var a=this.getAttribute("class");if(a){e=RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","i");if(e.test(a))(a=a.replace(e,
"").replace(/^\s+/,""))?this.setAttribute("class",a):this.removeAttribute("class")}return this},hasClass:function(e){return RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(e,a){typeof e=="string"&&(e=this.getDocument().createElement(e));a?this.$.insertBefore(e.$,this.$.firstChild):this.$.appendChild(e.$);return e},appendHtml:function(e){if(this.$.childNodes.length){var a=new CKEDITOR.dom.element("div",this.getDocument());a.setHtml(e);a.moveChildren(this)}else this.setHtml(e)},
appendText:function(e){this.$.text!=void 0?this.$.text=this.$.text+e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(e){if(e||CKEDITOR.env.needsBrFiller||CKEDITOR.env.opera){for(e=this.getLast();e&&e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(e.getText());)e=e.getPrevious();if(!e||!e.is||!e.is("br")){e=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br");CKEDITOR.env.gecko&&e.setAttribute("type","_moz");this.append(e)}}},breakParent:function(e){var a=
new CKEDITOR.dom.range(this.getDocument());a.setStartAfter(this);a.setEndAfter(e);e=a.extractContents();a.insertNode(this.remove());e.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e){var a=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?a.contains(e.getParent().$):a!=e.$&&a.contains(e.$)}:function(e){return!!(this.$.compareDocumentPosition(e.$)&16)},focus:function(){function e(){try{this.$.focus()}catch(e){}}return function(a){a?CKEDITOR.tools.setTimeout(e,100,this):e.call(this)}}(),
getHtml:function(){var e=this.$.innerHTML;return CKEDITOR.env.ie?e.replace(/<\?[^>]*>/g,""):e},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var e=this.$.ownerDocument.createElement("div");e.appendChild(this.$.cloneNode(true));return e.innerHTML},getClientRect:function(){var e=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!e.width&&(e.width=e.right-e.left);!e.height&&(e.height=e.bottom-e.top);return e},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<
9?function(e){try{var a=this.$;if(this.getParent())return a.innerHTML=e;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(a);a.innerHTML=e;b.removeChild(a);return e}catch(c){this.$.innerHTML="";a=new CKEDITOR.dom.element("body",this.getDocument());a.$.innerHTML=e;for(a=a.getChildren();a.count();)this.append(a.getItem(0));return e}}:function(e){return this.$.innerHTML=e},setText:function(e){CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(e){return this.$.innerText=
e}:function(e){return this.$.textContent=e};return this.setText(e)},getAttribute:function(){var e=function(e){return this.$.getAttribute(e,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){switch(e){case "class":e="className";break;case "http-equiv":e="httpEquiv";break;case "name":return this.$.name;case "tabindex":e=this.$.getAttribute(e,2);e!==0&&this.$.tabIndex===0&&(e=null);return e;case "checked":e=this.$.attributes.getNamedItem(e);return(e.specified?e.nodeValue:
this.$.checked)?"checked":null;case "hspace":case "value":return this.$[e];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(e,2)}:e}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){var a=
this.getWindow().$.getComputedStyle(this.$,null);return a?a.getPropertyValue(e):""},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return e};return e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var e=this.$.tabIndex;e===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(e=-1);return e}:CKEDITOR.env.webkit?function(){var e=this.$.tabIndex;if(e==void 0){e=parseInt(this.getAttribute("tabindex"),
10);isNaN(e)&&(e=-1)}return e}:function(){return this.$.tabIndex},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 e=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var a=this.$.scopeName;a!="HTML"&&(e=a.toLowerCase()+":"+e)}return(this.getName=function(){return e})()},getValue:function(){return this.$.value},
getFirst:function(e){var a=this.$.firstChild;(a=a&&new CKEDITOR.dom.node(a))&&(e&&!e(a))&&(a=a.getNext(e));return a},getLast:function(e){var a=this.$.lastChild;(a=a&&new CKEDITOR.dom.node(a))&&(e&&!e(a))&&(a=a.getPrevious(e));return a},getStyle:function(e){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]},is:function(){var e=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][e];for(var a=0;a<arguments.length;a++)if(arguments[a]==e)return true;return false},isEditable:function(e){var a=
this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[a]||CKEDITOR.dtd.$empty[a]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(e!==false){e=CKEDITOR.dtd[a]||CKEDITOR.dtd.span;return!(!e||!e["#"])}return true},isIdentical:function(e){var a=this.clone(0,1),e=e.clone(0,1);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href",
"data-cke-saved-name"]);e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(a.$.isEqualNode){a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText);return a.$.isEqualNode(e.$)}a=a.getOuterHtml();e=e.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var b=this.getParent();if(b.type==CKEDITOR.NODE_ELEMENT){b=b.clone();b.setHtml(a);a=b.getHtml();b.setHtml(e);
e=b.getHtml()}}return a==e},isVisible:function(){var e=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",a,b;if(e&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)){a=this.getWindow();if(!a.equals(CKEDITOR.document.getWindow())&&(b=a.$.frameElement))e=(new CKEDITOR.dom.element(b)).isVisible()}return!!e},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var e=this.getChildren(),a=0,b=e.count();a<b;a++){var c=e.getItem(a);
if(!(c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-bookmark"))&&(c.type==CKEDITOR.NODE_ELEMENT&&!c.isEmptyInlineRemoveable()||c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var e=this.$.attributes,a=0;a<e.length;a++){var b=e[a];switch(b.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;default:if(b.specified)return true}}return false}:
function(){var e=this.$.attributes,a=e.length,b={"data-cke-expando":1,_moz_dirty:1};return a>0&&(a>2||!b[e[0].nodeName]||a==2&&!b[e[1].nodeName])},hasAttribute:function(){function e(e){e=this.$.attributes.getNamedItem(e);return!(!e||!e.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(a){return a=="name"?!!this.$.name:e.call(this,a)}:e}(),hide:function(){this.setStyle("display","none")},moveChildren:function(e,a){var b=this.$,e=e.$;if(b!=e){var c;if(a)for(;c=b.lastChild;)e.insertBefore(b.removeChild(c),
e.firstChild);else for(;c=b.firstChild;)e.appendChild(b.removeChild(c))}},mergeSiblings:function(){function e(e,a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT){for(var c=[];a.data("cke-bookmark")||a.isEmptyInlineRemoveable();){c.push(a);a=b?a.getNext():a.getPrevious();if(!a||a.type!=CKEDITOR.NODE_ELEMENT)return}if(e.isIdentical(a)){for(var d=b?e.getLast():e.getFirst();c.length;)c.shift().move(e,!b);a.moveChildren(e,!b);a.remove();d&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings()}}}return function(a){if(a===
false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){e(this,this.getNext(),true);e(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var e=function(e,a){this.$.setAttribute(e,a);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a,b){a=="class"?this.$.className=b:a=="style"?this.$.style.cssText=b:a=="tabindex"?this.$.tabIndex=b:a=="checked"?this.$.checked=b:a=="contenteditable"?e.call(this,
"contentEditable",b):e.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(a,b){if(a=="src"&&b.match(/^http:\/\//))try{e.apply(this,arguments)}catch(c){}else e.apply(this,arguments);return this}:e}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?
function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(!b.removeProperty&&(a=="border"||a=="margin"||a=="padding")){var c=["top","left","right","bottom"],d;a=="border"&&(d=["color","style","width"]);
for(var b=[],f=0;f<c.length;f++)if(d)for(var j=0;j<d.length;j++)b.push([a,c[f],d[j]].join("-"));else b.push([a,c[f]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}else{b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&
CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,d=b.count();c<d;c++){a=b.getItem(c);a.setAttribute("unselectable","on")}}},getPositionedAncestor:function(){for(var a=
this;a.getName()!="html";){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,d=this.getDocument(),f=d.getBody(),j=d.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var k=this.$.getBoundingClientRect(),o=d.$.documentElement,n=o.clientTop||f.$.clientTop||0,q=o.clientLeft||f.$.clientLeft||0,l=true;if(CKEDITOR.env.ie){l=d.getDocumentElement().contains(this);d=d.getBody().contains(this);l=j&&d||!j&&
l}if(l){b=k.left+(!j&&o.scrollLeft||f.$.scrollLeft);b=b-q;c=k.top+(!j&&o.scrollTop||f.$.scrollTop);c=c-n}}else{f=this;for(d=null;f&&!(f.getName()=="body"||f.getName()=="html");){b=b+(f.$.offsetLeft-f.$.scrollLeft);c=c+(f.$.offsetTop-f.$.scrollTop);if(!f.equals(this)){b=b+(f.$.clientLeft||0);c=c+(f.$.clientTop||0)}for(;d&&!d.equals(f);){b=b-d.$.scrollLeft;c=c-d.$.scrollTop;d=d.getParent()}d=f;f=(k=f.$.offsetParent)?new CKEDITOR.dom.element(k):null}}if(a){f=this.getWindow();d=a.getWindow();if(!f.equals(d)&&
f.$.frameElement){a=(new CKEDITOR.dom.element(f.$.frameElement)).getDocumentPosition(a);b=b+a.x;c=c+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!j){b=b+(this.$.clientLeft?1:0);c=c+(this.$.clientTop?1:0)}return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do{(b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1);if(b.is("html")){var c=b.getWindow();try{var d=
c.$.frameElement;d&&(b=new CKEDITOR.dom.element(d))}catch(f){}}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var d,f,j,k;function o(b,c){if(/body|html/.test(a.getName()))a.getWindow().$.scrollBy(b,c);else{a.$.scrollLeft=a.$.scrollLeft+b;a.$.scrollTop=a.$.scrollTop+c}}function n(a,e){var b={x:0,y:0};if(!a.is(l?"body":"html")){var c=a.$.getBoundingClientRect();b.x=c.left;b.y=c.top}c=a.getWindow();if(!c.equals(e)){c=n(CKEDITOR.dom.element.get(c.$.frameElement),e);b.x=b.x+c.x;b.y=b.y+c.y}return b}
function q(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());j=a.getDocument();var l=j.$.compatMode=="BackCompat";a instanceof CKEDITOR.dom.window&&(a=l?j.getBody():j.getDocumentElement());j=a.getWindow();f=n(this,j);var m=n(a,j),r=this.$.offsetHeight;d=this.$.offsetWidth;var p=a.$.clientHeight,z=a.$.clientWidth;j=f.x-q(this,"left")-m.x||0;k=f.y-q(this,"top")-m.y||0;d=f.x+d+q(this,"right")-(m.x+z)||0;f=f.y+r+q(this,"bottom")-(m.y+p)||0;if(k<0||f>0)o(0,b===true?
k:b===false?f:k<0?k:f);if(c&&(j<0||d>0))o(j<0?j:d,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+
"_off");this.removeClass(b+"_on");this.removeClass(b+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){for(var c=this.$.attributes,b=b||{},d=0;d<c.length;d++){var f=c[d],j=f.nodeName.toLowerCase(),k;if(!(j in b))if(j=="checked"&&(k=this.getAttribute(j)))a.setAttribute(j,k);
else if(f.specified||CKEDITOR.env.ie&&f.nodeValue&&j=="value"){k=this.getAttribute(j);if(k===null)k=f.nodeValue;a.setAttribute(j,k)}}if(this.$.style.cssText!=="")a.$.style.cssText=this.$.style.cssText},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument(),a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent()&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$}},getChild:function(){function a(b,
e){var c=b.childNodes;if(e>=0&&e<c.length)return c[e]}return function(b){var c=this.$;if(b.slice)for(;b.length>0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&
this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(b===void 0)return this.getAttribute(a);b===false?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(){var a=CKEDITOR.instances,b,c;for(b in a){c=a[b];if(c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null},find:function(a){var b=c(this),a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(d(this,
a)));b();return a},findOne:function(a){var b=c(this),a=this.$.querySelector(d(this,a));b();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var d=a(this);if(d!==false)for(var c=this.getChildren(),f=0;f<c.count();f++){d=c.getItem(f);d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):(!b||d.type==b)&&a(d)}}});var a={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
CKEDITOR.dom.element.prototype.setSize=function(a,c,d){if(typeof c=="number"){if(d&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(d=d-b.call(this,a));return d}}(),CKEDITOR.dom.documentFragment=function(c){c=c||CKEDITOR.document;this.$=c.type==CKEDITOR.NODE_DOCUMENT?c.$.createDocumentFragment():
c},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(c){c=c.$;c.parentNode.insertBefore(this.$,c.nextSibling)}},!0,{append:1,appendBogus:1,getFirst: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 c(a,b){var c=this.range;
if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var e,k=c.startContainer;e=c.endContainer;var d=c.startOffset,f=c.endOffset,i,g=this.guard,h=this.type,j=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var u=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),s=e.type==CKEDITOR.NODE_ELEMENT?e.getChild(f):e.getNext();this._.guardLTR=function(a,b){return(!b||!u.equals(a))&&(!s||!a.equals(s))&&(a.type!=CKEDITOR.NODE_ELEMENT||
!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var w=k.type==CKEDITOR.NODE_ELEMENT?k:k.getParent(),x=k.type==CKEDITOR.NODE_ELEMENT?d?k.getChild(d-1):null:k.getPrevious();this._.guardRTL=function(a,b){return(!b||!w.equals(a))&&(!x||!a.equals(x))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var v=a?this._.guardRTL:this._.guardLTR;i=g?function(a,b){return v(a,b)===false?false:g(a,b)}:v;if(this.current)e=this.current[j](false,h,i);else{if(a)e.type==CKEDITOR.NODE_ELEMENT&&(e=f>0?e.getChild(f-
1):i(e,true)===false?null:e.getPreviousSourceNode(true,h,i));else{e=k;if(e.type==CKEDITOR.NODE_ELEMENT&&!(e=e.getChild(d)))e=i(k,true)===false?null:k.getNextSourceNode(true,h,i)}e&&i(e)===false&&(e=null)}for(;e&&!this._.end;){this.current=e;if(!this.evaluator||this.evaluator(e)!==false){if(!b)return e}else if(b&&this.evaluator)return false;e=e[j](false,h,i)}this.end();return this.current=null}function d(a){for(var b,e=null;b=c.call(this,a);)e=b;return e}function b(a){if(j(a))return false;if(a.type==
CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(k))a:{b=0;for(var c=a.getChildCount();b<c;++b)if(!j(a.getChild(b))){b=false;break a}b=true}if(b)return true}return false}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return c.call(this)},previous:function(){return c.call(this,
1)},checkForward:function(){return c.call(this,0,1)!==false},checkBackward:function(){return c.call(this,1,1)!==false},lastForward:function(){return d.call(this)},lastBackward:function(){return d.call(this,1)},reset:function(){delete this.current;this._={}}}});var a={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},e={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
function(b){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in e)&&a[this.getComputedStyle("display")]?true:!!(this.is(CKEDITOR.dtd.$block)||b&&this.is(b))};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&
a.data("cke-bookmark")}return function(e){var k,d;k=e&&e.type!=CKEDITOR.NODE_ELEMENT&&(d=e.getParent())&&c(d);k=a?k:k||c(e);return!!(b^k)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c=1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^
c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!h(a)}return function(c){var e=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&i.test(c.getText());if(e){e=c.getParent();c=c.getNext(b);e=e.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())}return!!(a^e)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=
b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var i=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),f=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=g(b)||h(b)||f(b);return!!(a^b)}};var j=CKEDITOR.dom.walker.ignored(),k=function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(a){return function(c){return!!(a^b(c))}};CKEDITOR.dom.element.prototype.getBogus=
function(){var a=this;do a=a.getPreviousSourceNode();while(h(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&i.test(a.getText()))?a:false}}(),CKEDITOR.dom.range=function(c){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var d=c instanceof CKEDITOR.dom.document;this.document=d?c:c.getDocument();this.root=d?c.getBody():c},function(){function c(){var a=
false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),e=CKEDITOR.dom.walker.bogus();return function(l){if(c(l)||b(l))return true;if(e(l)&&!a)return a=true;return l.type==CKEDITOR.NODE_TEXT&&(l.hasAscendant("pre")||CKEDITOR.tools.trim(l.getText()).length)||l.type==CKEDITOR.NODE_ELEMENT&&!l.is(i)?false:true}}function d(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(e){return c(e)||b(e)?true:!a&&g(e)||e.type==CKEDITOR.NODE_ELEMENT&&
e.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&j(a)&&(b=a);return f(a)&&!(g(a)&&a.equals(b))})}}var a=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},e=function(a,b,c,e){a.optimizeBookmark();var l=a.startContainer,d=a.endContainer,f=a.startOffset,i=a.endOffset,g,h;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(i);else if(d.getChildCount()>0)if(i>=
d.getChildCount()){d=d.append(a.document.createText(""));h=true}else d=d.getChild(i);if(l.type==CKEDITOR.NODE_TEXT){l.split(f);l.equals(d)&&(d=l.getNext())}else if(f)if(f>=l.getChildCount()){l=l.append(a.document.createText(""));g=true}else l=l.getChild(f).getPrevious();else{l=l.append(a.document.createText(""),1);g=true}var f=l.getParents(),i=d.getParents(),j,y,u;for(j=0;j<f.length;j++){y=f[j];u=i[j];if(!y.equals(u))break}for(var s=c,w,x,v,B=j;B<f.length;B++){w=f[B];s&&!w.equals(l)&&(x=s.append(w.clone()));
for(w=w.getNext();w;){if(w.equals(i[B])||w.equals(d))break;v=w.getNext();if(b==2)s.append(w.clone(true));else{w.remove();b==1&&s.append(w)}w=v}s&&(s=x)}s=c;for(c=j;c<i.length;c++){w=i[c];b>0&&!w.equals(d)&&(x=s.append(w.clone()));if(!f[c]||w.$.parentNode!=f[c].$.parentNode)for(w=w.getPrevious();w;){if(w.equals(f[c])||w.equals(l))break;v=w.getPrevious();if(b==2)s.$.insertBefore(w.$.cloneNode(true),s.$.firstChild);else{w.remove();b==1&&s.$.insertBefore(w.$,s.$.firstChild)}w=v}s&&(s=x)}if(b==2){y=a.startContainer;
if(y.type==CKEDITOR.NODE_TEXT){y.$.data=y.$.data+y.$.nextSibling.data;y.$.parentNode.removeChild(y.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(y&&u&&(l.$.parentNode!=y.$.parentNode||d.$.parentNode!=u.$.parentNode)){b=u.getIndex();g&&u.$.parentNode==l.$.parentNode&&b--;if(e&&y.type==CKEDITOR.NODE_ELEMENT){e=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',
a.document);e.insertAfter(y);y.mergeSiblings(false);a.moveToBookmark({startNode:e})}else a.setStart(u.getParent(),b)}a.collapse(true)}g&&l.remove();h&&d.$.parentNode&&d.remove()},i={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},g=CKEDITOR.dom.walker.bogus(),h=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,f=CKEDITOR.dom.walker.editable(),j=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype=
{clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||
e(this,2,a);return a},deleteContents:function(a){this.collapsed||e(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,b,a);return b},createBookmark:function(a){var b,c,e,l,d=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("&nbsp;");if(a){e="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",e+(d?"C":"S"))}if(!d){c=b.clone();c.setHtml("&nbsp;");a&&c.setAttribute("id",
e+"E");l=this.clone();l.collapse();l.insertNode(c)}l=this.clone();l.collapse(true);l.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?e+(d?"C":"S"):b,endNode:a?e+"E":c,serializable:a,collapsed:d}},createBookmark2:function(){function a(b){var c=b.container,e=b.offset,l;l=c;var d=e;l=l.type!=CKEDITOR.NODE_ELEMENT||d===0||d==l.getChildCount()?0:l.getChild(d-1).type==CKEDITOR.NODE_TEXT&&l.getChild(d).type==CKEDITOR.NODE_TEXT;
if(l){c=c.getChild(e-1);e=c.getLength()}c.type==CKEDITOR.NODE_ELEMENT&&e>1&&(e=c.getChild(e-1).getIndex(true)+1);if(c.type==CKEDITOR.NODE_TEXT){l=c;for(d=0;(l=l.getPrevious())&&l.type==CKEDITOR.NODE_TEXT;)d=d+l.getLength();e=e+d}b.container=c;b.offset=e}return function(b){var c=this.collapsed,e={container:this.startContainer,offset:this.startOffset},d={container:this.endContainer,offset:this.endOffset};if(b){a(e);c||a(d)}return{start:e.container.getAddress(b),end:c?null:d.container.getAddress(b),
startOffset:e.offset,endOffset:d.offset,normalized:b,collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,e=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);e?this.setEnd(e,a):this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}},
getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,e=this.endOffset,d;if(a.type==CKEDITOR.NODE_ELEMENT){d=a.getChildCount();if(d>c)a=a.getChild(c);else if(d<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){d=b.getChildCount();if(d>e)b=b.getChild(e).getPreviousSourceNode(true);else if(d<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=
b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,e=this.endContainer,c=c.equals(e)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(e);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):
this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,e=this.startOffset,d=this.collapsed;
if((!a||d)&&c&&c.type==CKEDITOR.NODE_TEXT){if(e)if(e>=c.getLength()){e=c.getIndex()+1;c=c.getParent()}else{var f=c.split(e),e=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(f,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{e=c.getIndex();c=c.getParent()}this.setStart(c,e);if(d){this.collapse(true);return}}c=this.endContainer;e=this.endOffset;if(!b&&!d&&c&&c.type==CKEDITOR.NODE_TEXT){if(e){e>=c.getLength()||
c.split(e);e=c.getIndex()+1}else e=c.getIndex();c=c.getParent();this.setEnd(c,e)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var d=this.getCommonAncestor(),f=this.root,i,g,h,j,A,y=false,u,s;u=this.startContainer;s=this.startOffset;if(u.type==CKEDITOR.NODE_TEXT){if(s){u=!CKEDITOR.tools.trim(u.substring(0,s)).length&&u;y=!!u}if(u&&
!(j=u.getPrevious()))h=u.getParent()}else{s&&(j=u.getChild(s-1)||u.getLast());j||(h=u)}for(h=c(h);h||j;){if(h&&!j){!A&&h.equals(d)&&(A=true);if(e?h.isBlockBoundary():!f.contains(h))break;if(!y||h.getComputedStyle("display")!="inline"){y=false;A?i=h:this.setStartBefore(h)}j=h.getPrevious()}for(;j;){u=false;if(j.type==CKEDITOR.NODE_COMMENT)j=j.getPrevious();else{if(j.type==CKEDITOR.NODE_TEXT){s=j.getText();/[^\s\ufeff]/.test(s)&&(j=null);u=/[\s\ufeff]$/.test(s)}else if((j.$.offsetWidth>0||b&&j.is("br"))&&
!j.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[j.getName()]){s=j.getText();if(/[^\s\ufeff]/.test(s))j=null;else for(var w=j.$.getElementsByTagName("*"),x=0,v;v=w[x++];)if(!CKEDITOR.dtd.$removeEmpty[v.nodeName.toLowerCase()]){j=null;break}j&&(u=!!s.length)}else j=null;u&&(y?A?i=h:h&&this.setStartBefore(h):y=true);if(j){u=j.getPrevious();if(!h&&!u){h=j;j=null;break}j=u}else h=null}}h&&(h=c(h.getParent()))}u=this.endContainer;s=this.endOffset;h=j=null;A=y=false;if(u.type==CKEDITOR.NODE_TEXT){u=
!CKEDITOR.tools.trim(u.substring(s)).length&&u;y=!(u&&u.getLength());if(u&&!(j=u.getNext()))h=u.getParent()}else(j=u.getChild(s))||(h=u);for(;h||j;){if(h&&!j){!A&&h.equals(d)&&(A=true);if(e?h.isBlockBoundary():!f.contains(h))break;if(!y||h.getComputedStyle("display")!="inline"){y=false;A?g=h:h&&this.setEndAfter(h)}j=h.getNext()}for(;j;){u=false;if(j.type==CKEDITOR.NODE_TEXT){s=j.getText();/[^\s\ufeff]/.test(s)&&(j=null);u=/^[\s\ufeff]/.test(s)}else if(j.type==CKEDITOR.NODE_ELEMENT){if((j.$.offsetWidth>
0||b&&j.is("br"))&&!j.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[j.getName()]){s=j.getText();if(/[^\s\ufeff]/.test(s))j=null;else{w=j.$.getElementsByTagName("*");for(x=0;v=w[x++];)if(!CKEDITOR.dtd.$removeEmpty[v.nodeName.toLowerCase()]){j=null;break}}j&&(u=!!s.length)}else j=null}else u=1;u&&y&&(A?g=h:this.setEndAfter(h));if(j){u=j.getNext();if(!h&&!u){h=j;j=null;break}j=u}else h=null}h&&(h=c(h.getParent()))}if(i&&g){d=i.contains(g)?g:i;this.setStartBefore(d);this.setEndAfter(d)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:h=
new CKEDITOR.dom.range(this.root);f=this.root;h.setStartAt(f,CKEDITOR.POSITION_AFTER_START);h.setEnd(this.startContainer,this.startOffset);h=new CKEDITOR.dom.walker(h);var B,E,C=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,I=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(D){if(D.equals(a)){D=null;return}}else D=a;else if(D)return;var b=C(a);b||(B=a);return b},e=function(a){var b=I(a);!b&&(a.is&&a.is("br"))&&
(E=a);return b};h.guard=I;h=h.lastBackward();B=B||f;this.setStartAt(B,!B.is("br")&&(!h&&this.checkStartOfBlock()||h&&B.contains(h))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){h=this.clone();h=new CKEDITOR.dom.walker(h);var J=CKEDITOR.dom.walker.whitespaces(),G=CKEDITOR.dom.walker.bookmark();h.evaluator=function(a){return!J(a)&&!G(a)};if((h=h.previous())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("br"))break}h=this.clone();h.collapse();h.setEndAt(f,
CKEDITOR.POSITION_BEFORE_END);h=new CKEDITOR.dom.walker(h);h.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:I;B=null;h=h.lastForward();B=B||f;this.setEndAt(B,!h&&this.checkEndOfBlock()||h&&B.contains(h)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);E&&this.setEndAfter(E)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,e=this.clone(),d=this.startContainer,f=this.endContainer,i=this.startOffset,g=this.endOffset,h=1,j=1;if(d&&d.type==CKEDITOR.NODE_TEXT)if(i)if(i>=
d.getLength())e.setStartAfter(d);else{e.setStartBefore(d);h=0}else e.setStartBefore(d);if(f&&f.type==CKEDITOR.NODE_TEXT)if(g)if(g>=f.getLength())e.setEndAfter(f);else{e.setEndAfter(f);j=0}else e.setEndBefore(f);var e=new CKEDITOR.dom.walker(e),A=CKEDITOR.dom.walker.bookmark();e.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var y;e.guard=function(b,e){if(A(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||e&&b.equals(y)||
c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!e&&b.type==CKEDITOR.NODE_ELEMENT&&(y=b);return true};if(h)(d=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(d,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){e.reset();(e=e[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!h&&
!j)}},insertNode:function(a){this.optimizeBookmark();this.trim(false,true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},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(b,c){if(b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]){c=b.getIndex();b=b.getParent()}this.startContainer=b;this.startOffset=c;if(!this.endContainer){this.endContainer=b;this.endOffset=c}a(this)},setEnd:function(b,c){if(b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]){c=b.getIndex()+1;b=b.getParent()}this.endContainer=b;this.endOffset=c;if(!this.startContainer){this.startContainer=b;this.startOffset=
c}a(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(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());
break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=
this.createBookmark(),e=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(e);e.trim();e.appendBogus();this.insertNode(e);this.moveToBookmark(c);return e},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=b.block,d=c.block,f=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!e){e=this.fixBlock(true,a);d=
(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}d||(d=this.fixBlock(false,a))}a=e&&this.checkStartOfBlock();b=d&&this.checkEndOfBlock();this.deleteContents();if(e&&e.equals(d))if(b){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END);d=null}else if(a){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e=null}else{d=this.splitElement(e);e.is("ul","ol")||e.appendBogus()}return{previousBlock:e,
nextBlock:d,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:f}},splitElement:function(a){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(e){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||e.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),
c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(),e=this[b?"endPath":"startPath"](),d=e.block||e.blockLimit,f;d&&!d.equals(e.root)&&!d.getFirst(a(d));){f=d.getParent();this[b?"setEndAt":"setStartAt"](d,CKEDITOR.POSITION_AFTER_END);d.remove(1);d=f}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,
b){var c=b==CKEDITOR.START,e=this.clone();e.collapse(c);e[c?"setStartAt":"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=d(c);return e[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,b=this.startOffset;if(CKEDITOR.env.ie&&b&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0,b));h.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);
b=this.clone();b.collapse(true);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=c();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,b=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(b));h.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(false);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(b);a.evaluator=c();return a.checkForward()},getPreviousNode:function(a,b,c){var e=this.clone();e.collapse(1);e.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var e=this.clone();e.collapse();e.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==
CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")=="false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c=
0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&h.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable()){this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);
else if(a.getAttribute("contenteditable")=="false"&&a.is(CKEDITOR.dtd.$block)){this.setStartBefore(a);this.setEndAfter(a);return true}var e=a,d=c,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(false)&&(f=e[b?"getLast":"getFirst"](j));!d&&!f&&(f=e[b?"getPrevious":"getNext"](j));a=f}return!!c},moveToClosestEditablePosition:function(a,b){var c=new CKEDITOR.dom.range(this.root),e=0,d,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];c.moveToPosition(a,f[b?0:1]);if(a.is(CKEDITOR.dtd.$block)){if(d=
c[b?"getNextEditableNode":"getPreviousEditableNode"]()){e=1;if(d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$block)&&d.getAttribute("contenteditable")=="false"){c.setStartAt(d,CKEDITOR.POSITION_BEFORE_START);c.setEndAt(d,CKEDITOR.POSITION_AFTER_END)}else c.moveToPosition(d,f[b?1:0])}}else e=1;e&&this.moveToRange(c);return!!e},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=
this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var e=a.next();a.reset();return e&&e.equals(a.previous())?e: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:b(),getPreviousEditableNode:b(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",this.document),b,c,e,d=this.clone();d.optimize();if(e=d.startContainer.type==CKEDITOR.NODE_TEXT){c=d.startContainer.getText();b=d.startContainer.split(d.startOffset);a.insertAfter(d.startContainer)}else d.insertNode(a);a.scrollIntoView();if(e){d.startContainer.setText(c);
b.remove()}a.remove()}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function c(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||
(this._={})}}function d(a,b,c){for(a=a.getNextSourceNode(b,null,c);!i(a);)a=a.getNextSourceNode(b,null,c);return a}function b(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function a(c,e,d,i){a:{i==void 0&&(i=b(d));for(var g;g=i.shift();)if(g.getDtd().p){i={element:g,remaining:i};break a}i=null}if(!i)return 0;if((g=CKEDITOR.filter.instances[i.element.data("cke-filter")])&&!g.check(e))return a(c,e,d,i.remaining);
e=new CKEDITOR.dom.range(i.element);e.selectNodeContents(i.element);e=e.createIterator();e.enlargeBr=c.enlargeBr;e.enforceRealBlocks=c.enforceRealBlocks;e.activeFilter=e.filter=g;c._.nestedEditable={element:i.element,container:d,remaining:i.remaining,iterator:e};return 1}var e=/^[\r\n\t ]+$/,i=CKEDITOR.dom.walker.bookmark(false,true),g=CKEDITOR.dom.walker.whitespaces(true),h=function(a){return i(a)&&g(a)};c.prototype={getNextParagraph:function(b){var c,g,o,n,q,b=b||"p";if(this._.nestedEditable){if(c=
this._.nestedEditable.iterator.getNextParagraph(b)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return c}this.activeFilter=this.filter;if(a(this,b,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(b)}this._.nestedEditable=null}if(!this.range.root.getDtd()[b])return null;if(!this._.started){var l=this.range.clone();l.shrink(CKEDITOR.SHRINK_ELEMENT,true);
g=l.endContainer.hasAscendant("pre",true)||l.startContainer.hasAscendant("pre",true);l.enlarge(this.forceBrBreak&&!g||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!l.collapsed){g=new CKEDITOR.dom.walker(l.clone());var m=CKEDITOR.dom.walker.bookmark(true,true);g.evaluator=m;this._.nextNode=g.next();g=new CKEDITOR.dom.walker(l.clone());g.evaluator=m;g=g.previous();this._.lastNode=g.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&
!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){m=this.range.clone();m.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(m.checkEndOfBlock()){m=new CKEDITOR.dom.elementPath(m.endContainer,m.root);this._.lastNode=(m.block||m.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!l.root.contains(this._.lastNode)){this._.lastNode=this._.docEndMarker=l.document.createText("");this._.lastNode.insertAfter(g)}l=null}this._.started=1;g=l}m=
this._.nextNode;l=this._.lastNode;for(this._.nextNode=null;m;){var r=0,p=m.hasAscendant("pre"),z=m.type!=CKEDITOR.NODE_ELEMENT,t=0;if(z)m.type==CKEDITOR.NODE_TEXT&&e.test(m.getText())&&(z=0);else{var A=m.getName();if(CKEDITOR.dtd.$block[A]&&m.getAttribute("contenteditable")=="false"){c=m;a(this,b,c);break}else if(m.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if(A=="br")z=1;else if(!g&&!m.getChildCount()&&A!="hr"){c=m;o=m.equals(l);break}if(g){g.setEndAt(m,CKEDITOR.POSITION_BEFORE_START);if(A!=
"br")this._.nextNode=m}r=1}else{if(m.getFirst()){if(!g){g=this.range.clone();g.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}m=m.getFirst();continue}z=1}}if(z&&!g){g=this.range.clone();g.setStartAt(m,CKEDITOR.POSITION_BEFORE_START)}o=(!r||z)&&m.equals(l);if(g&&!r)for(;!m.getNext(h)&&!o;){A=m.getParent();if(A.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){r=1;z=0;o||A.equals(l);g.setEndAt(A,CKEDITOR.POSITION_BEFORE_END);break}m=A;z=1;o=m.equals(l);t=1}z&&g.setEndAt(m,CKEDITOR.POSITION_AFTER_END);m=
d(m,t,l);if((o=!m)||r&&g)break}if(!c){if(!g){this._.docEndMarker&&this._.docEndMarker.remove();return this._.nextNode=null}c=new CKEDITOR.dom.elementPath(g.startContainer,g.root);m=c.blockLimit;r={div:1,th:1,td:1};c=c.block;if(!c&&m&&!this.enforceRealBlocks&&r[m.getName()]&&g.checkStartOfBlock()&&g.checkEndOfBlock()&&!m.equals(g.root))c=m;else if(!c||this.enforceRealBlocks&&c.getName()=="li"){c=this.range.document.createElement(b);g.extractContents().appendTo(c);c.trim();g.insertNode(c);n=q=true}else if(c.getName()!=
"li"){if(!g.checkStartOfBlock()||!g.checkEndOfBlock()){c=c.clone(false);g.extractContents().appendTo(c);c.trim();q=g.splitBlock();n=!q.wasStartOfBlock;q=!q.wasEndOfBlock;g.insertNode(c)}}else if(!o)this._.nextNode=c.equals(l)?null:d(g.getBoundaryNodes().endNode,1,l)}if(n)(n=c.getPrevious())&&n.type==CKEDITOR.NODE_ELEMENT&&(n.getName()=="br"?n.remove():n.getLast()&&n.getLast().$.nodeName.toLowerCase()=="br"&&n.getLast().remove());if(q)(n=c.getLast())&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()=="br"&&
(!CKEDITOR.env.needsBrFiller||n.getPrevious(i)||n.getNext(i))&&n.remove();if(!this._.nextNode)this._.nextNode=o||c.equals(l)||!l?null:d(c,1,l);return c}};CKEDITOR.dom.range.prototype.createIterator=function(){return new c(this)}}(),CKEDITOR.command=function(c,d){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&c.focus();return this.fire("exec")===false?true:d.exec.call(this,c,a)!==false};this.refresh=function(a,b){if(!this.readOnly&&
a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:d.refresh&&d.refresh.apply(this,arguments)!==false};var b;this.checkAllowed=function(a){return!a&&typeof b=="boolean"?b:b=c.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,
contextSensitive:!!d.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||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(c){if(this.state==c||c!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;this.previousState=this.state;
this.state=c;this.fire("state");return true},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:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function c(a,b,c,f,g){var i=b.name;if((f||typeof a.elements!="function"||a.elements(i))&&(!a.match||a.match(b))){if(f=!g){a:if(a.nothingRequired)f=true;else{if(g=a.requiredClasses){i=b.classes;for(f=0;f<g.length;++f)if(CKEDITOR.tools.indexOf(i,g[f])==-1){f=
false;break a}}f=e(b.styles,a.requiredStyles)&&e(b.attributes,a.requiredAttributes)}f=!f}if(!f){if(!a.propertiesOnly)c.valid=true;if(!c.allAttributes)c.allAttributes=d(a.attributes,b.attributes,c.validAttributes);if(!c.allStyles)c.allStyles=d(a.styles,b.styles,c.validStyles);if(!c.allClasses){a=a.classes;b=b.classes;f=c.validClasses;if(a)if(a===true)b=true;else{for(var g=0,i=b.length,l;g<i;++g){l=b[g];f[l]||(f[l]=a(l))}b=false}else b=false;c.allClasses=b}}}}function d(a,b,c){if(!a)return false;if(a===
true)return true;for(var e in b)c[e]||(c[e]=a(e,b[e]));return false}function b(a,b){if(!a)return false;if(a===true)return a;if(typeof a=="string"){a=u(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(b))}if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):false;var c={},e=0,d;for(d in a){c[d]=a[d];e++}return e?c:false}function a(a){if(a._.filterFunction)return a._.filterFunction;var b=/^cke:(object|embed|param)$/,e=/^(object|embed|param)$/;return a._.filterFunction=
function(d,g,i,l,h,p,z){var q=d.name,r,t=false;if(h)d.name=q=q.replace(b,"$1");if(i=i&&i[q]){f(d);for(q=0;q<i.length;++q)m(a,d,i[q]);j(d)}if(g){var q=d.name,i=g.elements[q],o=g.generic,g={valid:false,validAttributes:{},validClasses:{},validStyles:{},allAttributes:false,allClasses:false,allStyles:false};if(!i&&!o){l.push(d);return true}f(d);if(i){q=0;for(r=i.length;q<r;++q)c(i[q],d,g,true,p)}if(o){q=0;for(r=o.length;q<r;++q)c(o[q],d,g,false,p)}if(!g.valid){l.push(d);return true}p=g.validAttributes;
q=g.validStyles;i=g.validClasses;r=d.attributes;var o=d.styles,A=r["class"],u=r.style,n,y,s=[],w=[],x=/^data-cke-/,v=false;delete r.style;delete r["class"];if(!g.allAttributes)for(n in r)if(!p[n])if(x.test(n)){if(n!=(y=n.replace(/^data-cke-saved-/,""))&&!p[y]){delete r[n];v=true}}else{delete r[n];v=true}if(g.allStyles){if(u)r.style=u}else{for(n in o)q[n]?s.push(n+":"+o[n]):v=true;if(s.length)r.style=s.sort().join("; ")}if(g.allClasses)A&&(r["class"]=A);else{for(n in i)i[n]&&w.push(n);w.length&&(r["class"]=
w.sort().join(" "));A&&w.length<A.split(/\s+/).length&&(v=true)}v&&(t=true);if(!z&&!k(d)){l.push(d);return true}}if(h)d.name=d.name.replace(e,"cke:$1");return t}}function e(a,b){if(!b)return true;for(var c=0;c<b.length;++c)if(!(b[c]in a))return false;return true}function i(a){if(!a)return{};for(var a=a.split(/\s*,\s*/).sort(),b={};a.length;)b[a.shift()]=s;return b}function g(a){for(var b,c,e,d,f={},g=1,a=u(a);b=a.match(B);){if(c=b[2]){e=h(c,"styles");d=h(c,"attrs");c=h(c,"classes")}else e=d=c=null;
f["$"+g++]={elements:b[1],classes:c,styles:e,attributes:d};a=a.slice(b[0].length)}return f}function h(a,b){var c=a.match(E[b]);return c?u(c[1]):null}function f(a){if(!a.styles)a.styles=CKEDITOR.tools.parseCssText(a.attributes.style||"",1);if(!a.classes)a.classes=a.attributes["class"]?a.attributes["class"].split(/\s+/):[]}function j(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,true))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}
function k(a){switch(a.name){case "a":if(!a.children.length&&!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function o(a){return!a?false:a===true?true:function(b){return b in a}}function n(){return new CKEDITOR.htmlParser.element("br")}function q(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||A.$block[a.name])}function l(a,b,c){var e=a.name;if(A.$empty[e]||!a.children.length)if(e=="hr"&&b=="br")a.replaceWith(n());else{a.parent&&c.push({check:"it",
el:a.parent});a.remove()}else if(A.$block[e]||e=="tr")if(b=="br"){if(a.previous&&!q(a.previous)){b=n();b.insertBefore(a)}if(a.next&&!q(a.next)){b=n();b.insertAfter(a)}a.replaceWithChildren()}else{var e=a.children,d;b:{d=A[b];for(var f=0,g=e.length,i;f<g;++f){i=e[f];if(i.type==CKEDITOR.NODE_ELEMENT&&!d[i.name]){d=false;break b}}d=true}if(d){a.name=b;a.attributes={};c.push({check:"parent-down",el:a})}else{d=a.parent;for(var f=d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||d.name=="body",l,g=e.length;g>0;){i=
e[--g];if(f&&(i.type==CKEDITOR.NODE_TEXT||i.type==CKEDITOR.NODE_ELEMENT&&A.$inline[i.name])){if(!l){l=new CKEDITOR.htmlParser.element(b);l.insertAfter(a);c.push({check:"parent-down",el:l})}l.add(i,0)}else{l=null;i.insertAfter(a);d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i.type==CKEDITOR.NODE_ELEMENT&&!A[d.name][i.name])&&c.push({check:"el-up",el:i})}}a.remove()}}else if(e=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function m(a,b,c){var e,d;for(e=0;e<
c.length;++e){d=c[e];if((!d.check||a.check(d.check,false))&&(!d.left||d.left(b))){d.right(b,C);break}}}function r(a,b){var c=b.getDefinition(),e=c.attributes,d=c.styles,f,g,i,l;if(a.name!=c.element)return false;for(f in e)if(f=="class"){c=e[f].split(/\s+/);for(i=a.classes.join("|");l=c.pop();)if(i.indexOf(l)==-1)return false}else if(a.attributes[f]!=e[f])return false;for(g in d)if(a.styles[g]!=d[g])return false;return true}function p(a,b){var c,e;if(typeof a=="string")c=a;else if(a instanceof CKEDITOR.style)e=
a;else{c=a[0];e=a[1]}return[{element:c,left:e,right:function(a,c){c.transform(a,b)}}]}function z(a){return function(b){return r(b,a)}}function t(a){return function(b,c){c[a](b)}}var A=CKEDITOR.dtd,y=CKEDITOR.tools.copy,u=CKEDITOR.tools.trim,s="cke-test",w=["","p","br","div"];CKEDITOR.filter=function(a){this.allowedContent=[];this.disabled=false;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={rules:{},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof
CKEDITOR.editor){a=this.editor=a;this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(b,"config",1);this.allow(a.config.extraAllowedContent,"extra",1);this.allow(w[a.enterMode]+" "+w[a.shiftEnterMode],"default",1)}}else{this.customConfig=false;this.allow(a,"default",1)}};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,c,e){if(this.disabled||this.customConfig&&!e||!a)return false;this._.cachedChecks=
{};var d,f;if(typeof a=="string")a=g(a);else if(a instanceof CKEDITOR.style){f=a.getDefinition();e={};a=f.attributes;e[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.objectKeys(f.styles)};if(a){a=y(a);f.classes=a["class"]?a["class"].split(/\s+/):null;f.requiredClasses=f.classes;delete a["class"];f.attributes=a;f.requiredAttributes=a&&CKEDITOR.tools.objectKeys(a)}a=e}else if(CKEDITOR.tools.isArray(a)){for(d=0;d<a.length;++d)f=this.allow(a[d],c,e);return f}var i,e=[];for(i in a){f=
a[i];f=typeof f=="boolean"?{}:typeof f=="function"?{match:f}:y(f);if(i.charAt(0)!="$")f.elements=i;if(c)f.featureName=c.toLowerCase();var l=f;l.elements=b(l.elements,/\s+/)||null;l.propertiesOnly=l.propertiesOnly||l.elements===true;var h=/\s*,\s*/,j=void 0;for(j in x){l[j]=b(l[j],h)||null;var m=l,p=v[j],k=b(l[v[j]],h),z=l[j],q=[],r=true,t=void 0;k?r=false:k={};for(t in z)if(t.charAt(0)=="!"){t=t.slice(1);q.push(t);k[t]=true;r=false}for(;t=q.pop();){z[t]=z["!"+t];delete z["!"+t]}m[p]=(r?false:k)||
null}l.match=l.match||null;this.allowedContent.push(f);e.push(f)}c=this._.rules;i=c.elements||{};a=c.generic||[];f=0;for(l=e.length;f<l;++f){h=y(e[f]);j=h.classes===true||h.styles===true||h.attributes===true;m=h;p=void 0;for(p in x)m[p]=o(m[p]);k=true;for(p in v){p=v[p];m[p]=CKEDITOR.tools.objectKeys(m[p]);m[p]&&(k=false)}m.nothingRequired=k;if(h.elements===true||h.elements===null){h.elements=o(h.elements);a[j?"unshift":"push"](h)}else{m=h.elements;delete h.elements;for(d in m)if(i[d])i[d][j?"unshift":
"push"](h);else i[d]=[h]}}c.elements=i;c.generic=a.length?a:null;return true},applyTo:function(b,c,e,d){if(this.disabled)return false;var f=[],i=!e&&this._.rules,g=this._.transformations,h=a(this),j=this.editor&&this.editor.config.protectedSource,m=false;b.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(a.attributes["data-cke-filter"]=="off")return false;if(!c||!(a.name=="span"&&~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-")))h(a,i,g,f,c)&&(m=true)}else if(a.type==
CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var b;a:{var e=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));b=[];var d,l,p;if(j)for(l=0;l<j.length;++l)if((p=e.match(j[l]))&&p[0].length==e.length){b=true;break a}e=CKEDITOR.htmlParser.fragment.fromHtml(e);e.children.length==1&&(d=e.children[0]).type==CKEDITOR.NODE_ELEMENT&&h(d,i,g,b,c);b=!b.length}b||f.push(a)}},null,true);f.length&&(m=true);for(var p,b=[],d=w[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];e=
f.pop();)e.type==CKEDITOR.NODE_ELEMENT?l(e,d,b):e.remove();for(;p=b.pop();){e=p.el;if(e.parent)switch(p.check){case "it":A.$removeEmpty[e.name]&&!e.children.length?l(e,d,b):k(e)||l(e,d,b);break;case "el-up":e.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!A[e.parent.name][e.name]&&l(e,d,b);break;case "parent-down":e.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!A[e.parent.name][e.name]&&l(e.parent,d,b)}}return m},checkFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));
return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=true},addContentForms:function(a){if(!this.disabled&&a){var b,c,e=[],d;for(b=0;b<a.length&&!d;++b){c=a[b];if((typeof c=="string"||c instanceof CKEDITOR.style)&&this.check(c))d=c}if(d){for(b=0;b<a.length;++b)e.push(p(a[b],d));this.addTransformations(e)}}},addFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);
this.addContentForms(a.contentForms);return this.customConfig&&a.requiredContent?this.check(a.requiredContent):true},addTransformations:function(a){var b,c;if(!this.disabled&&a){var e=this._.transformations,d;for(d=0;d<a.length;++d){b=a[d];var f=void 0,i=void 0,g=void 0,l=void 0,h=void 0,j=void 0;c=[];for(i=0;i<b.length;++i){g=b[i];if(typeof g=="string"){g=g.split(/\s*:\s*/);l=g[0];h=null;j=g[1]}else{l=g.check;h=g.left;j=g.right}if(!f){f=g;f=f.element?f.element:l?l.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element}h instanceof
CKEDITOR.style&&(h=z(h));c.push({check:l==f?null:l,left:h,right:typeof j=="string"?t(j):j})}b=f;e[b]||(e[b]=[]);e[b].push(c)}}},check:function(b,c,e){if(this.disabled)return true;if(CKEDITOR.tools.isArray(b)){for(var d=b.length;d--;)if(this.check(b[d],c,e))return true;return false}var f,l;if(typeof b=="string"){l=b+"<"+(c===false?"0":"1")+(e?"1":"0")+">";if(l in this._.cachedChecks)return this._.cachedChecks[l];d=g(b).$1;f=d.styles;var h=d.classes;d.name=d.elements;d.classes=h=h?h.split(/\s*,\s*/):
[];d.styles=i(f);d.attributes=i(d.attributes);d.children=[];h.length&&(d.attributes["class"]=h.join(" "));if(f)d.attributes.style=CKEDITOR.tools.writeCssText(d.styles);f=d}else{d=b.getDefinition();f=d.styles;h=d.attributes||{};if(f){f=y(f);h.style=CKEDITOR.tools.writeCssText(f,true)}else f={};f={name:d.element,attributes:h,classes:h["class"]?h["class"].split(/\s+/):[],styles:f,children:[]}}var h=CKEDITOR.tools.clone(f),p=[],k;if(c!==false&&(k=this._.transformations[f.name])){for(d=0;d<k.length;++d)m(this,
f,k[d]);j(f)}a(this)(h,this._.rules,c===false?false:this._.transformations,p,false,!e,!e);c=p.length>0?false:CKEDITOR.tools.objectCompare(f.attributes,h.attributes,true)?true:false;typeof b=="string"&&(this._.cachedChecks[l]=c);return c},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,e){var d=a.slice(),f;if(this.check(w[c]))return c;for(e||(d=d.reverse());f=d.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}()};
var x={styles:1,attributes:1,classes:1},v={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},B=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,E={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},C=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,
"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var e=a.attributes[b];if(e){/^\d+$/.test(e)&&(e=e+"px");a.styles[c]=e}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var e=a.styles[b],d=e&&e.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[c]=d[1]:e==s&&(a.attributes[c]=s)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},
alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:r,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),e=c.styles,d=c.attributes,f,g,i,l;a.name=c.element;for(f in d)if(f=="class"){c=a.classes.join("|");for(i=d[f].split(/\s+/);l=i.pop();)c.indexOf(l)==-1&&a.classes.push(l)}else a.attributes[f]=d[f];for(g in e)a.styles[g]=e[g]}}}}(),function(){CKEDITOR.focusManager=
function(c){if(c.focusManager)return c.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:c};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(c){this._.timer&&clearTimeout(this._.timer);if(c)this.currentActive=c;if(!this.hasFocus&&!this._.locked){(c=CKEDITOR.currentInstance)&&c.focusManager.blur(1);this.hasFocus=true;(c=this._.editor.container)&&c.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked=
1},unlock:function(){delete this._.locked},blur:function(c){function d(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;c||!b?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},b,this)}},add:function(c,d){var b=c.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(c);var b=
"focus",a="blur";if(d)if(CKEDITOR.env.ie){b="focusin";a="focusout"}else CKEDITOR.event.useCapture=1;var e={blur:function(){c.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(c)}};c.on(b,e.focus,this);c.on(a,e.blur,this);if(d)CKEDITOR.event.useCapture=0;c.setCustomData("focusmanager",this);c.setCustomData("focusmanager_handlers",e)}},remove:function(c){c.removeCustomData("focusmanager");var d=c.removeCustomData("focusmanager_handlers");c.removeListener("blur",d.blur);c.removeListener("focus",
d.focus)}}}(),CKEDITOR.keystrokeHandler=function(c){if(c.keystrokeHandler)return c.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:c};return this},function(){var c,d=function(a){var a=a.data,b=a.getKeystroke(),d=this.keystrokes[b],g=this._.editor;c=g.fire("key",{keyCode:b})===false;if(!c){d&&(c=g.execCommand(d,{from:"keystrokeHandler"})!==false);c||(c=!!this.blockedKeystrokes[b])}c&&a.preventDefault(true);return!c},b=function(a){if(c){c=false;a.data.preventDefault(true)}};
CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",d,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es: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,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,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(c,d,b){if(!c||!CKEDITOR.lang.languages[c])c=this.detect(d,c);this[c]?b(c,this[c]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+c+".js"),function(){this[c].dir=this.rtl[c]?"rtl":"ltr";b(c,this[c])},this)},detect:function(c,d){var b=this.languages,d=d||navigator.userLanguage||navigator.language||c,a=d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=a[1],a=a[2];b[e+"-"+a]?e=e+"-"+a:b[e]||
(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||c}}}(),CKEDITOR.scriptLoader=function(){var c={},d={};return{load:function(b,a,e,i){var g=typeof b=="string";g&&(b=[b]);e||(e=CKEDITOR);var h=b.length,f=[],j=[],k=function(b){a&&(g?a.call(e,b):a.call(e,f,j))};if(h===0)k(true);else{var o=function(a,b){(b?f:j).push(a);if(--h<=0){i&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");k(b)}},n=function(a,b){c[a]=1;var e=d[a];delete d[a];for(var f=0;f<e.length;f++)e[f](a,
b)},q=function(b){if(c[b])o(b,true);else{var e=d[b]||(d[b]=[]);e.push(o);if(!(e.length>1)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:b});if(a)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)f.$.onreadystatechange=function(){if(f.$.readyState=="loaded"||f.$.readyState=="complete"){f.$.onreadystatechange=null;n(b,true)}};else{f.$.onload=function(){setTimeout(function(){n(b,true)},0)};f.$.onerror=function(){n(b,false)}}f.appendTo(CKEDITOR.document.getHead())}}};
i&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var l=0;l<h;l++)q(b[l])}},queue:function(){function b(){var b;(b=a[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var a=[];return function(c,d){var g=this;a.push({scriptUrl:c,callback:function(){d&&d.apply(this,arguments);a.shift();b.call(g)}});a.length==1&&b.call(this)}}()}}(),CKEDITOR.resourceManager=function(c,d){this.basePath=c;this.fileName=d;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},
CKEDITOR.resourceManager.prototype={add:function(c,d){if(this.registered[c])throw'[CKEDITOR.resourceManager.add] The resource name "'+c+'" is already registered.';var b=this.registered[c]=d||{};b.name=c;b.path=this.getPath(c);CKEDITOR.fire(c+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(c)},get:function(c){return this.registered[c]||null},getPath:function(c){var d=this.externals[c];return CKEDITOR.getUrl(d&&d.dir||this.basePath+c+"/")},getFilePath:function(c){var d=this.externals[c];
return CKEDITOR.getUrl(this.getPath(c)+(d?d.file:this.fileName+".js"))},addExternal:function(c,d,b){for(var c=c.split(","),a=0;a<c.length;a++){var e=c[a];b||(d=d.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[e]={dir:d,file:b||this.fileName+".js"}}},load:function(c,d,b){CKEDITOR.tools.isArray(c)||(c=c?[c]:[]);for(var a=this.loaded,e=this.registered,i=[],g={},h={},f=0;f<c.length;f++){var j=c[f];if(j)if(!a[j]&&!e[j]){var k=this.getFilePath(j);i.push(k);k in g||(g[k]=[]);g[k].push(j)}else h[j]=
this.get(j)}CKEDITOR.scriptLoader.load(i,function(c,e){if(e.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+g[e[0]].join(",")+'" was not found at "'+e[0]+'".';for(var f=0;f<c.length;f++)for(var l=g[c[f]],i=0;i<l.length;i++){var j=l[i];h[j]=this.get(j);a[j]=1}d.call(b,h)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(c){var d={};return function(b,a,e){var i={},g=function(b){c.call(this,
b,function(b){CKEDITOR.tools.extend(i,b);var c=[],h;for(h in b){var o=b[h],n=o&&o.requires;if(!d[h]){if(o.icons)for(var q=o.icons.split(","),l=q.length;l--;)CKEDITOR.skin.addIcon(q[l],o.path+"icons/"+(CKEDITOR.env.hidpi&&o.hidpi?"hidpi/":"")+q[l]+".png");d[h]=1}if(n){n.split&&(n=n.split(","));for(o=0;o<n.length;o++)i[n[o]]||c.push(n[o])}}if(c.length)g.call(this,c);else{for(h in i){o=i[h];if(o.onLoad&&!o.onLoad._called){o.onLoad()===false&&delete i[h];o.onLoad._called=1}}a&&a.call(e||window,i)}},this)};
g.call(this,b)}}),CKEDITOR.plugins.setLang=function(c,d,b){var a=this.get(c),c=a.langEntries||(a.langEntries={}),a=a.lang||(a.lang=[]);a.split&&(a=a.split(","));CKEDITOR.tools.indexOf(a,d)==-1&&a.push(d);c[d]=b},CKEDITOR.ui=function(c){if(c.ui)return c.ui;this.items={};this.instances={};this.editor=c;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(c,d,b){b.name=c.toLowerCase();var a=this.items[c]={type:d,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(a,
b)},get:function(c){return this.instances[c]},create:function(c){var d=this.items[c],b=d&&this._.handlers[d.type],a=d&&d.command&&this.editor.getCommand(d.command),b=b&&b.create.apply(this,d.args);this.instances[c]=b;a&&a.uiItems.push(b);if(b&&!b.type)b.type=d.type;return b},addHandler:function(c,d){this._.handlers[c]=d},space:function(c){return CKEDITOR.document.getById(this.spaceId(c))},spaceId:function(c){return this.editor.id+"_"+c}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function c(a,
c,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(c!==void 0){if(c instanceof CKEDITOR.dom.element){if(!f)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(f==CKEDITOR.ELEMENT_MODE_INLINE?c.is(CKEDITOR.dtd.$editable)||c.is("textarea"):f==CKEDITOR.ELEMENT_MODE_REPLACE?!c.is(CKEDITOR.dtd.$nonBodyContent):
1))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=f;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||d();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",b);this.on("selectionChange",function(a){e(this,a.data.path)});this.on("activeFilterChange",function(){e(this,this.elementPath(),true)});this.on("mode",b);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){g(this,a)},0,this)}function d(){do var a="editor"+ ++n;while(CKEDITOR.instances[a]);return a}function b(){var b=
this.commands,c;for(c in b)a(this,b[c])}function a(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function e(a,b,c){if(b){var e,d,f=a.commands;for(d in f){e=f[d];(c||e.contextSensitive)&&e.refresh(a,b)}}}function i(a){var b=a.config.customConfig;if(!b)return false;var b=CKEDITOR.getUrl(b),c=q[b]||(q[b]={});if(c.fn){c.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==b||!i(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.queue(b,
function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};i(a)});return true}function g(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}c=a.config;a.readOnly=!(!c.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=
a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):false;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;if(c.skin)CKEDITOR.skinName=c.skin;a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);
h(a)});if(b&&b.customConfig!=void 0)a.config.customConfig=b.customConfig;i(a)||a.fireOnce("customConfigLoaded")}function h(a){CKEDITOR.skin.loadPart("editor",function(){f(a)})}function f(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var e=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title=typeof e=="string"||e===false?e:[a.lang.editor,a.name].join(", ");if(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&a.lang.dir=="rtl")a.lang.dir="ltr";if(!a.config.contentsLangDirection)a.config.contentsLangDirection=
a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");j(a)})}function j(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);k(a)})}function k(a){var b=a.config,c=b.plugins,e=b.extraPlugins,d=b.removePlugins;if(e)var f=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(f,""),c=c+(","+e);if(d)var g=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(g,"");CKEDITOR.env.air&&
(c=c+",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var e=[],d=[],f=[];a.plugins=c;for(var i in c){var h=c[i],j=h.lang,k=null,p=h.requires,z;CKEDITOR.tools.isArray(p)&&(p=p.join(","));if(p&&(z=p.match(g)))for(;p=z.pop();)CKEDITOR.tools.setTimeout(function(a,b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+b+'" plugin.');},0,null,[p,i]);if(j&&!a.lang[i]){j.split&&(j=j.split(","));if(CKEDITOR.tools.indexOf(j,a.langCode)>=
0)k=a.langCode;else{k=a.langCode.replace(/-.*/,"");k=k!=a.langCode&&CKEDITOR.tools.indexOf(j,k)>=0?k:CKEDITOR.tools.indexOf(j,"en")>=0?"en":j[0]}if(!h.langEntries||!h.langEntries[k])f.push(CKEDITOR.getUrl(h.path+"lang/"+k+".js"));else{a.lang[i]=h.langEntries[k];k=null}}d.push(k);e.push(h)}CKEDITOR.scriptLoader.load(f,function(){for(var c=["beforeInit","init","afterInit"],f=0;f<c.length;f++)for(var g=0;g<e.length;g++){var i=e[g];f===0&&(d[g]&&i.lang&&i.langEntries)&&(a.lang[i.name]=i.langEntries[d[g]]);
if(i[c[f]])i[c[f]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function o(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):
a.setHtml(b);return true}return false}c.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=c;var n=0,q={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(b,c){c.name=b.toLowerCase();var e=new CKEDITOR.command(this,c);this.mode&&a(this,e);return this.commands[b]=e},_attachToForm:function(){var a=this,b=a.element,c=new CKEDITOR.dom.element(b.$.form);if(b.is("textarea")&&c){var e=function(c){a.updateElement();a._.required&&(!b.getValue()&&a.fire("required")===false)&&c.data.preventDefault()};
c.on("submit",e);if(c.$.submit&&c.$.submit.call&&c.$.submit.apply)c.$.submit=CKEDITOR.tools.override(c.$.submit,function(a){return function(){e();a.apply?a.apply(this):a()}});a.on("destroy",function(){c.removeListener("submit",e)})}},destroy:function(a){this.fire("beforeDestroy");!a&&o.call(this);this.editable(null);this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){return(a=a||this.getSelection().getStartElement())?
new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),e={name:a,commandData:b,command:c};if(c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",e)!==true){e.returnValue=c.exec(e.commandData);if(!c.async&&this.fire("afterCommandExec",e)!==true)return e.returnValue}return false},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&
this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"";b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},
setData:function(a,b,c){if(b)this.on("dataReady",function(a){a.removeListener();b.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==void 0||a;if(this.readOnly!=a){this.readOnly=a;this.keystrokeHandler.blockedKeystrokes[8]=+a;this.editable().setReadOnly(a);this.fire("readOnly")}},insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",
a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return o.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,e,d=b.length;d--;){c=b[d];e=0;if(CKEDITOR.tools.isArray(c)){e=c[1];c=c[0]}e?a[c]=e:delete a[c]}},addFeature:function(a){return this.filter.addFeature(a)},
setActiveFilter:function(a){if(!a)a=this.filter;if(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,true))}},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b){this.activeEnterMode=
a;this.activeShiftEnterMode=b;this.fire("activeEnterModeChange")}}})}(),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:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var c=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={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(b){for(var a,e,i=0,g;a=this._.htmlPartsRegex.exec(b);){e=a.index;if(e>i){i=b.substring(i,e);if(g)g.push(i);else this.onText(i)}i=this._.htmlPartsRegex.lastIndex;if(e=a[1]){e=e.toLowerCase();if(g&&CKEDITOR.dtd.$cdata[e]){this.onCDATA(g.join(""));
g=null}if(!g){this.onTagClose(e);continue}}if(g)g.push(a[0]);else if(e=a[3]){e=e.toLowerCase();if(!/="/.test(e)){var h={},f;a=a[4];var j=!!(a&&a.charAt(a.length-1)=="/");if(a)for(;f=c.exec(a);){var k=f[1].toLowerCase();f=f[2]||f[3]||f[4]||"";h[k]=!f&&d[k]?k:CKEDITOR.tools.htmlDecodeAttr(f)}this.onTagOpen(e,h,j);!g&&CKEDITOR.dtd.$cdata[e]&&(g=[])}}else if(e=a[2])this.onComment(e)}if(b.length>i)this.onText(b.substring(i,b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._=
{output:[]}},proto:{openTag:function(c){this._.output.push("<",c)},openTagClose:function(c,d){d?this._.output.push(" />"):this._.output.push(">")},attribute:function(c,d){typeof d=="string"&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",c,'="',d,'"')},closeTag:function(c){this._.output.push("</",c,">")},text:function(c){this._.output.push(c)},comment:function(c){this._.output.push("<\!--",c,"--\>")},write:function(c){this._.output.push(c)},reset:function(){this._.output=[];this._.indent=
false},getHtml:function(c){var d=this._.output.join("");c&&this.reset();return d}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var c=this.parent.children,d=CKEDITOR.tools.indexOf(c,this),b=this.previous,a=this.next;b&&(b.next=a);a&&(a.previous=b);c.splice(d,1);this.parent=null},replaceWith:function(c){var d=this.parent.children,b=CKEDITOR.tools.indexOf(d,this),a=c.previous=this.previous,e=c.next=this.next;a&&(a.next=c);e&&(e.previous=
c);d[b]=c;c.parent=this.parent;this.parent=null},insertAfter:function(c){var d=c.parent.children,b=CKEDITOR.tools.indexOf(d,c),a=c.next;d.splice(b+1,0,this);this.next=c.next;this.previous=c;c.next=this;a&&(a.previous=this);this.parent=c.parent},insertBefore:function(c){var d=c.parent.children,b=CKEDITOR.tools.indexOf(d,c);d.splice(b,0,this);this.next=c;(this.previous=c.previous)&&(c.previous.next=this);c.previous=this;this.parent=c.parent},getAscendant:function(c){var d=typeof c=="function"?c:typeof c==
"string"?function(a){return a.name==c}:function(a){return a.name in c},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(c){this.replaceWith(c);c.add(this);return c},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(c){return c||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(c){this.value=c;this._={isBlockLike:false}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,
{type:CKEDITOR.NODE_COMMENT,filter:function(c,d){var b=this.value;if(!(b=c.onComment(d,b,this))){this.remove();return false}if(typeof b!="string"){this.replaceWith(b);return false}this.value=b;return true},writeHtml:function(c,d){d&&this.filter(d);c.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(c){this.value=c;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(c,
d){if(!(this.value=c.onText(d,this.value,this))){this.remove();return false}},writeHtml:function(c,d){d&&this.filter(d);c.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(c){this.value=c};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(c){c.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,
hasInlineStarted:false}},function(){function c(a){return a.attributes["data-cke-survive"]?false:a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(e,i,g){function h(a){var b;if(m.length>0)for(var c=
0;c<m.length;c++){var e=m[c],d=e.name,g=CKEDITOR.dtd[d],i=p.name&&CKEDITOR.dtd[p.name];if((!i||i[d])&&(!a||!g||g[a]||!CKEDITOR.dtd[a])){if(!b){f();b=1}e=e.clone();e.parent=p;p=e;m.splice(c,1);c--}else if(d==p.name){k(p,p.parent,1);c--}}}function f(){for(;r.length;)k(r.shift(),p)}function j(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,c=a.children[b-1],e;if(c&&c.type==CKEDITOR.NODE_TEXT)(e=CKEDITOR.tools.rtrim(c.value))?c.value=e:a.children.length=b-1}}function k(a,
b,e){var b=b||p||l,d=p;if(a.previous===void 0){if(o(b,a)){p=b;q.onTagOpen(g,{});a.returnPoint=b=p}j(a);(!c(a)||a.children.length)&&b.add(a);a.name=="pre"&&(t=false);a.name=="textarea"&&(z=false)}if(a.returnPoint){p=a.returnPoint;delete a.returnPoint}else p=e?b:d}function o(a,b){if((a==l||a.name=="body")&&g&&(!a.name||CKEDITOR.dtd[a.name][g])){var c,e;return(c=b.attributes&&(e=b.attributes["data-cke-real-element-type"])?e:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||
b.type==CKEDITOR.NODE_TEXT}}function n(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||a=="dt"&&b=="dd"||a=="dd"&&b=="dt":false}var q=new CKEDITOR.htmlParser,l=i instanceof CKEDITOR.htmlParser.element?i:typeof i=="string"?new CKEDITOR.htmlParser.element(i):new CKEDITOR.htmlParser.fragment,m=[],r=[],p=l,z=l.name=="textarea",t=l.name=="pre";q.onTagOpen=function(e,g,i,j){g=new CKEDITOR.htmlParser.element(e,g);if(g.isUnknown&&i)g.isEmpty=true;g.isOptionalClose=j;if(c(g))m.push(g);
else{if(e=="pre")t=true;else{if(e=="br"&&t){p.add(new CKEDITOR.htmlParser.text("\n"));return}e=="textarea"&&(z=true)}if(e=="br")r.push(g);else{for(;;){j=(i=p.name)?CKEDITOR.dtd[i]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a;if(!g.isUnknown&&!p.isUnknown&&!j[e])if(p.isOptionalClose)q.onTagClose(i);else if(e in b&&i in b){i=p.children;(i=i[i.length-1])&&i.name=="li"||k(i=new CKEDITOR.htmlParser.element("li"),p);!g.returnPoint&&(g.returnPoint=p);p=i}else if(e in CKEDITOR.dtd.$listItem&&!n(e,
i))q.onTagOpen(e=="li"?"ul":"dl",{},0,1);else if(i in d&&!n(e,i)){!g.returnPoint&&(g.returnPoint=p);p=p.parent}else{i in CKEDITOR.dtd.$inline&&m.unshift(p);if(p.parent)k(p,p.parent,1);else{g.isOrphan=1;break}}else break}h(e);f();g.parent=p;g.isEmpty?k(g):p=g}}};q.onTagClose=function(a){for(var b=m.length-1;b>=0;b--)if(a==m[b].name){m.splice(b,1);return}for(var c=[],e=[],d=p;d!=l&&d.name!=a;){d._.isBlockLike||e.unshift(d);c.push(d);d=d.returnPoint||d.parent}if(d!=l){for(b=0;b<c.length;b++){var i=c[b];
k(i,i.parent)}p=d;d._.isBlockLike&&f();k(d,d.parent);if(d==p)p=p.parent;m=m.concat(e)}a=="body"&&(g=false)};q.onText=function(c){if((!p._.hasInlineStarted||r.length)&&!t&&!z){c=CKEDITOR.tools.ltrim(c);if(c.length===0)return}var e=p.name,i=e?CKEDITOR.dtd[e]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a;if(!z&&!i["#"]&&e in d){q.onTagOpen(e in b?"li":e=="dl"?"dd":e=="table"?"tr":e=="tr"?"td":"");q.onText(c)}else{f();h();!t&&!z&&(c=c.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));c=new CKEDITOR.htmlParser.text(c);
if(o(p,c))this.onTagOpen(g,{},0,1);p.add(c)}};q.onCDATA=function(a){p.add(new CKEDITOR.htmlParser.cdata(a))};q.onComment=function(a){f();h();p.add(new CKEDITOR.htmlParser.comment(a))};q.parse(e);for(f();p!=l;)k(p,p.parent,1);j(l);return l};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=b>0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length===
0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,false,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)this.children[b].filter(a,
c)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,false,d);b=0;c=this.children;for(d=c.length;b<d;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var d=a(this);if(d!==false)for(var c=this.children,f=0;f<c.length;f++){d=c[f];d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):(!b||d.type==b)&&a(d)}},getFilterContext:function(a){return a||
{}}}}(),"use strict",function(){function c(){this.rules=[]}function d(b,a,e,d){var g,h;for(g in a){(h=b[g])||(h=b[g]=new c);h.add(a[g],e,d)}}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new c;this.attributeNameRules=new c;this.elementsRules={};this.attributesRules={};this.textRules=new c;this.commentRules=new c;this.rootRules=new c;b&&this.addRules(b,10)},proto:{addRules:function(b,a){var c;if(typeof a=="number")c=
a;else if(a&&"priority"in a)c=a.priority;typeof c!="number"&&(c=10);typeof a!="object"&&(a={});b.elementNames&&this.elementNameRules.addMany(b.elementNames,c,a);b.attributeNames&&this.attributeNameRules.addMany(b.attributeNames,c,a);b.elements&&d(this.elementsRules,b.elements,c,a);b.attributes&&d(this.attributesRules,b.attributes,c,a);b.text&&this.textRules.add(b.text,c,a);b.comment&&this.commentRules.add(b.comment,c,a);b.root&&this.rootRules.add(b.root,c,a)},applyTo:function(b){b.filter(this)},onElementName:function(b,
a){return this.elementNameRules.execOnName(b,a)},onAttributeName:function(b,a){return this.attributeNameRules.execOnName(b,a)},onText:function(b,a){return this.textRules.exec(b,a)},onComment:function(b,a,c){return this.commentRules.exec(b,a,c)},onRoot:function(b,a){return this.rootRules.exec(b,a)},onElement:function(b,a){for(var c=[this.elementsRules["^"],this.elementsRules[a.name],this.elementsRules.$],d,g=0;g<3;g++)if(d=c[g]){d=d.exec(b,a,this);if(d===false)return null;if(d&&d!=a)return this.onNode(b,
d);if(a.parent&&!a.name)break}return a},onNode:function(b,a){var c=a.type;return c==CKEDITOR.NODE_ELEMENT?this.onElement(b,a):c==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(b,a.value)):c==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(b,a.value)):null},onAttribute:function(b,a,c,d){return(c=this.attributesRules[c])?c.exec(b,d,a,this):d}}});CKEDITOR.htmlParser.filterRulesGroup=c;c.prototype={add:function(b,a,c){this.rules.splice(this.findIndex(a),0,{value:b,priority:a,
options:c})},addMany:function(b,a,c){for(var d=[this.findIndex(a),0],g=0,h=b.length;g<h;g++)d.push({value:b[g],priority:a,options:c});this.rules.splice.apply(this.rules,d)},findIndex:function(b){for(var a=this.rules,c=a.length-1;c>=0&&b<a[c].priority;)c--;return c+1},exec:function(b,a){var c=a instanceof CKEDITOR.htmlParser.node||a instanceof CKEDITOR.htmlParser.fragment,d=Array.prototype.slice.call(arguments,1),g=this.rules,h=g.length,f,j,k,o;for(o=0;o<h;o++){if(c){f=a.type;j=a.name}k=g[o];if(!b.nonEditable||
k.options.applyToAll){k=k.value.apply(null,d);if(k===false)return k;if(c){if(k&&(k.name!=j||k.type!=f))return k}else if(typeof k!="string")return k;k!=void 0&&(d[0]=a=k)}}return a},execOnName:function(b,a){for(var c=0,d=this.rules,g=d.length,h;a&&c<g;c++){h=d[c];if(!b.nonEditable||h.options.applyToAll)a=a.replace(h.value[0],h.value[1])}return a}}}(),function(){function c(c,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",
{"data-cke-bogus":1})}function h(c,e){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],h=b(d),l,p;if(h)for(j(h,1)&&g.push(h);h;){if(i(h)&&(l=a(h))&&j(l))if((p=a(l))&&!i(p))g.push(l);else{f(k).insertAfter(l);l.remove()}h=h.previous}for(h=0;h<g.length;h++)g[h].remove();if(g=CKEDITOR.env.opera&&!c||(typeof e=="function"?e(d)!==false:e))if(!k&&!CKEDITOR.env.needsBrFiller&&d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)g=false;else if(!k&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>
7||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem))g=false;else{g=b(d);g=!g||d.name=="form"&&g.name=="input"}g&&d.add(f(c))}}}function j(a,b){if((!k||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(r))){if(c.index){(new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&k&&(!b||a.parent.name in p))return true;
if(!k)if((c=a.previous)&&c.name=="br"||!c||i(c))return true}return false}var l={elements:{}},k=d=="html",p=CKEDITOR.tools.extend({},A),m;for(m in p)"#"in z[m]||delete p[m];for(m in p)l.elements[m]=h(k,c.config.fillEmptyBlocks!==false);l.root=h(k);l.elements.br=function(b){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=c.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=c.next;d&&e(d);)d=d.next;var h=a(c);!d&&i(c.parent)?g(c.parent,
f(b)):i(d)&&(h&&!i(h))&&f(b).insertBefore(d)}}}}(k);return l}function d(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function a(a){for(a=a.previous;a&&e(a);)a=a.previous;return a}function e(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function i(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
A||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function g(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function h(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function f(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function j(a){return a.replace(x,function(a,b,c){return"<"+b+c.replace(v,
function(a,b){if(!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1){a=a.slice(1);return" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a}return a})+">"})}function k(a,b){return a.replace(b,function(a,b,c){a.indexOf("<textarea")===0&&(a=b+q(c).replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</textarea>");return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function o(a){return a.replace(C,function(a,b){return decodeURIComponent(b)})}function n(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,
function(a){return"<\!--"+p+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function q(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function l(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function m(a,b){for(var c=[],e=b.config.protectedSource,d=b._.dataStore||(b._.dataStore=
{id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,e=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(e),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),g=0;g<e.length;g++)a=a.replace(e[g],function(a){a=a.replace(f,function(a,b,e){return c[e]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(c.push(a)-1)+"--\>"});a=a.replace(f,function(a,b,e){return"<\!--"+p+(b?"{C}":"")+encodeURIComponent(c[e]).replace(/--/g,"%2D%2D")+
"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){d[d.id]=decodeURIComponent(b);return"{cke_protected_"+d.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var b,e,f=this;this.editor=a;this.dataFilter=b=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;b.addRules(y);b.addRules(u,{applyToAll:true});b.addRules(c(a,"data"),{applyToAll:true});e.addRules(s);
e.addRules(w,{applyToAll:true});e.addRules(c(a,"html"),{applyToAll:true});a.on("toHtml",function(b){var b=b.data,c=b.dataValue,c=m(c,a),c=k(c,E),c=j(c),c=k(c,B),c=c.replace(D,"$1cke:$2"),c=c.replace(J,"<cke:$1$2></cke:$1>"),c=CKEDITOR.env.opera?c:c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e=b.context||a.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";c="<pre>"+c+"</pre>";f=1}e=a.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(RegExp(" data-cke-"+
CKEDITOR.rnd+"-","ig")," ");f&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(I,"$1$2");c=o(c);c=q(c);b.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,b.context,b.fixForBody===false?false:d(b.enterMode,a.config.autoParagraph))},null,null,5);a.on("toHtml",function(b){b.data.filter.applyTo(b.data.dataValue,true,b.data.dontFilter,b.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,true)},null,null,10);a.on("toHtml",function(a){var a=
a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=n(b)},null,null,15);a.on("toDataFormat",function(b){var c=b.data.dataValue;b.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));b.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,b.data.context,d(b.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);a.on("toDataFormat",
function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);a.on("toDataFormat",function(b){var c=b.data.dataValue,e=f.writer;e.reset();c.writeChildrenHtml(e);c=e.getHtml(true);c=q(c);c=l(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,e){var d=this.editor,f,g,i;if(b&&typeof b=="object"){f=b.context;c=b.fixForBody;e=b.dontFilter;g=b.filter;i=b.enterMode}else f=b;!f&&f!==null&&(f=d.editable().getName());return d.fire("toHtml",{dataValue:a,
context:f,fixForBody:c,dontFilter:e,filter:g||d.filter,enterMode:i||d.enterMode}).dataValue},toDataFormat:function(a,b){var c,e,d;if(b){c=b.context;e=b.filter;d=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:e||this.editor.filter,context:c,enterMode:d||this.editor.enterMode}).dataValue}};var r=/(?:&nbsp;|\xa0)$/,p="{cke_protected}",z=CKEDITOR.dtd,t=["caption","colgroup","col","thead","tfoot","tbody"],A=CKEDITOR.tools.extend({},
z.$blockLimit,z.$block),y={elements:{input:h,textarea:h}},u={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},s={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width=c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},w={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,
""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],e,d=0;d<c.length;d++){e="data-cke-saved-"+c[d];e in b&&delete b[c[d]]}}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,e;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){c=CKEDITOR.tools.indexOf(t,a.name);e=CKEDITOR.tools.indexOf(t,b.name)}if(!(c>-1&&e>-1&&c!=e)){c=a.parent?a.getIndex():-1;e=b.parent?b.getIndex():-1}return c>
e?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&g(a,b=new CKEDITOR.htmlParser.text);
b.value=a.attributes["data-cke-title"]||""},input:f,textarea:f},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)w.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};var x=/<(a|area|img|input|source)\b([^>]*)>/gi,v=/\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,B=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,E=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,
C=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,D=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,I=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,J=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(c,d){this.name=c;this.attributes=d||{};this.children=[];var b=c||"",a=b.match(/^cke:(.*)/);a&&(b=a[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||
b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[c];this.isUnknown=!CKEDITOR.dtd[c];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}},CKEDITOR.htmlParser.cssStyle=function(c){var d={};((c instanceof CKEDITOR.htmlParser.element?c.attributes.style:c)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,a,c){a=="font-family"&&(c=c.replace(/["']/g,""));d[a.toLowerCase()]=c});return{rules:d,populate:function(b){var a=this.toString();if(a)b instanceof CKEDITOR.dom.element?
b.setAttribute("style",a):b instanceof CKEDITOR.htmlParser.element?b.attributes.style=a:b.style=a},toString:function(){var b=[],a;for(a in d)d[a]&&b.push(a,":",d[a],";");return b.join("")}}},function(){function c(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,
{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var c=this,d,h,b=c.getFilterContext(b);if(b.off)return true;if(!c.parent)a.onRoot(b,c);for(;;){d=c.name;if(!(h=a.onElementName(b,d))){this.remove();return false}c.name=h;if(!(c=a.onElement(b,c))){this.remove();return false}if(c!==this){this.replaceWith(c);return false}if(c.name==d)break;if(c.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(c);return false}if(!c.name){this.replaceWithChildren();
return false}}d=c.attributes;var f,j;for(f in d){j=f;for(h=d[f];;)if(j=a.onAttributeName(b,f))if(j!=f){delete d[f];f=j}else break;else{delete d[f];break}j&&((h=a.onAttribute(b,c,j,h))===false?delete d[j]:d[j]=h)}c.isEmpty||this.filterChildren(a,false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var c=this.name,g=[],h=this.attributes,f,j;a.openTag(c,h);for(f in h)g.push([f,h[f]]);a.sortAttributes&&g.sort(d);f=0;for(j=g.length;f<j;f++){h=g[f];a.attribute(h[0],
h[1])}a.openTagClose(c,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(c)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(a){if(!a)return this.children.length?this.children[0]:null;typeof a!="function"&&(a=c(a));for(var b=0,d=this.children.length;b<d;++b)if(a(this.children[b]))return this.children[b];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;
this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){for(var a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children,b=0,c=a.length;b<c;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),c=this.clone(),d=0;d<b.length;++d)b[d].parent=c;c.children=b;if(b[0])b[0].previous=null;if(a>0)this.children[a-1].next=null;this.parent.add(c,
this.getIndex()+1);return c},removeClass:function(a){var b=this.attributes["class"];if(b)(b=CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable==
"false"&&b.push("nonEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),c=0;c<b.length;c=c+2)a[b[c]]=b[c+1];return a}},true)}(),function(){var c={};CKEDITOR.template=function(d){if(c[d])this.output=c[d];else{var b=d.replace(/'/g,"\\'").replace(/{([^}]+)}/g,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=c[d]=Function("data","buffer","return buffer?buffer.push('"+b+"'):['"+b+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=
new CKEDITOR.dom.document(document),CKEDITOR.add=function(c){CKEDITOR.instances[c.name]=c;c.on("focus",function(){if(CKEDITOR.currentInstance!=c){CKEDITOR.currentInstance=c;CKEDITOR.fire("currentInstance")}});c.on("blur",function(){if(CKEDITOR.currentInstance==c){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",null,c)},CKEDITOR.remove=function(c){delete CKEDITOR.instances[c.name]},function(){var c={};CKEDITOR.addTemplate=function(d,b){var a=c[d];if(a)return a;
a={name:d,source:b};CKEDITOR.fire("template",a);return c[d]=new CKEDITOR.template(a.source)};CKEDITOR.getTemplate=function(d){return c[d]}}(),function(){var c=[];CKEDITOR.addCss=function(d){c.push(d)};CKEDITOR.getCss=function(){return c.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(c,d){if(!CKEDITOR.env.isCompatible)return null;
c=CKEDITOR.dom.element.get(c);if(c.getEditor())throw'The editor instance "'+c.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,c,CKEDITOR.ELEMENT_MODE_INLINE),a=c.is("textarea")?c:null;if(a){b.setData(a.getValue(),null,true);c=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!b.readOnly+'" class="cke_textarea_inline">'+a.getValue()+"</div>",CKEDITOR.document);c.insertAfter(a);a.hide();a.$.form&&b._attachToForm()}else b.setData(c.getHtml(),
null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(c);b.container=c;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(a){b.container.clearCustomData();b.container.remove();a.show()}b.element.clearCustomData();delete b.element});return b};CKEDITOR.inlineAll=function(){var c,d,b;for(b in CKEDITOR.dtd.$editable)for(var a=
CKEDITOR.document.getElementsByTag(b),e=0,i=a.count();e<i;e++){c=a.getItem(e);if(c.getAttribute("contenteditable")=="true"){d={element:c,config:{}};CKEDITOR.fire("inline",d)!==false&&CKEDITOR.inline(c,d.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function c(a,c,g,h){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';
var f=new CKEDITOR.editor(c,a,h);if(h==CKEDITOR.ELEMENT_MODE_REPLACE){a.setStyle("visibility","hidden");f._.required=a.hasAttribute("required");a.removeAttribute("required")}g&&f.setData(g,null,true);f.on("loaded",function(){b(f);h==CKEDITOR.ELEMENT_MODE_REPLACE&&(f.config.autoUpdateElement&&a.$.form)&&f._attachToForm();f.setMode(f.config.startupMode,function(){f.resetDirty();f.status="ready";f.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,f)})});f.on("destroy",d);return f}function d(){var a=
this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();if(this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){b.show();this._.required&&b.setAttribute("required","required")}delete this.element}}function b(b){var c=b.name,d=b.element,h=b.elementMode,f=b.fire("uiSpace",{space:"top",html:""}).html,j=b.fire("uiSpace",{space:"bottom",html:""}).html;a||(a=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+
CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'));c=CKEDITOR.dom.element.createFromHtml(a.output({id:b.id,name:c,langDir:b.lang.dir,langCode:b.langCode,voiceLabel:[b.lang.editor,
b.name].join(", "),topHtml:f?'<span id="'+b.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+f+"</span>":"",contentId:b.ui.spaceId("contents"),bottomHtml:j?'<span id="'+b.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+j+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(h==CKEDITOR.ELEMENT_MODE_REPLACE){d.hide();c.insertAfter(d)}else d.append(c);b.container=c;f&&b.ui.space("top").unselectable();j&&b.ui.space("bottom").unselectable();
d=b.config.width;h=b.config.height;d&&c.setStyle("width",CKEDITOR.tools.cssLength(d));h&&b.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(h));c.disableContextMenu();CKEDITOR.env.webkit&&c.on("focus",function(){b.focus()});b.fireOnce("uiReady")}CKEDITOR.replace=function(a,b){return c(a,b,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,b,d){return c(a,b,d,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),
b=0;b<a.length;b++){var c=null,d=a[b];if(d.name||d.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(d.className))continue}else if(typeof arguments[0]=="function"){c={};if(arguments[0](d,c)===false)continue}this.replace(d,c)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var c=this,d=this._.modes;if(!(a==c.mode||!d||!d[a])){c.fire("beforeSetMode",a);if(c.mode){var f=
c.checkDirty();c._.previousMode=c.mode;c.fire("beforeModeUnload");c.editable(0);c.ui.space("contents").setHtml("");c.mode=""}this._.modes[a](function(){c.mode=a;f!==void 0&&!f&&c.resetDirty();setTimeout(function(){c.fire("mode");b&&b.call(c)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var f=this.container,j=this.ui.space("contents"),k=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,d=d?f.getChild(1):f;d.setSize("width",a,true);k&&(k.style.width="1%");j.setStyle("height",
Math.max(b-(c?0:(d.$.offsetHeight||0)-(j.$.clientHeight||0)),0)+"px");k&&(k.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};var a;CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function c(b){var c=b.editor,e=b.data.path,f=e.blockLimit,g=b.data.selection,h=g.getRanges()[0],i;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&
CKEDITOR.env.needsBrFiller)if(g=d(g,e)){g.appendBogus();i=CKEDITOR.env.ie}if(c.config.autoParagraph!==false&&c.activeEnterMode!=CKEDITOR.ENTER_BR&&c.editable().equals(f)&&!e.block&&h.collapsed&&!h.getCommonAncestor().isReadOnly()){e=h.clone();e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);f=new CKEDITOR.dom.walker(e);f.guard=function(b){return!a(b)||b.type==CKEDITOR.NODE_COMMENT||b.isReadOnly()};if(!f.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock()){c=h.fixBlock(true,c.activeEnterMode==CKEDITOR.ENTER_DIV?
"div":"p");if(!CKEDITOR.env.needsBrFiller)(c=c.getFirst(a))&&(c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?:&nbsp;|\xa0)$/))&&c.remove();i=1;b.cancel()}}i&&h.select()}function d(b,c){if(b.isFake)return 0;var e=c.block||c.blockLimit,d=e&&e.getLast(a);if(e&&e.isBlockBoundary()&&(!d||!(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()))&&!e.is("pre")&&!e.getBogus())return e}function b(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||b=="reset")&&
a.data.preventDefault()}}function a(a){return k(a)&&o(a)}function e(a,b){return function(c){var e=CKEDITOR.dom.element.get(c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget);(!e||!b.equals(e)&&!b.contains(e))&&a.call(this,c)}}function i(b){var c,e=b.getRanges()[0],d=b.root,g={table:1,ul:1,ol:1,dl:1};if(e.startPath().contains(g)){var b=function(b){return function(e,d){d&&(e.type==CKEDITOR.NODE_ELEMENT&&e.is(g))&&(c=e);if(!d&&a(e)&&(!b||!f(e)))return false}},h=e.clone();h.collapse(1);
h.setStartAt(d,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(h);d.guard=b();d.checkBackward();if(c){h=e.clone();h.collapse();h.setEndAt(c,CKEDITOR.POSITION_AFTER_END);d=new CKEDITOR.dom.walker(h);d.guard=b(true);c=false;d.checkForward();return c}}return null}function g(a){a.editor.focus();a.editor.fire("saveSnapshot")}function h(a,b){var c=a.editor;!b&&c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,
$:function(a,b){this.base(b.$||b);this.editor=a;this.hasFocus=false;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus){a=this.editor._.previousActive||this.getDocument().getActive();if(this.contains(a)){a.focus();return}}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(b){if(!CKEDITOR.env.ie)throw b;}if(CKEDITOR.env.safari&&!this.isInline()){a=CKEDITOR.document.getActive();a.equals(this.getWindow().getFrame())||
this.getWindow().focus()}},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=a=="focus"?"focusin":"focusout";b=e(b,this);c[0]=a;c[1]=b}return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a,b,c,e,d,f){!this._.listeners&&(this._.listeners=[]);var g=Array.prototype.slice.call(arguments,1),g=a.on.apply(a,g);this._.listeners.push(g);return g},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},
restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b=this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,
b){g(this);n(this,b||"html",a)},insertText:function(a){g(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.activeEnterMode,b=c==CKEDITOR.ENTER_BR,e=CKEDITOR.tools,a=e.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"&nbsp;&nbsp; &nbsp;"),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var d=/\n{2}/g;if(d.test(a))var f="<"+c+">",h="</"+c+">",a=f+a.replace(d,function(){return h+f})+h}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+
">)"),function(a){return e.repeat(a,2)}));a=a.replace(/^ | $/g,"&nbsp;");a=a.replace(/(>|\s) /g,function(a,b){return b+"&nbsp;"}).replace(/ (?=<)/g,"&nbsp;");n(this,"text",a)},insertElement:function(a,b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,e=c.config.enterMode,d=a.getName(),f=CKEDITOR.dtd.$block[d];if(b.checkReadOnly())return false;b.deleteContents(1);var g,h;if(f)for(;(g=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[g.getName()])&&
(!h||!h[d]);)if(g.getName()in CKEDITOR.dtd.span)b.splitElement(g);else if(b.checkStartOfBlock()&&b.checkEndOfBlock()){b.setStartBefore(g);b.collapse(true);g.remove()}else b.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(b){var c=this.editor,e=c.activeEnterMode,c=c.getSelection(),d=c.getRanges(),i=b.getName(),i=CKEDITOR.dtd.$block[i],j,k,o;g(this);for(var n=d.length;n--;){o=d[n];j=!n&&b||b.clone(1);this.insertElementIntoRange(j,
o)&&!k&&(k=j)}if(k){o.moveToPosition(k,CKEDITOR.POSITION_AFTER_END);if(i)if((b=k.getNext(function(b){return a(b)&&!f(b)}))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?o.moveToElementEditStart(b):o.moveToElementEditEnd(k);else if(!b&&e!=CKEDITOR.ENTER_BR){b=o.fixBlock(true,e==CKEDITOR.ENTER_DIV?"div":"p");o.moveToElementEditStart(b)}}c.selectRanges([o]);h(this,CKEDITOR.env.opera)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")},
getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var c=this.editor;this.attachListener(c,"beforeGetData",function(){var a=this.getData();this.is("textarea")||c.config.ignoreEmptyParagraph!==
false&&(a=a.replace(j,function(a,b){return b}));c.setData(a,null,1)},this);this.attachListener(c,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(c,"afterSetData",function(){this.setData(c.getData(1))},this);this.attachListener(c,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(c,"beforeFocus",function(){var a=c.getSelection();(a=a&&a.getNative())&&a.type=="Control"||this.focus()},this);this.attachListener(c,"insertHtml",function(a){this.insertHtml(a.data.dataValue,
a.data.mode)},this);this.attachListener(c,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(c,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(c.readOnly);this.attachClass("cke_editable");this.attachClass(c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":c.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||c.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+c.config.contentsLangDirection);
c.keystrokeHandler.blockedKeystrokes[8]=+c.readOnly;c.keystrokeHandler.attach(this);this.on("blur",function(a){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?a.cancel():this.hasFocus=false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);c.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;c.once("contentDom",function(){c.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",
c.tabIndex);if(!this.is("textarea")){c.document=this.getDocument();c.window=this.getWindow();var e=c.document;this.changeAttr("spellcheck",!c.config.disableNativeSpellChecker);var d=c.config.contentsLangDirection;this.getDirection(1)!=d&&this.changeAttr("dir",d);var f=CKEDITOR.getCss();if(f){d=e.getHead();if(!d.getCustomData("stylesheet")){f=e.appendStyleText(f);f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement);d.setCustomData("stylesheet",f);f.data("cke-temp",1)}}d=e.getCustomData("stylesheet_ref")||
0;e.setCustomData("stylesheet_ref",d+1);this.setCustomData("cke_includeReadonly",!c.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var g={8:1,46:1};this.attachListener(c,"key",function(a){if(c.readOnly)return true;var b=a.data.keyCode,e;if(b in g){var d=c.getSelection(),a=d.getRanges()[0],f=a.startPath(),h,j,l,b=b==8;if(d=i(d)){c.fire("saveSnapshot");
a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();a.select();c.fire("saveSnapshot");e=1}else if(a.collapsed)if((h=f.block)&&(l=h[b?"getPrevious":"getNext"](k))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&a[b?"checkStartOfBlock":"checkEndOfBlock"]()){c.fire("saveSnapshot");a[b?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove();a["moveToElementEdit"+(b?"End":"Start")](l);a.select();c.fire("saveSnapshot");e=1}else if(f.blockLimit&&f.blockLimit.is("td")&&(j=f.blockLimit.getAscendant("table"))&&
a.checkBoundaryOfElement(j,b?CKEDITOR.START:CKEDITOR.END)&&(l=j[b?"getPrevious":"getNext"](k))){c.fire("saveSnapshot");a["moveToElementEdit"+(b?"End":"Start")](l);a.checkStartOfBlock()&&a.checkEndOfBlock()?l.remove():a.select();c.fire("saveSnapshot");e=1}else if((j=f.contains(["td","th","caption"]))&&a.checkBoundaryOfElement(j,b?CKEDITOR.START:CKEDITOR.END))e=1}return!e});c.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in
g&&!this.getFirst(a)){this.appendBogus();b=c.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this,"dblclick",function(a){if(c.readOnly)return false;a={element:a.data.getTarget()};c.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(a){var b=a.data.getTarget();if(b.is("img","hr","input","textarea","select")){c.getSelection().selectElement(b);
b.is("input","textarea","select")&&a.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(a.data.$.button==2){a=a.data.getTarget();if(!a.getOuterHtml().replace(j,"")){var b=c.createRange();b.moveToElementEditStart(a);b.select(true)}}});if(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()})}}}},_:{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());a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}delete this.editor}}});CKEDITOR.editor.prototype.editable=
function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var f=CKEDITOR.dom.walker.bogus(),j=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,k=CKEDITOR.dom.walker.whitespaces(true),o=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.on("insertElement",
function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});b.on("selectionChange",function(a){if(!b.readOnly){var e=b.getSelection();if(e&&!e.isLocked){e=b.checkDirty();b.fire("lockSnapshot");c(a);b.fire("unlockSnapshot");!e&&b.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",
function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('<span id="'+e+'" class="cke_voice_label">'+this.lang.common.editorHelp+"</span>");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");
var n=function(){function b(a){return a.type==CKEDITOR.NODE_ELEMENT}function c(a,e){var d,f,g,h,j=[],k=e.range.startContainer;d=e.range.startPath();for(var k=i[k.getName()],p=0,m=a.getChildren(),z=m.count(),o=-1,n=-1,r=0,u=d.contains(i.$list);p<z;++p){d=m.getItem(p);if(b(d)){g=d.getName();if(u&&g in CKEDITOR.dtd.$list)j=j.concat(c(d,e));else{h=!!k[g];if(g=="br"&&d.data("cke-eol")&&(!p||p==z-1)){r=(f=p?j[p-1].node:m.getItem(p+1))&&(!b(f)||!f.is("br"));f=f&&b(f)&&i.$block[f.getName()]}o==-1&&!h&&(o=
p);h||(n=p);j.push({isElement:1,isLineBreak:r,isBlock:d.isBlockBoundary(),hasBlockSibling:f,node:d,name:g,allowed:h});f=r=0}}else j.push({isElement:0,node:d,allowed:1})}if(o>-1)j[o].firstNotAllowed=1;if(n>-1)j[n].lastNotAllowed=1;return j}function e(a,c){var d=[],f=a.getChildren(),g=f.count(),h,j=0,k=i[c],l=!a.is(i.$inline)||a.is("br");for(l&&d.push(" ");j<g;j++){h=f.getItem(j);b(h)&&!h.is(k)?d=d.concat(e(h,c)):d.push(h)}l&&d.push(" ");return d}function d(a){return a&&b(a)&&(a.is(i.$removeEmpty)||
a.is("a")&&!a.isBlockBoundary())}function f(a,c,e,d){var g=a.clone(),h,i;g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);if((h=(new CKEDITOR.dom.walker(g)).next())&&b(h)&&j[h.getName()]&&(i=h.getPrevious())&&b(i)&&!i.getParent().equals(a.startContainer)&&e.contains(i)&&d.contains(h)&&h.isIdentical(i)){h.moveChildren(i);h.remove();f(a,c,e,d)}}function g(a,c){function e(a,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&b(a)&&a.is("br")){a.remove();return 1}}var d=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-
1);d&&e(d,a[a.length-1]);if(f&&e(f,a[0])){c.setEnd(c.endContainer,c.endOffset-1);c.collapse()}}var i=CKEDITOR.dtd,j={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},k={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},o=CKEDITOR.tools.extend({},i.$inline);delete o.br;return function(j,n,A){var v=j.editor;j.getDocument();var B=v.getSelection().getRanges()[0],E=false;if(n=="unfiltered_html"){n="html";E=true}if(!B.checkReadOnly()){var C=(new CKEDITOR.dom.elementPath(B.startContainer,
B.root)).blockLimit||B.root,n={type:n,dontFilter:E,editable:j,editor:v,range:B,blockLimit:C,mergeCandidates:[],zombies:[]},v=n.range,E=n.mergeCandidates,D,I,J,G;if(n.type=="text"&&v.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){D=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",v.document);v.insertNode(D);v.setStartAfter(D)}I=new CKEDITOR.dom.elementPath(v.startContainer);n.endPath=J=new CKEDITOR.dom.elementPath(v.endContainer);if(!v.collapsed){var C=J.block||J.blockLimit,L=v.getCommonAncestor();
C&&(!C.equals(L)&&!C.contains(L)&&v.checkEndOfBlock())&&n.zombies.push(C);v.deleteContents()}for(;(G=b(v.startContainer)&&v.startContainer.getChild(v.startOffset-1))&&b(G)&&G.isBlockBoundary()&&I.contains(G);)v.moveToPosition(G,CKEDITOR.POSITION_BEFORE_END);f(v,n.blockLimit,I,J);if(D){v.setEndBefore(D);v.collapse();D.remove()}D=v.startPath();if(C=D.contains(d,false,1)){v.splitElement(C);n.inlineStylesRoot=C;n.inlineStylesPeak=D.lastElement}D=v.createBookmark();(C=D.startNode.getPrevious(a))&&b(C)&&
d(C)&&E.push(C);(C=D.startNode.getNext(a))&&b(C)&&d(C)&&E.push(C);for(C=D.startNode;(C=C.getParent())&&d(C);)E.push(C);v.moveToBookmark(D);if(D=A){D=n.range;if(n.type=="text"&&n.inlineStylesRoot){G=n.inlineStylesPeak;v=G.getDocument().createText("{cke-peak}");for(E=n.inlineStylesRoot.getParent();!G.equals(E);){v=v.appendTo(G.clone());G=G.getParent()}A=v.getOuterHtml().split("{cke-peak}").join(A)}G=n.blockLimit.getName();if(/^\s+|\s+$/.test(A)&&"span"in CKEDITOR.dtd[G])var M='<span data-cke-marker="1">&nbsp;</span>',
A=M+A+M;A=n.editor.dataProcessor.toHtml(A,{context:null,fixForBody:false,dontFilter:n.dontFilter,filter:n.editor.activeFilter,enterMode:n.editor.activeEnterMode});G=D.document.createElement("body");G.setHtml(A);if(M){G.getFirst().remove();G.getLast().remove()}if((M=D.startPath().block)&&!(M.getChildCount()==1&&M.getBogus()))a:{var H;if(G.getChildCount()==1&&b(H=G.getFirst())&&H.is(k)){M=H.getElementsByTag("*");D=0;for(E=M.count();D<E;D++){v=M.getItem(D);if(!v.is(o))break a}H.moveChildren(H.getParent(1));
H.remove()}}n.dataWrapper=G;D=A}if(D){H=n.range;var M=H.document,F,A=n.blockLimit;D=0;var N;G=[];var K,Q,E=v=0,O,R;I=H.startContainer;var C=n.endPath.elements[0],S;J=C.getPosition(I);L=!!C.getCommonAncestor(I)&&J!=CKEDITOR.POSITION_IDENTICAL&&!(J&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);I=c(n.dataWrapper,n);for(g(I,H);D<I.length;D++){J=I[D];if(F=J.isLineBreak){F=H;O=A;var P=void 0,U=void 0;if(J.hasBlockSibling)F=1;else{P=F.startContainer.getAscendant(i.$block,1);if(!P||!P.is({div:1,
p:1}))F=0;else{U=P.getPosition(O);if(U==CKEDITOR.POSITION_IDENTICAL||U==CKEDITOR.POSITION_CONTAINS)F=0;else{O=F.splitElement(P);F.moveToPosition(O,CKEDITOR.POSITION_AFTER_START);F=1}}}}if(F)E=D>0;else{F=H.startPath();if(!J.isBlock&&n.editor.config.autoParagraph!==false&&(n.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&n.editor.editable().equals(F.blockLimit)&&!F.block)&&(Q=n.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&n.editor.config.autoParagraph!==false?n.editor.activeEnterMode==CKEDITOR.ENTER_DIV?
"div":"p":false)){Q=M.createElement(Q);Q.appendBogus();H.insertNode(Q);CKEDITOR.env.needsBrFiller&&(N=Q.getBogus())&&N.remove();H.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}if((F=H.startPath().block)&&!F.equals(K)){if(N=F.getBogus()){N.remove();G.push(F)}K=F}J.firstNotAllowed&&(v=1);if(v&&J.isElement){F=H.startContainer;for(O=null;F&&!i[F.getName()][J.name];){if(F.equals(A)){F=null;break}O=F;F=F.getParent()}if(F){if(O){R=H.splitElement(O);n.zombies.push(R);n.zombies.push(O)}}else{O=A.getName();
S=!D;F=D==I.length-1;O=e(J.node,O);for(var P=[],U=O.length,X=0,aa=void 0,V=0,Y=-1;X<U;X++){aa=O[X];if(aa==" "){if(!V&&(!S||X)){P.push(new CKEDITOR.dom.text(" "));Y=P.length}V=1}else{P.push(aa);V=0}}F&&Y==P.length&&P.pop();S=P}}if(S){for(;F=S.pop();)H.insertNode(F);S=0}else H.insertNode(J.node);if(J.lastNotAllowed&&D<I.length-1){(R=L?C:R)&&H.setEndAt(R,CKEDITOR.POSITION_AFTER_START);v=0}H.collapse()}}n.dontMoveCaret=E;n.bogusNeededBlocks=G}N=n.range;var W;R=n.bogusNeededBlocks;for(S=N.createBookmark();K=
n.zombies.pop();)if(K.getParent()){Q=N.clone();Q.moveToElementEditStart(K);Q.removeEmptyBlocksAtEnd()}if(R)for(;K=R.pop();)CKEDITOR.env.needsBrFiller?K.appendBogus():K.append(N.document.createText(" "));for(;K=n.mergeCandidates.pop();)K.mergeSiblings();N.moveToBookmark(S);if(!n.dontMoveCaret){for(K=b(N.startContainer)&&N.startContainer.getChild(N.startOffset-1);K&&b(K)&&!K.is(i.$empty);){if(K.isBlockBoundary())N.moveToPosition(K,CKEDITOR.POSITION_BEFORE_END);else{if(d(K)&&K.getHtml().match(/(\s|&nbsp;)$/g)){W=
null;break}W=N.clone();W.moveToPosition(K,CKEDITOR.POSITION_BEFORE_END)}K=K.getLast(a)}W&&N.moveToRange(W)}B.select();h(j)}}}()}(),function(){function c(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();
this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function d(){o=true;if(!k){b.call(this);k=CKEDITOR.tools.setTimeout(b,200,this)}}function b(){k=null;if(o){CKEDITOR.tools.setTimeout(c,0,this);o=false}}function a(a){function b(c,e){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(e?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,e=a.getPreviousNode(n,null,c),d=a.getNextNode(n,null,c);return b(e)||
b(d,1)||!e&&!d&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function e(a){return a.getCustomData("cke-fillingChar")}function i(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var e,d=a.getDocument().getSelection().getNative(),f=d&&d.type!="None"&&d.getRangeAt(0);if(c.getLength()>1&&f&&f.intersectsNode(c.$)){e=[d.anchorOffset,d.focusOffset];f=d.focusNode==c.$&&d.focusOffset>0;d.anchorNode==c.$&&d.anchorOffset>0&&e[0]--;f&&e[1]--;var h;f=d;
if(!f.isCollapsed){h=f.getRangeAt(0);h.setStart(f.anchorNode,f.anchorOffset);h.setEnd(f.focusNode,f.focusOffset);h=h.collapsed}h&&e.unshift(e.pop())}}c.setText(g(c.getText()));if(e){c=d.getRangeAt(0);c.setStart(c.startContainer,e[0]);c.setEnd(c.startContainer,e[1]);d.removeAllRanges();d.addRange(c)}}}function g(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function h(a,b,c){var e=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var d=a.getDocument().on("selectionchange",
function(a){a.cancel()},null,null,-100);else{var f=new CKEDITOR.dom.range(a);f.moveToElementEditStart(a);var g=a.getDocument().$.createRange();g.setStart(f.startContainer.$,f.startOffset);g.collapse(1);b.removeAllRanges();b.addRange(g)}c&&a.focus();e.removeListener();d&&d.removeListener()}function f(a){var b=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'">&nbsp;</div>',a.document);
a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(),e=a.createRange(),d=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(b,CKEDITOR.POSITION_AFTER_START);e.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([e]);d.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function j(a){var b={37:1,39:1,8:1,46:1};return function(c){var e=c.data.getKeystroke();if(b[e]){var d=a.getSelection().getRanges(),f=d[0];if(d.length==1&&f.collapsed)if((e=
f[e<38?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getAttribute("contenteditable")=="false"){a.getSelection().fake(e);c.data.preventDefault();c.cancel()}}}}var k,o,n=CKEDITOR.dom.walker.invisible(1),q=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,e=c.createRange(),d;if(!(d=e.moveToClosestEditablePosition(b.selected,
a)))d=e.moveToClosestEditablePosition(b.selected,!a);d&&c.getSelection().selectRanges([e]);c.fire("saveSnapshot");b.selected.remove();if(!d){e.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([e])}c.fire("saveSnapshot");return false}}var c=a(),e=a(1);return{37:c,38:c,39:e,40:e,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=e.getSelection();a&&a.removeAllRanges()}var e=a.editor;e.on("contentDom",function(){var a=e.document,b=CKEDITOR.document,
f=e.editable(),g=a.getBody(),h=a.getDocumentElement(),k=f.isInline(),p,m;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();if(p!==0)if((a=e.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==f.$){a=e.createRange();a.moveToElementEditStart(f);a.select()}},null,null,-2);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){p&&CKEDITOR.env.webkit&&(p=e._.previousActive&&e._.previousActive.equals(a.getActive()));e.unlockSelection(p);p=0},null,null,-1);
f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||k){var o=function(){m=new CKEDITOR.dom.selection(e.getSelection());m.lock()};l?f.attachListener(f,"beforedeactivate",o,null,null,-1):f.attachListener(e,"selectionCheck",o,null,null,-1);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){e.lockSelection(m);p=1},null,null,-1);f.attachListener(f,"mousedown",function(){p=0})}if(CKEDITOR.env.ie&&!k){var z;f.attachListener(f,"mousedown",function(a){if(a.data.$.button==
2){a=e.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)z=e.window.getScrollPosition()}});f.attachListener(f,"mouseup",function(a){if(a.data.$.button==2&&z){e.document.$.documentElement.scrollLeft=z.x;e.document.$.documentElement.scrollTop=z.y}z=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)h.on("mousedown",function(a){function c(a){a=a.data.$;if(d){var b=g.$.createTextRange();try{b.moveToPoint(a.x,a.y)}catch(e){}d.setEndPoint(i.compareEndPoints("StartToStart",
b)<0?"EndToEnd":"StartToStart",b);d.select()}}function e(){h.removeListener("mousemove",c);b.removeListener("mouseup",e);h.removeListener("mouseup",e);d.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<h.$.clientHeight&&a.$.x<h.$.clientWidth){var d=g.$.createTextRange();try{d.moveToPoint(a.$.x,a.$.y)}catch(f){}var i=d.duplicate();h.on("mousemove",c);b.on("mouseup",e);h.on("mouseup",e)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11){h.on("mousedown",function(a){if(a.data.getTarget().is("html")){b.on("mouseup",
n);h.on("mouseup",n)}});var n=function(){b.removeListener("mouseup",n);h.removeListener("mouseup",n);var c=CKEDITOR.document.$.selection,e=c.createRange();c.type!="None"&&e.parentElement().ownerDocument==a.$&&e.select()}}}}f.attachListener(f,"selectionchange",c,e);f.attachListener(f,"keyup",d,e);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(k?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var I;f.attachListener(f,
"mousedown",function(){I=1});f.attachListener(a.getDocumentElement(),"mouseup",function(){I&&d.call(e);I=0})}else f.attachListener(CKEDITOR.env.ie?f:a.getDocumentElement(),"mouseup",d,e);CKEDITOR.env.webkit&&f.attachListener(a,"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:i(f)}},null,null,-1);f.attachListener(f,"keydown",j(e),null,null,-1)});e.on("contentDomUnload",e.forceNextSelectionCheck,e);e.on("dataReady",function(){delete e._.fakeSelection;
delete e._.hiddenSelectionContainer;e.selectionChange(1)});e.on("loadSnapshot",function(){var a=e.editable().getLast(function(a){return a.type==CKEDITOR.NODE_ELEMENT});a&&a.hasAttribute("data-cke-hidden-sel")&&a.remove()},null,null,100);CKEDITOR.env.ie9Compat&&e.on("beforeDestroy",b,null,null,9);CKEDITOR.env.webkit&&e.on("setData",b);e.on("contentDomUnload",function(){e.unlockSelection()});e.on("key",function(a){if(e.mode=="wysiwyg"){var b=e.getSelection();if(b.isFake){var c=q[a.data.keyCode];if(c)return c({editor:e,
selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(),c=e(a);c&&(c.getCustomData("ready")?i(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){i(b.editable())},null,null,-1);var c,d,a=function(){var a=b.editable();if(a)if(a=e(a)){var f=b.document.$.defaultView.getSelection();f.type=="Caret"&&f.anchorNode==a.$&&(d=1);c=a.getText();a.setText(g(c))}},
f=function(){var a=b.editable();if(a)if(a=e(a)){a.setText(c);if(d){b.document.$.defaultView.getSelection().setPosition(a.$,a.getLength());d=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",f);b.on("beforeGetData",a,null,null,0);b.on("getData",f)}});CKEDITOR.editor.prototype.selectionChange=function(a){(a?c:d).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&
this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection;return true}return false};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;var l=typeof window.getSelection!="function",m=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=
a,a=a.root;var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:m++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=a=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}b=l?this.document.$.selection:this.document.getWindow().$.getSelection();if(CKEDITOR.env.webkit)(b.type=="None"&&this.document.getActive().equals(a)||b.type=="Caret"&&b.anchorNode.nodeType==
CKEDITOR.NODE_DOCUMENT)&&h(a,b);else if(CKEDITOR.env.gecko)b&&(this.document.getActive().equals(a)&&b.anchorNode&&b.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&h(a,b,true);else if(CKEDITOR.env.ie){var e;try{e=this.document.getActive()}catch(d){}if(l)b.type=="None"&&(e&&e.equals(this.document.getDocumentElement()))&&h(a,null,true);else{(b=b&&b.anchorNode)&&(b=new CKEDITOR.dom.node(b));e&&(e.equals(this.document.getDocumentElement())&&b&&(a.equals(b)||a.contains(b)))&&h(a,null,true)}}e=this.getNative();
var f,g;if(e)if(e.getRangeAt)f=(g=e.rangeCount&&e.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer);else{try{g=e.createRange()}catch(i){}f=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!f||!(f.type==CKEDITOR.NODE_ELEMENT||f.type==CKEDITOR.NODE_TEXT)||!this.root.equals(f)&&!this.root.contains(f)){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 r={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.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=l?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:l?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),e=c.type;if(e=="Text")b=
CKEDITOR.SELECTION_TEXT;if(e=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(d){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),e=c.startContainer;if(e==c.endContainer&&e.nodeType==1&&c.endOffset-c.startOffset==1&&r[e.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=
b},getRanges:function(){var a=l?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var e=b.parentElement();if(!e.hasChildNodes())return{container:e,offset:0};for(var d=e.children,f,g,h=b.duplicate(),i=0,j=d.length-1,k=-1,l,p;i<=j;){k=Math.floor((i+j)/2);f=d[k];h.moveToElementText(f);l=h.compareEndPoints("StartToStart",b);if(l>0)j=k-1;else if(l<0)i=k+1;else return{container:e,offset:a(f)}}if(k==-1||k==d.length-1&&l<0){h.moveToElementText(e);
h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;d=e.childNodes;if(!h){f=d[d.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:e,offset:d.length}:{container:f,offset:f.nodeValue.length}}for(e=d.length;h>0&&e>0;){g=d[--e];if(g.nodeType==CKEDITOR.NODE_TEXT){p=g;h=h-g.nodeValue.length}}return{container:p,offset:-h}}h.collapse(l>0?true:false);h.setEndPoint(l>0?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:e,offset:a(f)+
(l>0?0:1)};for(;h>0;)try{g=f[l>0?"previousSibling":"nextSibling"];if(g.nodeType==CKEDITOR.NODE_TEXT){h=h-g.nodeValue.length;p=g}f=g}catch(m){return{container:e,offset:a(f)}}return{container:p,offset:l>0?-h:p.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),e=this.getType();if(!a)return[];if(e==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);e=b(c,true);a.setStart(new CKEDITOR.dom.node(e.container),e.offset);e=b(c);a.setEnd(new CKEDITOR.dom.node(e.container),
e.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(e==CKEDITOR.SELECTION_ELEMENT){for(var e=[],d=0;d<c.length;d++){for(var f=c.item(d),g=f.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<g.childNodes.length&&g.childNodes[h]!=f;h++);a.setStart(new CKEDITOR.dom.node(g),h);a.setEnd(new CKEDITOR.dom.node(g),h+1);e.push(a)}return e}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;
for(var e=0;e<c.rangeCount;e++){var d=c.getRangeAt(e);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(d.startContainer),d.startOffset);b.setEnd(new CKEDITOR.dom.node(d.endContainer),d.endOffset);a.push(b)}return a};return function(b){var c=this._.cache;if(c.ranges&&!b)return c.ranges;if(!c.ranges)c.ranges=new CKEDITOR.dom.rangeList(a.call(this));if(b)for(var e=c.ranges,d=0;d<e.length;d++){var f=e[d];f.getCommonAncestor().isReadOnly()&&e.splice(d,1);if(!f.collapsed){if(f.startContainer.isReadOnly())for(var b=
f.startContainer,g;b;){if((g=b.type==CKEDITOR.NODE_ELEMENT)&&b.is("body")||!b.isReadOnly())break;g&&b.getAttribute("contentEditable")=="false"&&f.setStartAfter(b);b=b.getParent()}b=f.startContainer;g=f.endContainer;var h=f.startOffset,i=f.endOffset,j=f.clone();b&&b.type==CKEDITOR.NODE_TEXT&&(h>=b.getLength()?j.setStartAfter(b):j.setStartBefore(b));g&&g.type==CKEDITOR.NODE_TEXT&&(i?j.setEndAfter(g):j.setEndBefore(g));b=new CKEDITOR.dom.walker(j);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&
a.isReadOnly()){var b=f.clone();f.setEndBefore(a);f.collapsed&&e.splice(d--,1);if(!(a.getPosition(j.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||e.splice(d+1,0,b)}return true}return false};b.next()}}return c.ranges}}(),getStartElement:function(){var a=this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=
c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):
null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,e,d=2;d&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&r[c.getName()]&&(e=c)));d--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return e&&e.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;
if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=l?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),e=this.isFake;this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",
1)&&(e?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection&&this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot")}delete a._.hiddenSelectionContainer}this.rev=m++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(b){this.reset();
if(b.length)if(this.isLocked){var c=CKEDITOR.document.getActive();this.unlock();this.selectRanges(b);this.lock();!c.equals(this.root)&&c.focus()}else if(b.length==1&&!b[0].collapsed&&(c=b[0].getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getAttribute("contenteditable")=="false")this.fake(c);else{if(l){var e=CKEDITOR.dom.walker.whitespaces(true),d=/\ufeff|\u00a0/,f={table:1,tbody:1,tr:1};if(b.length>1){c=b[b.length-1];b[0].setEnd(c.endContainer,c.endOffset)}var c=b[0],b=c.collapsed,g,h,j,k=c.getEnclosedNode();
if(k&&k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in r&&(!k.is("a")||!k.getText()))try{j=k.$.createControlRange();j.addElement(k.$);j.select();return}catch(m){}(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in f||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in f)&&c.shrink(CKEDITOR.NODE_ELEMENT,true);j=c.createBookmark();var f=j.startNode,o;if(!b)o=j.endNode;j=c.document.$.body.createTextRange();j.moveToElementText(f.$);j.moveStart("character",1);if(o){d=
c.document.$.body.createTextRange();d.moveToElementText(o.$);j.setEndPoint("EndToEnd",d);j.moveEnd("character",-1)}else{g=f.getNext(e);h=f.hasAscendant("pre");g=!(g&&g.getText&&g.getText().match(d))&&(h||!f.hasPrevious()||f.getPrevious().is&&f.getPrevious().is("br"));h=c.document.createElement("span");h.setHtml("&#65279;");h.insertBefore(f);g&&c.document.createText("﻿").insertBefore(f)}c.setStartBefore(f);f.remove();if(b){if(g){j.moveStart("character",-1);j.select();c.document.$.selection.clear()}else j.select();
c.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START);h.remove()}else{c.setEndBefore(o);o.remove();j.select()}}else{o=this.getNative();if(!o)return;if(CKEDITOR.env.opera){c=this.document.$.createRange();c.selectNodeContents(this.root.$);o.addRange(c)}this.removeAllRanges();for(j=0;j<b.length;j++){if(j<b.length-1){c=b[j];d=b[j+1];h=c.clone();h.setStart(c.endContainer,c.endOffset);h.setEnd(d.startContainer,d.startOffset);if(!h.collapsed){h.shrink(CKEDITOR.NODE_ELEMENT,true);g=h.getCommonAncestor();h=h.getEnclosedNode();
if(g.isReadOnly()||h&&h.isReadOnly()){d.setStart(c.startContainer,c.startOffset);b.splice(j--,1);continue}}}c=b[j];d=this.document.$.createRange();g=c.startContainer;if(CKEDITOR.env.opera&&c.collapsed&&g.type==CKEDITOR.NODE_ELEMENT){h=g.getChild(c.startOffset-1);e=g.getChild(c.startOffset);if(!h&&!e&&g.is(CKEDITOR.dtd.$removeEmpty)||h&&h.type==CKEDITOR.NODE_ELEMENT||e&&e.type==CKEDITOR.NODE_ELEMENT){c.insertNode(this.document.createText(""));c.collapse(1)}}if(c.collapsed&&CKEDITOR.env.webkit&&a(c)){g=
this.root;i(g,false);h=g.getDocument().createText("​");g.setCustomData("cke-fillingChar",h);c.insertNode(h);if((g=h.getNext())&&!h.getPrevious()&&g.type==CKEDITOR.NODE_ELEMENT&&g.getName()=="br"){i(this.root);c.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START)}else c.moveToPosition(h,CKEDITOR.POSITION_AFTER_END)}d.setStart(c.startContainer.$,c.startOffset);try{d.setEnd(c.endContainer.$,c.endOffset)}catch(n){if(n.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){c.collapse(1);d.setEnd(c.endContainer.$,
c.endOffset)}else throw n;}o.addRange(d)}}this.reset();this.root.fire("selectionchange")}},fake:function(a){var b=this.root.editor;this.reset();f(b);var c=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(e);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=m++;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"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c=0;c<a.length;c++){var e=new CKEDITOR.dom.range(this.root);e.moveToBookmark(a[c]);b.push(e)}a.isFake?this.fake(b[0].getEnclosedNode()):this.selectRanges(b);return this},
getCommonAncestor:function(){var a=this.getRanges();return!a.length?null:a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var a=this.getNative();try{a&&a[l?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}(),"use strict",CKEDITOR.editor.prototype.attachStyleStateChange=function(c,d){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=
[];this.on("selectionChange",function(a){for(var c=0;c<b.length;c++){var d=b[c],g=d.style.checkActive(a.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;d.fn.call(this,g)}})}b.push({style:c,fn:d})},CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function c(a,b){for(var c,e;a=a.getParent();){if(a.equals(b))break;if(a.getAttribute("data-nostyle"))c=a;else if(!e){var d=a.getAttribute("contentEditable");d=="false"?c=a:d=="true"&&(e=1)}}return c}function d(b){var e=
b.document;if(b.collapsed){e=r(this,e);b.insertNode(e);b.moveToPosition(e,CKEDITOR.POSITION_BEFORE_END)}else{var f=this.element,g=this._.definition,h,i=g.ignoreReadonly,j=i||g.includeReadonly;j==void 0&&(j=b.root.getCustomData("cke_includeReadonly"));var k=CKEDITOR.dtd[f];if(!k){h=true;k=CKEDITOR.dtd.span}b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var l=b.createBookmark(),m=l.startNode,o=l.endNode,p=m,n;if(!i){var z=b.getCommonAncestor(),i=c(m,z),z=c(o,z);i&&(p=i.getNextSourceNode(true));z&&(o=
z)}for(p.getPosition(o)==CKEDITOR.POSITION_FOLLOWING&&(p=0);p;){i=false;if(p.equals(o)){p=null;i=true}else{var t=p.type==CKEDITOR.NODE_ELEMENT?p.getName():null,z=t&&p.getAttribute("contentEditable")=="false",A=t&&p.getAttribute("data-nostyle");if(t&&p.data("cke-bookmark")){p=p.getNextSourceNode(true);continue}if(z&&j&&CKEDITOR.dtd.$block[t])for(var u=p,y=a(u),s=void 0,x=y.length,w=0,u=x&&new CKEDITOR.dom.range(u.getDocument());w<x;++w){var s=y[w],B=CKEDITOR.filter.instances[s.data("cke-filter")];
if(B?B.check(this):1){u.selectNodeContents(s);d.call(this,u)}}y=t?!k[t]||A?0:z&&!j?0:(p.getPosition(o)|E)==E&&(!g.childRule||g.childRule(p)):1;if(y)if((y=p.getParent())&&((y.getDtd()||CKEDITOR.dtd.span)[f]||h)&&(!g.parentRule||g.parentRule(y))){if(!n&&(!t||!CKEDITOR.dtd.$removeEmpty[t]||(p.getPosition(o)|E)==E)){n=b.clone();n.setStartBefore(p)}t=p.type;if(t==CKEDITOR.NODE_TEXT||z||t==CKEDITOR.NODE_ELEMENT&&!p.getChildCount()){for(var t=p,ba;(i=!t.getNext(v))&&(ba=t.getParent(),k[ba.getName()])&&(ba.getPosition(m)|
C)==C&&(!g.childRule||g.childRule(ba));)t=ba;n.setEndAfter(t)}}else i=true;else i=true;p=p.getNextSourceNode(A||z)}if(i&&n&&!n.collapsed){for(var i=r(this,e),z=i.hasAttributes(),A=n.getCommonAncestor(),t={},y={},s={},x={},$,T,ca;i&&A;){if(A.getName()==f){for($ in g.attributes)if(!x[$]&&(ca=A.getAttribute(T)))i.getAttribute($)==ca?y[$]=1:x[$]=1;for(T in g.styles)if(!s[T]&&(ca=A.getStyle(T)))i.getStyle(T)==ca?t[T]=1:s[T]=1}A=A.getParent()}for($ in y)i.removeAttribute($);for(T in t)i.removeStyle(T);
z&&!i.hasAttributes()&&(i=null);if(i){n.extractContents().appendTo(i);n.insertNode(i);q.call(this,i);i.mergeSiblings();CKEDITOR.env.ie||i.$.normalize()}else{i=new CKEDITOR.dom.element("span");n.extractContents().appendTo(i);n.insertNode(i);q.call(this,i);i.remove(true)}n=null}}b.moveToBookmark(l);b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,true)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(e.getParent()),c=new CKEDITOR.dom.elementPath(j.getParent()),d=null,
f=null,g=0;g<a.elements.length;g++){var h=a.elements[g];if(h==a.block||h==a.blockLimit)break;k.checkElementRemovable(h)&&(d=h)}for(g=0;g<c.elements.length;g++){h=c.elements[g];if(h==c.block||h==c.blockLimit)break;k.checkElementRemovable(h)&&(f=h)}f&&j.breakParent(f);d&&e.breakParent(d)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),e=c.startNode;if(a.collapsed){for(var d=new CKEDITOR.dom.elementPath(e.getParent(),a.root),f,g=0,h;g<d.elements.length&&(h=d.elements[g]);g++){if(h==d.block||
h==d.blockLimit)break;if(this.checkElementRemovable(h)){var i;if(a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(i=a.checkBoundaryOfElement(h,CKEDITOR.START)))){f=h;f.match=i?"start":"end"}else{h.mergeSiblings();h.is(this.element)?n.call(this,h):l(h,t(this)[h.getName()])}}}if(f){h=e;for(g=0;;g++){i=d.elements[g];if(i.equals(f))break;else if(i.match)continue;else i=i.clone();i.append(h);h=i}h[f.match=="start"?"insertBefore":"insertAfter"](f)}}else{var j=c.endNode,k=this;b();for(d=e;!d.equals(j);){f=
d.getNextSourceNode();if(d.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(d)){d.getName()==this.element?n.call(this,d):l(d,t(this)[d.getName()]);if(f.type==CKEDITOR.NODE_ELEMENT&&f.contains(e)){b();f=e.getNext()}}d=f}}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,true)}function a(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function e(a){var b=a.getEnclosedNode()||a.getCommonAncestor(false,
true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&p(a,this)}function i(a){var b=a.getCommonAncestor(true,true);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var e in c)a.removeAttribute(e,c[e]);if(b.styles)for(var d in b.styles)b.styles.hasOwnProperty(d)&&a.removeStyle(d)}}function g(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=
this._.enterMode!=CKEDITOR.ENTER_BR;for(var e,d=a.document,g;e=c.getNextParagraph();)if(!e.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)){g=r(this,d,e);f(e,g)}a.moveToBookmark(b)}function h(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var e,d;e=c.getNextParagraph();)if(this.checkElementRemovable(e))if(e.is("pre")){(d=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))&&e.copyAttributes(d);f(e,d)}else n.call(this,e);a.moveToBookmark(b)}function f(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var e=b&&b.is("pre"),d=a.is("pre"),f=!e&&d;if(e&&!d){d=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=k(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 g=a.getDocument().createElement("div");
g.append(d);d.$.outerHTML="<pre>"+f+"</pre>";d.copyAttributes(g.getFirst());d=g.getFirst().remove()}else d.setHtml(f);b=d}else f?b=o(c?[a.getHtml()]:j(a),b):a.moveChildren(b);b.replace(a);if(e){var c=b,h;if((h=c.getPrevious(B))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")){e=k(h.getHtml(),/\n$/,"")+"\n\n"+k(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="<pre>"+e+"</pre>":c.setHtml(e);h.remove()}}else c&&m(b)}function j(a){a.getName();var b=[];k(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function k(a,b,c){var e="",d="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(e=b);c&&(d=c);return""});return e+a.replace(b,c)+d}function o(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var e=0;e<a.length;e++){var d=a[e],d=d.replace(/(\r\n|\r)/g,"\n"),d=k(d,/^[ \t]*\n/,""),
d=k(d,/\n$/,""),d=k(d,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?"&nbsp;":b?" "+CKEDITOR.tools.repeat("&nbsp;",a.length-1):CKEDITOR.tools.repeat("&nbsp;",a.length-1)+" "}),d=d.replace(/\n/g,"<br>"),d=d.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("&nbsp;",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(d);c.append(f)}else b.setHtml(d)}return c||b}function n(a){var b=this._.definition,c=b.attributes,b=b.styles,e=t(this)[a.getName()],d=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),
f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=A(f,c[f]))){d=a.hasAttribute(f);a.removeAttribute(f)}for(var g in b)if(!(this._.definition.fullMatch&&a.getStyle(g)!=A(g,b[g],true))){d=d||!!a.getStyle(g);a.removeStyle(g)}l(a,e,u[a.getName()]);d&&(this._.definition.alwaysRemoveElement?m(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?m(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function q(a){for(var b=
t(this),c=a.getElementsByTag(this.element),e,d=c.count();--d>=0;){e=c.getItem(d);e.isReadOnly()||n.call(this,e)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(d=c.count()-1;d>=0;d--){e=c.getItem(d);e.isReadOnly()||l(e,b[f])}}}function l(a,b,c){if(b=b&&b.attributes)for(var e=0;e<b.length;e++){var d=b[e][0],f;if(f=a.getAttribute(d)){var g=b[e][1];(g===null||g.test&&g.test(f)||typeof g=="string"&&f==g)&&a.removeAttribute(d)}}c||m(a)}function m(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=
a.getPrevious(B),e=a.getNext(B);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);e&&(e.type==CKEDITOR.NODE_TEXT||!e.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();e=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();e&&(!c.equals(e)&&e.type==CKEDITOR.NODE_ELEMENT)&&e.mergeSiblings()}}}function r(a,b,c){var e;e=a.element;e=="*"&&(e="span");e=new CKEDITOR.dom.element(e,b);c&&c.copyAttributes(e);e=p(e,a);b.getCustomData("doc_processing_style")&&
e.hasAttribute("id")?e.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return e}function p(a,b){var c=b._.definition,e=c.attributes,c=CKEDITOR.style.getStyleText(c);if(e)for(var d in e)a.setAttribute(d,e[d]);c&&a.setAttribute("style",c);return a}function z(a,b){for(var c in a)a[c]=a[c].replace(x,function(a,c){return b[c]})}function t(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var e=0;e<c.length;e++){var d=
c[e],f,g;if(typeof d=="string")f=d.toLowerCase();else{f=d.element?d.element.toLowerCase():a.element;g=d.attributes}d=b[f]||(b[f]={});if(g){var d=d.attributes=d.attributes||[],h;for(h in g)d.push([h.toLowerCase(),g[h]])}}}return b}function A(a,b,c){var e=new CKEDITOR.dom.element("span");e[c?"setStyle":"setAttribute"](a,b);return e[c?"getStyle":"getAttribute"](a)}function y(a,b){for(var c=a.document,e=a.getRanges(),d=b?this.removeFromRange:this.applyToRange,f,g=e.createIterator();f=g.getNextRange();)d.call(this,
f);a.selectRanges(e);c.removeCustomData("doc_processing_style")}var u={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},s={a: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},w=/\s*(?:;\s*|$)/,x=/#\((.+?)\)/g,v=CKEDITOR.dom.walker.bookmark(0,1),B=CKEDITOR.dom.walker.whitespaces(1);
CKEDITOR.style=function(a,b){var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);z(a.attributes,b);z(a.styles,b)}c=this.element=a.element?typeof a.element=="string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(u[c]?CKEDITOR.STYLE_BLOCK:s[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.editor.prototype.applyStyle=
function(a){a.checkApplicable(this.elementPath())&&y.call(a,this.getSelection())};CKEDITOR.editor.prototype.removeStyle=function(a){a.checkApplicable(this.elementPath())&&y.call(a,this.getSelection(),1)};CKEDITOR.style.prototype={apply:function(a){y.call(this,a.getSelection())},remove:function(a){y.call(this,a.getSelection(),1)},applyToRange:function(a){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?d:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?e:null).call(this,
a)},removeFromRange:function(a){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?i:null).call(this,a)},applyToObject:function(a){p(a,this)},checkActive:function(a){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,true);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var b=a.elements,c=0,e;c<b.length;c++){e=b[c];if(!(this.type==CKEDITOR.STYLE_INLINE&&(e==a.block||
e==a.blockLimit))){if(this.type==CKEDITOR.STYLE_OBJECT){var d=e.getName();if(!(typeof this.element=="string"?d==this.element:d in this.element))continue}if(this.checkElementRemovable(e,true))return true}}}return false},checkApplicable:function(a,b){if(b&&!b.check(this))return false;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return true},checkElementMatch:function(a,b){var c=this._.definition;if(!a||
!c.ignoreReadonly&&a.isReadOnly())return false;var e=a.getName();if(typeof this.element=="string"?e==this.element:e in this.element){if(!b&&!a.hasAttributes())return true;if(e=c._AC)c=e;else{var e={},d=0,f=c.attributes;if(f)for(var g in f){d++;e[g]=f[g]}if(g=CKEDITOR.style.getStyleText(c)){e.style||d++;e.style=g}e._length=d;c=c._AC=e}if(c._length){for(var h in c)if(h!="_length"){d=a.getAttribute(h)||"";if(h=="style")a:{e=c[h];typeof e=="string"&&(e=CKEDITOR.tools.parseCssText(e));typeof d=="string"&&
(d=CKEDITOR.tools.parseCssText(d,true));g=void 0;for(g in e)if(!(g in d&&(d[g]==e[g]||e[g]=="inherit"||d[g]=="inherit"))){e=false;break a}e=true}else e=c[h]==d;if(e){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b){if(this.checkElementMatch(a,b))return true;var c=t(this)[a.getName()];if(c){var e;if(!(c=c.attributes))return true;for(var d=0;d<c.length;d++){e=c[d][0];if(e=a.getAttribute(e)){var f=c[d][1];if(f===null||typeof f==
"string"&&e==f||f.test(e))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],e=b.element;e=="bdo"&&(e="span");var c=["<",e],d=b.attributes;if(d)for(var f in d)c.push(" ",f,'="',d[f],'"');(d=CKEDITOR.style.getStyleText(b))&&c.push(' style="',d,'"');c.push(">",a||b.name,"</",e,">");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",
e="";c.length&&(c=c.replace(w,";"));for(var d in b){var f=b[d],g=(d+":"+f).replace(w,";");f=="inherit"?e=e+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+e};var E=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,C=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(c,d){this.requiredContent=this.allowedContent=this.style=c;CKEDITOR.tools.extend(this,d,true)},CKEDITOR.styleCommand.prototype.exec=
function(c){c.focus();this.state==CKEDITOR.TRISTATE_OFF?c.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&c.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(c,d,b){CKEDITOR.stylesSet.addExternal(c,d,"");CKEDITOR.stylesSet.load(c,b)},CKEDITOR.editor.prototype.getStylesSet=function(c){if(this._.stylesDefinitions)c(this._.stylesDefinitions);
else{var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(b===false)c(null);else if(b instanceof Array){d._.stylesDefinitions=b;c(b)}else{b||(b="default");var b=b.split(":"),a=b[0];CKEDITOR.stylesSet.addExternal(a,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(a,function(b){d._.stylesDefinitions=b[a];c(d._.stylesDefinitions)})}}},CKEDITOR.dom.comment=function(c,d){typeof c=="string"&&(c=(d?d.$:document).createComment(c));CKEDITOR.dom.domObject.call(this,
c)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}}),"use strict",function(){var c={},d={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(c[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(d[b]=1);CKEDITOR.dom.elementPath=function(a,b){var i=null,g=null,h=[],f=a,j,b=b||a.getDocument().getBody();
do if(f.type==CKEDITOR.NODE_ELEMENT){h.push(f);if(!this.lastElement){this.lastElement=f;if(f.is(CKEDITOR.dtd.$object)||f.getAttribute("contenteditable")=="false")continue}if(f.equals(b))break;if(!g){j=f.getName();f.getAttribute("contenteditable")=="true"?g=f:!i&&d[j]&&(i=f);if(c[j]){var k;if(k=!i){if(j=j=="div"){a:{j=f.getChildren();k=0;for(var o=j.count();k<o;k++){var n=j.getItem(k);if(n.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[n.getName()]){j=true;break a}}j=false}j=!j}k=j}k?i=f:g=f}}}while(f=
f.getParent());g||(g=b);this.block=i;this.blockLimit=g;this.root=b;this.elements=h}}(),CKEDITOR.dom.elementPath.prototype={compare:function(c){var d=this.elements,c=c&&c.elements;if(!c||d.length!=c.length)return false;for(var b=0;b<d.length;b++)if(!d[b].equals(c[b]))return false;return true},contains:function(c,d,b){var a;typeof c=="string"&&(a=function(a){return a.getName()==c});c instanceof CKEDITOR.dom.element?a=function(a){return a.equals(c)}:CKEDITOR.tools.isArray(c)?a=function(a){return CKEDITOR.tools.indexOf(c,
a.getName())>-1}:typeof c=="function"?a=c:typeof c=="object"&&(a=function(a){return a.getName()in c});var e=this.elements,i=e.length;d&&i--;if(b){e=Array.prototype.slice.call(e,0);e.reverse()}for(d=0;d<i;d++)if(a(e[d]))return e[d];return null},isContextFor:function(c){var d;if(c in CKEDITOR.dtd.$block){d=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit;return!!d.getDtd()[c]}return true},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},
CKEDITOR.dom.text=function(c,d){typeof c=="string"&&(c=(d?d.$:document).createTextNode(c));this.$=c},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(c){this.$.nodeValue=c},split:function(c){var d=this.$.parentNode,b=d.childNodes.length,a=this.getLength(),e=this.getDocument(),i=new CKEDITOR.dom.text(this.$.splitText(c),
e);if(d.childNodes.length==b)if(c>=a){i=e.createText("");i.insertAfter(this)}else{c=e.createText("");c.insertAfter(i);c.remove()}return i},substring:function(c,d){return typeof d!="number"?this.$.nodeValue.substr(c):this.$.nodeValue.substring(c,d)}}),function(){function c(b,a,c){var d=b.serializable,g=a[c?"endContainer":"startContainer"],h=c?"endOffset":"startOffset",f=d?a.document.getById(b.startNode):b.startNode,b=d?a.document.getById(b.endNode):b.endNode;if(g.equals(f.getPrevious())){a.startOffset=
a.startOffset-g.getLength()-b.getPrevious().getLength();g=b.getNext()}else if(g.equals(b.getPrevious())){a.startOffset=a.startOffset-g.getLength();g=b.getNext()}g.equals(f.getParent())&&a[h]++;g.equals(b.getParent())&&a[h]++;a[c?"endContainer":"startContainer"]=g;return a}CKEDITOR.dom.rangeList=function(b){if(b instanceof CKEDITOR.dom.rangeList)return b;b?b instanceof CKEDITOR.dom.range&&(b=[b]):b=[];return CKEDITOR.tools.extend(b,d)};var d={createIterator:function(){var b=this,a=CKEDITOR.dom.walker.bookmark(),
c=[],d;return{getNextRange:function(g){d=d==void 0?0:d+1;var h=b[d];if(h&&b.length>1){if(!d)for(var f=b.length-1;f>=0;f--)c.unshift(b[f].createBookmark(true));if(g)for(var j=0;b[d+j+1];){for(var k=h.document,g=0,f=k.getById(c[j].endNode),k=k.getById(c[j+1].startNode);;){f=f.getNextSourceNode(false);if(k.equals(f))g=1;else if(a(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary())continue;break}if(!g)break;j++}for(h.moveToBookmark(c.shift());j--;){f=b[++d];f.moveToBookmark(c.shift());h.setEnd(f.endContainer,
f.endOffset)}}return h}}},createBookmarks:function(b){for(var a=[],e,d=0;d<this.length;d++){a.push(e=this[d].createBookmark(b,true));for(var g=d+1;g<this.length;g++){this[g]=c(e,this[g]);this[g]=c(e,this[g],true)}}return a},createBookmarks2:function(b){for(var a=[],c=0;c<this.length;c++)a.push(this[c].createBookmark2(b));return a},moveToBookmarks:function(b){for(var a=0;a<this.length;a++)this[a].moveToBookmark(b[a])}}}(),function(){function c(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||
"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function d(a){var b=CKEDITOR.skin["ua_"+a],e=CKEDITOR.env;if(b)for(var b=b.split(",").sort(function(a,b){return a>b?-1:1}),d=0,f;d<b.length;d++){f=b[d];if(e.ie&&(f.replace(/^ie/,"")==e.version||e.quirks&&f=="iequirks"))f="ie";if(e[f]){a=a+("_"+b[d]);break}}return CKEDITOR.getUrl(c()+a+".css")}function b(a,b){if(!i[a]){CKEDITOR.document.appendStyleSheet(d(a));i[a]=1}b&&b()}function a(a){var b=a.getById(g);if(!b){b=a.getHead().append("style");b.setAttribute("id",
g);b.setAttribute("type","text/css")}return b}function e(a,b,c){var e,d,f;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(d=0;d<b.length;d++)b[d]=b[d].split("{")}for(var g=0;g<a.length;g++)if(CKEDITOR.env.webkit)for(d=0;d<b.length;d++){f=b[d][1];for(e=0;e<c.length;e++)f=f.replace(c[e][0],c[e][1]);a[g].$.sheet.addRule(b[d][0],f)}else{f=b;for(e=0;e<c.length;e++)f=f.replace(c[e][0],c[e][1]);CKEDITOR.env.ie&&CKEDITOR.env.version<11?a[g].$.styleSheet.cssText=a[g].$.styleSheet.cssText+f:a[g].$.innerHTML=
a[g].$.innerHTML+f}}var i={};CKEDITOR.skin={path:c,loadPart:function(a,e){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c()+"skin.js"),function(){b(a,e)}):b(a,e)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,b,c,e,d){var f;if(a){a=a.toLowerCase();b&&(f=this.icons[a+"-rtl"]);f||(f=this.icons[a])}a=c||
f&&f.path||"";e=e||f&&f.offset;d=d||f&&f.bgsize||"16px";return a&&"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+e+"px;background-size:"+d+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(b){var c=a(CKEDITOR.document);return(this.setUiColor=function(a){var b=CKEDITOR.skin.chameleon,d=[[f,a]];this.uiColor=a;e([c],b(this,"editor"),d);e(h,b(this,"panel"),d)}).call(this,b)}});var g="cke_ui_color",h=[],f=/\$color/g;
CKEDITOR.on("instanceLoaded",function(b){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var c=b.editor,b=function(b){b=(b.data[0]||b.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!b.getById("cke_ui_color")){b=a(b);h.push(b);var d=c.getUiColor();d&&e([b],CKEDITOR.skin.chameleon(c,"panel"),[[f,d]])}};c.on("panelShow",b);c.on("menuShow",b);c.config.uiColor&&c.setUiColor(c.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var c=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',
CKEDITOR.document);c.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=c.getComputedStyle("border-top-color")==c.getComputedStyle("border-right-color")}catch(d){CKEDITOR.env.hc=false}c.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc";CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(c=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var b=0;b<c.length;b++){CKEDITOR.editor.prototype.constructor.apply(c[b][0],
c[b][1]);CKEDITOR.add(c[b][0])}}}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8,opera",CKEDITOR.skin.chameleon=function(){var c=function(){return function(a,b){for(var c=a.match(/[^#]./g),d=0;d<3;d++){var h=c,f=d,j;j=parseInt(c[d],16);j=("0"+(b<0?0|j*(1+b):0|j+(255-j)*b).toString(16)).slice(-2);h[f]=j}return"#"+c.join("")}}(),d=function(){var a=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");
return function(b,c){return a.output({from:b,to:c})}}(),b={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {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} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {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:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(a,e){var i=a.uiColor,i={id:"."+a.id,defaultBorder:c(i,-0.1),defaultGradient:d(c(i,0.9),i),lightGradient:d(c(i,1),c(i,0.7)),mediumGradient:d(c(i,0.8),c(i,0.5)),ckeButtonOn:d(c(i,0.6),c(i,0.7)),ckeResizer:c(i,-0.4),ckeToolbarSeparator:c(i,0.5),ckeColorauto:c(i,0.8),dialogBody:c(i,0.7),dialogTabSelected:d("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:c(i,-0.6),elementsPathBg:i,menubuttonIcon:c(i,0.5),menubuttonIconHover:c(i,0.3)};return b[e].output(i).replace(/\[/g,
"{").replace(/\]/g,"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var c=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||false;for(var b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(true);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},d={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},b={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},a={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},e=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){if(!this._.domOnChangeRegistered){a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",
{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",b)}},true),i=/^on([A-Z]\w+)/,g=function(a){for(var b in a)(i.test(b)||b=="title"||b=="type")&&delete a[b];return a};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(a,b,e,d){if(!(arguments.length<4)){var g=c.call(this,b);g.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];CKEDITOR.ui.dialog.uiElement.call(this,a,b,e,"div",null,{role:"presentation"},function(){var c=[],e=b.required?
" cke_required":"";if(b.labelLayout!="horizontal")c.push('<label class="cke_dialog_ui_labeled_label'+e+'" ',' id="'+g.labelId+'"',g.inputId?' for="'+g.inputId+'"':"",(b.labelStyle?' style="'+b.labelStyle+'"':"")+">",b.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',b.controlStyle?' style="'+b.controlStyle+'"':"",' role="radiogroup" aria-labelledby="'+g.labelId+'">',d.call(this,a,b),"</div>");else{e={type:"hbox",widths:b.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+
e+'" id="'+g.labelId+'" for="'+g.inputId+'"'+(b.labelStyle?' style="'+b.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(b.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(b.controlStyle?' style="'+b.controlStyle+'"':"")+">"+d.call(this,a,b)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,e,c)}return c.join("")})}},textInput:function(a,b,e){if(!(arguments.length<3)){c.call(this,b);var d=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",g={"class":"cke_dialog_ui_input_"+
b.type,id:d,type:b.type};if(b.validate)this.validate=b.validate;if(b.maxLength)g.maxlength=b.maxLength;if(b.size)g.size=b.size;if(b.inputStyle)g.style=b.inputStyle;var i=this,q=false;a.on("load",function(){i.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(q=true)});i.getInputElement().on("keyup",function(b){if(b.data.getKeystroke()==13&&q){a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0);q=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,
a,b,e,function(){var a=['<div class="cke_dialog_ui_input_',b.type,'" role="presentation"'];b.width&&a.push('style="width:'+b.width+'" ');a.push("><input ");g["aria-labelledby"]=this._.labelId;this._.required&&(g["aria-required"]=this._.required);for(var c in g)a.push(c+'="'+g[c]+'" ');a.push(" /></div>");return a.join("")})}},textarea:function(a,b,e){if(!(arguments.length<3)){c.call(this,b);var d=this,g=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",i={};if(b.validate)this.validate=b.validate;
i.rows=b.rows||5;i.cols=b.cols||20;i["class"]="cke_dialog_ui_input_textarea "+(b["class"]||"");if(typeof b.inputStyle!="undefined")i.style=b.inputStyle;if(b.dir)i.dir=b.dir;CKEDITOR.ui.dialog.labeledElement.call(this,a,b,e,function(){i["aria-labelledby"]=this._.labelId;this._.required&&(i["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',g,'" '],b;for(b in i)a.push(b+'="'+CKEDITOR.tools.htmlEncode(i[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(d._["default"]),
"</textarea></div>");return a.join("")})}},checkbox:function(a,b,e){if(!(arguments.length<3)){var d=c.call(this,b,{"default":!!b["default"]});if(b.validate)this.validate=b.validate;CKEDITOR.ui.dialog.uiElement.call(this,a,b,e,"span",null,null,function(){var c=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),e=[],i=CKEDITOR.tools.getNextId()+"_label",j={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":i};g(c);if(b["default"])j.checked=
"checked";if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;d.checkbox=new CKEDITOR.ui.dialog.uiElement(a,c,e,"input",null,j);e.push(' <label id="',i,'" for="',j.id,'"'+(b.labelStyle?' style="'+b.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(b.label),"</label>");return e.join("")})}},radio:function(a,b,e){if(!(arguments.length<3)){c.call(this,b);if(!this._["default"])this._["default"]=this._.initValue=b.items[0][1];if(b.validate)this.validate=b.valdiate;var d=[],i=this;CKEDITOR.ui.dialog.labeledElement.call(this,
a,b,e,function(){for(var c=[],e=[],j=(b.id?b.id:CKEDITOR.tools.getNextId())+"_radio",m=0;m<b.items.length;m++){var r=b.items[m],p=r[2]!==void 0?r[2]:r[0],z=r[1]!==void 0?r[1]:r[0],t=CKEDITOR.tools.getNextId()+"_radio_input",A=t+"_label",t=CKEDITOR.tools.extend({},b,{id:t,title:null,type:null},true),p=CKEDITOR.tools.extend({},t,{title:p},true),y={type:"radio","class":"cke_dialog_ui_radio_input",name:j,value:z,"aria-labelledby":A},u=[];if(i._["default"]==z)y.checked="checked";g(t);g(p);if(typeof t.inputStyle!=
"undefined")t.style=t.inputStyle;t.keyboardFocusable=true;d.push(new CKEDITOR.ui.dialog.uiElement(a,t,u,"input",null,y));u.push(" ");new CKEDITOR.ui.dialog.uiElement(a,p,u,"label",null,{id:A,"for":y.id},r[0]);c.push(u.join(""))}new CKEDITOR.ui.dialog.hbox(a,d,c,e);return e.join("")});this._.children=d}},button:function(a,b,e){if(arguments.length){typeof b=="function"&&(b=b(a.getParentEditor()));c.call(this,b,{disabled:b.disabled||false});CKEDITOR.event.implementOn(this);var d=this;a.on("load",function(){var a=
this.getElement();(function(){a.on("click",function(a){d.click();a.data.preventDefault()});a.on("keydown",function(a){if(a.data.getKeystroke()in{32:1}){d.click();a.data.preventDefault()}})})();a.unselectable()},this);var g=CKEDITOR.tools.extend({},b);delete g.style;var i=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,g,e,"a",null,{style:b.style,href:"javascript:void(0)",title:b.label,hidefocus:"true","class":b["class"],role:"button","aria-labelledby":i},'<span id="'+
i+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(b.label)+"</span>")}},select:function(a,b,e){if(!(arguments.length<3)){var d=c.call(this,b);if(b.validate)this.validate=b.validate;d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,b,e,function(){var c=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),e=[],i=[],j={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('<div class="cke_dialog_ui_input_',
b.type,'" role="presentation"');b.width&&e.push('style="width:'+b.width+'" ');e.push(">");if(b.size!=void 0)j.size=b.size;if(b.multiple!=void 0)j.multiple=b.multiple;g(c);for(var m=0,r;m<b.items.length&&(r=b.items[m]);m++)i.push('<option value="',CKEDITOR.tools.htmlEncode(r[1]!==void 0?r[1]:r[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(r[0]));if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;d.select=new CKEDITOR.ui.dialog.uiElement(a,c,e,"select",null,j,i.join(""));e.push("</div>");
return e.join("")})}},file:function(a,b,e){if(!(arguments.length<3)){b["default"]===void 0&&(b["default"]="");var d=CKEDITOR.tools.extend(c.call(this,b),{definition:b,buttons:[]});if(b.validate)this.validate=b.validate;a.on("load",function(){CKEDITOR.document.getById(d.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,b,e,function(){d.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',
d.frameId,'" title="',b.label,'" src="javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"></iframe>');return a.join("")})}},fileButton:function(a,b,e){if(!(arguments.length<3)){c.call(this,b);var d=this;if(b.validate)this.validate=b.validate;var g=CKEDITOR.tools.extend({},b),i=g.onClick;g.className=(g.className?g.className+" ":"")+"cke_dialog_ui_button";g.onClick=function(c){var e=
b["for"];if(!i||i.call(this,c)!==false){a.getContentElement(e[0],e[1]).submit();this.disable()}};a.on("load",function(){a.getContentElement(b["for"][0],b["for"][1])._.buttons.push(d)});CKEDITOR.ui.dialog.button.call(this,a,g,e)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,d,g){if(!(arguments.length<3)){var i=[],l=d.html;l.charAt(0)!="<"&&(l="<span>"+l+"</span>");var m=d.focus;if(m){var r=this.focus;this.focus=function(){(typeof m==
"function"?m:r).call(this);this.fire("focus")};if(d.isFocusable)this.isFocusable=this.isFocusable;this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,e,d,i,"span",null,null,"");i=i.join("").match(a);l=l.match(b)||["","",""];if(c.test(l[1])){l[1]=l[1].slice(0,-1);l[2]="/"+l[2]}g.push([l[1]," ",i[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,c,e,d){var g=d.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,d,e,"fieldset",null,null,function(){var a=[];g&&a.push("<legend"+
(d.labelStyle?' style="'+d.labelStyle+'"':"")+">"+g+"</legend>");for(var b=0;b<c.length;b++)a.push(c[b]);return a.join("")})}},true);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);b.getChildCount()<1?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=
CKEDITOR.document.getById(this._.labelId);return!a||a.getChildCount()<1?"":a.getChild(0).getText()},eventProcessors:e},true);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):false},enable:function(){this._.disabled=false;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=true;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},
isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},true),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:true},true);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},
focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();if(b){b.$.focus();b.$.select()}},0)},accessKeyUp:function(){this.select()},setValue:function(a){!a&&(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:true},a,true);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=
CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,c){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),d=this.getInputElement().$;e.$.text=a;e.$.value=b===void 0||b===null?a:b;c===void 0||c===null?CKEDITOR.env.ie?d.add(e.$):d.add(e.$,null):d.add(e.$,c);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;a.length>
0;)a.remove(0);return this},keyboardFocusable:true},a,true);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||CKEDITOR.env.version>
8)return e.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;b.propertyName=="checked"&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:true},a,true);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,e,d=0;d<c.length&&(e=c[d]);d++)e.getElement().$.checked=e.getValue()==
a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,b){if(CKEDITOR.env.ie){a.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.$;a.propertyName=="checked"&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b)}else return e.onChange.apply(this,arguments);return null}}},a,true);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,a,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return a.$.forms.length>0?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},
submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,e=function(a,b,c,e){a.on("formLoaded",function(){a.getInputElement().on(c,e,a)})},d;for(d in a)if(c=d.match(b))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,a[d]):e(this,this._.dialog,c[1].toLowerCase(),a[d]);return this},reset:function(){function a(){c.$.open();var h="";e.size&&
(h=e.size-(CKEDITOR.env.ie?7:0));var p=b.frameId+"_input";c.$.write(['<html dir="'+l+'" lang="'+m+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+l+'" lang="'+m+'" action="',CKEDITOR.tools.htmlEncode(e.action),'"><input type="hidden" name="Action" value="',CKEDITOR.config.action,'" /><input type="hidden" name="FormID" value="',CKEDITOR.config.formID,'"/><input type="hidden" name="CKEditorFuncNum" value="',
b.dialog._.editor._.filebrowserFn,'" /><input type="hidden" name="',Core.Config.Get("SessionName"),'" value="',Core.Config.Get("SessionID"),'" /><label id="',b.labelId,'" for="',p,'" style="display:none">',CKEDITOR.tools.htmlEncode(e.label),'</label><input id="',p,'" aria-labelledby="',b.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(h>0?h:""),'" /></form></body></html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":
"","window.parent.CKEDITOR.tools.callFunction("+g+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+i+")}","<\/script>"].join(""));c.$.close();for(h=0;h<d.length;h++)d[h].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),e=b.definition,d=b.buttons,g=this.formLoadedNumber,i=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,m=b.dialog._.editor.langCode;if(!g){g=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},
this);i=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this);this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(g);CKEDITOR.tools.removeFunction(i)})}CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){if(!this._.domOnChangeRegistered){this.on("formLoaded",function(){this.getInputElement().on("change",
function(){this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",b)}},keyboardFocusable:true},true);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",d);CKEDITOR.dialog.addUIElement("password",d);CKEDITOR.dialog.addUIElement("textarea",b);CKEDITOR.dialog.addUIElement("checkbox",b);CKEDITOR.dialog.addUIElement("radio",
b);CKEDITOR.dialog.addUIElement("button",b);CKEDITOR.dialog.addUIElement("select",b);CKEDITOR.dialog.addUIElement("file",b);CKEDITOR.dialog.addUIElement("fileButton",b);CKEDITOR.dialog.addUIElement("html",b);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,c){for(var e=b.children,d,g=[],i=[],l=0;l<e.length&&(d=e[l]);l++){var m=[];g.push(m);i.push(CKEDITOR.dialog._.uiElementBuilders[d.type].build(a,d,m))}return new CKEDITOR.ui.dialog[b.type](a,i,g,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=
0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function c(){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 d(){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 b(a,b){for(var c=a.$.getElementsByTagName("input"),e=0,d=c.length;e<d;e++){var f=new CKEDITOR.dom.element(c[e]);if(f.getAttribute("type").toLowerCase()=="text")if(b){f.setAttribute("value",f.getCustomData("fake_value")||"");f.removeCustomData("fake_value")}else{f.setCustomData("fake_value",f.getAttribute("value"));f.setAttribute("value","")}}}function a(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",true));a||(this.select?
this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function e(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function i(a){var a=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",m).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":""})),b=a.getChild([0,
0,0,0,0]),c=b.getChild(0),e=b.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat){var d="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+d+'" tabIndex="-1"></iframe>').appendTo(b.getParent())}c.unselectable();e.unselectable();return{element:a,parts:{dialog:a.getChild(0),title:c,close:e,tabs:b.getChild(2),contents:b.getChild([3,
0,0,0]),footer:b.getChild([3,0,1,0])}}}function g(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 h(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();
c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function f(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function j(a){function b(c){var h=a.getSize(),j=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,k=c.data.$.screenY,m=l-e.x,p=k-e.y;e={x:l,y:k};d.x=d.x+m;d.y=d.y+p;a.move(d.x+i[3]<g?-i[3]:d.x-i[1]>j.width-h.width-g?j.width-h.width+(f.lang.dir=="rtl"?0:i[1]):d.x,d.y+i[0]<g?-i[0]:d.y-i[2]>j.height-h.height-g?j.height-h.height+i[2]:d.y,1);c.data.preventDefault()}
function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=s.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var e=null,d=null;a.getElement().getFirst();var f=a.getParentEditor(),g=f.config.dialog_magnetDistance,i=CKEDITOR.skin.margins||[0,0,0,0];typeof g=="undefined"&&(g=20);a.parts.title.on("mousedown",function(f){e={x:f.data.$.screenX,y:f.data.$.screenY};CKEDITOR.document.on("mousemove",
b);CKEDITOR.document.on("mouseup",c);d=a.getPosition();if(CKEDITOR.env.ie6Compat){var g=s.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",c)}f.data.preventDefault()},a)}function k(a){var b,c;function e(d){var m=i.lang.dir=="rtl",p=k.width,o=k.height,n=p+(d.data.$.screenX-b)*(m?-1:1)*(a._.moved?1:2),r=o+(d.data.$.screenY-c)*(a._.moved?1:2),q=a._.element.getFirst(),q=m&&q.getComputedStyle("right"),t=a.getPosition();t.y+r>l.height&&(r=l.height-t.y);if((m?q:t.x)+n>l.width)n=l.width-
(m?q:t.x);if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(f.minWidth||0,n-h);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)o=Math.max(f.minHeight||0,r-j);a.resize(p,o);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",e);if(m){m.remove();m=null}if(CKEDITOR.env.ie6Compat){var a=s.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",
e)}}var f=a.definition,g=f.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var i=a.getParentEditor(),h,j,l,k,m,p=CKEDITOR.tools.addFunction(function(f){k=a.getSize();var g=a.parts.contents;if(g.$.getElementsByTagName("iframe").length){m=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');g.append(m)}j=k.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks));
h=k.width-a.parts.contents.getSize("width",1);b=f.screenX;c=f.screenY;l=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",e);CKEDITOR.document.on("mouseup",d);if(CKEDITOR.env.ie6Compat){g=s.getChild(0).getFrameDocument();g.on("mousemove",e);g.on("mouseup",d)}f.preventDefault&&f.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('<div class="cke_resizer'+
b+" cke_resizer_"+i.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(i.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+p+', event )">'+(i.lang.dir=="ltr"?"◢":"◣")+"</div>");a.parts.footer.append(b,1)});i.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function o(a){a.data.preventDefault(1)}function n(a){var b=CKEDITOR.document.getWindow(),c=a.config,e=c.dialog_backgroundCoverColor||"white",d=c.dialog_backgroundCoverOpacity,f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(e,
d,f),g=u[c];if(g)g.show();else{f=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ",!CKEDITOR.env.ie6Compat?"background-color: "+e:"",'" class="cke_dialog_background_cover">'];if(CKEDITOR.env.ie6Compat){e="<html><body style=\\'background-color:"+e+";\\'></body></html>";f.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');f.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+e+"' );document.close();")+"})())");f.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')}f.push("</div>");g=CKEDITOR.dom.element.createFromHtml(f.join(""));g.setOpacity(d!=void 0?d:0.5);g.on("keydown",o);g.on("keypress",o);g.on("keyup",o);g.appendTo(CKEDITOR.document.getBody());u[c]=g}a.focusManager.add(g);s=g;var a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+
"px",height:a.height+"px"})},i=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.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)}};y=a;b.on("resize",a);a();(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&g.focus();if(CKEDITOR.env.ie6Compat){var h=function(){i();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){h.prevScrollHandler=window.onscroll||function(){};window.onscroll=h},0);i()}}
function q(a){if(s){a.focusManager.remove(s);a=CKEDITOR.document.getWindow();s.hide();a.removeListener("resize",y);CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0);y=null}}var l=CKEDITOR.tools.cssLength,m='<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';
CKEDITOR.dialog=function(b,f){function g(){var a=s._.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 h(a){var b=s._.focusList,a=a||0;if(!(b.length<1)){var c=s._.currentFocusIndex;try{b[c].getInputElement().$.blur()}catch(e){}for(var d=c=(c+a+b.length)%b.length;a&&!b[d].isFocusable();){d=(d+a+b.length)%b.length;if(d==c)break}b[d].focus();b[d].type=="text"&&b[d].select()}}function l(a){if(s==
CKEDITOR.dialog._.currentTop){var e=a.data.getKeystroke(),f=b.lang.dir=="rtl";z=u=0;if(e==9||e==CKEDITOR.SHIFT+9){e=e==CKEDITOR.SHIFT+9;if(s._.tabBarMode){e=e?c.call(s):d.call(s);s.selectPage(e);s._.tabs[e][0].focus()}else h(e?-1:1);z=1}else if(e==CKEDITOR.ALT+121&&!s._.tabBarMode&&s.getPageCount()>1){s._.tabBarMode=true;s._.tabs[s._.currentTabId][0].focus();z=1}else if((e==37||e==39)&&s._.tabBarMode){e=e==(f?39:37)?c.call(s):d.call(s);s.selectPage(e);s._.tabs[e][0].focus();z=1}else if((e==13||e==
32)&&s._.tabBarMode){this.selectPage(this._.currentTabId);this._.tabBarMode=false;this._.currentFocusIndex=-1;h(1);z=1}else if(e==13){e=a.data.getTarget();if(!e.is("a","button","select","textarea")&&(!e.is("input")||e.$.type!="button")){(e=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(e.click,0,e);z=1}u=1}else if(e==27){(e=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(e.click,0,e):this.fire("cancel",{hide:true}).hide!==false&&this.hide();u=1}else return;m(a)}}function m(a){z?a.data.preventDefault(1):
u&&a.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[f],o=CKEDITOR.tools.clone(r),n=b.config.dialog_buttonsOrder||"OS",q=b.lang.dir,t={},z,u;(n=="OS"&&CKEDITOR.env.mac||n=="rtl"&&q=="ltr"||n=="ltr"&&q=="rtl")&&o.buttons.reverse();p=CKEDITOR.tools.extend(p(b),o);p=CKEDITOR.tools.clone(p);p=new A(this,p);o=i(b);this._={editor:b,element:o.element,name:f,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,
currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=o.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);o={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};o[q=="rtl"?"right":"left"]=0;this.parts.dialog.setStyles(o);CKEDITOR.event.call(this);this.definition=p=CKEDITOR.fire("dialogDefinition",{name:f,definition:p},b).definition;if(!("removeDialogTabs"in b._)&&
b.config.removeDialogTabs){o=b.config.removeDialogTabs.split(";");for(q=0;q<o.length;q++){n=o[q].split(":");if(n.length==2){var y=n[0];t[y]||(t[y]=[]);t[y].push(n[1])}}b._.removeDialogTabs=t}if(b._.removeDialogTabs&&(t=b._.removeDialogTabs[f]))for(q=0;q<t.length;q++)p.removeContents(t[q]);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);if(p.onOk.call(this,a)===false)a.data.hide=false});if(p.onCancel)this.on("cancel",function(a){if(p.onCancel.call(this,a)===false)a.data.hide=false});var s=this,x=function(a){var b=s._.contents,c=false,e;for(e in b)for(var d in b[e])if(c=a.call(this,b[e][d]))return};this.on("ok",function(b){x(function(c){if(c.validate){var e=c.validate(this),d=typeof e=="string"||e===false;if(d){b.data.hide=false;b.stop()}a.call(c,!d,typeof e=="string"?e:void 0);return d}})},this,null,0);this.on("cancel",function(a){x(function(c){if(c.isChanged()){if(!b.config.dialog_noConfirmCancel&&
!confirm(b.lang.common.confirmCancel))a.data.hide=false;return true}})},this,null,0);this.parts.close.on("click",function(a){this.fire("cancel",{hide:true}).hide!==false&&this.hide();a.data.preventDefault()},this);this.changeFocus=h;var v=this._.element;b.focusManager.add(v,1);this.on("show",function(){v.on("keydown",l,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko)v.on("keypress",m,this)});this.on("hide",function(){v.removeListener("keydown",l);(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&v.removeListener("keypress",
m);x(function(a){e.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",l,this,null,0)});this.on("show",function(){g();if(b.config.dialog_startupFocusTab&&s._.pageCount>1){s._.tabBarMode=true;s._.tabs[s._.currentTabId][0].focus()}else if(!this._.hasFocus){this._.currentFocusIndex=-1;if(p.onFocus){var a=p.onFocus.call(this);a&&a.focus()}else h(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);j(this);k(this);(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(q=0;q<p.contents.length;q++)(t=p.contents[q])&&this.addPage(t);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();if(b.hasClass("cke_dialog_tab")){b=b.$.id;this.selectPage(b.substring(4,b.lastIndexOf("_")));if(this._.tabBarMode){this._.tabBarMode=false;this._.currentFocusIndex=-1;h(1)}a.data.preventDefault()}},this);q=[];t=
CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:p.buttons},q).getChild();this.parts.footer.setHtml(q.join(""));for(q=0;q<t.length;q++)this._.buttons[t[q].id]=t[q]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){if(!this._.contentSize||!(this._.contentSize.width==a&&this._.contentSize.height==b)){CKEDITOR.dialog.fire("resize",{dialog:this,width:a,height:b},
this._.editor);this.fire("resize",{width:a,height:b},this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if(this._.editor.lang.dir=="rtl"&&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 e=this._.element.getFirst(),d=this._.editor.lang.dir=="rtl",f=e.getComputedStyle("position")=="fixed";CKEDITOR.env.ie&&e.setStyle("zoom","100%");if(!f||!this._.position||!(this._.position.x==a&&this._.position.y==b)){this._.position={x:a,y:b};if(!f){f=CKEDITOR.document.getWindow().getScrollPosition();a=a+f.x;b=b+f.y}if(d){f=this.getSize();a=CKEDITOR.document.getWindow().getViewPaneSize().width-f.width-a}b={top:(b>0?b:0)+"px"};b[d?"right":"left"]=(a>0?a:0)+"px";e.setStyles(b);c&&(this._.moved=
1)}},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition;!a.getParent()||!a.getParent().equals(CKEDITOR.document.getBody())?a.appendTo(CKEDITOR.document.getBody()):a.setStyle("display","block");if(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900){var c=this.parts.dialog;c.setStyle("position","absolute");setTimeout(function(){c.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||b.width||
b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(CKEDITOR.dialog._.currentZIndex===null)CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex=CKEDITOR.dialog._.currentZIndex+10);if(CKEDITOR.dialog._.currentTop===null){CKEDITOR.dialog._.currentTop=this;this._.parentDialog=null;n(this._.editor)}else{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",x);a.on(CKEDITOR.env.opera?"keypress":"keyup",v);this._.hasFocus=false;for(var e in b.contents)if(b.contents[e]){var a=b.contents[e],d=this._.tabs[a.id],f=a.requiredContent,g=0;if(d){for(var i in this._.contents[a.id]){var j=this._.contents[a.id][i];if(!(j.type=="hbox"||j.type=="vbox"||!j.getInputElement()))if(j.requiredContent&&
!this._.editor.activeFilter.check(j.requiredContent))j.disable();else{j.enable();g++}}!g||f&&!this._.editor.activeFilter.check(f)?d[0].addClass("cke_dialog_tab_disabled"):d[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();h(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(),e=(c.width-b.width)/2,d=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(d>0?d:0)>c.height||b.width+(e>0?e:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:e,this._.moved?this._.position.y:d)},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(E(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 q(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex=
CKEDITOR.dialog._.currentZIndex-10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",x);a.removeListener(CKEDITOR.env.opera?"keypress":"keyup",v);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()})}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title="'+CKEDITOR.tools.htmlEncode(a.label)+'"':
"",e=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),d=this._.contents[a.id]={},f=e.getChild(),g=0;e=f.shift();){!e.notAllowed&&(e.type!="hbox"&&e.type!="vbox")&&g++;d[e.id]=e;typeof e.getChild=="function"&&f.push.apply(f,e.getChild())}if(!g)a.hidden=true;b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");e=CKEDITOR.env;d=
"cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',this._.pageCount>0?" cke_last":"cke_first",c,a.hidden?' style="display:none"':"",' id="',d,'"',e.gecko&&e.version>=10900&&!e.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',a.label,"</a>"].join(""));b.setAttribute("aria-labelledby",d);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);if(a.accessKey){B(this,this,"CTRL+"+a.accessKey,D,C);this._.accessKeyMap["CTRL+"+a.accessKey]=a.id}}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&this.fire("selectPage",{page:a,currentPage:this._.currentTabId})!==true){for(var c in this._.tabs){var e=this._.tabs[c][0],d=this._.tabs[c][1];if(c!=a){e.removeClass("cke_dialog_tab_selected");d.hide()}d.setAttribute("aria-hidden",
c!=a)}var f=this._.tabs[a];f[0].addClass("cke_dialog_tab_selected");if(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat){b(f[1]);f[1].show();setTimeout(function(){b(f[1],1)},0)}else f[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=this._.tabs[a]&&this._.tabs[a][0];if(b&&this._.pageCount!=1&&b.isVisible()){a==this._.currentTabId&&
this.selectPage(c.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(typeof b=="undefined"){b=this._.focusList.length;this._.focusList.push(new g(this,a,b))}else{this._.focusList.splice(b,
0,new g(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){if(!this._.dialogDefinitions[a]||typeof b=="function")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(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;a.fire("ok",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};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;a.fire("cancel",{hide:true}).hide!==false&&a.hide()}},b,true)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},true)};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 r={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,
minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},p=function(a,b,c){for(var e=0,d;d=a[e];e++){if(d.id==b)return d;if(c&&d[c])if(d=p(d[c],b,c))return d}return null},z=function(a,b,c,e,d){if(c){for(var f=0,g;g=a[f];f++){if(g.id==c){a.splice(f,0,b);return b}if(e&&g[e])if(g=z(g[e],b,c,e,true))return g}if(d)return null}a.push(b);return b},t=function(a,b,c){for(var e=0,d;d=a[e];e++){if(d.id==b)return a.splice(e,1);if(c&&d[c])if(d=t(d[c],b,c))return d}return null},
A=function(a,b){this.dialog=a;for(var c=b.contents,e=0,d;d=c[e];e++)c[e]=d&&new f(a,d);CKEDITOR.tools.extend(this,b)};A.prototype={getContents:function(a){return p(this.contents,a)},getButton:function(a){return p(this.buttons,a)},addContents:function(a,b){return z(this.contents,a,b)},addButton:function(a,b){return z(this.buttons,a,b)},removeContents:function(a){t(this.contents,a)},removeButton:function(a){t(this.buttons,a)}};f.prototype={get:function(a){return p(this.elements,a,"children")},add:function(a,
b){return z(this.elements,a,b,"children")},remove:function(a){t(this.elements,a,"children")}};var y,u={},s,w={},x=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);if((b=w[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length){b=b[b.length-1];b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}},v=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,
d=String.fromCharCode(a.data.$.keyCode);if((b=w[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+d])&&b.length){b=b[b.length-1];if(b.keyup){b.keyup.call(b.uiElement,b.dialog,b.key);a.data.preventDefault()}}},B=function(a,b,c,e,d){(w[c]||(w[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:d||a.accessKeyUp,keydown:e||a.accessKeyDown})},E=function(a){for(var b in w){for(var c=w[b],e=c.length-1;e>=0;e--)(c[e].dialog==a||c[e].uiElement==a)&&c.splice(e,1);c.length===0&&delete w[b]}},C=function(a,b){a._.accessKeyMap[b]&&
a.selectPage(a._.accessKeyMap[b])},D=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,e,d,f,g){if(!(arguments.length<4)){var i=(e.call?e(b):e)||"div",h=["<",i," "],j=(d&&d.call?d(b):d)||{},l=(f&&f.call?f(b):f)||{},k=(g&&g.call?g.call(this,a,b):g)||"",p=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";this.id=b.id;if(b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)){j.display="none";this.notAllowed=true}l.id=p;var m={};b.type&&(m["cke_dialog_ui_"+
b.type]=1);b.className&&(m[b.className]=1);b.disabled&&(m.cke_disabled=1);for(var o=l["class"]&&l["class"].split?l["class"].split(" "):[],p=0;p<o.length;p++)o[p]&&(m[o[p]]=1);o=[];for(p in m)o.push(p);l["class"]=o.join(" ");if(b.title)l.title=b.title;m=(b.style||"").split(";");if(b.align){o=b.align;j["margin-left"]=o=="left"?0:"auto";j["margin-right"]=o=="right"?0:"auto"}for(p in j)m.push(p+":"+j[p]);b.hidden&&m.push("display:none");for(p=m.length-1;p>=0;p--)m[p]===""&&m.splice(p,1);if(m.length>0)l.style=
(l.style?l.style+"; ":"")+m.join("; ");for(p in l)h.push(p+'="'+CKEDITOR.tools.htmlEncode(l[p])+'" ');h.push(">",k,"</",i,">");c.push(h.join(""));(this._||(this._={})).dialog=a;if(typeof b.isChanged=="boolean")this.isChanged=function(){return b.isChanged};if(typeof b.isChanged=="function")this.isChanged=b.isChanged;if(typeof b.setValue=="function")this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}});if(typeof b.getValue=="function")this.getValue=
CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}});CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&(this.accessKeyDown&&b.accessKey)&&B(this,a,"CTRL+"+b.accessKey);var n=this;a.on("load",function(){var b=n.getInputElement();if(b){var c=n.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=false;a._.hasFocus=true;n.fire("focus");
c&&this.addClass(c)});b.on("blur",function(){n.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);if(this.keyboardFocusable){this.tabIndex=b.tabIndex||0;this.focusIndex=a._.focusList.push(this)-1;this.on("focus",function(){a._.currentFocusIndex=n.focusIndex})}}},hbox:function(a,b,c,e,d){if(!(arguments.length<4)){this._||(this._={});var f=this._.children=b,g=d&&d.widths||null,i=d&&d.height||null,h,j={role:"presentation"};d&&d.align&&(j.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this,
a,d||{type:"hbox"},e,"table",{},j,function(){var a=['<tbody><tr class="cke_dialog_ui_hbox">'];for(h=0;h<c.length;h++){var b="cke_dialog_ui_hbox_child",e=[];h===0&&(b="cke_dialog_ui_hbox_first");h==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('<td class="',b,'" role="presentation" ');g?g[h]&&e.push("width:"+l(g[h])):e.push("width:"+Math.floor(100/c.length)+"%");i&&e.push("height:"+l(i));d&&d.padding!=void 0&&e.push("padding:"+l(d.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[h].align)&&e.push("text-align:"+
f[h].align);e.length>0&&a.push('style="'+e.join("; ")+'" ');a.push(">",c[h],"</td>")}a.push("</tr></tbody>");return a.join("")})}},vbox:function(a,b,c,e,d){if(!(arguments.length<3)){this._||(this._={});var f=this._.children=b,g=d&&d.width||null,h=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b=['<table role="presentation" cellspacing="0" border="0" '];b.push('style="');d&&d.expand&&b.push("height:100%;");b.push("width:"+
l(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align="',CKEDITOR.tools.htmlEncode(d&&d.align||(a.getParentEditor().lang.dir=="ltr"?"left":"right")),'" ');b.push("><tbody>");for(var e=0;e<c.length;e++){var i=[];b.push('<tr><td role="presentation" ');g&&i.push("width:"+l(g||"100%"));h?i.push("height:"+l(h[e])):d&&d.expand&&i.push("height:"+Math.floor(100/c.length)+"%");d&&d.padding!=void 0&&i.push("padding:"+l(d.padding));CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&f[e].align)&&
i.push("text-align:"+f[e].align);i.length>0&&b.push('style="',i.join("; "),'" ');b.push(' class="cke_dialog_ui_vbox_child">',c[e],"</td></tr>")}b.push("</tbody></table>");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 false},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&a.$.className.search("cke_dialog_page_contents")==-1;);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,e=function(a,b,c,e){b.on("load",
function(){a.getInputElement().on(c,e,a)})},d;for(d in a)if(c=d.match(b))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,a[d]):e(this,this._.dialog,c[1].toLowerCase(),a[d]);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()?false:true}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(arguments.length<
1)return this._.children.concat();a.splice||(a=[a]);return a.length<2?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},true);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var e=b.children,d,f=[],g=[],i=0;i<e.length&&(d=e[i]);i++){var h=[];f.push(h);g.push(CKEDITOR.dialog._.uiElementBuilders[d.type].build(a,d,h))}return new CKEDITOR.ui.dialog[b.type](a,
g,f,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,true)};CKEDITOR.dialogCommand.prototype={exec:function(a){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout(function(){a.openDialog(this.dialogName)},0,this):a.openDialog(this.dialogName)},canUndo:false,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
f=/^(\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=void 0,e=CKEDITOR.VALIDATE_AND,d=[],f;for(f=0;f<a.length;f++)if(typeof a[f]=="function")d.push(a[f]);else break;if(f<a.length&&typeof a[f]=="string"){c=a[f];f++}f<a.length&&typeof a[f]=="number"&&(e=a[f]);var g=e==CKEDITOR.VALIDATE_AND?true:false;for(f=0;f<d.length;f++)g=e==CKEDITOR.VALIDATE_AND?
g&&d[f](b):g||d[f](b);return!g?c:true}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return!a.test(c)?b:true}},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 d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return f.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 u)u[c].remove();u={}}var a=a.editor._.storedDialogs,e;for(e in a)a[e].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,e=CKEDITOR.dialog._.dialogDefinitions[a];
CKEDITOR.dialog._.currentTop===null&&n(this);if(typeof e=="function"){c=this._.storedDialogs||(this._.storedDialogs={});c=c[a]||(c[a]=new CKEDITOR.dialog(this,a));b&&b.call(c,c);c.show()}else{if(e=="failed"){q(this);throw Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');}typeof e=="string"&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){typeof CKEDITOR.dialog._.dialogDefinitions[a]!="function"&&(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(c){c.on("doubleclick",function(d){d.data.dialog&&c.openDialog(d.data.dialog)},null,null,999)}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,eo:1,es:1,et:1,fa:1,fi: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,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,ug:1,uk:1,vi:1,"zh-cn":1},init:function(c){var d=this;c.addCommand("a11yHelp",{exec:function(){var b=c.langCode,b=d.availableLangs[b]?b:d.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d.path+"dialogs/lang/"+b+".js"),function(){c.lang.a11yhelp=d.langEntries[b];c.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:false});c.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");
CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js")}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(c){var d=c.addCommand("about",new CKEDITOR.dialogCommand("about"));d.modes={wysiwyg:1,source:1};d.canUndo=false;d.readOnly=1;c.ui.addButton&&c.ui.addButton("About",{label:c.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(c){var d=0,b=function(b,e,f,i){if(i){var i=
new CKEDITOR.style(i),k=a[f];k.unshift(i);c.attachStyleStateChange(i,function(a){!c.readOnly&&c.getCommand(f).setState(a)});c.addCommand(f,new CKEDITOR.styleCommand(i,{contentForms:k}));c.ui.addButton&&c.ui.addButton(b,{label:e,command:f,toolbar:"basicstyles,"+(d=d+10)})}},a={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return a=="bold"||+a>=700}]],italic:["em","i",["span",function(a){return a.styles["font-style"]=="italic"}]],underline:["u",["span",function(a){return a.styles["text-decoration"]==
"underline"}]],strike:["s","strike",["span",function(a){return a.styles["text-decoration"]=="line-through"}]],subscript:["sub"],superscript:["sup"]},e=c.config,i=c.lang.basicstyles;b("Bold",i.bold,"bold",e.coreStyles_bold);b("Italic",i.italic,"italic",e.coreStyles_italic);b("Underline",i.underline,"underline",e.coreStyles_underline);b("Strike",i.strike,"strike",e.coreStyles_strike);b("Subscript",i.subscript,"subscript",e.coreStyles_subscript);b("Superscript",i.superscript,"superscript",e.coreStyles_superscript);
c.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(){function c(a,b,c,e){if(!a.isReadOnly()&&
!a.equals(c.editable())){CKEDITOR.dom.element.setMarker(e,a,"bidi_processed",1);for(var e=a,d=c.editable();(e=e.getParent())&&!e.equals(d);)if(e.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}e="useComputedState"in c.config?c.config.useComputedState:1;if((e?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=b){a.removeStyle("direction");if(e){a.removeAttribute("dir");b!=a.getComputedStyle("direction")&&a.setAttribute("dir",
b)}else a.setAttribute("dir",b);c.forceNextSelectionCheck()}}}function d(a,b,c){var e=a.getCommonAncestor(false,true),a=a.clone();a.enlarge(c==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(e,CKEDITOR.START)&&a.checkBoundaryOfElement(e,CKEDITOR.END)){for(var d;e&&e.type==CKEDITOR.NODE_ELEMENT&&(d=e.getParent())&&d.getChildCount()==1&&!(e.getName()in b);)e=d;return e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in b&&e}}function b(a){return{context:"p",
allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:true,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,b){var c=a.config.useComputedState,e,c=c===void 0||c;if(!c){e=b.lastElement;for(var d=a.editable();e&&!(e.getName()in g||e.equals(d));){var f=e.getParent();if(!f)break;e=f}}e=e||b.block||b.blockLimit;if(e.equals(a.editable()))(d=a.getSelection().getRanges()[0].getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&(e=d);if(e){c=c?e.getComputedStyle("direction"):
e.getStyle("direction")||e.getAttribute("dir");a.getCommand("bidirtl").setState(c=="rtl"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.getCommand("bidiltr").setState(c=="ltr"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}c=(b.block||b.blockLimit||a.editable()).getDirection(1);if(c!=(a._.selDir||a.lang.dir)){a._.selDir=c;a.fire("contentDirChanged",c)}},exec:function(b){var f=b.getSelection(),g=b.config.enterMode,h=f.getRanges();if(h&&h.length){for(var j={},r=f.createBookmarks(),h=h.createIterator(),
p,z=0;p=h.getNextRange(1);){var t=p.getEnclosedNode();if(!t||t&&!(t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in i))t=d(p,e,g);t&&c(t,a,b,j);var A=new CKEDITOR.dom.walker(p),y=r[z].startNode,u=r[z++].endNode;A.evaluator=function(a){return!!(a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in e&&!(a.getName()==(g==CKEDITOR.ENTER_P?"p":"div")&&a.getParent().type==CKEDITOR.NODE_ELEMENT&&a.getParent().getName()=="blockquote")&&a.getPosition(y)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(u)&CKEDITOR.POSITION_PRECEDING+
CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;t=A.next();)c(t,a,b,j);p=p.createIterator();for(p.enlargeBr=g!=CKEDITOR.ENTER_BR;t=p.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)c(t,a,b,j)}CKEDITOR.dom.element.clearAllMarkers(j);b.forceNextSelectionCheck();f.selectBookmarks(r);b.focus()}}}}function a(a){var b=a==h.setAttribute,c=a==h.removeAttribute,e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(d,f){if(!this.isReadOnly()){var g;if(g=d==(b||c?"dir":"direction")||d=="style"&&
(c||e.test(f))){a:{g=this;for(var i=g.getDocument().getBody().getParent();g;){if(g.equals(i)){g=false;break a}g=g.getParent()}g=true}g=!g}if(g){g=this.getDirection(1);i=a.apply(this,arguments);if(g!=this.getDirection(1)){this.getDocument().fire("dirChanged",this);return i}}}return a.apply(this,arguments)}}var e={table:1,ul:1,ol:1,blockquote:1,div:1},i={},g={};CKEDITOR.tools.extend(i,e,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(g,i,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function c(b,
e,d,f,g){a.addCommand(d,new CKEDITOR.command(a,f));a.ui.addButton&&a.ui.addButton(b,{label:e,command:d,toolbar:"bidi,"+g})}if(!a.blockless){var e=a.lang.bidi;c("BidiLtr",e.ltr,"bidiltr",b("ltr"),10);c("BidiRtl",e.rtl,"bidirtl",b("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(b){a.fire("dirChanged",{node:b.data,dir:b.data.getDirection(1)})})});a.on("contentDirChanged",function(b){var b=(a.lang.dir!=b.data?"add":"remove")+"Class",c=a.ui.space(a.config.toolbarLocation);if(c)c[b]("cke_mixed_dir_content")})}}});
for(var h=CKEDITOR.dom.element.prototype,f=["setStyle","removeStyle","setAttribute","removeAttribute"],j=0;j<f.length;j++)h[f[j]]=CKEDITOR.tools.override(h[f[j]],a)}(),function(){var c={exec:function(c){var b=c.getCommand("blockquote").state,a=c.getSelection(),e=a&&a.getRanges()[0];if(e){var i=a.createBookmarks();if(CKEDITOR.env.ie){var g=i[0].startNode,h=i[0].endNode,f;if(g&&g.getParent().getName()=="blockquote")for(f=g;f=f.getNext();)if(f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()){g.move(f,
true);break}if(h&&h.getParent().getName()=="blockquote")for(f=h;f=f.getPrevious();)if(f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()){h.move(f);break}}var j=e.createIterator();j.enlargeBr=c.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(g=[];b=j.getNextParagraph();)g.push(b);if(g.length<1){b=c.document.createElement(c.config.enterMode==CKEDITOR.ENTER_P?"p":"div");h=i.shift();e.insertNode(b);b.append(new CKEDITOR.dom.text("﻿",c.document));e.moveToBookmark(h);e.selectNodeContents(b);
e.collapse(true);h=e.createBookmark();g.push(b);i.unshift(h)}f=g[0].getParent();e=[];for(h=0;h<g.length;h++){b=g[h];f=f.getCommonAncestor(b.getParent())}for(b={table:1,tbody:1,tr:1,ol:1,ul:1};b[f.getName()];)f=f.getParent();for(h=null;g.length>0;){for(b=g.shift();!b.getParent().equals(f);)b=b.getParent();b.equals(h)||e.push(b);h=b}for(;e.length>0;){b=e.shift();if(b.getName()=="blockquote"){for(h=new CKEDITOR.dom.documentFragment(c.document);b.getFirst();){h.append(b.getFirst().remove());g.push(h.getLast())}h.replace(b)}else g.push(b)}e=
c.document.createElement("blockquote");for(e.insertBefore(g[0]);g.length>0;){b=g.shift();e.append(b)}}else if(b==CKEDITOR.TRISTATE_ON){h=[];for(f={};b=j.getNextParagraph();){for(g=e=null;b.getParent();){if(b.getParent().getName()=="blockquote"){e=b.getParent();g=b;break}b=b.getParent()}if(e&&g&&!g.getCustomData("blockquote_moveout")){h.push(g);CKEDITOR.dom.element.setMarker(f,g,"blockquote_moveout",true)}}CKEDITOR.dom.element.clearAllMarkers(f);b=[];g=[];for(f={};h.length>0;){j=h.shift();e=j.getParent();
if(j.getPrevious())if(j.getNext()){j.breakParent(j.getParent());g.push(j.getNext())}else j.remove().insertAfter(e);else j.remove().insertBefore(e);if(!e.getCustomData("blockquote_processed")){g.push(e);CKEDITOR.dom.element.setMarker(f,e,"blockquote_processed",true)}b.push(j)}CKEDITOR.dom.element.clearAllMarkers(f);for(h=g.length-1;h>=0;h--){e=g[h];a:{f=e;for(var j=0,k=f.getChildCount(),o=void 0;j<k&&(o=f.getChild(j));j++)if(o.type==CKEDITOR.NODE_ELEMENT&&o.isBlockBoundary()){f=false;break a}f=true}f&&
e.remove()}if(c.config.enterMode==CKEDITOR.ENTER_BR)for(e=true;b.length;){j=b.shift();if(j.getName()=="div"){h=new CKEDITOR.dom.documentFragment(c.document);e&&(j.getPrevious()&&!(j.getPrevious().type==CKEDITOR.NODE_ELEMENT&&j.getPrevious().isBlockBoundary()))&&h.append(c.document.createElement("br"));for(e=j.getNext()&&!(j.getNext().type==CKEDITOR.NODE_ELEMENT&&j.getNext().isBlockBoundary());j.getFirst();)j.getFirst().remove().appendTo(h);e&&h.append(c.document.createElement("br"));h.replace(j);
e=false}}}a.selectBookmarks(i);c.focus()}},refresh:function(c,b){this.setState(c.elementPath(b.block||b.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(d){if(!d.blockless){d.addCommand("blockquote",c);d.ui.addButton&&d.ui.addButton("Blockquote",{label:d.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"})}}})}(),"use strict",
function(){function c(a){function b(){var c=a.editable();c.on(w,function(a){(!CKEDITOR.env.ie||!y)&&z(a)});CKEDITOR.env.ie&&c.on("paste",function(b){if(!u){d();b.data.preventDefault();z(b);n("paste")||a.openDialog("paste")}});if(CKEDITOR.env.ie){c.on("contextmenu",i,null,null,0);c.on("beforepaste",function(a){a.data&&!a.data.$.ctrlKey&&i()},null,null,0)}c.on("beforecut",function(){!y&&l(a)});var e;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){e=setTimeout(function(){t()},
0)});a.on("destroy",function(){clearTimeout(e)});c.on("keyup",t)}function c(b){return{type:b,canUndo:b=="cut",startDisabled:true,exec:function(){this.type=="cut"&&l();var b;var c=this.type;if(CKEDITOR.env.ie)b=n(c);else try{b=a.document.$.execCommand(c,false,null)}catch(e){b=false}b||alert(a.lang.clipboard[this.type+"Error"]);return b}}}function e(){return{canUndo:false,async:true,exec:function(a,b){var c=function(b,c){b&&q(b.type,b.dataValue,!!c);a.fire("afterCommandExec",{name:"paste",command:e,
returnValue:!!b})},e=this;typeof b=="string"?c({type:"auto",dataValue:b},1):a.getClipboardData(c)}}}function d(){u=1;setTimeout(function(){u=0},100)}function i(){y=1;setTimeout(function(){y=0},10)}function n(b){var c=a.document,e=c.getBody(),d=false,f=function(){d=true};e.on(b,f);(CKEDITOR.env.version>7?c.$:c.$.selection.createRange()).execCommand(b);e.removeListener(b,f);return d}function q(b,c,e){b={type:b};if(e&&!a.fire("beforePaste",b)||!c)return false;b.dataValue=c;return a.fire("paste",b)}function l(){if(CKEDITOR.env.ie&&
!CKEDITOR.env.quirks){var b=a.getSelection(),c,e,d;if(b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())){e=b.getRanges()[0];d=a.document.createText("");d.insertBefore(c);e.setStartBefore(d);e.setEndAfter(c);b.selectRanges([e]);setTimeout(function(){if(c.getParent()){d.remove();b.selectElement(c)}},0)}}}function m(b,c){var e=a.document,d=a.editable(),f=function(a){a.cancel()},i=CKEDITOR.env.gecko&&CKEDITOR.env.version<=10902,h;if(!e.getById("cke_pastebin")){var j=a.getSelection(),
l=j.createBookmarks(),k=new CKEDITOR.dom.element((CKEDITOR.env.webkit||d.is("body"))&&!CKEDITOR.env.ie&&!CKEDITOR.env.opera?"body":"div",e);k.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});CKEDITOR.env.opera&&k.appendBogus();var p=0,e=e.getWindow();if(i){k.insertAfter(l[0].startNode);k.setStyle("display","inline")}else{if(CKEDITOR.env.webkit){d.append(k);k.addClass("cke_editable");if(!d.is("body")){i=d.getComputedStyle("position")!="static"?d:CKEDITOR.dom.element.get(d.$.offsetParent);p=i.getDocumentPosition().y}}else d.getAscendant(CKEDITOR.env.ie||
CKEDITOR.env.opera?"body":"html",1).append(k);k.setStyles({position:"absolute",top:e.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,e.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0})}if(i=k.getParent().isReadOnly()){k.setOpacity(0);k.setAttribute("contenteditable",true)}else k.setStyle(a.config.contentsLangDirection=="ltr"?"left":"right","-1000px");a.on("selectionChange",f,null,null,0);CKEDITOR.env.webkit&&(h=d.once("blur",f,null,null,-100));i&&k.focus();i=new CKEDITOR.dom.range(k);
i.selectNodeContents(k);var m=i.select();CKEDITOR.env.ie&&(h=d.once("blur",function(){a.lockSelection(m)}));var o=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){if(CKEDITOR.env.webkit||CKEDITOR.env.opera)CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=o;h&&h.removeListener();CKEDITOR.env.ie&&d.focus();j.selectBookmarks(l);k.remove();var b;if(CKEDITOR.env.webkit&&(b=k.getFirst())&&b.is&&b.hasClass("Apple-style-span"))k=b;a.removeListener("selectionChange",
f);c(k.getHtml())},0)}}function r(){if(CKEDITOR.env.ie){a.focus();d();var b=a.focusManager;b.lock();if(a.editable().fire(w)&&!n("paste")){b.unlock();return false}b.unlock()}else try{if(a.editable().fire(w)&&!a.document.$.execCommand("Paste",false,null))throw 0;}catch(c){return false}return true}function p(b){if(a.mode=="wysiwyg")switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();d();!CKEDITOR.env.ie&&b.fire("beforepaste");(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.version<
10900)&&b.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0)}}function z(b){var c={type:"auto"},e=a.fire("beforePaste",c);m(b,function(a){a=a.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&q(c.type,a,0,1)})}function t(){if(a.mode=="wysiwyg"){var b=A("paste");a.getCommand("cut").setState(A("cut"));a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function A(b){if(s&&
b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if(b=="paste")return CKEDITOR.TRISTATE_OFF;var b=a.getSelection(),c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||c.length==1&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var y=0,u=0,s=0,w=CKEDITOR.env.ie?"beforepaste":"paste";(function(){a.on("key",p);a.on("contentDom",b);a.on("selectionChange",function(a){s=a.data.selection.getRanges()[0].checkReadOnly();t()});a.contextMenu&&a.contextMenu.addListener(function(a,
b){s=b.getRanges()[0].checkReadOnly();return{cut:A("cut"),copy:A("copy"),paste:A("paste")}})})();(function(){function b(c,e,d,f,i){var h=a.lang.clipboard[e];a.addCommand(e,d);a.ui.addButton&&a.ui.addButton(c,{label:h,command:e,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(e,{label:h,command:e,group:"clipboard",order:i})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",e(),30,8)})();a.getClipboardData=function(b,c){function e(a){a.removeListener();a.cancel();
c(a.data)}function d(a){a.removeListener();a.cancel();j=true;c({type:h,dataValue:a.data})}function f(){this.customTitle=b&&b.title}var i=false,h="auto",j=false;if(!c){c=b;b=null}a.on("paste",e,null,null,0);a.on("beforePaste",function(a){a.removeListener();i=true;h=a.data.type},null,null,1E3);if(r()===false){a.removeListener("paste",e);if(i&&a.fire("pasteDialog",f)){a.on("pasteDialogCommit",d);a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",d);setTimeout(function(){j||
c(null)},10)})}else c(null)}}}function d(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||CKEDITOR.env.opera){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function b(a,b){function c(a){return CKEDITOR.tools.repeat("</p><p>",
~~(a/2))+(a%2==1?"<br>":"")}b=b.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;if(CKEDITOR.env.webkit&&b.indexOf("<div>")>-1){b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>");b.match(/<div>(<br>|)<\/div>/)&&(b="<p>"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("</div><div>").length+
1)})+"</p>");b=b.replace(/<\/div><div>/g,"<br>");b=b.replace(/<\/?div>/g,"")}if((CKEDITOR.env.gecko||CKEDITOR.env.opera)&&a.enterMode!=CKEDITOR.ENTER_BR){CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"<br>"));b.indexOf("<br><br>")>-1&&(b="<p>"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"</p>")}return i(a,b)}function a(){var a=new CKEDITOR.htmlParser.filter,b={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,ul:1},c=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),
e={p:1,br:1,"cke:br":1},d=CKEDITOR.dtd,i=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),n=function(a){delete a.name;a.add(new CKEDITOR.htmlParser.text(" "))},q=function(a){for(var b=a,c;(b=b.next)&&b.name&&b.name.match(/^h\d$/);){c=new CKEDITOR.htmlParser.element("cke:br");c.isEmpty=true;for(a.add(c);c=b.children.shift();)a.add(c)}};a.addRules({elements:{h1:q,h2:q,h3:q,h4:q,h5:q,h6:q,img:function(a){var a=CKEDITOR.tools.trim(a.attributes.alt||
""),b=" ";a&&!a.match(/(^http|\.(jpe?g|gif|png))/i)&&(b=" ["+a+"] ");return new CKEDITOR.htmlParser.text(b)},td:n,th:n,$:function(a){var g=a.name,n;if(i[g])return false;a.attributes=[];if(g=="br")return a;if(b[g])a.name="p";else if(c[g])delete a.name;else if(d[g]){n=new CKEDITOR.htmlParser.element("cke:br");n.isEmpty=true;if(CKEDITOR.dtd.$empty[g])return n;a.add(n,0);n=n.clone();n.isEmpty=true;a.add(n);delete a.name}e[a.name]||delete a.name;return a}}},{applyToAll:true});return a}function e(a,b,c){var b=
new CKEDITOR.htmlParser.fragment.fromHtml(b),e=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(e,c);var b=e.getHtml(),b=b.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,""),d=0,b=b.replace(/<\/?p>/g,function(a){if(a=="<p>"){if(++d>1)return"</p><p>"}else if(--d>0)return"</p><p>";return a}).replace(/<p><\/p>/g,"");
return i(a,b)}function i(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("<br>",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"<$1div>"));return b}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(g){var i;c(g);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));g.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;if(b.indexOf("Apple-")>
-1){b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," ");a.data.type!="html"&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"&nbsp;&nbsp; &nbsp;")}));if(b.indexOf('<br class="Apple-interchange-newline">')>-1){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 e,d,g=new CKEDITOR.dom.element("div");
for(g.setHtml(b);g.getChildCount()==1&&(e=g.getFirst())&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasClass("cke_editable")||e.hasClass("cke_contents"));)g=d=e;d&&(b=d.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,e){if(e.toLowerCase()in c){a.data.preSniffing="html";return"<"+e}return b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,e){if(e in c){a.data.endsWithEOL=1;return"</"+e+">"}return b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,
"$1"));a.data.dataValue=b},null,null,3);g.on("paste",function(c){var c=c.data,j=c.type,k=c.dataValue,o,n=g.config.clipboard_defaultContentType||"html";o=j=="html"||c.preSniffing=="html"?"html":d(k);o=="htmlifiedtext"?k=b(g.config,k):j=="text"&&o=="html"&&(k=e(g.config,k,i||(i=a(g))));c.startsWithEOL&&(k='<br data-cke-eol="1">'+k);c.endsWithEOL&&(k=k+'<br data-cke-eol="1">');j=="auto"&&(j=o=="html"||n=="html"?"html":"text");c.type=j;c.dataValue=k;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},
null,null,6);g.on("paste",function(a){a=a.data;g.insertHtml(a.dataValue,a.type);setTimeout(function(){g.fire("afterPaste")},0)},null,null,1E3);g.on("pasteDialog",function(a){setTimeout(function(){g.openDialog("paste",a.data)},0)})}})}(),function(){var c='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}"';
if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)c=c+' onkeypress="return false;"';CKEDITOR.env.gecko&&(c=c+' onblur="this.style.cssText = this.style.cssText;"');var c=c+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);"  onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"'),
c=c+'>&nbsp;</span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span>{arrowHtml}</a>',d=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"</span>"),b=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,
click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,c){var i=CKEDITOR.env,g=this._.id=CKEDITOR.tools.getNextId(),h="",f=this.command,j;this._.editor=a;var k={id:g,button:this,editor:a,focus:function(){CKEDITOR.document.getById(g).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},o=CKEDITOR.tools.addFunction(function(a){if(k.onkey){a=
new CKEDITOR.dom.event(a);return k.onkey(k,a.getKeystroke())!==false}}),n=CKEDITOR.tools.addFunction(function(a){var b;k.onfocus&&(b=k.onfocus(k,new CKEDITOR.dom.event(a))!==false);CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&a.preventBubble();return b}),q=0,l=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var b=a.editable();if(b.isInline()&&b.hasFocus){a.lockSelection();q=1}}});k.clickFn=j=CKEDITOR.tools.addFunction(function(){if(q){a.unlockSelection(1);q=0}k.execute()});if(this.modes){var m=
{},r=function(){var b=a.mode;if(b){b=this.modes[b]?m[b]!=void 0?m[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b;this.setState(b);this.refresh&&this.refresh()}};a.on("beforeModeUnload",function(){if(a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED)m[a.mode]=this._.state},this);a.on("activeFilterChange",r,this);a.on("mode",r,this);!this.readOnly&&a.on("readOnly",r,this)}else if(f)if(f=a.getCommand(f)){f.on("state",function(){this.setState(f.state)},
this);h=h+(f.state==CKEDITOR.TRISTATE_ON?"on":f.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off")}if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),e=c.getFirst(),b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");e.setAttribute("style",CKEDITOR.skin.getIconStyle(p,b=="rtl",this.icon,this.iconOffset))},this);f||(h=h+"off");var p=r=this.name||this.command;if(this.icon&&!/\./.test(this.icon)){p=this.icon;this.icon=
null}i={id:g,name:r,iconName:p,label:this.label,cls:this.className||"",state:h,title:this.title,titleJs:i.gecko&&i.version>=10900&&!i.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:o,mousedownFn:l,focusFn:n,clickFn:j,style:CKEDITOR.skin.getIconStyle(p,a.lang.dir=="rtl",this.icon,this.iconOffset),arrowHtml:this.hasArrow?d.output():""};b.output(i,c);if(this.onRender)this.onRender();return k},setState:function(a){if(this._.state==a)return false;this._.state=a;
var b=CKEDITOR.document.getById(this._.id);if(b){b.setState(a,"cke_button");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",true):b.removeAttribute("aria-disabled");a==CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",true):b.removeAttribute("aria-pressed");return true}return false},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;!this.allowedContent&&(!this.requiredContent&&this.command)&&(b=a.getCommand(this.command)||
b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function c(c){var b=this._;if(b.state!=CKEDITOR.TRISTATE_DISABLED){this.createPanel(c);b.on?b.panel.hide():b.panel.showBlock(this._.id,this.document.getById(this._.id),4)}}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(d){var b=d.panel||{};delete d.panel;this.base(d);this.document=
b.parent&&b.parent.getDocument()||CKEDITOR.document;b.block={attributes:b.attributes};this.hasArrow=b.toolbarRelated=true;this.click=c;this._={panelDefinition:b}},statics:{handler:{create:function(c){return new CKEDITOR.ui.panelButton(c)}}},proto:{createPanel:function(c){var b=this._;if(!b.panel){var a=this._.panelDefinition,e=this._.panelDefinition.block,i=a.parent||CKEDITOR.document.getBody(),g=this._.panel=new CKEDITOR.ui.floatPanel(c,i,a),a=g.addBlock(b.id,e),h=this;g.onShow=function(){h.className&&
this.element.addClass(h.className+"_panel");h.setState(CKEDITOR.TRISTATE_ON);b.on=1;h.editorFocus&&c.focus();if(h.onOpen)h.onOpen()};g.onHide=function(a){h.className&&this.element.getFirst().removeClass(h.className+"_panel");h.setState(h.modes&&h.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b.on=0;if(!a&&h.onClose)h.onClose()};g.onEscape=function(){g.hide(1);h.document.getById(b.id).focus()};if(this.onBlock)this.onBlock(g,a);a.onHide=function(){b.on=0;h.setState(CKEDITOR.TRISTATE_OFF)}}}}})},
beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=a;this.isFramed=this.forceIFrame||this.css.length;
this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var c=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),d=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'),b=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');
CKEDITOR.ui.panel.prototype={render:function(a,e){this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),c=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&c.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=true;if(this.onLoad)this.onLoad()},this));a.write(b.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),
onload:"window.parent.CKEDITOR.tools.callFunction("+c+");"},i)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("key"+(CKEDITOR.env.opera?"press":"down"),function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&this._.onKeyDown(b)===false?a.data.preventDefault():(b==27||b==(c=="rtl"?39:37))&&this.onEscape&&this.onEscape(b)===false&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else a=this.document.getById(this.id);
this._.holder=a}return a};var i={editorId:a.id,id:this.id,langCode:a.langCode,dir:a.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":a.config.baseFloatZIndex+1};if(this.isFramed){var g=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";i.frame=d.output({id:this.id+"_frame",src:g})}g=c.output(i);e&&e.push(g);return g},addBlock:function(a,b){b=this._.blocks[a]=
b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){var a=this._.blocks[a],b=this._.currentBlock,c=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",c);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();
return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);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(a){if(a!=-1){a=this.element.getElementsByTag("a").getItem(this._.focusIndex=a);(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&a.getDocument().getWindow().focus();a.focus();this.onMark&&this.onMark(a)}}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||this.onHide.call(this)!==true)&&this.element.setStyle("display","none")},onKeyDown:function(a){var b=this.keys[a];switch(b){case "next":for(var a=this._.focusIndex,
b=this.element.getElementsByTag("a"),c;c=b.getItem(++a);)if(c.getAttribute("_cke_focus")&&c.$.offsetWidth){this._.focusIndex=a;c.focus();break}return false;case "prev":a=this._.focusIndex;for(b=this.element.getElementsByTag("a");a>0&&(c=b.getItem(--a));)if(c.getAttribute("_cke_focus")&&c.$.offsetWidth){this._.focusIndex=a;c.focus();break}return false;case "click":case "mouseup":a=this._.focusIndex;(c=a>=0&&this.element.getElementsByTag("a").getItem(a))&&(c.$[b]?c.$[b]():c.$["on"+b]());return false}return true}}})}(),
CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function c(b,a,c,i,g){var g=CKEDITOR.tools.genKey(a.getUniqueId(),c.getUniqueId(),b.lang.dir,b.uiColor||"",i.css||"",g||""),h=d[g];if(!h){h=d[g]=new CKEDITOR.ui.panel(a,i);h.element=c.append(CKEDITOR.dom.element.createFromHtml(h.render(b),a));h.element.setStyles({display:"none",position:"absolute"})}return h}var d={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(b,a,e,d){function g(){k.hide()}e.forceIFrame=1;e.toolbarRelated&&
b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a=CKEDITOR.document.getById("cke_"+b.name));var h=a.getDocument(),d=c(b,h,a,e,d||0),f=d.element,j=f.getFirst(),k=this;f.disableContextMenu();this.element=f;this._={editor:b,panel:d,parentElement:a,definition:e,document:h,iframe:j,children:[],dir:b.lang.dir};b.on("mode",g);b.on("resize",g);h.getWindow().on("resize",g)},proto:{addBlock:function(b,a){return this._.panel.addBlock(b,a)},addListBlock:function(b,a){return this._.panel.addListBlock(b,a)},getBlock:function(b){return this._.panel.getBlock(b)},
showBlock:function(b,a,c,d,g,h){var f=this._.panel,j=f.showBlock(b);this.allowBlur(false);b=this._.editor.editable();this._.returnFocus=b.hasFocus?b:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var k=this.element,b=this._.iframe,b=CKEDITOR.env.ie?b:new CKEDITOR.dom.window(b.$.contentWindow),o=k.getDocument(),n=this._.parentElement.getPositionedAncestor(),q=a.getDocumentPosition(o),o=n?n.getDocumentPosition(o):{x:0,y:0},l=this._.dir=="rtl",m=q.x+(d||0)-o.x,r=q.y+(g||0)-o.y;if(l&&(c==
1||c==4))m=m+a.$.offsetWidth;else if(!l&&(c==2||c==3))m=m+(a.$.offsetWidth-1);if(c==3||c==4)r=r+(a.$.offsetHeight-1);this._.panel._.offsetParentId=a.getId();k.setStyles({top:r+"px",left:0,display:""});k.setOpacity(0);k.getFirst().removeStyle("width");this._.editor.focusManager.add(b);if(!this._.blurSet){CKEDITOR.event.useCapture=true;b.on("blur",function(a){if(this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild){delete this._.returnFocus;this.hide()}},
this);b.on("focus",function(){this._.focused=true;this.hideChild();this.allowBlur(true)},this);CKEDITOR.event.useCapture=false;this._.blurSet=1}f.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&this.onEscape(a)===false)return false},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){k.removeStyle("width");if(j.autoSize){var a=j.element.getDocument(),a=(CKEDITOR.env.webkit?j.element:a.getBody()).$.scrollWidth;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+
((k.$.offsetWidth||0)-(k.$.clientWidth||0)+3));k.setStyle("width",a+10+"px");a=j.element.$.scrollHeight;CKEDITOR.env.ie&&(CKEDITOR.env.quirks&&a>0)&&(a=a+((k.$.offsetHeight||0)-(k.$.clientHeight||0)+3));k.setStyle("height",a+"px");f._.currentBlock.element.setStyle("display","none").removeStyle("display")}else k.removeStyle("height");l&&(m=m-k.$.offsetWidth);k.setStyle("left",m+"px");var b=f.element.getWindow(),a=k.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,e=a.height||
a.bottom-a.top,d=l?a.right:b.width-a.left,g=l?b.width-a.right:a.left;l?d<c&&(m=g>c?m+c:b.width>c?m-a.left:m-a.right+b.width):d<c&&(m=g>c?m-c:b.width>c?m-a.right+b.width:m-a.left);c=a.top;b.height-a.top<e&&(r=c>e?r-e:b.height>e?r-a.bottom+b.height:r-a.top);if(CKEDITOR.env.ie){b=a=new CKEDITOR.dom.element(k.$.offsetParent);b.getName()=="html"&&(b=b.getDocument().getBody());b.getComputedStyle("direction")=="rtl"&&(m=CKEDITOR.env.ie8Compat?m-k.getDocument().getDocumentElement().$.scrollLeft*2:m-(a.$.scrollWidth-
a.$.clientWidth))}var a=k.getFirst(),i;(i=a.getCustomData("activePanel"))&&i.onHide&&i.onHide.call(this,1);a.setCustomData("activePanel",this);k.setStyles({top:r+"px",left:m+"px"});k.setOpacity(1);h&&h()},this);f.isLoaded?a():f.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();j.element.focus();if(CKEDITOR.env.webkit)CKEDITOR.document.getBody().$.scrollTop=a;this.allowBlur(true);this._.editor.fire("panelShow",
this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var b=CKEDITOR.document.getActive();!b.equals(this._.iframe)&&b.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var b=this._.iframe.getFrameDocument().getActive();b.is("a")&&(this._.lastFocused=b)},hide:function(b){if(this.visible&&(!this.onHide||this.onHide.call(this)!==true)){this.hideChild();CKEDITOR.env.gecko&&
this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(b=b&&this._.returnFocus){CKEDITOR.env.webkit&&b.type&&b.getWindow().$.focus();b.focus()}delete this._.lastFocused;this._.editor.fire("panelHide",this)}},allowBlur:function(b){var a=this._.panel;if(b!=void 0)a.allowBlur=b;return a.allowBlur},showAsChild:function(b,a,c,d,g,h){if(!(this._.activeChild==b&&b._.panel._.offsetParentId==
c.getId())){this.hideChild();b.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this);this._.activeChild=b;this._.focused=false;b.showBlock(a,c,d,g,h);this.blur();(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){b.element.getChild(0).$.style.cssText+=""},100)}},hideChild:function(b){var a=this._.activeChild;if(a){delete a.onHide;delete this._.activeChild;a.hide();b&&this.focus()}}}});CKEDITOR.on("instanceDestroyed",
function(){var b=CKEDITOR.tools.isEmpty(CKEDITOR.instances),a;for(a in d){var c=d[a];b?c.destroy():c.element.hide()}b&&(d={})})}(),CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(c){function d(a,d,f,j){var k=new CKEDITOR.style(e["colorButton_"+d+"Style"]),o=CKEDITOR.tools.getNextId()+"_colorBox";c.ui.add(a,CKEDITOR.UI_PANELBUTTON,{label:f,title:f,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+j,allowedContent:k,requiredContent:k,panel:{css:CKEDITOR.skin.getPath("editor"),
attributes:{role:"listbox","aria-label":i.panelTitle}},onBlock:function(a,e){e.autoSize=true;e.element.addClass("cke_colorblock");e.element.setHtml(b(a,d,o));e.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var f=e.keys,g=c.lang.dir=="rtl";f[g?37:39]="next";f[40]="next";f[9]="next";f[g?39:37]="prev";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]="click"},refresh:function(){c.activeFilter.check(k)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var a=
c.getSelection(),a=a&&a.getStartElement(),a=c.elementPath(a),b;if(a){a=a.block||a.blockLimit||c.document.getBody();do b=a&&a.getComputedStyle(d=="back"?"background-color":"color")||"transparent";while(d=="back"&&b=="transparent"&&a&&(a=a.getParent()));if(!b||b=="transparent")b="#ffffff";this._.panel._.iframe.getFrameDocument().getById(o).setStyle("background-color",b);return b}}})}function b(b,d,f){var j=[],k=e.colorButton_colors.split(","),o=CKEDITOR.tools.addFunction(function(d,f){if(d=="?"){var i=
arguments.callee,h=function(a){this.removeListener("ok",h);this.removeListener("cancel",h);a.name=="ok"&&i(this.getContentElement("picker","selectedColor").getValue(),f)};c.openDialog("colordialog",function(){this.on("ok",h);this.on("cancel",h)})}else{c.focus();b.hide();c.fire("saveSnapshot");c.removeStyle(new CKEDITOR.style(e["colorButton_"+f+"Style"],{color:"inherit"}));if(d){var j=e["colorButton_"+f+"Style"];j.childRule=f=="back"?function(b){return a(b)}:function(b){return!(b.is("a")||b.getElementsByTag("a").count())||
a(b)};c.applyStyle(new CKEDITOR.style(j,{color:d}))}c.fire("saveSnapshot")}});j.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',i.auto,'" onclick="CKEDITOR.tools.callFunction(',o,",null,'",d,"');return false;\" href=\"javascript:void('",i.auto,'\')" role="option"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',f,'"></span></td><td colspan=7 align=center>',i.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');
for(f=0;f<k.length;f++){f%8===0&&j.push("</tr><tr>");var n=k[f].split("/"),q=n[0],l=n[1]||q;n[1]||(q="#"+q.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));n=c.lang.colorbutton.colors[l]||l;j.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',n,'" onclick="CKEDITOR.tools.callFunction(',o,",'",q,"','",d,"'); return false;\" href=\"javascript:void('",n,'\')" role="option"><span class="cke_colorbox" style="background-color:#',l,'"></span></a></td>')}(c.plugins.colordialog&&e.colorButton_enableMore===
void 0||e.colorButton_enableMore)&&j.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',i.more,'" onclick="CKEDITOR.tools.callFunction(',o,",'?','",d,"');return false;\" href=\"javascript:void('",i.more,"')\"",' role="option">',i.more,"</a></td>");j.push("</tr></table>");return j.join("")}function a(a){return a.getAttribute("contentEditable")=="false"||a.getAttribute("data-nostyle")}var e=c.config,i=c.lang.colorbutton;if(!CKEDITOR.env.hc){d("TextColor",
"fore",i.textColorTitle,10);d("BGColor","back",i.bgColorTitle,20)}}}),CKEDITOR.config.colorButton_colors="000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},
CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.colordialog={requires:"dialog",init:function(c){var d=new CKEDITOR.dialogCommand("colordialog");d.editorFocus=false;c.addCommand("colordialog",d);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");c.getColorFromDialog=function(b,a){var e=function(c){this.removeListener("ok",e);this.removeListener("cancel",e);c=c.name=="ok"?this.getValueOf("picker","selectedColor"):null;
b.call(a,c)},d=function(a){a.on("ok",e);a.on("cancel",e)};c.execCommand("colordialog");if(c._.storedDialogs&&c._.storedDialogs.colordialog)d(c._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if(a.data.name=="colordialog"){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){d(this);b.onLoad=a;typeof a=="function"&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("menu",
{requires:"floatpanel",beforeInit:function(c){for(var d=c.config.menu_groups.split(","),b=c._.menuGroups={},a=c._.menuItems={},e=0;e<d.length;e++)b[d[e]]=e+1;c.addMenuGroup=function(a,c){b[a]=c||100};c.addMenuItem=function(c,e){b[e.group]&&(a[c]=new CKEDITOR.menuItem(this,c,e))};c.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};c.getMenuItem=function(b){return a[b]};c.removeMenuItem=function(b){delete a[b]}}}),function(){function c(a){a.sort(function(a,b){return a.group<b.group?
-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var d='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem" aria-haspopup="{hasPopup}" aria-disabled="{disabled}"';if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)d=d+' onkeypress="return false;"';CKEDITOR.env.gecko&&(d=d+' onblur="this.style.cssText = this.style.cssText;"');
var d=d+(' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'),b=CKEDITOR.addTemplate("menuItem",d+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{arrowHtml}</span></a></span>'),
a=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),d=c.block.attributes=c.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=
this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var f=0;f<d.length;f++){var j=d[f](b,a,c);if(j)for(var k in j){var o=this.editor.getMenuItem(k);if(o&&(!o.command||this.editor.getCommand(o.command).state)){o.state=j[k];this.add(o)}}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):a==27&&this.hide(1);return false},
onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){if(b)b.removeAll();else{b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},true));b.parent=this;b._.onClick=CKEDITOR.tools.bind(this._.onClick,this)}for(var d in c){var f=this.editor.getMenuItem(d);if(f){f.state=c[d];b.add(f)}}var j=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
(""+a));setTimeout(function(){b.show(j,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){if(!a.order)a.order=this.items.length;this.items.push(a)},removeAll:function(){this.items=[]},show:function(a,b,d,h){if(!this.parent){this._.onShow();if(!this.items.length)return}var b=b||(this.editor.lang.dir=="rtl"?2:1),f=this.items,j=this.editor,k=this._.panel,o=this._.element;if(!k){k=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
k.onEscape=CKEDITOR.tools.bind(function(a){if(this._.onEscape(a)===false)return false},this);k.onShow=function(){k._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")};k.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);o=k.addBlock(this.id,this._.panelDefinition.block);o.autoSize=true;var n=o.keys;n[40]="next";n[9]="next";n[38]="prev";n[CKEDITOR.SHIFT+9]="prev";n[j.lang.dir=="rtl"?37:39]=CKEDITOR.env.ie?"mouseup":"click";n[32]=CKEDITOR.env.ie?"mouseup":
"click";CKEDITOR.env.ie&&(n[13]="mouseup");o=this._.element=o.element;n=o.getDocument();n.getBody().setStyle("overflow","hidden");n.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,j.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);
this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}c(f);for(var n=j.elementPath(),n=['<div class="cke_menu'+(n&&n.direction()!=j.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],q=f.length,l=q&&f[0].group,m=0;m<q;m++){var r=f[m];if(l!=r.group){n.push('<div class="cke_menuseparator" role="separator"></div>');l=r.group}r.render(this,m,n)}n.push("</div>");
o.setHtml(n.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(k,this.id,a,b,d,h):k.showBlock(this.id,a,b,d,h);j.fire("menuShow",[k])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=
b},proto:{render:function(c,d,g){var h=c.id+(""+d),f=typeof this.state=="undefined"?CKEDITOR.TRISTATE_OFF:this.state,j=f==CKEDITOR.TRISTATE_ON?"on":f==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",k=this.getItems,o="&#"+(this.editor.lang.dir=="rtl"?"9668":"9658")+";",n=this.name;if(this.icon&&!/\./.test(this.icon))n=this.icon;c={id:h,name:this.name,iconName:n,label:this.label,cls:this.className||"",state:j,hasPopup:k?"true":"false",disabled:f==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+
(this.label||"").replace("'")+"')",hoverFn:c._.itemOverFn,moveOutFn:c._.itemOutFn,clickFn:c._.itemClickFn,index:d,iconStyle:CKEDITOR.skin.getIconStyle(n,this.editor.lang.dir=="rtl",n==this.icon?null:this.icon,this.iconOffset),arrowHtml:k?a.output({label:o}):""};b.output(c,g)}}})}(),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(c){this.base.call(this,c,{panel:{className:"cke_menu_panel",attributes:{"aria-label":c.lang.contextmenu.options}}})},proto:{addTarget:function(c,d){if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)){var b;c.on("mousedown",function(a){a=a.data;if(a.$.button!=2)a.getKeystroke()==CKEDITOR.CTRL+1&&c.fire("contextmenu",a);else if(!d||!(CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey)){var e=
a.getTarget();if(!b){e=e.getDocument();b=e.createElement("input");b.$.type="button";e.getBody().append(b)}b.setAttribute("style","position:absolute;top:"+(a.$.clientY-2)+"px;left:"+(a.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}});c.on("mouseup",function(a){if(b){b.remove();b=void 0;c.fire("contextmenu",a.data)}})}c.on("contextmenu",function(b){b=b.data;if(!d||!(CKEDITOR.env.webkit?a:CKEDITOR.env.mac?b.$.metaKey:b.$.ctrlKey)){b.preventDefault();var c=b.getTarget().getDocument(),e=b.getTarget().getDocument().getDocumentElement(),
f=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),j=f?b.$.clientX:b.$.pageX||c.x+b.$.clientX,k=f?b.$.clientY:b.$.pageY||c.y+b.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(e,null,j,k)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.opera)c.on("keypress",function(a){a=a.data;a.$.keyCode===0&&a.preventDefault()});if(CKEDITOR.env.webkit){var a,e=function(){a=0};c.on("keydown",function(b){a=CKEDITOR.env.mac?b.data.$.metaKey:b.data.$.ctrlKey});c.on("keyup",e);c.on("contextmenu",
e)}},open:function(c,d,b,a){this.editor.focus();c=c||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);this.show(c,d,b,a)}}})},beforeInit:function(c){var d=c.contextMenu=new CKEDITOR.plugins.contextMenu(c);c.on("contentDom",function(){d.addTarget(c.editable(),c.config.browserContextMenuOnCtrl!==false)});c.addCommand("contextMenu",{exec:function(){c.contextMenu.open(c.document.getBody())}});c.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");c.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+
121,"contextMenu")}}),function(){function c(a){var b=this.att,a=a&&a.hasAttribute(b)&&a.getAttribute(b)||"";a!==void 0&&this.setValue(a)}function d(){for(var a,b=0;b<arguments.length;b++)if(arguments[b]instanceof CKEDITOR.dom.element){a=arguments[b];break}if(a){var b=this.att,c=this.getValue();c?a.setAttribute(b,c):a.removeAttribute(b,c)}}var b={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=b);var c=[];a.id&&c.push("id");a.dir&&
c.push("dir");var d="";c.length&&(d=d+("["+c.join(",")+"]"));a.classes&&(d=d+"(*)");a.styles&&(d=d+"{*}");return d},createAdvancedTab:function(a,e,i){e||(e=b);var g=a.lang.common,h={id:"advanced",label:g.advancedTab,title:g.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},f=[];if(e.id||e.dir){e.id&&f.push({id:"advId",att:"id",type:"text",requiredContent:i?i+"[id]":null,label:g.id,setup:c,commit:d});e.dir&&f.push({id:"advLangDir",att:"dir",type:"select",requiredContent:i?i+"[dir]":null,
label:g.langDir,"default":"",style:"width:100%",items:[[g.notSet,""],[g.langDirLTR,"ltr"],[g.langDirRTL,"rtl"]],setup:c,commit:d});h.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(f)})}if(e.styles||e.classes){f=[];e.styles&&f.push({id:"advStyles",att:"style",type:"text",requiredContent:i?i+"{cke-xyz}":null,label:g.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(g.invalidInlineStyle),onChange:function(){},getStyle:function(a,b){var c=this.getValue().match(RegExp("(?:^|;)\\s*"+
a+"\\s*:\\s*([^;]*)","i"));return c?c[1]:b},updateStyle:function(b,c){var e=this.getValue(),d=a.document.createElement("span");d.setAttribute("style",e);d.setStyle(b,c);e=CKEDITOR.tools.normalizeCssText(d.getAttribute("style"));this.setValue(e,1)},setup:c,commit:d});e.classes&&f.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:i?i+"(cke-xyz)":null,label:g.cssClasses,"default":"",setup:c,commit:d}]});h.elements[0].children.push({type:"hbox",
widths:["50%","50%"],children:[].concat(f)})}return h}})}(),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(c){if(!c.blockless){var d=c.lang.div,b="div(*)";CKEDITOR.dialog.isTabEnabled(c,"editdiv","advanced")&&(b=b+";div[dir,id,lang,title]{*}");c.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:b,requiredContent:"div",contextSensitive:true,refresh:function(a,b){this.setState("div"in(a.config.div_wrapTable?b.root:b.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED)}}));c.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));c.addCommand("removediv",{requiredContent:"div",exec:function(a){function b(c){if((c=CKEDITOR.plugins.div.getSurroundDiv(a,c))&&!c.data("cke-div-added")){j.push(c);c.data("cke-div-added")}}for(var c=a.getSelection(),d=c&&c.getRanges(),h,f=c.createBookmarks(),j=[],k=0;k<d.length;k++){h=d[k];if(h.collapsed)b(c.getStartElement());else{h=new CKEDITOR.dom.walker(h);h.evaluator=b;h.lastForward()}}for(k=
0;k<j.length;k++)j[k].remove(true);c.selectBookmarks(f)}});c.ui.addButton&&c.ui.addButton("CreateDiv",{label:d.toolbar,command:"creatediv",toolbar:"blocks,50"});if(c.addMenuItems){c.addMenuItems({editdiv:{label:d.edit,command:"editdiv",group:"div",order:1},removediv:{label:d.remove,command:"removediv",group:"div",order:5}});c.contextMenu&&c.contextMenu.addListener(function(a){return!a||a.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(c)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:
null})}CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});CKEDITOR.plugins.div={getSurroundDiv:function(c,d){var b=c.elementPath(d);return c.elementPath(b.blockLimit).contains(function(a){return a.is("div")&&!a.isReadOnly()},1)}}}(),function(){var c;function d(a,d){function h(b){b=o.list[b];if(b.equals(a.editable())||b.getAttribute("contenteditable")=="true"){var c=a.createRange();c.selectNodeContents(b);c.select()}else a.getSelection().selectElement(b);
a.focus()}function f(){k&&k.setHtml(b);delete o.list}var j=a.ui.spaceId("path"),k,o=a._.elementsPath,n=o.idBase;d.html=d.html+('<span id="'+j+'_label" class="cke_voice_label">'+a.lang.elementspath.eleLabel+'</span><span id="'+j+'" class="cke_path" role="group" aria-labelledby="'+j+'_label">'+b+"</span>");a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});o.onClick=h;var q=CKEDITOR.tools.addFunction(h),l=CKEDITOR.tools.addFunction(function(b,c){var e=o.idBase,d,c=new CKEDITOR.dom.event(c);
d=a.lang.dir=="rtl";switch(c.getKeystroke()){case d?39:37:case 9:(d=CKEDITOR.document.getById(e+(b+1)))||(d=CKEDITOR.document.getById(e+"0"));d.focus();return false;case d?37:39:case CKEDITOR.SHIFT+9:(d=CKEDITOR.document.getById(e+(b-1)))||(d=CKEDITOR.document.getById(e+(o.list.length-1)));d.focus();return false;case 27:a.focus();return false;case 13:case 32:h(b);return false}return true});a.on("selectionChange",function(){a.editable();for(var c=[],d=o.list=[],f=[],g=o.filters,h=true,A=a.elementPath().elements,
y,u=A.length;u--;){var s=A[u],w=0;y=s.data("cke-display-name")?s.data("cke-display-name"):s.data("cke-real-element-type")?s.data("cke-real-element-type"):s.getName();h=s.hasAttribute("contenteditable")?s.getAttribute("contenteditable")=="true":h;!h&&!s.hasAttribute("contenteditable")&&(w=1);for(var x=0;x<g.length;x++){var v=g[x](s,y);if(v===false){w=1;break}y=v||y}if(!w){d.unshift(s);f.unshift(y)}}d=d.length;for(g=0;g<d;g++){y=f[g];h=a.lang.elementspath.eleTitle.replace(/%1/,y);y=e.output({id:n+g,
label:h,text:y,jsTitle:"javascript:void('"+y+"')",index:g,keyDownFn:l,clickFn:q});c.unshift(y)}k||(k=CKEDITOR.document.getById(j));f=k;f.setHtml(c.join("")+b);a.fire("elementsPathUpdate",{space:f})});a.on("readOnly",f);a.on("contentDomUnload",f);a.addCommand("elementsPathFocus",c);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}c={editorFocus:false,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}};var b='<span class="cke_path_empty">&nbsp;</span>',
a="";if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)a=a+' onkeypress="return false;"';CKEDITOR.env.gecko&&(a=a+' onblur="this.style.cssText = this.style.cssText;"');var e=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900?' onfocus="event.preventBubble();"':"")+a+' hidefocus="true"  onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');
CKEDITOR.plugins.add("elementspath",{init:function(a){a._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};a.on("uiSpace",function(b){b.data.space=="bottom"&&d(a,b.data)})}})}(),function(){function c(a,b,c){c=a.config.forceEnterMode||c;if(a.mode=="wysiwyg"){if(!b)b=a.activeEnterMode;if(!a.elementPath().isContextFor("p")){b=CKEDITOR.ENTER_BR;c=1}a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?i(a,b,null,c):g(a,b,null,c);a.fire("saveSnapshot")}}function d(a){for(var a=
a.getSelection().getRanges(true),b=a.length-1;b>0;b--)a[b].deleteContents();return a[0]}CKEDITOR.plugins.add("enterkey",{init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:false,exec:function(a){c(a)}});a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:false,exec:function(a){c(a,a.activeShiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var b=CKEDITOR.dom.walker.whitespaces(),a=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(c,
e,g,o){if(g=g||d(c)){var n=g.document,q=g.checkStartOfBlock(),l=g.checkEndOfBlock(),m=c.elementPath(g.startContainer).block,r=e==CKEDITOR.ENTER_DIV?"div":"p",p;if(q&&l){if(m&&(m.is("li")||m.getParent().is("li"))){g=m.getParent();p=g.getParent();var o=!m.hasPrevious(),z=!m.hasNext(),r=c.getSelection(),t=r.createBookmarks(),q=m.getDirection(1),l=m.getAttribute("class"),A=m.getAttribute("style"),y=p.getDirection(1)!=q,c=c.enterMode!=CKEDITOR.ENTER_BR||y||A||l;if(p.is("li"))if(o||z)m[o?"insertBefore":
"insertAfter"](p);else m.breakParent(p);else{if(c){p=n.createElement(e==CKEDITOR.ENTER_P?"p":"div");y&&p.setAttribute("dir",q);A&&p.setAttribute("style",A);l&&p.setAttribute("class",l);m.moveChildren(p);if(o||z)p[o?"insertBefore":"insertAfter"](g);else{m.breakParent(g);p.insertAfter(g)}}else{m.appendBogus(true);if(o||z)for(;n=m[o?"getFirst":"getLast"]();)n[o?"insertBefore":"insertAfter"](g);else for(m.breakParent(g);n=m.getLast();)n.insertAfter(g)}m.remove()}r.selectBookmarks(t);return}if(m&&m.getParent().is("blockquote")){m.breakParent(m.getParent());
m.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getPrevious().remove();m.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getNext().remove();g.moveToElementEditStart(m);g.select();return}}else if(m&&m.is("pre")&&!l){i(c,e,g,o);return}if(l=g.splitBlock(r)){e=l.previousBlock;m=l.nextBlock;c=l.wasStartOfBlock;q=l.wasEndOfBlock;if(m){t=m.getParent();if(t.is("li")){m.breakParent(t);m.move(m.getNext(),1)}}else if(e&&(t=e.getParent())&&t.is("li")){e.breakParent(t);t=e.getNext();g.moveToElementEditStart(t);
e.move(e.getPrevious())}if(!c&&!q){if(m.is("li")){p=g.clone();p.selectNodeContents(m);p=new CKEDITOR.dom.walker(p);p.evaluator=function(c){return!(a(c)||b(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in CKEDITOR.dtd.$inline&&!(c.getName()in CKEDITOR.dtd.$empty))};(t=p.next())&&(t.type==CKEDITOR.NODE_ELEMENT&&t.is("ul","ol"))&&(CKEDITOR.env.needsBrFiller?n.createElement("br"):n.createText(" ")).insertBefore(t)}m&&g.moveToElementEditStart(m)}else{if(e){if(e.is("li")||!h.test(e.getName())&&!e.is("pre"))p=
e.clone()}else m&&(p=m.clone());if(p)o&&!p.is("li")&&p.renameNode(r);else if(t&&t.is("li"))p=t;else{p=n.createElement(r);e&&(z=e.getDirection())&&p.setAttribute("dir",z)}if(n=l.elementPath){o=0;for(r=n.elements.length;o<r;o++){t=n.elements[o];if(t.equals(n.block)||t.equals(n.blockLimit))break;if(CKEDITOR.dtd.$removeEmpty[t.getName()]){t=t.clone();p.moveChildren(t);p.append(t)}}}p.appendBogus();p.getParent()||g.insertNode(p);p.is("li")&&p.removeAttribute("value");if(CKEDITOR.env.ie&&c&&(!q||!e.getChildCount())){g.moveToElementEditStart(q?
e:p);g.select()}g.moveToElementEditStart(c&&!q?m:p)}g.select();g.scrollIntoView()}}},enterBr:function(a,b,c,e){if(c=c||d(a)){var i=c.document,q=c.checkEndOfBlock(),l=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),m=l.block,l=m&&l.block.getName();if(!e&&l=="li")g(a,b,c,e);else{if(!e&&q&&h.test(l))if(q=m.getDirection()){i=i.createElement("div");i.setAttribute("dir",q);i.insertAfter(m);c.setStart(i,0)}else{i.createElement("br").insertAfter(m);CKEDITOR.env.gecko&&i.createText("").insertAfter(m);
c.setStartAt(m.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)}else{m=l=="pre"&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?i.createText("\r"):i.createElement("br");c.deleteContents();c.insertNode(m);if(CKEDITOR.env.needsBrFiller){i.createText("﻿").insertAfter(m);q&&m.getParent().appendBogus();m.getNext().$.nodeValue="";c.setStartAt(m.getNext(),CKEDITOR.POSITION_AFTER_START)}else c.setStartAt(m,CKEDITOR.POSITION_AFTER_END)}c.collapse(true);c.select();c.scrollIntoView()}}}};
var e=CKEDITOR.plugins.enterkey,i=e.enterBr,g=e.enterBlock,h=/^h[1-6]$/}(),function(){function c(c,b){var a={},e=[],i={nbsp:" ",shy:"­",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},c=c.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(c,d){var f=b?"&"+d+";":i[d];a[f]=b?i[d]:"&"+d+";";e.push(f);return""});if(!b&&c){var c=c.split(","),g=document.createElement("div"),h;g.innerHTML="&"+c.join(";&")+";";h=g.innerHTML;g=null;for(g=0;g<h.length;g++){var f=h.charAt(g);a[f]="&"+c[g]+";";e.push(f)}}a.regex=
e.join(b?"|":"");return a}CKEDITOR.plugins.add("entities",{afterInit:function(d){var b=d.config;if(d=(d=d.dataProcessor)&&d.htmlFilter){var a=[];b.basicEntities!==false&&a.push("nbsp,gt,lt,amp");if(b.entities){a.length&&a.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");
b.entities_latin&&a.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");b.entities_greek&&a.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");
b.entities_additional&&a.push(b.entities_additional)}var e=c(a.join(",")),i=e.regex?"["+e.regex+"]":"a^";delete e.regex;b.entities&&b.entities_processNumerical&&(i="[^ -~]|"+i);var i=RegExp(i,"g"),g=function(a){return b.entities_processNumerical=="force"||!e[a]?"&#"+a.charCodeAt(0)+";":e[a]},h=c("nbsp,gt,lt,amp,shy",true),f=RegExp(h.regex,"g"),j=function(a){return h[a]};d.addRules({text:function(a){return a.replace(f,j).replace(i,g)}})}}})}(),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(c,d,b,a){d=d||"80%";b=b||"70%";typeof d=="string"&&(d.length>1&&d.substr(d.length-1,1)=="%")&&(d=parseInt(window.screen.width*parseInt(d,10)/100,10));typeof b=="string"&&(b.length>1&&b.substr(b.length-1,1)=="%")&&(b=parseInt(window.screen.height*parseInt(b,10)/100,10));d<640&&(d=640);b<420&&(b=
420);var e=parseInt((window.screen.height-b)/2,10),i=parseInt((window.screen.width-d)/2,10),a=(a||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+d+",height="+b+",top="+e+",left="+i,g=window.open("",null,a,true);if(!g)return false;try{if(navigator.userAgent.toLowerCase().indexOf(" chrome/")==-1){g.moveTo(i,e);g.resizeTo(d,b)}g.focus();g.location.href=c}catch(h){window.open(c,null,a,true)}return true}}),function(){function c(a,
b){var c=[];if(b)for(var e in b)c.push(e+"="+encodeURIComponent(b[e]));else return a;return a+(a.indexOf("?")!=-1?"&":"?")+c.join("&")}function d(a){a=a+"";return a.charAt(0).toUpperCase()+a.substr(1)}function b(){var a=this.getDialog(),b=a.getParentEditor();b._.filebrowserSe=this;var e=b.config["filebrowser"+d(a.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",a=b.config["filebrowser"+d(a.getName())+"WindowHeight"]||b.config.filebrowserWindowHeight||"70%",g=this.filebrowser.params||
{};g.CKEditor=b.name;g.CKEditorFuncNum=b._.filebrowserFn;if(!g.langCode)g.langCode=b.langCode;g=c(this.filebrowser.url,g);b.popup(g,e,a,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function a(){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()?false:true}function e(a,b,e){var d=e.params||{};d.CKEditor=a.name;d.CKEditorFuncNum=
a._.filebrowserFn;if(!d.langCode)d.langCode=a.langCode;b.action=c(e.url,d);b.filebrowser=e}function i(c,g,h,o){if(o&&o.length)for(var n,q=o.length;q--;){n=o[q];(n.type=="hbox"||n.type=="vbox"||n.type=="fieldset")&&i(c,g,h,n.children);if(n.filebrowser){if(typeof n.filebrowser=="string")n.filebrowser={action:n.type=="fileButton"?"QuickUpload":"Browse",target:n.filebrowser};if(n.filebrowser.action=="Browse"){var l=n.filebrowser.url;if(l===void 0){l=c.config["filebrowser"+d(g)+"BrowseUrl"];if(l===void 0)l=
c.config.filebrowserBrowseUrl}if(l){n.onClick=b;n.filebrowser.url=l;n.hidden=false}}else if(n.filebrowser.action=="QuickUpload"&&n["for"]){l=n.filebrowser.url;if(l===void 0){l=c.config["filebrowser"+d(g)+"UploadUrl"];if(l===void 0)l=c.config.filebrowserUploadUrl}if(l){var m=n.onClick;n.onClick=function(b){var c=b.sender;return m&&m.call(c,b)===false?false:a.call(c,b)};n.filebrowser.url=l;n.hidden=false;e(c,h.getContents(n["for"][0]).get(n["for"][1]),n.filebrowser)}}}}}function g(a,b,c){if(c.indexOf(";")!==
-1){for(var c=c.split(";"),e=0;e<c.length;e++)if(g(a,b,c[e]))return true;return false}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function h(a,b){var c=this._.filebrowserSe.getDialog(),e=this._.filebrowserSe["for"],d=this._.filebrowserSe.filebrowser.onSelect;e&&c.getContentElement(e[0],e[1]).reset();if(!(typeof b=="function"&&b.call(this._.filebrowserSe)===false)&&!(d&&d.call(this._.filebrowserSe,a,b)===false)){typeof b=="string"&&b&&alert(b);if(a){e=this._.filebrowserSe;c=e.getDialog();
if(e=e.filebrowser.target||null){e=e.split(":");if(d=c.getContentElement(e[0],e[1])){d.setValue(a);c.selectPage(e[0])}}}}}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(h,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){for(var b=a.data.definition,c,e=0;e<b.contents.length;++e)if(c=b.contents[e]){i(a.editor,a.data.name,b,c.elements);if(c.hidden&&c.filebrowser)c.hidden=
!g(b,c.id,c.filebrowser)}})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(c){var d=c.addCommand("find",new CKEDITOR.dialogCommand("find"));d.canUndo=false;d.readOnly=1;c.addCommand("replace",new CKEDITOR.dialogCommand("replace")).canUndo=false;if(c.ui.addButton){c.ui.addButton("Find",{label:c.lang.find.find,command:"find",toolbar:"find,10"});c.ui.addButton("Replace",{label:c.lang.find.replace,command:"replace",toolbar:"find,20"})}CKEDITOR.dialog.add("find",this.path+"dialogs/find.js");
CKEDITOR.dialog.add("replace",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},function(){function c(b,c){var e=a.exec(b),d=a.exec(c);if(e){if(!e[2]&&d[2]=="px")return d[1];if(e[2]=="px"&&!d[2])return d[1]+"px"}return c}var d=CKEDITOR.htmlParser.cssStyle,b=CKEDITOR.tools.cssLength,a=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,e={elements:{$:function(a){var b=a.attributes;if((b=(b=(b=b&&b["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(b)))&&
b.children[0])&&a.attributes["data-cke-resizable"]){var e=(new d(a)).rules,a=b.attributes,i=e.width,e=e.height;i&&(a.width=c(a.width,i));e&&(a.height=c(a.height,e))}return b}}},i=CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(e)}});CKEDITOR.editor.prototype.createFakeElement=function(a,c,e,j){var k=this.lang.fakeobjects,k=k[e]||k.unknown,c={"class":c,
"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,alt:k,title:k,align:a.getAttribute("align")||""};if(!CKEDITOR.env.hc)c.src=CKEDITOR.getUrl(i.path+"images/spacer.gif");e&&(c["data-cke-real-element-type"]=e);if(j){c["data-cke-resizable"]=j;e=new d;j=a.getAttribute("width");a=a.getAttribute("height");j&&(e.rules.width=b(j));a&&(e.rules.height=b(a));e.populate(c)}return this.document.createElement("img",{attributes:c})};CKEDITOR.editor.prototype.createFakeParserElement=
function(a,c,e,j){var k=this.lang.fakeobjects,k=k[e]||k.unknown,o;o=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(o);o=o.getHtml();c={"class":c,"data-cke-realelement":encodeURIComponent(o),"data-cke-real-node-type":a.type,alt:k,title:k,align:a.attributes.align||""};if(!CKEDITOR.env.hc)c.src=CKEDITOR.getUrl(i.path+"images/spacer.gif");e&&(c["data-cke-real-element-type"]=e);if(j){c["data-cke-resizable"]=j;j=a.attributes;a=new d;e=j.width;j=j.height;e!=void 0&&(a.rules.width=b(e));j!=void 0&&(a.rules.height=
b(j));a.populate(c)}return new CKEDITOR.htmlParser.element("img",c)};CKEDITOR.editor.prototype.restoreRealElement=function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var b=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(a.data("cke-realelement")),this.document);if(a.data("cke-resizable")){var e=a.getStyle("width"),a=a.getStyle("height");e&&b.setAttribute("width",c(b.getAttribute("width"),e));a&&b.setAttribute("height",c(b.getAttribute("height"),a))}return b}}(),function(){function c(a){a=
a.attributes;return a.type=="application/x-shockwave-flash"||b.test(a.src||"")}function d(a,b){return a.createFakeParserElement(b,"cke_flash","flash",true)}var b=/\.swf(?:$|\?)/i;CKEDITOR.plugins.add("flash",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_flash{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(a){var b=
"object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]";CKEDITOR.dialog.isTabEnabled(a,"flash","properties")&&(b=b+";object[align]; embed[allowscriptaccess,quality,scale,wmode]");CKEDITOR.dialog.isTabEnabled(a,"flash","advanced")&&(b=b+";object[id]{*}; embed[bgcolor]{*}(*)");a.addCommand("flash",new CKEDITOR.dialogCommand("flash",{allowedContent:b,requiredContent:"embed"}));a.ui.addButton&&a.ui.addButton("Flash",{label:a.lang.common.flash,
command:"flash",toolbar:"insert,20"});CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js");a.addMenuItems&&a.addMenuItems({flash:{label:a.lang.flash.properties,command:"flash",group:"flash"}});a.on("doubleclick",function(a){var b=a.data.element;if(b.is("img")&&b.data("cke-real-element-type")=="flash")a.data.dialog="flash"});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&!a.isReadOnly()&&a.data("cke-real-element-type")=="flash")return{flash:CKEDITOR.TRISTATE_OFF}})},afterInit:function(a){var b=
a.dataProcessor;(b=b&&b.dataFilter)&&b.addRules({elements:{"cke:object":function(b){var e=b.attributes;if((!e.classid||!(""+e.classid).toLowerCase())&&!c(b)){for(e=0;e<b.children.length;e++)if(b.children[e].name=="cke:embed"){if(!c(b.children[e]))break;return d(a,b)}return null}return d(a,b)},"cke:embed":function(b){return!c(b)?null:d(a,b)}}},5)}})}(),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),function(){function c(c){var i=c.config,g=c.fire("uiSpace",
{space:"top",html:""}).html,h=function(){function d(b,c,e){f.setStyle(c,a(e));f.setStyle("position",b)}function g(a){var b=l.getDocumentPosition();switch(a){case "top":d("absolute","top",b.y-z-y);break;case "pin":d("fixed","top",s);break;case "bottom":d("absolute","top",b.y+(r.height||r.bottom-r.top)+y)}j=a}var j,l,k,r,p,z,t,A=i.floatSpaceDockedOffsetX||0,y=i.floatSpaceDockedOffsetY||0,u=i.floatSpacePinnedOffsetX||0,s=i.floatSpacePinnedOffsetY||0;return function(d){if(l=c.editable()){d&&d.name=="focus"&&
f.show();f.removeStyle("left");f.removeStyle("right");k=f.getClientRect();r=l.getClientRect();p=b.getViewPaneSize();z=k.height;t="pageXOffset"in b.$?b.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;if(j){z+y<=r.top?g("top"):z+y>p.height-r.bottom?g("pin"):g("bottom");var d=p.width/2,d=r.left>0&&r.right<p.width&&r.width>k.width?c.config.contentsLangDirection=="rtl"?"right":"left":d-r.left>r.right-d?"left":"right",i;if(k.width>p.width){d="left";i=0}else{i=d=="left"?r.left>0?r.left:0:r.right<
p.width?p.width-r.right:0;if(i+k.width>p.width){d=d=="left"?"right":"left";i=0}}f.setStyle(d,a((j=="pin"?u:A)+i+(j=="pin"?0:d=="left"?t:-t)))}else{j="pin";g("pin");h(d)}}}}();if(g){var f=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(d.output({content:g,id:c.id,langDir:c.lang.dir,langCode:c.langCode,name:c.name,style:"display:none;z-index:"+(i.baseFloatZIndex-1),topId:c.ui.spaceId("top"),voiceLabel:c.lang.editorPanel+", "+c.name}))),j=CKEDITOR.tools.eventsBuffer(500,h),k=CKEDITOR.tools.eventsBuffer(100,
h);f.unselectable();f.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});c.on("focus",function(a){h(a);c.on("change",j.input);b.on("scroll",k.input);b.on("resize",k.input)});c.on("blur",function(){f.hide();c.removeListener("change",j.input);b.removeListener("scroll",k.input);b.removeListener("resize",k.input)});c.on("destroy",function(){b.removeListener("scroll",k.input);b.removeListener("resize",k.input);f.clearCustomData();f.remove()});c.focusManager.hasFocus&&
f.show();c.focusManager.add(f,1)}}var d=CKEDITOR.addTemplate("floatcontainer",'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'),
b=CKEDITOR.document.getWindow(),a=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){c(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var c=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),d=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')"  {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),
b=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>');CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){var b=b||{},c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(c["aria-multiselectable"]=true);!c.role&&(c.role="listbox");this.base.apply(this,
arguments);this.element.setAttribute("role",c.role);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=c.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);delete this._.started}},getClick:function(){if(!this._.click)this._.click=CKEDITOR.tools.addFunction(function(a){var b=
this.toggle(a);if(this.onClick)this.onClick(a,b)},this);return this._.click}},proto:{add:function(a,b,c){var g=CKEDITOR.tools.getNextId();if(!this._.started){this._.started=1;this._.size=this._.size||0}this._.items[a]=g;a={id:g,val:a,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:c||a,text:b||a};this._.pendingList.push(d.output(a))},startGroup:function(a){this._.close();var c=CKEDITOR.tools.getNextId();this._.groups[a]=c;this._.pendingHtml.push(b.output({id:c,
label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();if(a){a.setStyle("display","none");b&&b.getName()=="ul"&&b.setStyle("display","none")}},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},
showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),d;for(d in a)c.getById(a[d]).setStyle("display","");for(var h in b){a=c.getById(b[h]);d=a.getNext();a.setStyle("display","");d&&d.getName()=="ul"&&d.setStyle("display","")}},mark:function(a){this.multiSelect||this.unmarkAll();var a=this._.items[a],b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",true);this.onMark&&this.onMark(b)},
unmark:function(a){var b=this.element.getDocument(),a=this._.items[a],c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var d=a[c];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},
focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,d=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++d);){if(a.equals(c)){this._.focusIndex=d;break}}else this.element.focus();c&&setTimeout(function(){c.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var c='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" hidefocus=true title="{title}" tabindex="-1"'+
(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)c=c+' onkeypress="return false;"';CKEDITOR.env.gecko&&(c=c+' onblur="this.style.cssText = this.style.cssText;"');var c=c+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);"  onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+
(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"&#9660;":CKEDITOR.env.air?"&nbsp;":"")+"</span></span></a></span>"),d=CKEDITOR.addTemplate("combo",c);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(b){CKEDITOR.tools.extend(this,
b,{canGroup:false,title:b.label,modes:{wysiwyg:1},editorFocus:1});b=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=b.parent&&b.parent.getDocument()||CKEDITOR.document;b.className="cke_combopanel";b.block={multiSelect:b.multiSelect,attributes:b.attributes};b.toolbarRelated=true;this._={panelDefinition:b,items:{}}},proto:{renderHtml:function(b){var a=[];this.render(b,a);return a.join("")},render:function(b,a){function c(){var a=this.modes[b.mode]?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED;if(b.readOnly&&!this.readOnly)a=CKEDITOR.TRISTATE_DISABLED;this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}var i=CKEDITOR.env,g="cke_"+this.id,h=CKEDITOR.tools.addFunction(function(a){if(n){b.unlockSelection(1);n=0}j.execute(a)},this),f=this,j={id:g,combo:this,focus:function(){CKEDITOR.document.getById(g).getChild(1).focus()},execute:function(a){var c=f._;if(c.state!=CKEDITOR.TRISTATE_DISABLED){f.createPanel(b);if(c.on)c.panel.hide();
else{f.commit();var e=f.getValue();e?c.list.mark(e):c.list.unmarkAll();c.panel.showBlock(f.id,new CKEDITOR.dom.element(a),4)}}},clickFn:h};b.on("activeFilterChange",c,this);b.on("mode",c,this);!this.readOnly&&b.on("readOnly",c,this);var k=CKEDITOR.tools.addFunction(function(a,b){var a=new CKEDITOR.dom.event(a),c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(h,b);break;default:j.onkey(j,c)}a.preventDefault()}),o=CKEDITOR.tools.addFunction(function(){j.onfocus&&j.onfocus()}),
n=0,q=CKEDITOR.tools.addFunction(function(){if(CKEDITOR.env.opera){var a=b.editable();if(a.isInline()&&a.hasFocus){b.lockSelection();n=1}}});j.keyDownFn=k;i={id:g,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:i.gecko&&i.version>=10900&&!i.hc?"":(this.title||"").replace("'",""),keydownFn:k,mousedownFn:q,focusFn:o,clickFn:h};d.output(i,a);if(this.onRender)this.onRender();return j},createPanel:function(b){if(!this._.panel){var a=this._.panelDefinition,
c=this._.panelDefinition.block,d=a.parent||CKEDITOR.document.getBody(),g="cke_combopanel__"+this.name,h=new CKEDITOR.ui.floatPanel(b,d,a),f=h.addListBlock(this.id,c),j=this;h.onShow=function(){this.element.addClass(g);j.setState(CKEDITOR.TRISTATE_ON);j._.on=1;j.editorFocus&&!b.focusManager.hasFocus&&b.focus();if(j.onOpen)j.onOpen();b.once("panelShow",function(){f.focus(!f.multiSelect&&j.getValue())})};h.onHide=function(a){this.element.removeClass(g);j.setState(j.modes&&j.modes[b.mode]?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED);j._.on=0;if(!a&&j.onClose)j.onClose()};h.onEscape=function(){h.hide(1)};f.onClick=function(a,b){j.onClick&&j.onClick.call(j,a,b);h.hide()};this._.panel=h;this._.list=f;h.getBlock(this.id).onHide=function(){j._.on=0;j.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(b,a){this._.value=b;var c=this.document.getById("cke_"+this.id+"_text");if(c){if(!b&&!a){a=this.label;c.addClass("cke_combo_inlinelabel")}else c.removeClass("cke_combo_inlinelabel");
c.setText(typeof a!="undefined"?a:b)}},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(b){this._.list.mark(b)},hideItem:function(b){this._.list.hideItem(b)},hideGroup:function(b){this._.list.hideGroup(b)},showAll:function(){this._.list.showAll()},add:function(b,a,c){this._.items[b]=c||b;this._.list.add(b,a,c)},startGroup:function(b){this._.list.startGroup(b)},commit:function(){if(!this._.committed){this._.list.commit();this._.committed=1;CKEDITOR.ui.fire("ready",
this)}this._.committed=1},setState:function(b){if(this._.state!=b){var a=this.document.getById("cke_"+this.id);a.setState(b,"cke_combo");b==CKEDITOR.TRISTATE_DISABLED?a.setAttribute("aria-disabled",true):a.removeAttribute("aria-disabled");this._.state=b}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){if(this._.state!=CKEDITOR.TRISTATE_DISABLED){this._.lastState=this._.state;this.setState(CKEDITOR.TRISTATE_DISABLED)}}},
statics:{handler:{create:function(b){return new CKEDITOR.ui.richCombo(b)}}}});CKEDITOR.ui.prototype.addRichCombo=function(b,a){this.add(b,CKEDITOR.UI_RICHCOMBO,a)}}(),function(){function c(c,b,a,e,i,g,h,f){for(var j=c.config,k=new CKEDITOR.style(h),o=i.split(";"),i=[],n={},q=0;q<o.length;q++){var l=o[q];if(l){var l=l.split("/"),m={},r=o[q]=l[0];m[a]=i[q]=l[1]||r;n[r]=new CKEDITOR.style(h,m);n[r]._.definition.name=r}else o.splice(q--,1)}c.ui.addRichCombo(b,{label:e.label,title:e.panelTitle,toolbar:"styles,"+
f,allowedContent:k,requiredContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(j.contentsCss),multiSelect:false,attributes:{"aria-label":e.panelTitle}},init:function(){this.startGroup(e.panelTitle);for(var a=0;a<o.length;a++){var b=o[a];this.add(b,n[b].buildPreview(),b)}},onClick:function(a){c.focus();c.fire("saveSnapshot");var b=n[a];c[this.getValue()==a?"removeStyle":"applyStyle"](b);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(a){for(var b=this.getValue(),
a=a.data.path.elements,c=0,e;c<a.length;c++){e=a[c];for(var d in n)if(n[d].checkElementMatch(e,true)){d!=b&&this.setValue(d);return}}this.setValue("",g)},this)},refresh:function(){c.activeFilter.check(k)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(d){var b=d.config;c(d,"Font","family",d.lang.font,b.font_names,b.font_defaultLabel,b.font_style,30);c(d,"FontSize","size",d.lang.font.fontSize,b.fontSize_sizes,b.fontSize_defaultLabel,b.fontSize_style,
40)}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},
overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(c){if(!c.blockless){for(var d=c.config,b=c.lang.format,
a=d.format_tags.split(";"),e={},i=0,g=[],h=0;h<a.length;h++){var f=a[h],j=new CKEDITOR.style(d["format_"+f]);if(!c.filter.customConfig||c.filter.check(j)){i++;e[f]=j;e[f]._.enterMode=c.config.enterMode;g.push(j)}}i!==0&&c.ui.addRichCombo("Format",{label:b.label,title:b.panelTitle,toolbar:"styles,20",allowedContent:g,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(d.contentsCss),multiSelect:false,attributes:{"aria-label":b.panelTitle}},init:function(){this.startGroup(b.panelTitle);for(var a in e){var c=
b["tag_"+a];this.add(a,e[a].buildPreview(c),c)}},onClick:function(a){c.focus();c.fire("saveSnapshot");var a=e[a],b=c.elementPath();c[a.checkActive(b)?"removeStyle":"applyStyle"](a);setTimeout(function(){c.fire("saveSnapshot")},0)},onRender:function(){c.on("selectionChange",function(a){var b=this.getValue(),a=a.data.path;this.refresh();for(var d in e)if(e[d].checkActive(a)){d!=b&&this.setValue(d,c.lang.format["tag_"+d]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in e)c.activeFilter.check(e[a])||
this.hideItem(a)},refresh:function(){var a=c.elementPath();if(a){if(a.isContextFor("p"))for(var b in e)if(c.activeFilter.check(e[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"},CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}")},
init:function(c){var d=c.lang,b=0,a={email:1,password:1,search:1,tel:1,text:1,url:1},e={checkbox:"input[type,name,checked]",radio:"input[type,name,checked]",textfield:"input[type,name,value,size,maxlength]",textarea:"textarea[cols,rows,name]",select:"select[name,size,multiple]; option[value,selected]",button:"input[type,name,value]",form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},
i={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},g=function(a,f,g){var h={allowedContent:e[f],requiredContent:i[f]};f=="form"&&(h.context="form");c.addCommand(f,new CKEDITOR.dialogCommand(f,h));c.ui.addButton&&c.ui.addButton(a,{label:d.common[a.charAt(0).toLowerCase()+a.slice(1)],command:f,toolbar:"forms,"+(b=b+10)});CKEDITOR.dialog.add(f,g)},h=this.path+"dialogs/";!c.blockless&&g("Form","form",
h+"form.js");g("Checkbox","checkbox",h+"checkbox.js");g("Radio","radio",h+"radio.js");g("TextField","textfield",h+"textfield.js");g("Textarea","textarea",h+"textarea.js");g("Select","select",h+"select.js");g("Button","button",h+"button.js");var f=CKEDITOR.plugins.get("image");f&&g("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js");g("HiddenField","hiddenfield",h+"hiddenfield.js");if(c.addMenuItems){g={checkbox:{label:d.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",
group:"checkbox"},radio:{label:d.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:d.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:d.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:d.forms.button.title,command:"button",group:"button"},select:{label:d.forms.select.title,command:"select",group:"select"},textarea:{label:d.forms.textarea.title,command:"textarea",group:"textarea"}};if(f)g.imagebutton={label:d.image.titleButton,
command:"imagebutton",group:"imagebutton"};!c.blockless&&(g.form={label:d.forms.form.menu,command:"form",group:"form"});c.addMenuItems(g)}if(c.contextMenu){!c.blockless&&c.contextMenu.addListener(function(a,b,c){if((a=c.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}});c.contextMenu.addListener(function(b){if(b&&!b.isReadOnly()){var c=b.getName();if(c=="select")return{select:CKEDITOR.TRISTATE_OFF};if(c=="textarea")return{textarea:CKEDITOR.TRISTATE_OFF};if(c=="input"){var e=
b.getAttribute("type")||"text";switch(e){case "button":case "submit":case "reset":return{button:CKEDITOR.TRISTATE_OFF};case "checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case "radio":return{radio:CKEDITOR.TRISTATE_OFF};case "image":return f?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(a[e])return{textfield:CKEDITOR.TRISTATE_OFF}}if(c=="img"&&b.data("cke-real-element-type")=="hiddenfield")return{hiddenfield:CKEDITOR.TRISTATE_OFF}}})}c.on("doubleclick",function(b){var e=b.data.element;if(!c.blockless&&
e.is("form"))b.data.dialog="form";else if(e.is("select"))b.data.dialog="select";else if(e.is("textarea"))b.data.dialog="textarea";else if(e.is("img")&&e.data("cke-real-element-type")=="hiddenfield")b.data.dialog="hiddenfield";else if(e.is("input")){e=e.getAttribute("type")||"text";switch(e){case "button":case "submit":case "reset":b.data.dialog="button";break;case "checkbox":b.data.dialog="checkbox";break;case "radio":b.data.dialog="radio";break;case "image":b.data.dialog="imagebutton"}if(a[e])b.data.dialog=
"textfield"}})},afterInit:function(c){var d=c.dataProcessor,b=d&&d.htmlFilter,d=d&&d.dataFilter;CKEDITOR.env.ie&&b&&b.addRules({elements:{input:function(a){var a=a.attributes,b=a.type;if(!b)a.type="text";(b=="checkbox"||b=="radio")&&a.value=="on"&&delete a.value}}},{applyToAll:true});d&&d.addRules({elements:{input:function(a){if(a.attributes.type=="hidden")return c.createFakeParserElement(a,"cke_hidden","hiddenfield")}}},{applyToAll:true})}}),CKEDITOR.env.ie&&(CKEDITOR.dom.element.prototype.hasAttribute=
CKEDITOR.tools.override(CKEDITOR.dom.element.prototype.hasAttribute,function(c){return function(d){this.$.attributes.getNamedItem(d);if(this.getName()=="input")switch(d){case "class":return this.$.className.length>0;case "checked":return!!this.$.checked;case "value":var b=this.getAttribute("type");return b=="checkbox"||b=="radio"?this.$.value!="on":this.$.value}return c.apply(this,arguments)}})),function(){var c={canUndo:false,exec:function(c){var b=c.document.createElement("hr");c.insertElement(b)},
allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(d){if(!d.blockless){d.addCommand("horizontalrule",c);d.ui.addButton&&d.ui.addButton("HorizontalRule",{label:d.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"})}}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(c){var d=new CKEDITOR.htmlWriter;d.forceSimpleAmpersand=c.config.forceSimpleAmpersand;d.indentationChars=c.config.dataIndentationChars||"\t";c.dataProcessor.writer=d}}),
CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var c=CKEDITOR.dtd,d;for(d in CKEDITOR.tools.extend({},c.$nonBodyContent,c.$block,c.$listItem,c.$tableContent))this.setRules(d,{indent:!c[d]["#"],breakBeforeOpen:1,breakBeforeClose:!c[d]["#"],breakAfterClose:1,needsSpace:d in
c.$block&&!(d in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(c){var d=this._.rules[c];this._.afterCloser&&(d&&d.needsSpace&&this._.needsSpace)&&this._.output.push("\n");if(this._.indent)this.indentation();else if(d&&d.breakBeforeOpen){this.lineBreak();this.indentation()}this._.output.push("<",c);this._.afterCloser=
0},openTagClose:function(c,d){var b=this._.rules[c];if(d){this._.output.push(this.selfClosingEnd);if(b&&b.breakAfterClose)this._.needsSpace=b.needsSpace}else{this._.output.push(">");if(b&&b.indent)this._.indentation=this._.indentation+this.indentationChars}b&&b.breakAfterOpen&&this.lineBreak();c=="pre"&&(this._.inPre=1)},attribute:function(c,d){if(typeof d=="string"){this.forceSimpleAmpersand&&(d=d.replace(/&amp;/g,"&"));d=CKEDITOR.tools.htmlEncodeAttr(d)}this._.output.push(" ",c,'="',d,'"')},closeTag:function(c){var d=
this._.rules[c];if(d&&d.indent)this._.indentation=this._.indentation.substr(this.indentationChars.length);if(this._.indent)this.indentation();else if(d&&d.breakBeforeClose){this.lineBreak();this.indentation()}this._.output.push("</",c,">");c=="pre"&&(this._.inPre=0);if(d&&d.breakAfterClose){this.lineBreak();this._.needsSpace=d.needsSpace}this._.afterCloser=1},text:function(c){if(this._.indent){this.indentation();!this._.inPre&&(c=CKEDITOR.tools.ltrim(c))}this._.output.push(c)},comment:function(c){this._.indent&&
this.indentation();this._.output.push("<\!--",c,"--\>")},lineBreak:function(){!this._.inPre&&this._.output.length>0&&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},setRules:function(c,d){var b=this._.rules[c];b?CKEDITOR.tools.extend(b,d,true):this._.rules[c]=d}}}),function(){CKEDITOR.plugins.add("iframe",
{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(c){var d=c.lang.iframe,b="iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]";c.plugins.dialogadvtab&&(b=b+(";iframe"+c.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1})));
CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");c.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:b,requiredContent:"iframe"}));c.ui.addButton&&c.ui.addButton("Iframe",{label:d.toolbar,command:"iframe",toolbar:"insert,80"});c.on("doubleclick",function(a){var b=a.data.element;if(b.is("img")&&b.data("cke-real-element-type")=="iframe")a.data.dialog="iframe"});c.addMenuItems&&c.addMenuItems({iframe:{label:d.title,command:"iframe",group:"image"}});c.contextMenu&&c.contextMenu.addListener(function(a){if(a&&
a.is("img")&&a.data("cke-real-element-type")=="iframe")return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(c){var d=c.dataProcessor;(d=d&&d.dataFilter)&&d.addRules({elements:{iframe:function(b){return c.createFakeParserElement(b,"cke_iframe","iframe",true)}}})}})}(),function(){function c(b,a){a||(a=b.getSelection().getSelectedElement());if(a&&a.is("img")&&!a.data("cke-realelement")&&!a.isReadOnly())return a}function d(b){var a=b.getStyle("float");if(a=="inherit"||a=="none")a=0;a||(a=b.getAttribute("align"));
return a}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(b){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var a="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(b,"image","advanced")&&(a="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");b.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:a,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle",
"img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));b.ui.addButton&&b.ui.addButton("Image",{label:b.lang.common.image,command:"image",toolbar:"insert,10"});b.on("doubleclick",function(a){var b=a.data.element;if(b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly())a.data.dialog="image"});b.addMenuItems&&b.addMenuItems({image:{label:b.lang.image.menu,command:"image",group:"image"}});b.contextMenu&&b.contextMenu.addListener(function(a){if(c(b,a))return{image:CKEDITOR.TRISTATE_OFF}})},
afterInit:function(b){function a(a){var i=b.getCommand("justify"+a);if(i){if(a=="left"||a=="right")i.on("exec",function(g){var h=c(b),f;if(h){f=d(h);if(f==a){h.removeStyle("float");a==d(h)&&h.removeAttribute("align")}else h.setStyle("float",a);g.cancel()}});i.on("refresh",function(g){var h=c(b);if(h){h=d(h);this.setState(h==a?CKEDITOR.TRISTATE_ON:a=="right"||a=="left"?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.cancel()}})}}a("left");a("right");a("center");a("block")}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=
!0,function(){function c(a,c){var i,g;c.on("refresh",function(a){var c=[d],e;for(e in a.data.states)c.push(a.data.states[e]);this.setState(CKEDITOR.tools.search(c,b)?b:d)},c,null,100);c.on("exec",function(b){i=a.getSelection();g=i.createBookmarks(1);if(!b.data)b.data={};b.data.done=false},c,null,0);c.on("exec",function(){a.forceNextSelectionCheck();i.selectBookmarks(g)},c,null,100)}var d=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(a){var b=CKEDITOR.plugins.indent.genericDefinition;
c(a,a.addCommand("indent",new b(true)));c(a,a.addCommand("outdent",new b));if(a.ui.addButton){a.ui.addButton("Indent",{label:a.lang.indent.indent,command:"indent",directional:true,toolbar:"indent,20"});a.ui.addButton("Outdent",{label:a.lang.indent.outdent,command:"outdent",directional:true,toolbar:"indent,10"})}a.on("dirChanged",function(b){var c=a.createRange(),e=b.data.node;c.setStartBefore(e);c.setEndAfter(e);for(var d=new CKEDITOR.dom.walker(c),j;j=d.next();)if(j.type==CKEDITOR.NODE_ELEMENT)if(!j.equals(e)&&
j.getDirection()){c.setStartAfter(j);d=new CKEDITOR.dom.walker(c)}else{var k=a.config.indentClasses;if(k)for(var o=b.data.dir=="ltr"?["_rtl",""]:["","_rtl"],n=0;n<k.length;n++)if(j.hasClass(k[n]+o[0])){j.removeClass(k[n]+o[0]);j.addClass(k[n]+o[1])}k=j.getStyle("margin-right");o=j.getStyle("margin-left");k?j.setStyle("margin-left",k):j.removeStyle("margin-left");o?j.setStyle("margin-right",o):j.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=
!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,c){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!c;this.relatedGlobal=c?"indent":"outdent";this.indentKey=c?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),e;for(e in b.jobs){c.on("exec",function(c){if(!c.data.done){a.fire("lockSnapshot");if(b.execJob(a,
e))c.data.done=true;a.fire("unlockSnapshot");CKEDITOR.dom.element.clearAllMarkers(b.database)}},this,null,e);c.on("refresh",function(c){if(!c.data.states)c.data.states={};c.data.states[b.name+"@"+e]=b.refreshJob(a,e,c.data.path)},this,null,e)}a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var c=this.jobs[b];if(c.state!=d)return c.exec.call(this,a)},refreshJob:function(a,
b,c){b=this.jobs[b];b.state=a.activeFilter.checkFeature(this)?b.refresh.call(this,a,c):d;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function c(c){function e(b){for(var i=l.startContainer,j=l.endContainer;i&&!i.getParent().equals(b);)i=i.getParent();for(;j&&!j.getParent().equals(b);)j=j.getParent();if(!i||!j)return false;for(var m=i,i=[],r=false;!r;){m.equals(j)&&(r=true);i.push(m);m=m.getNext()}if(i.length<1)return false;m=b.getParents(true);for(j=0;j<m.length;j++)if(m[j].getName&&
h[m[j].getName()]){b=m[j];break}for(var m=d.isIndent?1:-1,j=i[0],i=i[i.length-1],r=CKEDITOR.plugins.list.listToArray(b,g),q=r[i.getCustomData("listarray_index")].indent,j=j.getCustomData("listarray_index");j<=i.getCustomData("listarray_index");j++){r[j].indent=r[j].indent+m;if(m>0){var s=r[j].parent;r[j].parent=new CKEDITOR.dom.element(s.getName(),s.getDocument())}}for(j=i.getCustomData("listarray_index")+1;j<r.length&&r[j].indent>q;j++)r[j].indent=r[j].indent+m;i=CKEDITOR.plugins.list.arrayToList(r,
g,null,c.config.enterMode,b.getDirection());if(!d.isIndent){var w;if((w=b.getParent())&&w.is("li"))for(var m=i.listNode.getChildren(),x=[],v,j=m.count()-1;j>=0;j--)(v=m.getItem(j))&&(v.is&&v.is("li"))&&x.push(v)}i&&i.listNode.replace(b);if(x&&x.length)for(j=0;j<x.length;j++){for(v=b=x[j];(v=v.getNext())&&v.is&&v.getName()in h;){CKEDITOR.env.needsNbspFiller&&!b.getFirst(a)&&b.append(l.document.createText(" "));b.append(v)}b.insertAfter(w)}i&&c.fire("contentDomInvalidated");return true}for(var d=this,
g=this.database,h=this.context,i=c.getSelection(),i=(i&&i.getRanges()).createIterator(),l;l=i.getNextRange();){for(var m=l.getCommonAncestor();m&&!(m.type==CKEDITOR.NODE_ELEMENT&&h[m.getName()]);)m=m.getParent();m||(m=l.startPath().contains(h))&&l.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);if(!m){var r=l.getEnclosedNode();if(r&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in h){l.setStartAt(r,CKEDITOR.POSITION_AFTER_START);l.setEndAt(r,CKEDITOR.POSITION_BEFORE_END);m=r}}if(m&&l.startContainer.type==CKEDITOR.NODE_ELEMENT&&
l.startContainer.getName()in h){r=new CKEDITOR.dom.walker(l);r.evaluator=b;l.startContainer=r.next()}if(m&&l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in h){r=new CKEDITOR.dom.walker(l);r.evaluator=b;l.endContainer=r.previous()}if(m)return e(m)}return 0}function d(a,c){c||(c=a.contains(this.context));return c&&a.block&&a.block.equals(c.getFirst(b))}function b(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function a(a){return e(a)&&i(a)}var e=CKEDITOR.dom.walker.whitespaces(true),
i=CKEDITOR.dom.walker.bookmark(false,true),g=CKEDITOR.TRISTATE_DISABLED,h=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(a){function b(a,f){e.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];a.on("key",function(b){if(a.mode=="wysiwyg"&&b.data.keyCode==this.indentKey){var c=this.getContext(a.elementPath());if(c&&(!this.isIndent||!d.call(this,a.elementPath(),c))){a.execCommand(this.relatedGlobal);b.cancel()}}},this);this.jobs[this.isIndent?
10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),e=d.call(this,b,c);return!c||!this.isIndent||e?g:h}:function(a,b){return!this.getContext(b)||this.isIndent?g:h},exec:CKEDITOR.tools.bind(c,this)}}var e=CKEDITOR.plugins.indent;e.registerCommands(a,{indentlist:new b(a,"indentlist",true),outdentlist:new b(a,"outdentlist")});CKEDITOR.tools.extend(b.prototype,e.specificDefinition.prototype,{context:{ol:1,ul:1}})}})}(),function(){function c(a,b,c){if(!a.getCustomData("indent_processed")){var e=
this.editor,i=this.isIndent;if(b){e=a.$.className.match(this.classNameRegex);c=0;if(e){e=e[1];c=CKEDITOR.tools.indexOf(b,e)+1}if((c=c+(i?1:-1))<0)return;c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));c>0&&a.addClass(b[c-1])}else{var b=d(a,c),c=parseInt(a.getStyle(b),10),o=e.config.indentOffset||40;isNaN(c)&&(c=0);c=c+(i?1:-1)*o;if(c<0)return;c=Math.max(c,0);c=Math.ceil(c/o)*o;a.setStyle(b,c?c+(e.config.indentUnit||"px"):"");
a.getAttribute("style")===""&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function d(a,b){return(b||a.getComputedStyle("direction"))=="ltr"?"margin-left":"margin-right"}var b=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,e=CKEDITOR.TRISTATE_DISABLED,i=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(g){function h(g,h){f.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:true,
styles:!j?"margin-left,margin-right":null,classes:j||null}};if(this.enterBr)this.allowedContent.div=true;this.requiredContent=(this.enterBr?"div":"p")+(j?"("+j.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,c){var f=c.block||c.blockLimit;if(f.is(b))f=f.getParent();else if(f.getAscendant(b))return e;if(!this.enterBr&&!this.getContext(c))return e;if(j){var g;g=j;var f=f.$.className.match(this.classNameRegex),h=this.isIndent;g=f?h?f[1]!=g.slice(-1):true:h;return g?i:e}return this.isIndent?
i:f?CKEDITOR[(parseInt(f.getStyle(d(f)),10)||0)<=0?"TRISTATE_DISABLED":"TRISTATE_OFF"]:e},exec:function(b){var e=b.getSelection(),e=e&&e.getRanges()[0],d;if(d=b.elementPath().contains(a))c.call(this,d,j);else{e=e.createIterator();b=b.config.enterMode;e.enforceRealBlocks=true;for(e.enlargeBr=b!=CKEDITOR.ENTER_BR;d=e.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)d.isReadOnly()||c.call(this,d,j)}return true}}}}var f=CKEDITOR.plugins.indent,j=g.config.indentClasses;f.registerCommands(g,{indentblock:new h(g,
"indentblock",true),outdentblock:new h(g,"outdentblock")});CKEDITOR.tools.extend(h.prototype,f.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:j?RegExp("(?:^|\\s+)("+j.join("|")+")(?=$|\\s)"):null})}})}(),function(){function c(a,b){var b=b===void 0||b,c;if(b)c=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){c=a.getParent();if(!c)break;a=c}c=a.getStyle("text-align")||
a.getAttribute("align")||""}c&&(c=c.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!c&&b&&(c=a.getComputedStyle("direction")=="rtl"?"right":"left");return c}function d(a,b,c){this.editor=a;this.name=b;this.value=c;this.context="p";var b=a.config.justifyClasses,d=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(c){case "left":this.cssClassName=b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=
RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?=$|\\s)");this.requiredContent=d+"("+this.cssClassName+")"}else this.requiredContent=d+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:true,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};if(a.config.enterMode==CKEDITOR.ENTER_BR)this.allowedContent.div=true}function b(a){var b=a.editor,c=b.createRange();c.setStartBefore(a.data.node);c.setEndAfter(a.data.node);for(var d=new CKEDITOR.dom.walker(c),
h;h=d.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(a.data.node)&&h.getDirection()){c.setStartAfter(h);d=new CKEDITOR.dom.walker(c)}else{var f=b.config.justifyClasses;if(f)if(h.hasClass(f[0])){h.removeClass(f[0]);h.addClass(f[2])}else if(h.hasClass(f[2])){h.removeClass(f[2]);h.addClass(f[0])}f=h.getStyle("text-align");f=="left"?h.setStyle("text-align","right"):f=="right"&&h.setStyle("text-align","left")}}d.prototype={exec:function(a){var b=a.getSelection(),d=a.config.enterMode;if(b){for(var g=
b.createBookmarks(),h=b.getRanges(),f=this.cssClassName,j,k,o=a.config.useComputedState,o=o===void 0||o,n=h.length-1;n>=0;n--){j=h[n].createIterator();for(j.enlargeBr=d!=CKEDITOR.ENTER_BR;k=j.getNextParagraph(d==CKEDITOR.ENTER_P?"p":"div");)if(!k.isReadOnly()){k.removeAttribute("align");k.removeStyle("text-align");var q=f&&(k.$.className=CKEDITOR.tools.ltrim(k.$.className.replace(this.cssClassRegex,""))),l=this.state==CKEDITOR.TRISTATE_OFF&&(!o||c(k,true)!=this.value);f?l?k.addClass(f):q||k.removeAttribute("class"):
l&&k.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();b.selectBookmarks(g)}},refresh:function(a,b){var d=b.block||b.blockLimit;this.setState(d.getName()!="body"&&c(d,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var c=new d(a,"justifyleft","left"),i=new d(a,"justifycenter","center"),g=new d(a,"justifyright","right"),h=new d(a,"justifyblock","justify");a.addCommand("justifyleft",
c);a.addCommand("justifycenter",i);a.addCommand("justifyright",g);a.addCommand("justifyblock",h);if(a.ui.addButton){a.ui.addButton("JustifyLeft",{label:a.lang.justify.left,command:"justifyleft",toolbar:"align,10"});a.ui.addButton("JustifyCenter",{label:a.lang.justify.center,command:"justifycenter",toolbar:"align,20"});a.ui.addButton("JustifyRight",{label:a.lang.justify.right,command:"justifyright",toolbar:"align,30"});a.ui.addButton("JustifyBlock",{label:a.lang.justify.block,command:"justifyblock",
toolbar:"align,40"})}a.on("dirChanged",b)}}})}(),CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function c(a){return b.replace(/%1/g,a=="rtl"?"right":"left").replace(/%2/g,"cke_contents_"+a)}var d="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",b=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+
d+"padding-%1:18px;cursor:auto;}"+(CKEDITOR.plugins.link.synAnchorSelector?"a.cke_anchor_empty{display:inline-block;}":"")+".%2 img.cke_anchor{"+d+"width:16px;min-height:15px;height:1.15em;vertical-align:"+(CKEDITOR.env.opera?"middle":"text-bottom")+";}";CKEDITOR.addCss(c("ltr")+c("rtl"))},init:function(c){var d="a[!href]";CKEDITOR.dialog.isTabEnabled(c,"link","advanced")&&(d=d.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)"));CKEDITOR.dialog.isTabEnabled(c,"link",
"target")&&(d=d.replace("]",",target,onclick]"));c.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:d,requiredContent:"a[href]"}));c.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));c.addCommand("unlink",new CKEDITOR.unlinkCommand);c.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);c.setKeystroke(CKEDITOR.CTRL+76,"link");if(c.ui.addButton){c.ui.addButton("Link",{label:c.lang.link.toolbar,command:"link",
toolbar:"links,10"});c.ui.addButton("Unlink",{label:c.lang.link.unlink,command:"unlink",toolbar:"links,20"});c.ui.addButton("Anchor",{label:c.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"})}CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");c.on("doubleclick",function(b){var a=CKEDITOR.plugins.link.getSelectedLink(c)||b.data.element;if(!a.isReadOnly())if(a.is("a")){b.data.dialog=a.getAttribute("name")&&(!a.getAttribute("href")||
!a.getChildCount())?"anchor":"link";c.getSelection().selectElement(a)}else if(CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a))b.data.dialog="anchor"});c.addMenuItems&&c.addMenuItems({anchor:{label:c.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:c.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:c.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:c.lang.link.unlink,command:"unlink",group:"link",order:5}});c.contextMenu&&
c.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(c)))return null;var a={};b.getAttribute("href")&&b.getChildCount()&&(a={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});if(b&&b.hasAttribute("name"))a.anchor=a.removeAnchor=CKEDITOR.TRISTATE_OFF;return a})},afterInit:function(c){var d=c.dataProcessor,b=d&&d.dataFilter,d=d&&d.htmlFilter,a=c._.elementsPath&&c._.elementsPath.filters;
b&&b.addRules({elements:{a:function(a){var b=a.attributes;if(!b.name)return null;var d=!a.children.length;if(CKEDITOR.plugins.link.synAnchorSelector){var a=d?"cke_anchor_empty":"cke_anchor",h=b["class"];if(b.name&&(!h||h.indexOf(a)<0))b["class"]=(h||"")+" "+a;if(d&&CKEDITOR.plugins.link.emptyAnchorFix){b.contenteditable="false";b["data-cke-editable"]=1}}else if(CKEDITOR.plugins.link.fakeAnchor&&d)return c.createFakeParserElement(a,"cke_anchor","anchor");return null}}});CKEDITOR.plugins.link.emptyAnchorFix&&
d&&d.addRules({elements:{a:function(a){delete a.attributes.contenteditable}}});a&&a.push(function(a,b){if(b=="a"&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a)||a.getAttribute("name")&&(!a.getAttribute("href")||!a.getChildCount())))return"anchor"})}}),CKEDITOR.plugins.link={getSelectedLink:function(c){var d=c.getSelection(),b=d.getSelectedElement();if(b&&b.is("a"))return b;if(d=d.getRanges()[0]){d.shrink(CKEDITOR.SHRINK_TEXT);return c.elementPath(d.getCommonAncestor()).contains("a",1)}return null},
fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie&&11>CKEDITOR.env.version,emptyAnchorFix:CKEDITOR.env.ie&&8>CKEDITOR.env.version,tryRestoreFakeAnchor:function(c,d){if(d&&d.data("cke-real-element-type")&&d.data("cke-real-element-type")=="anchor"){var b=c.restoreRealElement(d);if(b.data("cke-saved-name"))return b}}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(c){var d=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,
alwaysRemoveElement:1});c.removeStyle(d)},refresh:function(c,d){var b=d.lastElement&&d.lastElement.getAscendant("a",true);b&&b.getName()=="a"&&b.getAttribute("href")&&b.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]"},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(c){var d=c.getSelection(),b=d.createBookmarks(),a;if(d&&(a=d.getSelectedElement())&&
(CKEDITOR.plugins.link.fakeAnchor&&!a.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,a):a.is("a")))a.remove(1);else if(a=CKEDITOR.plugins.link.getSelectedLink(c))if(a.hasAttribute("href")){a.removeAttributes({name:1,"data-cke-saved-name":1});a.removeClass("cke_anchor")}else a.remove(1);d.selectBookmarks(b)},requiredContent:"a[name]"},CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0}),function(){function c(a,b,c){function e(c){if((j=i[c?"getFirst":"getLast"]())&&
(!j.is||!j.isBlockBoundary())&&(k=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(true)))&&(!k.is||!k.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](j)}for(var d=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];if((h=h.getAscendant("li",true))&&!h.getCustomData("list_item_processed")){f.push(h);CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",true)}}h=null;for(g=0;g<f.length;g++){h=f[g].getCustomData("listarray_index");
d[h].indent=-1}for(g=h+1;g<d.length;g++)if(d[g].indent>d[g-1].indent+1){f=d[g-1].indent+1-d[g].indent;for(h=d[g].indent;d[g]&&d[g].indent>=h;){d[g].indent=d[g].indent+f;g++}g--}var i=CKEDITOR.plugins.list.arrayToList(d,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,j,k;e(true);e();i.replace(b.root);a.fire("contentDomInvalidated")}function d(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function b(a,b,c,e){for(var d,f;d=a[e?"getLast":"getFirst"](q);){(f=
d.getDirection(1))!==b.getDirection(1)&&d.setAttribute("dir",f);d.remove();c?d[e?"insertBefore":"insertAfter"](c):b.append(d,e)}}function a(a){var c;(c=function(c){var e=a[c?"getPrevious":"getNext"](k);if(e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a.getName())){b(a,e,null,!c);a.remove();a=e}})();c(1)}function e(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function i(c,e,d){c.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);
var f=d.extractContents();e.trim(false,true);var h=e.createBookmark(),i=new CKEDITOR.dom.elementPath(e.startContainer),j=i.block,i=i.lastElement.getAscendant("li",1)||j,n=new CKEDITOR.dom.elementPath(d.startContainer),q=n.contains(CKEDITOR.dtd.$listItem),n=n.contains(CKEDITOR.dtd.$list);if(j)(j=j.getBogus())&&j.remove();else if(n)(j=n.getPrevious(k))&&o(j)&&j.remove();(j=f.getLast())&&(j.type==CKEDITOR.NODE_ELEMENT&&j.is("br"))&&j.remove();(j=e.startContainer.getChild(e.startOffset))?f.insertBefore(j):
e.startContainer.append(f);if(q)if(f=g(q))if(i.contains(q)){b(f,q.getParent(),q);f.remove()}else i.append(f);for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){n=d.startPath();f=n.block;if(f.is("li")){i=f.getParent();f.equals(i.getLast(k))&&f.equals(i.getFirst(k))&&(f=i)}d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=c.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return k(a)&&!o(a)};(d=d.next())&&(d.type==CKEDITOR.NODE_ELEMENT&&
d.getName()in CKEDITOR.dtd.$list)&&a(d);e.moveToBookmark(h);e.select();c.fire("saveSnapshot")}function g(a){return(a=a.getLast(k))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in h?a:null}var h={ol:1,ul:1},f=CKEDITOR.dom.walker.whitespaces(),j=CKEDITOR.dom.walker.bookmark(),k=function(a){return!(f(a)||j(a))},o=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,e,d){if(!h[a.getName()])return[];e||(e=0);c||(c=[]);for(var f=0,g=a.getChildCount();f<g;f++){var i=a.getChild(f);
i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(i,b,c,e+1);if(i.$.nodeName.toLowerCase()=="li"){var j={parent:a,indent:e,element:i,contents:[]};if(d)j.grandparent=d;else{j.grandparent=a.getParent();if(j.grandparent&&j.grandparent.$.nodeName.toLowerCase()=="li")j.grandparent=j.grandparent.getParent()}b&&CKEDITOR.dom.element.setMarker(b,i,"listarray_index",c.length);c.push(j);for(var k=0,n=i.getChildCount(),o;k<n;k++){o=i.getChild(k);o.type==CKEDITOR.NODE_ELEMENT&&
h[o.getName()]?CKEDITOR.plugins.list.listToArray(o,b,c,e+1,j.grandparent):j.contents.push(o)}}}return c},arrayToList:function(a,b,c,e,d){c||(c=0);if(!a||a.length<c+1)return null;for(var f,g=a[c].parent.getDocument(),i=new CKEDITOR.dom.documentFragment(g),n=null,o=c,q=Math.max(a[c].indent,0),x=null,v,B,E=e==CKEDITOR.ENTER_P?"p":"div";;){var C=a[o];f=C.grandparent;v=C.element.getDirection(1);if(C.indent==q){if(!n||a[o].parent.getName()!=n.getName()){n=a[o].parent.clone(false,1);d&&n.setAttribute("dir",
d);i.append(n)}x=n.append(C.element.clone(0,1));v!=n.getDirection(1)&&x.setAttribute("dir",v);for(f=0;f<C.contents.length;f++)x.append(C.contents[f].clone(1,1));o++}else if(C.indent==Math.max(q,0)+1){C=a[o-1].element.getDirection(1);o=CKEDITOR.plugins.list.arrayToList(a,null,o,e,C!=v?v:null);!x.getChildCount()&&(CKEDITOR.env.needsNbspFiller&&!(g.$.documentMode>7))&&x.append(g.createText(" "));x.append(o.listNode);o=o.nextIndex}else if(C.indent==-1&&!c&&f){if(h[f.getName()]){x=C.element.clone(false,
true);v!=f.getDirection(1)&&x.setAttribute("dir",v)}else x=new CKEDITOR.dom.documentFragment(g);var n=f.getDirection(1)!=v,D=C.element,I=D.getAttribute("class"),J=D.getAttribute("style"),G=x.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||n||J||I),L,M=C.contents.length,H;for(f=0;f<M;f++){L=C.contents[f];if(j(L)&&M>1)G?H=L.clone(1,1):x.append(L.clone(1,1));else if(L.type==CKEDITOR.NODE_ELEMENT&&L.isBlockBoundary()){n&&!L.getDirection()&&L.setAttribute("dir",v);B=L;var F=D.getAttribute("style");
F&&B.setAttribute("style",F.replace(/([^;])$/,"$1;")+(B.getAttribute("style")||""));I&&L.addClass(I);B=null;if(H){x.append(H);H=null}x.append(L.clone(1,1))}else if(G){if(!B){B=g.createElement(E);x.append(B);n&&B.setAttribute("dir",v)}J&&B.setAttribute("style",J);I&&B.setAttribute("class",I);if(H){B.append(H);H=null}B.append(L.clone(1,1))}else x.append(L.clone(1,1))}if(H){(B||x).append(H);H=null}if(x.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&o!=a.length-1){if(CKEDITOR.env.needsBrFiller)(v=x.getLast())&&
(v.type==CKEDITOR.NODE_ELEMENT&&v.is("br"))&&v.remove();v=x.getLast(k);(!v||!(v.type==CKEDITOR.NODE_ELEMENT&&v.is(CKEDITOR.dtd.$block)))&&x.append(g.createElement("br"))}v=x.$.nodeName.toLowerCase();(v=="div"||v=="p")&&x.appendBogus();i.append(x);n=null;o++}else return null;B=null;if(a.length<=o||Math.max(a[o].indent,0)<q)break}if(b)for(a=i.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT){CKEDITOR.dom.element.clearMarkers(b,a);if(a.getName()in CKEDITOR.dtd.$listItem){c=a;g=d=e=void 0;if(e=c.getDirection()){for(d=
c.getParent();d&&!(g=d.getDirection());)d=d.getParent();e==g&&c.removeAttribute("dir")}}}a=a.getNextSourceNode()}return{listNode:i,nextIndex:o}}};var n=/^h[1-6]$/,q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);d.prototype={exec:function(b){this.refresh(b,b.elementPath());var e=b.config,d=b.getSelection(),f=d&&d.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var g=b.editable();if(g.getFirst(k)){var i=f.length==1&&f[0];(e=i&&i.getEnclosedNode())&&(e.is&&this.type==e.getName())&&this.setState(CKEDITOR.TRISTATE_ON)}else{e.enterMode==
CKEDITOR.ENTER_BR?g.appendBogus():f[0].fixBlock(1,e.enterMode==CKEDITOR.ENTER_P?"p":"div");d.selectRanges(f)}}for(var e=d.createBookmarks(true),g=[],j={},f=f.createIterator(),o=0;(i=f.getNextRange())&&++o;){var q=i.getBoundaryNodes(),s=q.startNode,w=q.endNode;s.type==CKEDITOR.NODE_ELEMENT&&s.getName()=="td"&&i.setStartAt(q.startNode,CKEDITOR.POSITION_AFTER_START);w.type==CKEDITOR.NODE_ELEMENT&&w.getName()=="td"&&i.setEndAt(q.endNode,CKEDITOR.POSITION_BEFORE_END);i=i.createIterator();for(i.forceBrBreak=
this.state==CKEDITOR.TRISTATE_OFF;q=i.getNextParagraph();)if(!q.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(j,q,"list_block",1);for(var x=b.elementPath(q),s=x.elements,w=0,x=x.blockLimit,v,B=s.length-1;B>=0&&(v=s[B]);B--)if(h[v.getName()]&&x.contains(v)){x.removeCustomData("list_group_object_"+o);if(s=v.getCustomData("list_group_object"))s.contents.push(q);else{s={root:v,contents:[q]};g.push(s);CKEDITOR.dom.element.setMarker(j,v,"list_group_object",s)}w=1;break}if(!w){w=x;if(w.getCustomData("list_group_object_"+
o))w.getCustomData("list_group_object_"+o).contents.push(q);else{s={root:w,contents:[q]};CKEDITOR.dom.element.setMarker(j,w,"list_group_object_"+o,s);g.push(s)}}}}for(v=[];g.length>0;){s=g.shift();if(this.state==CKEDITOR.TRISTATE_OFF)if(h[s.root.getName()]){f=b;o=s;s=j;i=v;w=CKEDITOR.plugins.list.listToArray(o.root,s);x=[];for(q=0;q<o.contents.length;q++){B=o.contents[q];if((B=B.getAscendant("li",true))&&!B.getCustomData("list_item_processed")){x.push(B);CKEDITOR.dom.element.setMarker(s,B,"list_item_processed",
true)}}for(var B=o.root.getDocument(),E=void 0,C=void 0,q=0;q<x.length;q++){var D=x[q].getCustomData("listarray_index"),E=w[D].parent;if(!E.is(this.type)){C=B.createElement(this.type);E.copyAttributes(C,{start:1,type:1});C.removeStyle("list-style-type");w[D].parent=C}}s=CKEDITOR.plugins.list.arrayToList(w,s,null,f.config.enterMode);w=void 0;x=s.listNode.getChildCount();for(q=0;q<x&&(w=s.listNode.getChild(q));q++)w.getName()==this.type&&i.push(w);s.listNode.replace(o.root);f.fire("contentDomInvalidated")}else{w=
b;q=s;i=v;x=q.contents;f=q.root.getDocument();o=[];if(x.length==1&&x[0].equals(q.root)){s=f.createElement("div");x[0].moveChildren&&x[0].moveChildren(s);x[0].append(s);x[0]=s}q=q.contents[0].getParent();for(B=0;B<x.length;B++)q=q.getCommonAncestor(x[B].getParent());E=w.config.useComputedState;w=s=void 0;E=E===void 0||E;for(B=0;B<x.length;B++)for(C=x[B];D=C.getParent();){if(D.equals(q)){o.push(C);!w&&C.getDirection()&&(w=1);C=C.getDirection(E);s!==null&&(s=s&&s!=C?null:C);break}C=D}if(!(o.length<1)){x=
o[o.length-1].getNext();B=f.createElement(this.type);i.push(B);for(E=i=void 0;o.length;){i=o.shift();E=f.createElement("li");if(i.is("pre")||n.test(i.getName())||i.getAttribute("contenteditable")=="false")i.appendTo(E);else{i.copyAttributes(E);if(s&&i.getDirection()){E.removeStyle("direction");E.removeAttribute("dir")}i.moveChildren(E);i.remove()}E.appendTo(B)}s&&w&&B.setAttribute("dir",s);x?B.insertBefore(x):B.appendTo(q)}}else this.state==CKEDITOR.TRISTATE_ON&&h[s.root.getName()]&&c.call(this,b,
s,j)}for(B=0;B<v.length;B++)a(v[B]);CKEDITOR.dom.element.clearAllMarkers(j);d.selectBookmarks(e);b.focus()},refresh:function(a,b){var c=b.contains(h,1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){if(!a.blockless){a.addCommand("numberedlist",new d("numberedlist","ol"));a.addCommand("bulletedlist",new d("bulletedlist","ul"));
if(a.ui.addButton){a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:true,toolbar:"list,10"});a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:true,toolbar:"list,20"})}a.on("key",function(b){var c=b.data.keyCode;if(a.mode=="wysiwyg"&&c in{8:1,46:1}){var d=a.getSelection().getRanges()[0],f=d&&d.startPath();if(d&&d.collapsed){var f=new CKEDITOR.dom.elementPath(d.startContainer),j=c==8,n=a.editable(),q=new CKEDITOR.dom.walker(d.clone());
q.evaluator=function(a){return k(a)&&!o(a)};q.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=d.clone();if(j){var u,s;if((u=f.contains(h))&&d.checkBoundaryOfElement(u,CKEDITOR.START)&&(u=u.getParent())&&u.is("li")&&(u=g(u))){s=u;u=u.getPrevious(k);c.moveToPosition(u&&o(u)?u:s,CKEDITOR.POSITION_BEFORE_START)}else{q.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START);q.range.setEnd(d.startContainer,d.startOffset);if((u=q.previous())&&u.type==CKEDITOR.NODE_ELEMENT&&(u.getName()in
h||u.is("li"))){if(!u.is("li")){q.range.selectNodeContents(u);q.reset();q.evaluator=e;u=q.previous()}s=u;c.moveToElementEditEnd(s)}}if(s){i(a,c,d);b.cancel()}else if((c=f.contains(h))&&d.checkBoundaryOfElement(c,CKEDITOR.START)){s=c.getFirst(k);if(d.checkBoundaryOfElement(s,CKEDITOR.START)){u=c.getPrevious(k);if(g(s)){if(u){d.moveToElementEditEnd(u);d.select()}}else a.execCommand("outdent");b.cancel()}}}else if(s=f.contains("li")){q.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);n=(f=s.getLast(k))&&
e(f)?f:s;s=0;if((u=q.next())&&u.type==CKEDITOR.NODE_ELEMENT&&u.getName()in h&&u.equals(f)){s=1;u=q.next()}else d.checkBoundaryOfElement(n,CKEDITOR.END)&&(s=1);if(s&&u){d=d.clone();d.moveToElementEditStart(u);i(a,c,d);b.cancel()}}else{q.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);if((u=q.next())&&u.type==CKEDITOR.NODE_ELEMENT&&u.is(h)){u=u.getFirst(k);if(f.block&&d.checkStartOfBlock()&&d.checkEndOfBlock()){f.block.remove();d.moveToElementEditStart(u);d.select()}else if(g(u)){d.moveToElementEditStart(u);
d.select()}else{d=d.clone();d.moveToElementEditStart(u);i(a,c,d)}b.cancel()}}setTimeout(function(){a.selectionChange(1)})}}})}}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(c){if(!c.blockless){var d;d=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]"});d=c.addCommand("numberedListStyle",d);c.addFeature(d);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");d=new CKEDITOR.dialogCommand("bulletedListStyle",
{requiredContent:"ul",allowedContent:"ul{list-style-type}"});d=c.addCommand("bulletedListStyle",d);c.addFeature(d);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");c.addMenuGroup("list",108);c.addMenuItems({numberedlist:{label:c.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:c.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});c.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;for(;b;){var a=
b.getName();if(a=="ol")return{numberedlist:CKEDITOR.TRISTATE_OFF};if(a=="ul")return{bulletedlist:CKEDITOR.TRISTATE_OFF};b=b.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function c(a,b,c){return k(b)&&k(c)&&c.equals(b.getNext(function(a){return!(V(a)||Y(a)||o(a))}))}function d(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function b(a){var b=a.element;if(b&&k(b))if((b=b.getAscendant(a.triggers,true))&&a.editable.contains(b)){var c=
i(b,true);if(c.getAttribute("contenteditable")=="true")return b;if(c.is(a.triggers))return c}return null}function a(a,b,c){t(a,b);t(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function e(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!V(b)||k(b)&&!o(b)&&!j(a,b)})}function i(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a;){if(a.data("cke-editable"))break;if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}
function g(a){var b=a.doc,c=x('<span contenteditable="false" style="'+P+"position:absolute;border-top:1px dashed "+a.boxColor+'"></span>',b),e=this.path+"images/"+(v.hidpi?"hidpi/":"")+"icon.png";s(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,true);return this},lineChildren:[s(x('<span title="'+a.editor.lang.magicline.title+'" contenteditable="false">&#8629;</span>',b),{base:P+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+
a.boxColor+";cursor:pointer;"+(v.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(v.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),s(x(X,b),{base:U+"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"]}),s(x(X,b),{base:U+"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(){t(a,this);var b=a.holdDistance,c=this.size;return c&&a.mouse.y>c.top-b&&a.mouse.y<c.bottom+b&&a.mouse.x>c.left-b&&a.mouse.x<c.right+b?true:false},place:function(){var b=
a.view,c=a.editable,e=a.trigger,d=e.upper,f=e.lower,g=d||f,h=g.getParent(),i={};this.trigger=e;d&&t(a,d,true);f&&t(a,f,true);t(a,h,true);a.inInlineMode&&A(a,true);if(h.equals(c)){i.left=b.scroll.x;i.right=-b.scroll.x;i.width=""}else{i.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0);i.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x;i.right=""}if(d&&f)i.top=d.size.margin.bottom===f.size.margin.top?0|d.size.bottom+d.size.margin.bottom/
2:d.size.margin.bottom<f.size.margin.top?d.size.bottom+d.size.margin.bottom:d.size.bottom+d.size.margin.bottom-f.size.margin.top;else if(d){if(!f)i.top=d.size.bottom+d.size.margin.bottom}else i.top=f.size.top-f.size.margin.top;if(e.is(M)||i.top>b.scroll.y-15&&i.top<b.scroll.y+5){i.top=a.inInlineMode?0:b.scroll.y;this.look(M)}else if(e.is(H)||i.top>b.pane.bottom-5&&i.top<b.pane.bottom+15){i.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1;this.look(H)}else{if(a.inInlineMode)i.top=
i.top-(b.editable.top+b.editable.border.top);this.look(F)}if(a.inInlineMode){i.top--;i.top=i.top+b.editable.scroll.top;i.left=i.left+b.editable.scroll.left}for(var j in i)i[j]=CKEDITOR.tools.cssLength(i[j]);this.setStyles(i)},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 w("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(F);c.appendTo(c.wrap);
c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();h(a,function(b){var c=a.line.trigger;b[c.is(D)?"insertBefore":"insertAfter"](c.is(D)?c.lower:c.upper)},true);a.editor.focus();!v.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();b.data.preventDefault(true)});c.on("mousedown",function(a){a.data.preventDefault(true)});a.line=c}function h(a,b,c){var e=new CKEDITOR.dom.range(a.doc),d=a.editor,f;if(v.ie&&a.enterMode==CKEDITOR.ENTER_BR)f=a.doc.createText(N);else{f=(f=i(a.element,
true))&&f.data("cke-enter-mode")||a.enterMode;f=new w(C[f],a.doc);f.is("br")||a.doc.createText(N).appendTo(f)}c&&d.fire("saveSnapshot");b(f);e.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);d.getSelection().selectRanges([e]);a.hotNode=f;c&&d.fire("saveSnapshot")}function f(a,c){return{canUndo:true,modes:{wysiwyg:1},exec:function(){function d(b){var e=v.ie&&v.version<9?" ":N,f=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;h(a,function(e){f&&a.hotNode&&a.hotNode.remove();
e[c?"insertAfter":"insertBefore"](b);e.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});!v.ie&&a.enterMode!=CKEDITOR.ENTER_BR&&a.hotNode.scrollIntoView();a.line.detach()}return function(f){var f=f.getSelection().getStartElement(),g,f=f.getAscendant(R,1);if(!l(a,f)&&f&&!f.equals(a.editable)&&!f.contains(a.editable)){if((g=i(f))&&g.getAttribute("contenteditable")=="false")f=g;a.element=f;g=e(a,f,!c);var h;if(k(g)&&g.is(a.triggers)&&g.is(O)&&(!e(a,g,!c)||
(h=e(a,g,!c))&&k(h)&&h.is(a.triggers)))d(g);else{h=b(a,f);if(k(h))if(e(a,h,!c))(f=e(a,h,!c))&&(k(f)&&f.is(a.triggers))&&d(h);else d(h)}}}}()}}function j(a,b){if(!b||!(b.type==CKEDITOR.NODE_ELEMENT&&b.$))return false;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function k(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function o(a){if(!k(a))return false;var b;if(!(b=n(a)))if(k(a)){b={left:1,right:1,center:1};b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])}else b=false;
return b}function n(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function q(a,b){return k(b)?b.is(a.triggers):null}function l(a,b){if(!b)return false;for(var c=b.getParents(1),e=c.length;e--;)for(var d=a.tabuList.length;d--;)if(c[e].hasAttribute(a.tabuList[d]))return true;return false}function m(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(Q)});if(!b)return false;t(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function r(a){var b=a.editable,
c=a.mouse,e=a.view,f=a.triggerOffset;A(a);var g=c.y>(a.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),b=b[g?"getLast":"getFirst"](function(a){return!(V(a)||Y(a))});if(!b)return null;j(a,b)&&(b=a.line.wrap[g?"getPrevious":"getNext"](function(a){return!(V(a)||Y(a))}));if(!k(b)||o(b)||!q(a,b))return null;t(a,b);if(!g&&b.size.top>=0&&c.y>0&&c.y<b.size.top+f){a=a.inInlineMode||e.scroll.y===0?M:F;return new d([null,b,D,G,a])}if(g&&b.size.bottom<=e.pane.height&&
c.y>b.size.bottom-f&&c.y<e.pane.height){a=a.inInlineMode||b.size.bottom>e.pane.height-f&&b.size.bottom<e.pane.height?H:F;return new d([b,null,I,G,a])}return null}function p(a){var c=a.mouse,f=a.view,g=a.triggerOffset,h=b(a);if(!h)return null;t(a,h);var g=Math.min(g,0|h.size.outerHeight/2),i=[],j,l;if(c.y>h.size.top-1&&c.y<h.size.top+g)l=false;else if(c.y>h.size.bottom-g&&c.y<h.size.bottom+1)l=true;else return null;if(o(h)||m(a,h,l)||h.getParent().is(K))return null;var p=e(a,h,!l);if(p){if(p&&p.type==
CKEDITOR.NODE_TEXT)return null;if(k(p)){if(o(p)||!q(a,p)||p.getParent().is(K))return null;i=[p,h][l?"reverse":"concat"]().concat([J,G])}}else{if(h.equals(a.editable[l?"getLast":"getFirst"](a.isRelevant))){A(a);l&&c.y>h.size.bottom-g&&c.y<f.pane.height&&h.size.bottom>f.pane.height-g&&h.size.bottom<f.pane.height?j=H:c.y>0&&c.y<h.size.top+g&&(j=M)}else j=F;i=[null,h][l?"reverse":"concat"]().concat([l?I:D,G,j,h.equals(a.editable[l?"getLast":"getFirst"](a.isRelevant))?l?H:M:F])}return 0 in i?new d(i):
null}function z(a,b,c,e){for(var d=function(){var c=v.ie?b.$.currentStyle:a.win.$.getComputedStyle(b.$,"");return v.ie?function(a){return c[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){return c.getPropertyValue(a)}}(),f=b.getDocumentPosition(),g={},h={},i={},j={},l=Z.length;l--;){g[Z[l]]=parseInt(d("border-"+Z[l]+"-width"),10)||0;i[Z[l]]=parseInt(d("padding-"+Z[l]),10)||0;h[Z[l]]=parseInt(d("margin-"+Z[l]),10)||0}(!c||e)&&y(a,e);j.top=f.y-(c?0:a.view.scroll.y);j.left=f.x-(c?0:a.view.scroll.x);
j.outerWidth=b.$.offsetWidth;j.outerHeight=b.$.offsetHeight;j.height=j.outerHeight-(i.top+i.bottom+g.top+g.bottom);j.width=j.outerWidth-(i.left+i.right+g.left+g.right);j.bottom=j.top+j.outerHeight;j.right=j.left+j.outerWidth;if(a.inInlineMode)j.scroll={top:b.$.scrollTop,left:b.$.scrollLeft};return s({border:g,padding:i,margin:h,ignoreScroll:c},j,true)}function t(a,b,c){if(!k(b))return b.size=null;if(b.size){if(b.size.ignoreScroll==c&&b.size.date>new Date-S)return null}else b.size={};return s(b.size,
z(a,b,c),{date:+new Date},true)}function A(a,b){a.view.editable=z(a,a.editable,b,true)}function y(a,b){if(!a.view)a.view={};var c=a.view;if(b||!(c&&c.date>new Date-S)){var e=a.win,c=e.getScrollPosition(),e=e.getViewPaneSize();s(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-e.width,height:a.doc.$.documentElement.scrollHeight-e.height},pane:{width:e.width,height:e.height,bottom:e.height+c.y},date:+new Date},true)}}function u(a,b,c,e){for(var f=e,g=e,h=0,i=false,j=false,l=a.view.pane.height,
k=a.mouse;k.y+h<l&&k.y-h>0;){i||(i=b(f,e));j||(j=b(g,e));!i&&k.y-h>0&&(f=c(a,{x:k.x,y:k.y-h}));!j&&k.y+h<l&&(g=c(a,{x:k.x,y:k.y+h}));if(i&&j)break;h=h+2}return new d([f,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var c=a.config,i=c.magicline_triggerOffset||30,m={editor:a,enterMode:c.enterMode,triggerOffset:i,holdDistance:0|i*(c.magicline_holdDistance||0.5),boxColor:c.magicline_color||"#ff0000",rtl:c.contentsLangDirection=="rtl",tabuList:["data-cke-hidden-sel"].concat(c.magicline_tabuList||
[]),triggers:c.magicline_everywhere?R:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},q,t,u;m.isRelevant=function(a){return k(a)&&!j(m,a)&&!o(a)};a.on("contentDom",function(){var i=a.editable(),k=a.document,o=a.window;s(m,{editable:i,inInlineMode:i.isInline(),doc:k,win:o,hotNode:null},true);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();if(!i.is(E.$inline)){m.inInlineMode&&!n(i)&&i.setStyles({position:"relative",top:null,left:null});g.call(this,m);y(m);i.attachListener(a,
"beforeUndoImage",function(){m.line.detach()});i.attachListener(a,"beforeGetData",function(){if(m.line.wrap.getParent()){m.line.detach();a.once("getData",function(){m.line.attach()},null,null,1E3)}},null,null,0);i.attachListener(m.inInlineMode?k:k.getWindow().getFrame(),"mouseout",function(b){if(a.mode=="wysiwyg")if(m.inInlineMode){var c=b.data.$.clientX,b=b.data.$.clientY;y(m);A(m,true);var e=m.view.editable,d=m.view.scroll;if(!(c>e.left-d.x&&c<e.right-d.x)||!(b>e.top-d.y&&b<e.bottom-d.y)){clearTimeout(u);
u=null;m.line.detach()}}else{clearTimeout(u);u=null;m.line.detach()}});i.attachListener(i,"keyup",function(){m.hiddenMode=0});i.attachListener(i,"keydown",function(b){if(a.mode=="wysiwyg"){b=b.data.getKeystroke();a.getSelection().getStartElement();switch(b){case 2228240:case 16:m.hiddenMode=1;m.line.detach()}}});i.attachListener(m.inInlineMode?i:k,"mousemove",function(b){t=true;if(!(a.mode!="wysiwyg"||a.readOnly||u)){var c={x:b.data.$.clientX,y:b.data.$.clientY};u=setTimeout(function(){m.mouse=c;
u=m.trigger=null;y(m);if(t&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=aa(m,true))){if((m.trigger=r(m)||p(m)||W(m))&&!l(m,m.trigger.upper||m.trigger.lower))m.line.attach().place();else{m.trigger=null;m.line.detach()}t=false}},30)}});i.attachListener(o,"scroll",function(){if(a.mode=="wysiwyg"){m.line.detach();if(v.webkit){m.hiddenMode=1;clearTimeout(q);q=setTimeout(function(){if(!m.mouseDown)m.hiddenMode=0},50)}}});i.attachListener(B?k:o,"mousedown",function(){if(a.mode==
"wysiwyg"){m.line.detach();m.hiddenMode=1;m.mouseDown=1}});i.attachListener(B?k:o,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0});a.addCommand("accessPreviousSpace",f(m));a.addCommand("accessNextSpace",f(m,true));a.setKeystroke([[c.magicline_keystrokePrevious,"accessPreviousSpace"],[c.magicline_keystrokeNext,"accessNextSpace"]]);a.on("loadSnapshot",function(){var b,c,e,d;for(d in{p:1,br:1,div:1}){b=a.document.getElementsByTag(d);for(e=b.count();e--;)if((c=b.getItem(e)).data("cke-magicline-hot")){m.hotNode=
c;m.lastCmdDirection=c.data("cke-magicline-dir")==="true"?true:false;return}}});this.backdoor={accessFocusSpace:h,boxTrigger:d,isLine:j,getAscendantTrigger:b,getNonEmptyNeighbour:e,getSize:z,that:m,triggerEdge:p,triggerEditable:r,triggerExpand:W}}},this)}});var s=CKEDITOR.tools.extend,w=CKEDITOR.dom.element,x=w.createFromHtml,v=CKEDITOR.env,B=CKEDITOR.env.ie&&CKEDITOR.env.version<9,E=CKEDITOR.dtd,C={},D=128,I=64,J=32,G=16,L=8,M=4,H=2,F=1,N=" ",K=E.$listItem,Q=E.$tableContent,O=s({},E.$nonEditable,
E.$empty),R=E.$block,S=100,P="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",U=P+"border-color:transparent;display:block;border-style:solid;",X="<span>"+N+"</span>";C[CKEDITOR.ENTER_BR]="br";C[CKEDITOR.ENTER_P]="p";C[CKEDITOR.ENTER_DIV]="div";d.prototype={set:function(a,b,c){this.properties=a+b+(c||F);return this},is:function(a){return(this.properties&a)==a}};var aa=function(){return function(a,b,c){if(!a.mouse)return null;
var e=a.doc,d=a.line.wrap,c=c||a.mouse,f=new CKEDITOR.dom.element(e.$.elementFromPoint(c.x,c.y));if(b&&j(a,f)){d.hide();f=new CKEDITOR.dom.element(e.$.elementFromPoint(c.x,c.y));d.show()}return!f||!(f.type==CKEDITOR.NODE_ELEMENT&&f.$)||v.ie&&v.version<9&&!a.boundary.equals(f)&&!a.boundary.contains(f)?null:f}}(),V=CKEDITOR.dom.walker.whitespaces(),Y=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),W=function(){function b(d){var f=d.element,g,h,i;if(!k(f)||f.contains(d.editable)||f.isReadOnly())return null;
i=u(d,function(a,b){return!b.equals(a)},function(a,b){return aa(a,true,b)},f);g=i.upper;h=i.lower;if(c(d,g,h))return i.set(J,L);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return e(d,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return e(d,a)});if(!g||!h)return null;t(d,g);t(d,h);if(!(d.mouse.y>g.size.top&&d.mouse.y<h.size.bottom))return null;for(var f=Number.MAX_VALUE,j,l,m,p;h&&!h.equals(g);){if(!(l=
g.getNext(d.isRelevant)))break;j=Math.abs(a(d,g,l)-d.mouse.y);if(j<f){f=j;m=g;p=l}g=l;t(d,g)}if(!m||!p||!(d.mouse.y>m.size.top&&d.mouse.y<p.size.bottom))return null;i.upper=m;i.lower=p;return i.set(J,L)}function e(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||Y(b)||o(b)||j(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(a){var e=b(a),d;if(d=e){d=e.upper;var f=e.lower;d=!d||!f||o(f)||o(d)||f.equals(d)||d.equals(f)||f.contains(d)||d.contains(f)?false:q(a,d)&&q(a,f)&&c(a,d,f)?true:
false}return d?e:null}}(),Z=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function c(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||a.getName()!="form")return[];for(var b=[],c=["style","className"],e=0;e<c.length;e++){var d=a.$.elements.namedItem(c[e]);if(d){d=new CKEDITOR.dom.element(d);b.push([d,d.nextSibling]);d.remove()}}return b}function d(a,b){if(a&&!(a.type!=
CKEDITOR.NODE_ELEMENT||a.getName()!="form")&&b.length>0)for(var c=b.length-1;c>=0;c--){var e=b[c][0],d=b[c][1];d?e.insertBefore(d):e.appendTo(a)}}function b(a,b){var e=c(a),f={},j=a.$;if(!b){f["class"]=j.className||"";j.className=""}f.inline=j.style.cssText||"";if(!b)j.style.cssText="position: static; overflow: visible";d(e);return f}function a(a,b){var e=c(a),f=a.$;if("class"in b)f.className=b["class"];if("inline"in b)f.style.cssText=b.inline;d(e)}function e(a){if(!a.editable().isInline()){var b=
CKEDITOR.instances,c;for(c in b){var e=b[c];if(e.mode=="wysiwyg"&&!e.readOnly){e=e.document.getBody();e.setAttribute("contentEditable",false);e.setAttribute("contentEditable",true)}}if(a.editable().hasFocus){a.toolbox.focus();a.focus()}}}CKEDITOR.plugins.add("maximize",{init:function(c){function d(){var a=j.getViewPaneSize();c.resize(a.width,a.height,null,true)}if(c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var h=c.lang,f=CKEDITOR.document,j=f.getWindow(),k,o,n,q=CKEDITOR.TRISTATE_OFF;c.addCommand("maximize",
{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:false,exec:function(){var l=c.container.getChild(1),m=c.ui.space("contents");if(c.mode=="wysiwyg"){var r=c.getSelection();k=r&&r.getRanges();o=j.getScrollPosition()}else{var p=c.editable().$;k=!CKEDITOR.env.ie&&[p.selectionStart,p.selectionEnd];o=[p.scrollLeft,p.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){j.on("resize",d);n=j.getScrollPosition();for(r=c.container;r=r.getParent();){r.setCustomData("maximize_saved_styles",
b(r));r.setStyle("z-index",c.config.baseFloatZIndex-5)}m.setCustomData("maximize_saved_styles",b(m,true));l.setCustomData("maximize_saved_styles",b(l,true));m={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};f.getDocumentElement().setStyles(m);!CKEDITOR.env.gecko&&f.getDocumentElement().setStyle("position","fixed");(!CKEDITOR.env.gecko||!CKEDITOR.env.quirks)&&f.getBody().setStyles(m);CKEDITOR.env.ie?setTimeout(function(){j.$.scrollTo(0,0)},0):j.$.scrollTo(0,0);l.setStyle("position",CKEDITOR.env.gecko&&
CKEDITOR.env.quirks?"fixed":"absolute");l.$.offsetLeft;l.setStyles({"z-index":c.config.baseFloatZIndex-5,left:"0px",top:"0px"});l.addClass("cke_maximized");d();m=l.getDocumentPosition();l.setStyles({left:-1*m.x+"px",top:-1*m.y+"px"});CKEDITOR.env.gecko&&e(c)}else if(this.state==CKEDITOR.TRISTATE_ON){j.removeListener("resize",d);m=[m,l];for(r=0;r<m.length;r++){a(m[r],m[r].getCustomData("maximize_saved_styles"));m[r].removeCustomData("maximize_saved_styles")}for(r=c.container;r=r.getParent();){a(r,
r.getCustomData("maximize_saved_styles"));r.removeCustomData("maximize_saved_styles")}CKEDITOR.env.ie?setTimeout(function(){j.$.scrollTo(n.x,n.y)},0):j.$.scrollTo(n.x,n.y);l.removeClass("cke_maximized");if(CKEDITOR.env.webkit){l.setStyle("display","inline");setTimeout(function(){l.setStyle("display","block")},0)}c.fire("resize")}this.toggleState();if(r=this.uiItems[0]){m=this.state==CKEDITOR.TRISTATE_OFF?h.maximize.maximize:h.maximize.minimize;r=CKEDITOR.document.getById(r._.id);r.getChild(1).setHtml(m);
r.setAttribute("title",m);r.setAttribute("href",'javascript:void("'+m+'");')}if(c.mode=="wysiwyg")if(k){CKEDITOR.env.gecko&&e(c);c.getSelection().selectRanges(k);(p=c.getSelection().getStartElement())&&p.scrollIntoView(true)}else j.$.scrollTo(o.x,o.y);else{if(k){p.selectionStart=k[0];p.selectionEnd=k[1]}p.scrollLeft=o[0];p.scrollTop=o[1]}k=o=null;q=this.state;c.fire("maximize",this.state)},canUndo:false});c.ui.addButton&&c.ui.addButton("Maximize",{label:h.maximize.maximize,command:"maximize",toolbar:"tools,10"});
c.on("mode",function(){var a=c.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:q)},null,null,100)}}})}(),CKEDITOR.plugins.add("newpage",{init:function(c){c.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(c){var b=this;c.setData(c.config.newpage_html||"",function(){c.focus();setTimeout(function(){c.fire("afterCommandExec",{name:"newpage",command:b});c.selectionChange()},200)})},async:true});c.ui.addButton&&c.ui.addButton("NewPage",{label:c.lang.newpage.toolbar,
command:"newpage",toolbar:"document,20"})}}),CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var c=["{","background: url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;","clear: both;width:100%; _width:99.9%;border-top: #999999 1px dotted;border-bottom: #999999 1px dotted;padding:0;height: 5px;cursor: default;}"].join("").replace(/;/g," !important;");CKEDITOR.addCss("div.cke_pagebreak"+c)},init:function(c){if(!c.blockless){c.addCommand("pagebreak",
CKEDITOR.plugins.pagebreakCmd);c.ui.addButton&&c.ui.addButton("PageBreak",{label:c.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"});CKEDITOR.env.opera&&c.on("contentDom",function(){c.document.on("click",function(d){d=d.data.getTarget();d.is("div")&&d.hasClass("cke_pagebreak")&&c.getSelection().selectElement(d)})})}},afterInit:function(c){var d=c.lang.pagebreak.alt,b=c.dataProcessor,c=b&&b.dataFilter;(b=b&&b.htmlFilter)&&b.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak",
"");if(c!=a){var d=CKEDITOR.htmlParser.fragment.fromHtml('<span style="display: none;">&nbsp;</span>').children[0];b.children.length=0;b.add(d);d=b.attributes;delete d["aria-label"];delete d.contenteditable;delete d.title}return c}}},{applyToAll:true,priority:5});c&&c.addRules({elements:{div:function(a){var b=a.attributes,c=b&&b.style,g=c&&a.children.length==1&&a.children[0];if((g=g&&g.name=="span"&&g.attributes.style)&&/page-break-after\s*:\s*always/i.test(c)&&/display\s*:\s*none/i.test(g)){b.contenteditable=
"false";b["class"]="cke_pagebreak";b["data-cke-display-name"]="pagebreak";b["aria-label"]=d;b.title=d;a.children.length=0}}}})}}),CKEDITOR.plugins.pagebreakCmd={exec:function(c){var d=c.lang.pagebreak.alt,d=CKEDITOR.dom.element.createFromHtml('<div style="page-break-after: always;"contenteditable="false" title="'+d+'" aria-label="'+d+'" data-cke-display-name="pagebreak" class="cke_pagebreak"></div>',c.document);c.insertElement(d)},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(c){return(c=
c.parent)&&c.name=="div"&&c.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"},function(){function c(b,a,c){var d=CKEDITOR.cleanWord;if(d)c();else{b=CKEDITOR.getUrl(b.config.pasteFromWordCleanupFile||a+"filter/default.js");CKEDITOR.scriptLoader.load(b,c,null,true)}return!d}function d(b){b.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(b){var a=0,e=this.path;b.addCommand("pastefromword",{canUndo:false,async:true,exec:function(b){var c=
this;a=1;b.once("beforePaste",d);b.getClipboardData({title:b.lang.pastefromword.title},function(a){a&&b.fire("paste",{type:"html",dataValue:a.dataValue});b.fire("afterCommandExec",{name:"pastefromword",command:c,returnValue:!!a})})}});b.ui.addButton&&b.ui.addButton("PasteFromWord",{label:b.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});b.on("pasteState",function(a){b.getCommand("pastefromword").setState(a.data)});b.on("paste",function(d){var g=d.data,h=g.dataValue;if(h&&
(a||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(h))){var f=c(b,e,function(){if(f)b.fire("paste",g);else if(!b.config.pasteFromWordPromptCleanup||a||confirm(b.lang.pastefromword.confirmCleanup))g.dataValue=CKEDITOR.cleanWord(h,b)});f&&d.cancel()}},null,null,3)}})}(),function(){var c={canUndo:false,async:true,exec:function(d){d.getClipboardData({title:d.lang.pastetext.title},function(b){b&&d.fire("paste",{type:"text",dataValue:b.dataValue});d.fire("afterCommandExec",{name:"pastetext",
command:c,returnValue:!!b})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(d){d.addCommand("pastetext",c);d.ui.addButton&&d.ui.addButton("PasteText",{label:d.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(d.config.forcePasteAsPlainText)d.on("beforePaste",function(b){if(b.data.type!="html")b.data.type="text"});d.on("pasteState",function(b){d.getCommand("pastetext").setState(b.data)})}})}(),function(){var c,d={modes:{wysiwyg:1,source:1},canUndo:false,
readOnly:1,exec:function(b){var a,e=b.config,d=e.baseHref?'<base href="'+e.baseHref+'"/>':"";if(e.fullPage)a=b.getData().replace(/<head>/,"$&"+d).replace(/[^>]*(?=<\/title>)/,"$& &mdash; "+b.lang.preview.preview);else{var e="<body ",g=b.document&&b.document.getBody();if(g){g.getAttribute("id")&&(e=e+('id="'+g.getAttribute("id")+'" '));g.getAttribute("class")&&(e=e+('class="'+g.getAttribute("class")+'" '))}a=b.config.docType+'<html dir="'+b.config.contentsLangDirection+'"><head>'+d+"<title>"+b.lang.preview.preview+
"</title>"+CKEDITOR.tools.buildStyleHtml(b.config.contentsCss)+"</head>"+(e+">")+b.getData()+"</body></html>"}d=640;e=420;g=80;try{var h=window.screen,d=Math.round(h.width*0.8),e=Math.round(h.height*0.7),g=Math.round(h.width*0.1)}catch(f){}if(!b.fire("contentPreview",b={dataValue:a}))return false;h="";if(CKEDITOR.env.ie){window._cke_htmlToLoad=b.dataValue;h="javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+
"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad = null;})() )"}if(CKEDITOR.env.gecko){window._cke_htmlToLoad=b.dataValue;h=c+"preview.html"}h=window.open(h,null,"toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width="+d+",height="+e+",left="+g);if(!CKEDITOR.env.ie&&!CKEDITOR.env.gecko){h=h.document;h.open();h.write(b.dataValue);h.close()}return true}};CKEDITOR.plugins.add("preview",{init:function(b){if(b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){c=
this.path;b.addCommand("preview",d);b.ui.addButton&&b.ui.addButton("Preview",{label:b.lang.preview.preview,command:"preview",toolbar:"document,40"})}}})}(),CKEDITOR.plugins.add("print",{init:function(c){if(c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){c.addCommand("print",CKEDITOR.plugins.print);c.ui.addButton&&c.ui.addButton("Print",{label:c.lang.print.toolbar,command:"print",toolbar:"document,50"})}}}),CKEDITOR.plugins.print={exec:function(c){CKEDITOR.env.opera||(CKEDITOR.env.gecko?c.window.$.print():
c.document.$.execCommand("Print"))},canUndo:!1,readOnly:1,modes:{wysiwyg:!CKEDITOR.env.opera}},CKEDITOR.plugins.add("removeformat",{init:function(c){c.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);c.ui.addButton&&c.ui.addButton("RemoveFormat",{label:c.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(c){for(var d=c._.removeFormatRegex||(c._.removeFormatRegex=RegExp("^(?:"+
c.config.removeFormatTags.replace(/,/g,"|")+")$","i")),b=c._.removeAttributes||(c._.removeAttributes=c.config.removeFormatAttributes.split(",")),a=CKEDITOR.plugins.removeformat.filter,e=c.getSelection().getRanges(1),i=e.createIterator(),g;g=i.getNextRange();){g.collapsed||g.enlarge(CKEDITOR.ENLARGE_ELEMENT);var h=g.createBookmark(),f=h.startNode,j=h.endNode,k=function(b){for(var e=c.elementPath(b),f=e.elements,g=1,h;h=f[g];g++){if(h.equals(e.block)||h.equals(e.blockLimit))break;d.test(h.getName())&&
a(c,h)&&b.breakParent(h)}};k(f);if(j){k(j);for(f=f.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT);f;){if(f.equals(j))break;k=f.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);if(!(f.getName()=="img"&&f.data("cke-realelement"))&&a(c,f))if(d.test(f.getName()))f.remove(1);else{f.removeAttributes(b);c.fire("removeFormatCleanup",f)}f=k}}g.moveToBookmark(h)}c.forceNextSelectionCheck();c.getSelection().selectRanges(e)}}},filter:function(c,d){for(var b=c._.removeFormatFilters||[],a=0;a<b.length;a++)if(b[a](d)===
false)return false;return true}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(c){if(!this._.removeFormatFilters)this._.removeFormatFilters=[];this._.removeFormatFilters.push(c)},CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("resize",{init:function(c){var d,b,a,e,i=c.config,g=c.ui.spaceId("resizer"),
h=c.element?c.element.getDirection(1):"ltr";!i.resize_dir&&(i.resize_dir="vertical");i.resize_maxWidth==void 0&&(i.resize_maxWidth=3E3);i.resize_maxHeight==void 0&&(i.resize_maxHeight=3E3);i.resize_minWidth==void 0&&(i.resize_minWidth=750);i.resize_minHeight==void 0&&(i.resize_minHeight=250);if(i.resize_enabled!==false){var f=null,j=(i.resize_dir=="both"||i.resize_dir=="horizontal")&&i.resize_minWidth!=i.resize_maxWidth,k=(i.resize_dir=="both"||i.resize_dir=="vertical")&&i.resize_minHeight!=i.resize_maxHeight,
o=function(f){var g=d,n=b,p=g+(f.data.$.screenX-a)*(h=="rtl"?-1:1),f=n+(f.data.$.screenY-e);j&&(g=Math.max(i.resize_minWidth,Math.min(p,i.resize_maxWidth)));k&&(n=Math.max(i.resize_minHeight,Math.min(f,i.resize_maxHeight)));c.resize(j?g:null,n)},n=function(){CKEDITOR.document.removeListener("mousemove",o);CKEDITOR.document.removeListener("mouseup",n);if(c.document){c.document.removeListener("mousemove",o);c.document.removeListener("mouseup",n)}},q=CKEDITOR.tools.addFunction(function(g){f||(f=c.getResizable());
d=f.$.offsetWidth||0;b=f.$.offsetHeight||0;a=g.screenX;e=g.screenY;i.resize_minWidth>d&&(i.resize_minWidth=d);i.resize_minHeight>b&&(i.resize_minHeight=b);CKEDITOR.document.on("mousemove",o);CKEDITOR.document.on("mouseup",n);if(c.document){c.document.on("mousemove",o);c.document.on("mouseup",n)}g.preventDefault&&g.preventDefault()});c.on("destroy",function(){CKEDITOR.tools.removeFunction(q)});c.on("uiSpace",function(a){if(a.data.space=="bottom"){var b="";j&&!k&&(b=" cke_resizer_horizontal");!j&&k&&
(b=" cke_resizer_vertical");var e='<span id="'+g+'" class="cke_resizer'+b+" cke_resizer_"+h+'" title="'+CKEDITOR.tools.htmlEncode(c.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+q+', event)">'+(h=="ltr"?"◢":"◣")+"</span>";h=="ltr"&&b=="ltr"?a.data.html=a.data.html+e:a.data.html=e+a.data.html}},c,null,100);c.on("maximize",function(a){c.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var c={readOnly:1,exec:function(c){if(c.fire("save"))if(c=c.element.$.form)try{c.submit()}catch(b){c.submit.click&&
c.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(d){if(d.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){d.addCommand("save",c).modes={wysiwyg:!!d.element.$.form};d.ui.addButton&&d.ui.addButton("Save",{label:d.lang.save.toolbar,command:"save",toolbar:"document,10"})}}})}(),function(){CKEDITOR.plugins.add("selectall",{init:function(c){c.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(c){var b=c.editable();if(b.is("textarea")){c=b.$;if(CKEDITOR.env.ie)c.createTextRange().execCommand("SelectAll");
else{c.selectionStart=0;c.selectionEnd=c.value.length}c.focus()}else{if(b.is("body"))c.document.$.execCommand("SelectAll",false,null);else{var a=c.createRange();a.selectNodeContents(b);a.select()}c.forceNextSelectionCheck();c.selectionChange()}},canUndo:false});c.ui.addButton&&c.ui.addButton("SelectAll",{label:c.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){var c={readOnly:1,preserveState:true,editorFocus:false,exec:function(c){this.toggleState();this.refresh(c)},
refresh:function(c){if(c.document){var b=this.state==CKEDITOR.TRISTATE_ON&&(c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE||c.focusManager.hasFocus)?"attachClass":"removeClass";c.editable()[b]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){function c(b){return".%1.%2 p,.%1.%2 div,.%1.%2 pre,.%1.%2 address,.%1.%2 blockquote,.%1.%2 h1,.%1.%2 h2,.%1.%2 h3,.%1.%2 h4,.%1.%2 h5,.%1.%2 h6{background-position: top %3;padding-%3: 8px;}".replace(/%1/g,"cke_show_blocks").replace(/%2/g,
"cke_contents_"+b).replace(/%3/g,b=="rtl"?"right":"left")}CKEDITOR.addCss(".%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}".replace(/%1/g,"background-image: url("+
CKEDITOR.getUrl(this.path)+"images/block_").replace(/%2/g,"cke_show_blocks ")+c("ltr")+c("rtl"))},init:function(d){if(!d.blockless){var b=d.addCommand("showblocks",c);b.canUndo=false;d.config.startupOutlineBlocks&&b.setState(CKEDITOR.TRISTATE_ON);d.ui.addButton&&d.ui.addButton("ShowBlocks",{label:d.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});d.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(d)});if(d.elementMode==CKEDITOR.ELEMENT_MODE_INLINE){var a=function(){b.refresh(d)};
d.on("focus",a);d.on("blur",a)}d.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(d)})}}})}(),function(){var c={preserveState:true,editorFocus:false,readOnly:1,exec:function(c){this.toggleState();this.refresh(c)},refresh:function(c){if(c.document){var b=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";c.editable()[b]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var c;c=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th",
"{","border : #d3d3d3 1px dotted","}"]:[".%1 table.%2,",".%1 table.%2 > tr > td, .%1 table.%2 > tr > th,",".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(c)},init:function(d){var b=d.addCommand("showborders",c);b.canUndo=
false;d.config.startupShowBorders!==false&&b.setState(CKEDITOR.TRISTATE_ON);d.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(d)},null,null,100);d.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(d)});d.on("removeFormatCleanup",function(a){a=a.data;d.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&(a.is("table")&&(!a.hasAttribute("border")||parseInt(a.getAttribute("border"),10)<=0))&&a.addClass("cke_show_border")})},afterInit:function(c){var b=c.dataProcessor,
c=b&&b.dataFilter,b=b&&b.htmlFilter;c&&c.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"],c=parseInt(a.border,10);if((!c||c<=0)&&(!b||b.indexOf("cke_show_border")==-1))a["class"]=(b||"")+" cke_show_border"}}});b&&b.addRules({elements:{table:function(a){var a=a.attributes,b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}});CKEDITOR.on("dialogDefinition",function(c){var b=c.data.name;if(b=="table"||b=="tableProperties"){c=
c.data.definition;b=c.getContents("info").get("txtBorder");b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,c){a.apply(this,arguments);var d=parseInt(this.getValue(),10);c[!d||d<=0?"addClass":"removeClass"]("cke_show_border")}});if(c=(c=c.getContents("advanced"))&&c.get("advCSSClasses")){c.setup=CKEDITOR.tools.override(c.setup,function(a){return function(){a.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}});c.commit=CKEDITOR.tools.override(c.commit,
function(a){return function(b,c){a.apply(this,arguments);parseInt(c.getAttribute("border"),10)||c.addClass("cke_show_border")}})}}})}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(c){c.config.smiley_path=c.config.smiley_path||this.path+"images/";c.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));c.ui.addButton&&c.ui.addButton("Smiley",{label:c.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"});
CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}}),CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "),CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),
function(){CKEDITOR.plugins.add("sourcearea",{init:function(d){function b(){this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show()}if(d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var a=CKEDITOR.plugins.sourcearea;d.addMode("source",function(a){var i=d.ui.space("contents").getDocument().createElement("textarea");i.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",
outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",d.config.sourceAreaTabSize||4)));i.setAttribute("dir","ltr");i.addClass("cke_source cke_reset cke_enable_context_menu");d.ui.space("contents").append(i);i=d.editable(new c(d,i));i.setData(d.getData(1));if(CKEDITOR.env.ie){i.attachListener(d,"resize",b,i);i.attachListener(CKEDITOR.document.getWindow(),"resize",b,i);CKEDITOR.tools.setTimeout(b,0,i)}d.fire("ariaWidget",this);a()});d.addCommand("source",a.commands.source);d.ui.addButton&&
d.ui.addButton("Source",{label:d.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});d.on("mode",function(){d.getCommand("source").setState(d.mode=="source"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)})}}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(c){this.setValue(c);this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(c){this[(c?"set":
"remove")+"Attribute"]("readOnly","readonly")},detach:function(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){c.mode=="wysiwyg"&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode(c.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{ar:1,bg:1,ca:1,cs:1,cy:1,de:1,
el:1,en:1,eo:1,es:1,et: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,ku:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},requires:"dialog",init:function(c){var d=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");c.addCommand("specialchar",{exec:function(){var b=c.langCode,b=d.availableLangs[b]?b:d.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d.path+
"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(c.lang.specialchar,d.langEntries[b]);c.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:false});c.ui.addButton&&c.ui.addButton("SpecialChar",{label:c.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! &quot; # $ % &amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ 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 { | } ~ &euro; &lsquo; &rsquo; &ldquo; &rdquo; &ndash; &mdash; &iexcl; &cent; &pound; &curren; &yen; &brvbar; &sect; &uml; &copy; &ordf; &laquo; &not; &reg; &macr; &deg; &sup2; &sup3; &acute; &micro; &para; &middot; &cedil; &sup1; &ordm; &raquo; &frac14; &frac12; &frac34; &iquest; &Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; &AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; &Igrave; &Iacute; &Icirc; &Iuml; &ETH; &Ntilde; &Ograve; &Oacute; &Ocirc; &Otilde; &Ouml; &times; &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; &divide; &oslash; &ugrave; &uacute; &ucirc; &uuml; &yacute; &thorn; &yuml; &OElig; &oelig; &#372; &#374 &#373 &#375; &sbquo; &#8219; &bdquo; &hellip; &trade; &#9658; &bull; &rarr; &rArr; &hArr; &diams; &asymp;".split(" "),
function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(c){var d=c.config,b=c.lang.stylescombo,a={},e=[],i=[];c.on("stylesSet",function(b){if(b=b.data.styles){for(var h,f,j=0,k=b.length;j<k;j++){h=b[j];if(!(c.blockless&&h.element in CKEDITOR.dtd.$block)){f=h.name;h=new CKEDITOR.style(h);if(!c.filter.customConfig||c.filter.check(h)){h._name=f;h._.enterMode=d.enterMode;h._.weight=j+(h.type==CKEDITOR.STYLE_OBJECT?1:h.type==CKEDITOR.STYLE_BLOCK?2:3)*1E3;a[f]=h;e.push(h);i.push(h)}}}e.sort(function(a,
b){return a._.weight-b._.weight})}});c.ui.addRichCombo("Styles",{label:b.label,title:b.panelTitle,toolbar:"styles,10",allowedContent:i,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(d.contentsCss),multiSelect:true,attributes:{"aria-label":b.panelTitle}},init:function(){var a,c,d,i,k,o;k=0;for(o=e.length;k<o;k++){a=e[k];c=a._name;i=a.type;if(i!=d){this.startGroup(b["panelTitle"+i]);d=i}this.add(c,a.type==CKEDITOR.STYLE_OBJECT?c:a.buildPreview(),c)}this.commit()},onClick:function(b){c.focus();
c.fire("saveSnapshot");var b=a[b],e=c.elementPath();c[b.checkActive(e)?"removeStyle":"applyStyle"](b);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(b){for(var c=this.getValue(),b=b.data.path.elements,e=0,d=b.length,i;e<d;e++){i=b[e];for(var o in a)if(a[o].checkElementRemovable(i,true)){o!=c&&this.setValue(o);return}}this.setValue("")},this)},onOpen:function(){var e=c.getSelection().getSelectedElement(),e=c.elementPath(e),d=[0,0,0,0];this.showAll();this.unmarkAll();for(var f in a){var i=
a[f],k=i.type;i.checkApplicable(e,c.activeFilter)?d[k]++:this.hideItem(f);i.checkActive(e)&&this.mark(f)}d[CKEDITOR.STYLE_BLOCK]||this.hideGroup(b["panelTitle"+CKEDITOR.STYLE_BLOCK]);d[CKEDITOR.STYLE_INLINE]||this.hideGroup(b["panelTitle"+CKEDITOR.STYLE_INLINE]);d[CKEDITOR.STYLE_OBJECT]||this.hideGroup(b["panelTitle"+CKEDITOR.STYLE_OBJECT])},refresh:function(){var b=c.elementPath();if(b){for(var e in a)if(a[e].checkApplicable(b,c.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){a=
{};e=[]}})}})}(),function(){function c(a){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var c=b.getSelection(),d;if(d=(new CKEDITOR.dom.elementPath(c.getCommonAncestor(),c.root)).contains({td:1,th:1},1)){var c=b.createRange(),f=CKEDITOR.tools.tryThese(function(){var b=d.getParent().$.cells[d.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=d.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?
b.cells.length-1:0]});if(!f&&!a){for(var j=d.getAscendant("table").$,f=d.getParent().$.cells,j=new CKEDITOR.dom.element(j.insertRow(-1),b.document),k=0,o=f.length;k<o;k++)j.append((new CKEDITOR.dom.element(f[k],b.document)).clone(false,false)).appendBogus();c.moveToElementEditStart(j)}else if(f){f=new CKEDITOR.dom.element(f);c.moveToElementEditStart(f);(!c.checkStartOfBlock()||!c.checkEndOfBlock())&&c.selectNodeContents(f)}else return true;c.select(true);return true}}return false}}}var d={editorFocus:false,
modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(true,a.tabIndex)}},a={exec:function(a){a.container.focusPrevious(true,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(e){for(var i=e.config.enableTabKeyTools!==false,g=e.config.tabSpaces||0,h="";g--;)h=h+" ";if(h)e.on("key",function(a){if(a.data.keyCode==9){e.insertHtml(h);a.cancel()}});if(i)e.on("key",function(a){(a.data.keyCode==9&&e.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&e.execCommand("selectPreviousCell"))&&
a.cancel()});e.addCommand("blur",CKEDITOR.tools.extend(b,d));e.addCommand("blurBack",CKEDITOR.tools.extend(a,d));e.addCommand("selectNextCell",c());e.addCommand("selectPreviousCell",c(true))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(c,d){var b=d===void 0?this.getTabIndex():d,a,e,i,g,h,f;if(b<=0)for(h=this.getNextSourceNode(c,CKEDITOR.NODE_ELEMENT);h;){if(h.isVisible()&&h.getTabIndex()===0){i=h;break}h=h.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT)}else for(h=this.getDocument().getBody().getFirst();h=
h.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);){if(!a)if(!e&&h.equals(this)){e=true;if(c){if(!(h=h.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;a=1}}else e&&!this.contains(h)&&(a=1);if(h.isVisible()&&!((f=h.getTabIndex())<0)){if(a&&f==b){i=h;break}if(f>b&&(!i||!g||f<g)){i=h;g=f}else if(!i&&f===0){i=h;g=f}}}i&&i.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(c,d){for(var b=d===void 0?this.getTabIndex():d,a,e,i,g=0,h,f=this.getDocument().getBody().getLast();f=f.getPreviousSourceNode(false,
CKEDITOR.NODE_ELEMENT);){if(!a)if(!e&&f.equals(this)){e=true;if(c){if(!(f=f.getPreviousSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;a=1}}else e&&!this.contains(f)&&(a=1);if(f.isVisible()&&!((h=f.getTabIndex())<0))if(b<=0){if(a&&h===0){i=f;break}if(h>g){i=f;g=h}}else{if(a&&h==b){i=f;break}if(h<b&&(!i||h>g)){i=f;g=h}}}i&&i.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(c){function d(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",
1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!c.blockless){var b=c.lang.table;c.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];"+(c.plugins.dialogadvtab?"table"+c.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"]]}));c.addCommand("tableProperties",
new CKEDITOR.dialogCommand("tableProperties",d()));c.addCommand("tableDelete",d({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var c=b.getParent();c.getChildCount()==1&&!c.is("body","td","th")&&(b=c);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));c.ui.addButton&&c.ui.addButton("Table",{label:b.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",
this.path+"dialogs/table.js");c.addMenuItems&&c.addMenuItems({table:{label:b.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:b.deleteTable,command:"tableDelete",group:"table",order:1}});c.on("doubleclick",function(a){if(a.data.element.is("table"))a.data.dialog="tableProperties"});c.contextMenu&&c.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function c(a){function b(a){if(!(c.length>0)&&a.type==CKEDITOR.NODE_ELEMENT&&
n.test(a.getName())&&!a.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(e,a,"selected_cell",true);c.push(a)}}for(var a=a.getRanges(),c=[],e={},d=0;d<a.length;d++){var f=a[d];if(f.collapsed){f=f.getCommonAncestor();(f=f.getAscendant("td",true)||f.getAscendant("th",true))&&c.push(f)}else{var f=new CKEDITOR.dom.walker(f),g;for(f.guard=b;g=f.next();)if(g.type!=CKEDITOR.NODE_ELEMENT||!g.is(CKEDITOR.dtd.table))if((g=g.getAscendant("td",true)||g.getAscendant("th",true))&&!g.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(e,
g,"selected_cell",true);c.push(g)}}}CKEDITOR.dom.element.clearAllMarkers(e);return c}function d(a,b){for(var e=c(a),d=e[0],f=d.getAscendant("table"),d=d.getDocument(),g=e[0].getParent(),h=g.$.rowIndex,e=e[e.length-1],i=e.getParent().$.rowIndex+e.$.rowSpan-1,e=new CKEDITOR.dom.element(f.$.rows[i]),h=b?h:i,g=b?g:e,e=CKEDITOR.tools.buildTableMap(f),f=e[h],h=b?e[h-1]:e[h+1],e=e[0].length,d=d.createElement("tr"),i=0;f[i]&&i<e;i++){var j;if(f[i].rowSpan>1&&h&&f[i]==h[i]){j=f[i];j.rowSpan=j.rowSpan+1}else{j=
(new CKEDITOR.dom.element(f[i])).clone();j.removeAttribute("rowSpan");j.appendBogus();d.append(j);j=j.$}i=i+(j.colSpan-1)}b?d.insertBefore(g):d.insertAfter(g)}function b(a){if(a instanceof CKEDITOR.dom.selection){for(var e=c(a),d=e[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(d),a=e[0].getParent().$.rowIndex,e=e[e.length-1],g=e.getParent().$.rowIndex+e.$.rowSpan-1,e=[],h=a;h<=g;h++){for(var i=f[h],j=new CKEDITOR.dom.element(d.$.rows[h]),k=0;k<i.length;k++){var n=new CKEDITOR.dom.element(i[k]),
o=n.getParent().$.rowIndex;if(n.$.rowSpan==1)n.remove();else{n.$.rowSpan=n.$.rowSpan-1;if(o==h){o=f[h+1];o[k-1]?n.insertAfter(new CKEDITOR.dom.element(o[k-1])):(new CKEDITOR.dom.element(d.$.rows[h+1])).append(n,1)}}k=k+(n.$.colSpan-1)}e.push(j)}f=d.$.rows;d=new CKEDITOR.dom.element(f[g+1]||(a>0?f[a-1]:null)||d.$.parentNode);for(h=e.length;h>=0;h--)b(e[h]);return d}if(a instanceof CKEDITOR.dom.element){d=a.getAscendant("table");d.$.rows.length==1?d.remove():a.remove()}return null}function a(a,b){for(var c=
b?Infinity:0,e=0;e<a.length;e++){var d;d=a[e];for(var f=b,g=d.getParent().$.cells,h=0,i=0;i<g.length;i++){var j=g[i],h=h+(f?1:j.colSpan);if(j==d.$)break}d=h-1;if(b?d<c:d>c)c=d}return c}function e(b,e){for(var d=c(b),f=d[0].getAscendant("table"),g=a(d,1),d=a(d),g=e?g:d,h=CKEDITOR.tools.buildTableMap(f),f=[],d=[],i=h.length,j=0;j<i;j++){f.push(h[j][g]);d.push(e?h[j][g-1]:h[j][g+1])}for(j=0;j<i;j++)if(f[j]){if(f[j].colSpan>1&&d[j]==f[j]){g=f[j];g.colSpan=g.colSpan+1}else{g=(new CKEDITOR.dom.element(f[j])).clone();
g.removeAttribute("colSpan");g.appendBogus();g[e?"insertBefore":"insertAfter"].call(g,new CKEDITOR.dom.element(f[j]));g=g.$}j=j+(g.rowSpan-1)}}function i(a,b){var c=a.getStartElement();if(c=c.getAscendant("td",1)||c.getAscendant("th",1)){var e=c.clone();e.appendBogus();b?e.insertBefore(c):e.insertAfter(c)}}function g(a){if(a instanceof CKEDITOR.dom.selection){var a=c(a),b=a[0]&&a[0].getAscendant("table"),e;a:{var d=0;e=a.length-1;for(var f={},i,j;i=a[d++];)CKEDITOR.dom.element.setMarker(f,i,"delete_cell",
true);for(d=0;i=a[d++];)if((j=i.getPrevious())&&!j.getCustomData("delete_cell")||(j=i.getNext())&&!j.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(f);e=j;break a}CKEDITOR.dom.element.clearAllMarkers(f);j=a[0].getParent();if(j=j.getPrevious())e=j.getLast();else{j=a[e].getParent();e=(j=j.getNext())?j.getChild(0):null}}for(j=a.length-1;j>=0;j--)g(a[j]);e?h(e,true):b&&b.remove()}else if(a instanceof CKEDITOR.dom.element){b=a.getParent();b.getChildCount()==1?b.remove():a.remove()}}
function h(a,b){var c=a.getDocument(),e=CKEDITOR.document;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11){e.focus();c.focus()}c=new CKEDITOR.dom.range(c);if(!c["moveToElementEdit"+(b?"End":"Start")](a)){c.selectNodeContents(a);c.collapse(b?false:true)}c.select(true)}function f(a,b,c){a=a[b];if(typeof c=="undefined")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 j(a,b,e){var d=c(a),g;if((b?d.length!=1:d.length<
2)||(g=a.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return false;var h,a=d[0];g=a.getAscendant("table");var i=CKEDITOR.tools.buildTableMap(g),j=i.length,k=i[0].length,n=a.getParent().$.rowIndex,o=f(i,n,a);if(b){var w;try{var x=parseInt(a.getAttribute("rowspan"),10)||1;h=parseInt(a.getAttribute("colspan"),10)||1;w=i[b=="up"?n-x:b=="down"?n+x:n][b=="left"?o-h:b=="right"?o+h:o]}catch(v){return false}if(!w||a.$==w)return false;d[b=="up"||b=="left"?"unshift":"push"](new CKEDITOR.dom.element(w))}for(var b=
a.getDocument(),B=n,x=w=0,E=!e&&new CKEDITOR.dom.documentFragment(b),C=0,b=0;b<d.length;b++){h=d[b];var D=h.getParent(),I=h.getFirst(),J=h.$.colSpan,G=h.$.rowSpan,D=D.$.rowIndex,L=f(i,D,h),C=C+J*G,x=Math.max(x,L-o+J);w=Math.max(w,D-n+G);if(!e){J=h;(G=J.getBogus())&&G.remove();J.trim();if(h.getChildren().count()){if(D!=B&&I&&(!I.isBlockBoundary||!I.isBlockBoundary({br:1})))(B=E.getLast(CKEDITOR.dom.walker.whitespaces(true)))&&(!B.is||!B.is("br"))&&E.append("br");h.moveChildren(E)}b?h.remove():h.setHtml("")}B=
D}if(e)return w*x==C;E.moveChildren(a);a.appendBogus();x>=k?a.removeAttribute("rowSpan"):a.$.rowSpan=w;w>=j?a.removeAttribute("colSpan"):a.$.colSpan=x;e=new CKEDITOR.dom.nodeList(g.$.rows);d=e.count();for(b=d-1;b>=0;b--){g=e.getItem(b);if(!g.$.cells.length){g.remove();d++}}return a}function k(a,b){var e=c(a);if(e.length>1)return false;if(b)return true;var e=e[0],d=e.getParent(),g=d.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),i=d.$.rowIndex,j=f(h,i,e),k=e.$.rowSpan,n;if(k>1){n=Math.ceil(k/
2);for(var k=Math.floor(k/2),d=i+n,g=new CKEDITOR.dom.element(g.$.rows[d]),h=f(h,d),o,d=e.clone(),i=0;i<h.length;i++){o=h[i];if(o.parentNode==g.$&&i>j){d.insertBefore(new CKEDITOR.dom.element(o));break}else o=null}o||g.append(d,true)}else{k=n=1;g=d.clone();g.insertAfter(d);g.append(d=e.clone());o=f(h,i);for(j=0;j<o.length;j++)o[j].rowSpan++}d.appendBogus();e.$.rowSpan=n;d.$.rowSpan=k;n==1&&e.removeAttribute("rowSpan");k==1&&d.removeAttribute("rowSpan");return d}function o(a,b){var e=c(a);if(e.length>
1)return false;if(b)return true;var e=e[0],d=e.getParent(),g=d.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=f(g,d.$.rowIndex,e),i=e.$.colSpan;if(i>1){d=Math.ceil(i/2);i=Math.floor(i/2)}else{for(var i=d=1,j=[],k=0;k<g.length;k++){var n=g[k];j.push(n[h]);n[h].rowSpan>1&&(k=k+(n[h].rowSpan-1))}for(g=0;g<j.length;g++)j[g].colSpan++}g=e.clone();g.insertAfter(e);g.appendBogus();e.$.colSpan=d;g.$.colSpan=i;d==1&&e.removeAttribute("colSpan");i==1&&g.removeAttribute("colSpan");return g}var n=
/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function f(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function m(b,c){var e=a.addCommand(b,c);a.addFeature(e)}var n=a.lang.table;m("cellProperties",new CKEDITOR.dialogCommand("cellProperties",f({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",
requiredContent:"table"})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");m("rowDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();h(b(a))}}));m("rowInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();d(a,true)}}));m("rowInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();d(a)}}));m("columnDelete",f({requiredContent:"table",exec:function(a){for(var a=a.getSelection(),a=c(a),b=a[0],e=a[a.length-1],a=b.getAscendant("table"),
d=CKEDITOR.tools.buildTableMap(a),f,g,i=[],j=0,k=d.length;j<k;j++)for(var l=0,n=d[j].length;l<n;l++){d[j][l]==b.$&&(f=l);d[j][l]==e.$&&(g=l)}for(j=f;j<=g;j++)for(l=0;l<d.length;l++){e=d[l];b=new CKEDITOR.dom.element(a.$.rows[l]);e=new CKEDITOR.dom.element(e[j]);if(e.$){e.$.colSpan==1?e.remove():e.$.colSpan=e.$.colSpan-1;l=l+(e.$.rowSpan-1);b.$.cells.length||i.push(b)}}g=a.$.rows[0]&&a.$.rows[0].cells;f=new CKEDITOR.dom.element(g[f]||(f?g[f-1]:a.$.parentNode));i.length==k&&a.remove();f&&h(f,true)}}));
m("columnInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();e(a,true)}}));m("columnInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();e(a)}}));m("cellDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();g(a)}}));m("cellMerge",f({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a){h(j(a.getSelection()),true)}}));m("cellMergeRight",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",
exec:function(a){h(j(a.getSelection(),"right"),true)}}));m("cellMergeDown",f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){h(j(a.getSelection(),"down"),true)}}));m("cellVerticalSplit",f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){h(k(a.getSelection()))}}));m("cellHorizontalSplit",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){h(o(a.getSelection()))}}));m("cellInsertBefore",f({requiredContent:"table",exec:function(a){a=
a.getSelection();i(a,true)}}));m("cellInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();i(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:n.cell.menu,group:"tablecell",order:1,getItems:function(){var b=a.getSelection(),e=c(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:j(b,null,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:j(b,
"right",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:j(b,"down",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:k(b,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:o(b,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:e.length>0?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:n.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},
tablecell_insertAfter:{label:n.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:n.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:n.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:n.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:n.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:n.cell.splitHorizontal,
group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:n.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:n.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:n.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:n.row.insertBefore,
group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:n.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:n.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:n.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:n.column.insertBefore,
group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:n.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:n.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})},getSelectedCells:c};
CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(c){for(var c=c.$.rows,d=-1,b=[],a=0;a<c.length;a++){d++;!b[d]&&(b[d]=[]);for(var e=-1,i=0;i<c[a].cells.length;i++){var g=c[a].cells[i];for(e++;b[d][e];)e++;for(var h=isNaN(g.colSpan)?1:g.colSpan,g=isNaN(g.rowSpan)?1:g.rowSpan,f=0;f<g;f++){b[d+f]||(b[d+f]=[]);for(var j=0;j<h;j++)b[d+f][e+j]=c[a].cells[i]}e=e+(h-1)}}return b},function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(b){CKEDITOR.dialog.add("templates",
CKEDITOR.getUrl(this.path+"dialogs/templates.js"));b.addCommand("templates",new CKEDITOR.dialogCommand("templates"));b.ui.addButton&&b.ui.addButton("Templates",{label:b.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},d={};CKEDITOR.addTemplates=function(b,a){c[b]=a};CKEDITOR.getTemplates=function(b){return c[b]};CKEDITOR.loadTemplates=function(b,a){for(var c=[],i=0,g=b.length;i<g;i++)if(!d[b[i]]){c.push(b[i]);d[b[i]]=1}c.length?CKEDITOR.scriptLoader.load(c,a):setTimeout(a,
0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,function(){function c(a){function b(){for(var f=c(),i=CKEDITOR.tools.clone(a.config.toolbarGroups)||d(a),j=0;j<i.length;j++){var k=i[j];if(k!="/"){typeof k=="string"&&(k=i[j]={name:k});var m,r=k.groups;if(r)for(var p=0;p<r.length;p++){m=r[p];(m=f[m])&&h(k,m)}(m=f[k.name])&&h(k,m)}}return i}function c(){var b={},d,f,g;for(d in a.ui.items){f=a.ui.items[d];g=
f.toolbar||"others";g=g.split(",");f=g[0];g=parseInt(g[1]||-1,10);b[f]||(b[f]=[]);b[f].push({name:d,order:g})}for(f in b)b[f]=b[f].sort(function(a,b){return a.order==b.order?0:b.order<0?-1:a.order<0?1:a.order<b.order?-1:1});return b}function h(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var d;d=c.shift();){d=typeof d=="string"?d:d.name;if(!j||CKEDITOR.tools.indexOf(j,d)==-1)(d=a.ui.create(d))&&a.addFeature(d)&&b.items.push(d)}}}function f(a){var b=[],c,e,d;for(c=0;c<a.length;++c){e=
a[c];d={};if(e=="/")b.push(e);else if(CKEDITOR.tools.isArray(e)){h(d,CKEDITOR.tools.clone(e));b.push(d)}else if(e.items){h(d,CKEDITOR.tools.clone(e.items));d.name=e.name;b.push(d)}}return b}var j=a.config.removeButtons,j=j&&j.split(","),k=a.config.toolbar;typeof k=="string"&&(k=a.config["toolbar_"+k]);return a.toolbar=k?f(k):b()}function d(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",
groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var b=function(){this.toolbars=[];this.focusCommandExecuted=false};b.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var c=0,d;d=b.items[c++];)if(d.focus){d.focus();return}};var a={modes:{wysiwyg:1,
source:1},readOnly:1,exec:function(a){if(a.toolbox){a.toolbox.focusCommandExecuted=true;CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus()}}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(e){var d,g=function(a,b){var c,k=e.lang.dir=="rtl",o=e.config.toolbarGroupCycling,o=o===void 0||o;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;){c=b==9?(c?c.next:a.toolbar.next)||e.toolbox.toolbars[0]:(c?c.previous:a.toolbar.previous)||
e.toolbox.toolbars[e.toolbox.toolbars.length-1];if(c.items.length)for(a=c.items[d?c.items.length-1:0];a&&!a.focus;)(a=d?a.previous:a.next)||(c=0)}a&&a.focus();return false;case k?37:39:case 40:c=a;do{c=c.next;!c&&o&&(c=a.toolbar.items[0])}while(c&&!c.focus);c?c.focus():g(a,9);return false;case k?39:37:case 38:c=a;do{c=c.previous;!c&&o&&(c=a.toolbar.items[a.toolbar.items.length-1])}while(c&&!c.focus);if(c)c.focus();else{d=1;g(a,CKEDITOR.SHIFT+9);d=0}return false;case 27:e.focus();return false;case 13:case 32:a.execute();
return false}return true};e.on("uiSpace",function(a){if(a.data.space==e.config.toolbarLocation){a.removeListener();e.toolbox=new b;var d=CKEDITOR.tools.getNextId(),i=['<span id="',d,'" class="cke_voice_label">',e.lang.toolbar.toolbars,"</span>",'<span id="'+e.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',d,'" onmousedown="return false;">'],d=e.config.toolbarStartupExpanded!==false,k,o;e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&i.push('<span class="cke_toolbox_main"'+
(d?">":' style="display:none">'));for(var n=e.toolbox.toolbars,q=c(e),l=0;l<q.length;l++){var m,r=0,p,z=q[l],t;if(z){if(k){i.push("</span>");o=k=0}if(z==="/")i.push('<span class="cke_toolbar_break"></span>');else{t=z.items||z;for(var A=0;A<t.length;A++){var y=t[A],u;if(y)if(y.type==CKEDITOR.UI_SEPARATOR)o=k&&y;else{u=y.canGroup!==false;if(!r){m=CKEDITOR.tools.getNextId();r={id:m,items:[]};p=z.name&&(e.lang.toolbar.toolbarGroups[z.name]||z.name);i.push('<span id="',m,'" class="cke_toolbar"',p?' aria-labelledby="'+
m+'_label"':"",' role="toolbar">');p&&i.push('<span id="',m,'_label" class="cke_voice_label">',p,"</span>");i.push('<span class="cke_toolbar_start"></span>');var s=n.push(r)-1;if(s>0){r.previous=n[s-1];r.previous.next=r}}if(u){if(!k){i.push('<span class="cke_toolgroup" role="presentation">');k=1}}else if(k){i.push("</span>");k=0}m=function(a){a=a.render(e,i);s=r.items.push(a)-1;if(s>0){a.previous=r.items[s-1];a.previous.next=a}a.toolbar=r;a.onkey=g;a.onfocus=function(){e.toolbox.focusCommandExecuted||
e.focus()}};if(o){m(o);o=0}m(y)}}if(k){i.push("</span>");o=k=0}r&&i.push('<span class="cke_toolbar_end"></span></span>')}}}e.config.toolbarCanCollapse&&i.push("</span>");if(e.config.toolbarCanCollapse&&e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var w=CKEDITOR.tools.addFunction(function(){e.execCommand("toolbarCollapse")});e.on("destroy",function(){CKEDITOR.tools.removeFunction(w)});e.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),
e=a.ui.space("contents"),d=c.getParent(),f=parseInt(e.$.style.height,10),g=d.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");if(h){c.show();b.removeClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarCollapse)}else{c.hide();b.addClass("cke_toolbox_collapser_min");b.setAttribute("title",a.lang.toolbar.toolbarExpand)}b.getFirst().setText(h?"▲":"◀");e.setStyle("height",f-(d.$.offsetHeight-g)+"px");a.fire("resize")},modes:{wysiwyg:1,source:1}});e.setKeystroke(CKEDITOR.ALT+
(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");i.push('<a title="'+(d?e.lang.toolbar.toolbarCollapse:e.lang.toolbar.toolbarExpand)+'" id="'+e.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser');d||i.push(" cke_toolbox_collapser_min");i.push('" onclick="CKEDITOR.tools.callFunction('+w+')">','<span class="cke_arrow">&#9650;</span>',"</a>")}i.push("</span>");a.data.html=a.data.html+i.join("")}});e.on("destroy",function(){if(this.toolbox){var a,b=0,c,e,d;
for(a=this.toolbox.toolbars;b<a.length;b++){e=a[b].items;for(c=0;c<e.length;c++){d=e[c];d.clickFn&&CKEDITOR.tools.removeFunction(d.clickFn);d.keyDownFn&&CKEDITOR.tools.removeFunction(d.keyDownFn)}}}});e.on("uiReady",function(){var a=e.ui.space("toolbox");a&&e.focusManager.add(a,1)});e.addCommand("toolbarFocus",a);e.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");e.ui.add("-",CKEDITOR.UI_SEPARATOR,{});e.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('<span class="cke_toolbar_separator" role="separator"></span>');
return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,c){var h=d(this.editor),f=b===0,j={name:a};if(c){if(c=CKEDITOR.tools.search(h,function(a){return a.name==c})){!c.groups&&(c.groups=[]);if(b){b=CKEDITOR.tools.indexOf(c.groups,b);if(b>=0){c.groups.splice(b+1,0,a);return}}f?c.groups.splice(0,0,a):c.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(h,function(a){return a.name==b}));f?h.splice(0,0,a):typeof b=="number"?h.splice(b+1,0,j):h.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",
CKEDITOR.config.toolbarLocation="top",function(){function c(a){this.editor=a;this.reset()}CKEDITOR.plugins.add("undo",{init:function(a){function b(a){g.enabled&&a.data.command.canUndo!==false&&g.save()}function d(){g.enabled=a.readOnly?false:a.mode=="wysiwyg";g.onChange()}var g=a.undoManager=new c(a),h=a.addCommand("undo",{exec:function(){if(g.undo()){a.selectionChange();this.fire("afterUndo")}},startDisabled:true,canUndo:false}),f=a.addCommand("redo",{exec:function(){if(g.redo()){a.selectionChange();
this.fire("afterRedo")}},startDisabled:true,canUndo:false});a.setKeystroke([[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"]]);g.onChange=function(){h.setState(g.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);f.setState(g.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",b);a.on("afterCommandExec",b);a.on("saveSnapshot",function(a){g.save(a.data&&a.data.contentOnly)});a.on("contentDom",function(){a.editable().on("keydown",
function(a){a=a.data.getKey();(a==8||a==46)&&g.type(a,0)});a.editable().on("keypress",function(a){g.type(a.data.getKey(),1)})});a.on("beforeModeUnload",function(){a.mode=="wysiwyg"&&g.save(true)});a.on("mode",d);a.on("readOnly",d);if(a.ui.addButton){a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"});a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"})}a.resetUndo=function(){g.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){g.currentImage&&
g.update()});a.on("lockSnapshot",function(a){g.lock(a.data&&a.data.dontUpdate)});a.on("unlockSnapshot",g.unlock,g)}});CKEDITOR.plugins.undo={};var d=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;if(!b)this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(true);a.fire("afterUndoImage")},b=/\b(?:href|src|name)="[^"]*?"/gi;d.prototype={equalsContent:function(a){var c=
this.contents,a=a.contents;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)){c=c.replace(b,"");a=a.replace(b,"")}return c!=a?false:true},equalsSelection:function(a){var b=this.bookmarks,a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return false;for(var c=0;c<b.length;c++){var d=b[c],h=a[c];if(d.startOffset!=h.startOffset||d.endOffset!=h.endOffset||!CKEDITOR.tools.arrayCompare(d.start,h.start)||!CKEDITOR.tools.arrayCompare(d.end,h.end))return false}}return true}};c.prototype=
{type:function(a,b){var c=!b&&a!=this.lastKeystroke,g=this.editor;if(!this.typing||b&&!this.wasCharacter||c){var h=new d(g),f=this.snapshots.length;CKEDITOR.tools.setTimeout(function(){var a=g.getSnapshot();CKEDITOR.env.ie&&(a=a.replace(/\s+data-cke-expando=".*?"/g,""));if(h.contents!=a&&f==this.snapshots.length){this.typing=true;this.save(false,h,false)||this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1);this.hasUndo=true;this.hasRedo=false;this.modifiersCount=this.typesCount=
1;this.onChange()}},0,this)}this.lastKeystroke=a;if(this.wasCharacter=b){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1}else setTimeout(function(){g.fire("change")},0)}else{this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1}else setTimeout(function(){g.fire("change")},0)}},reset:function(){this.lastKeystroke=0;this.snapshots=[];this.index=-1;this.limit=this.editor.config.undoStackSize||
20;this.currentImage=null;this.hasRedo=this.hasUndo=false;this.locked=null;this.resetType()},resetType:function(){this.typing=false;delete this.lastKeystroke;this.modifiersCount=this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(true);this.hasRedo=!!this.getNextImage(false);this.resetType();this.onChange()},save:function(a,b,c){if(this.locked)return false;var g=this.snapshots;b||(b=new d(this.editor));if(b.contents===false)return false;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||
b.equalsSelection(this.currentImage))return false}else this.editor.fire("change");g.splice(this.index+1,g.length-this.index-1);g.length==this.limit&&g.shift();this.index=g.push(b)-1;this.currentImage=b;c!==false&&this.fireChange();return true},restoreImage:function(a){var b=this.editor,c;if(a.bookmarks){b.focus();c=b.getSelection()}this.locked=1;this.editor.loadSnapshot(a.contents);if(a.bookmarks)c.selectBookmarks(a.bookmarks);else if(CKEDITOR.env.ie){c=this.editor.document.getBody().$.createTextRange();
c.collapse(true);c.select()}this.locked=0;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.fireChange();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;if(c)if(a)for(d=this.index-1;d>=0;d--){a=b[d];if(!c.equalsContent(a)){a.index=d;return a}}else for(d=this.index+1;d<b.length;d++){a=b[d];if(!c.equalsContent(a)){a.index=d;return a}}return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&
this.hasUndo},undo:function(){if(this.undoable()){this.save(true);var a=this.getNextImage(true);if(a)return this.restoreImage(a),true}return false},redo:function(){if(this.redoable()){this.save(true);if(this.redoable()){var a=this.getNextImage(false);if(a)return this.restoreImage(a),true}}return false},update:function(a){if(!this.locked){a||(a=new d(this.editor));for(var b=this.index,c=this.snapshots;b>0&&this.currentImage.equalsContent(c[b-1]);)b=b-1;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=
a}},lock:function(a){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{a=new d(this.editor,true);this.locked={update:this.currentImage&&this.currentImage.equalsContent(a)?a:null,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update,b=a&&new d(this.editor,true);this.locked=null;a&&!a.equalsContent(b)&&this.update()}}}}(),function(){function c(a){var b=this.editor,c=a.document,d=c.body;(a=c.getElementById("cke_actscrpt"))&&a.parentNode.removeChild(a);
(a=c.getElementById("cke_shimscrpt"))&&a.parentNode.removeChild(a);if(CKEDITOR.env.gecko){d.contentEditable=false;if(CKEDITOR.env.version<2E4){d.innerHTML=d.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,"");setTimeout(function(){var a=new CKEDITOR.dom.range(new CKEDITOR.dom.document(c));a.setStart(new CKEDITOR.dom.node(d),0);b.getSelection().selectRanges([a])},0)}}d.contentEditable=true;if(CKEDITOR.env.ie){d.hideFocus=true;d.disabled=true;d.removeAttribute("disabled")}delete this._.isLoadingData;
this.$=d;c=new CKEDITOR.dom.document(c);this.setup();if(CKEDITOR.env.ie){c.getDocumentElement().addClass(c.$.compatMode);b.config.enterMode!=CKEDITOR.ENTER_P&&c.on("selectionchange",function(){var a=c.getBody(),d=b.getSelection(),f=d&&d.getRanges()[0];f&&(a.getHtml().match(/^<p>(?:&nbsp;|<br>)<\/p>$/i)&&f.startContainer.equals(a))&&setTimeout(function(){f=b.getSelection().getRanges()[0];if(!f.startContainer.equals("body")){a.getFirst().remove(1);f.moveToElementEditEnd(a);f.select()}},0)})}if(CKEDITOR.env.webkit||
CKEDITOR.env.ie&&CKEDITOR.env.version>10)c.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){b.editable().focus()})});try{b.document.$.execCommand("2D-position",false,true)}catch(h){}try{b.document.$.execCommand("enableInlineTableEditing",false,!b.config.disableNativeTableHandles)}catch(f){}if(b.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",false,false)}catch(j){this.attachListener(this,CKEDITOR.env.ie?"resizestart":
"resize",function(a){a.data.preventDefault()})}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&b.document.$.compatMode=="CSS1Compat")&&this.attachListener(this,"keydown",function(a){var c=a.data.getKeystroke();if(c==33||c==34)if(CKEDITOR.env.ie)setTimeout(function(){b.getSelection().scrollIntoView()},0);else if(b.window.$.innerHeight>this.$.offsetHeight){var d=b.createRange();d[c==33?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(c,
"blur",function(){try{c.$.selection.empty()}catch(a){}});b.document.getElementsByTag("title").getItem(0).data("cke-title",b.document.$.title);if(CKEDITOR.env.ie)b.document.$.title=this._.docTitle;CKEDITOR.tools.setTimeout(function(){b.fire("contentDom");if(this._.isPendingFocus){b.focus();this._.isPendingFocus=false}setTimeout(function(){b.fire("dataReady")},0);CKEDITOR.env.ie&&setTimeout(function(){if(b.document){var a=b.document.$.body;a.runtimeStyle.marginBottom="0px";a.runtimeStyle.marginBottom=
""}},1E3)},0,this)}function d(){var a=[];if(CKEDITOR.document.$.documentMode>=8){a.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var b=[],c;for(c in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+c+"[contenteditable=false]");a.push(b.join(",")+"{display:inline-block}")}else if(CKEDITOR.env.gecko){a.push("html{height:100% !important}");a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");
return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(c){function d(f){f&&f.removeListener();a.editable(new b(a,h.$.contentWindow.document.body));a.setData(a.getData(1),c)}var g="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",g=CKEDITOR.env.air?"javascript:void(0)":
CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(g)+"}())":"",h=CKEDITOR.dom.element.createFromHtml('<iframe src="'+g+'" frameBorder="0"></iframe>');h.setStyles({width:"100%",height:"100%"});h.addClass("cke_wysiwyg_frame cke_reset");var f=a.ui.space("contents");f.append(h);if(g=CKEDITOR.env.ie||CKEDITOR.env.gecko)h.on("load",d);var j=a.title,k=a.lang.common.editorHelp;if(j){CKEDITOR.env.ie&&(j=j+(", "+k));h.setAttribute("title",j)}var j=CKEDITOR.tools.getNextId(),o=CKEDITOR.dom.element.createFromHtml('<span id="'+
j+'" class="cke_voice_label">'+k+"</span>");f.append(o,1);a.on("beforeModeUnload",function(a){a.removeListener();o.remove()});h.setAttributes({"aria-describedby":j,tabIndex:a.tabIndex,allowTransparency:"true"});!g&&d();if(CKEDITOR.env.webkit){g=function(){f.setStyle("width","100%");h.hide();h.setSize("width",f.getSize("width"));f.removeStyle("width");h.show()};h.setCustomData("onResize",g);CKEDITOR.document.getWindow().on("resize",g)}a.fire("ariaWidget",h)})}});var b=CKEDITOR.tools.createClass({$:function(a){this.base.apply(this,
arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(c,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,b){var c=this.editor;if(b){this.setHtml(a);c.fire("dataReady")}else{this._.isLoadingData=true;c._.dataStore={id:1};var g=c.config,h=g.fullPage,f=g.docType,j=CKEDITOR.tools.buildStyleHtml(d()).replace(/<style>/,'<style data-cke-temp="1">');h||(j=j+CKEDITOR.tools.buildStyleHtml(c.config.contentsCss));
var k=g.baseHref?'<base href="'+g.baseHref+'" data-cke-temp="1" />':"";h&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){c.docType=f=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){c.xmlDeclaration=a;return""}));a=c.dataProcessor.toHtml(a);if(h){/<body[\s|>]/.test(a)||(a="<body>"+a);/<html[\s|>]/.test(a)||(a="<html>"+a+"</html>");/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$&<title></title>")):a=a.replace(/<html[^>]*>/,"$&<head><title></title></head>");k&&(a=a.replace(/<head>/,
"$&"+k));a=a.replace(/<\/head\s*>/,j+"$&");a=f+a}else a=g.docType+'<html dir="'+g.contentsLangDirection+'" lang="'+(g.contentsLanguage||c.langCode)+'"><head><title>'+this._.docTitle+"</title>"+k+j+"</head><body"+(g.bodyId?' id="'+g.bodyId+'"':"")+(g.bodyClass?' class="'+g.bodyClass+'"':"")+">"+a+"</body></html>";if(CKEDITOR.env.gecko){a=a.replace(/<body/,'<body contenteditable="true" ');CKEDITOR.env.version<2E4&&(a=a.replace(/<body[^>]*>/,"$&<\!-- cke-content-start --\>"))}g='<script id="cke_actscrpt" type="text/javascript"'+
(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>";CKEDITOR.env.ie&&CKEDITOR.env.version<9&&(g=g+'<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)<\/script>');a=a.replace(/(?=\s*<\/(:?head)>)/,g);this.clearCustomData();this.clearListeners();
c.fire("contentDomUnload");var o=this.getDocument();try{o.write(a)}catch(n){setTimeout(function(){o.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();var a=this.editor,b=a.config,c=b.fullPage,d=c&&a.docType,h=c&&a.xmlDeclaration,f=this.getDocument(),c=c?f.getDocumentElement().getOuterHtml():f.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/<br>(?=\s*(:?$|<\/body>))/,""));c=a.dataProcessor.toDataFormat(c);h&&(c=h+"\n"+c);d&&(c=d+"\n"+c);return c},
focus:function(){this._.isLoadingData?this._.isPendingFocus=true:b.baseProto.focus.call(this)},detach:function(){var a=this.editor,c=a.document,d=a.window.getFrame();b.baseProto.detach.call(this);this.clearCustomData();c.getDocumentElement().clearCustomData();d.clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);(c=d.removeCustomData("onResize"))&&c.removeListener();a.fire("contentDomUnload");d.remove()}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=
!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.contentsCss=CKEDITOR.basePath+"contents.css",CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,menu,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,format,forms,horizontalrule,htmlwriter,iframe,image,indent,indentlist,indentblock,justify,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,save,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,templates,toolbar,undo,wysiwygarea",
CKEDITOR.config.skin="moono",function(){var c=function(c,b){for(var a=CKEDITOR.getUrl("plugins/"+b),c=c.split(","),e=0;e<c.length;e++)CKEDITOR.skin.icons[c[e]]={path:a,offset:-c[++e],bgsize:c[++e]}};CKEDITOR.env.hidpi?c("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,creatediv,432,,docprops-rtl,456,,docprops,480,,find-rtl,504,,find,528,,replace,552,,flash,576,,button,600,,checkbox,624,,form,648,,hiddenfield,672,,imagebutton,696,,radio,720,,select-rtl,744,,select,768,,textarea-rtl,792,,textarea,816,,textfield-rtl,840,,textfield,864,,horizontalrule,888,,iframe,912,,image,936,,image2,960,,indent-rtl,984,,indent,1008,,outdent-rtl,1032,,outdent,1056,,justifyblock,1080,,justifycenter,1104,,justifyleft,1128,,justifyright,1152,,language,1176,,anchor-rtl,1200,,anchor,1224,,link,1248,,unlink,1272,,bulletedlist-rtl,1296,,bulletedlist,1320,,numberedlist-rtl,1344,,numberedlist,1368,,mathjax,1392,,maximize,1416,,newpage-rtl,1440,,newpage,1464,,pagebreak-rtl,1488,,pagebreak,1512,,pastefromword-rtl,1536,,pastefromword,1560,,pastetext-rtl,1584,,pastetext,1608,,placeholder,1632,,preview-rtl,1656,,preview,1680,,print,1704,,removeformat,1728,,save,1752,,selectall,1776,,showblocks-rtl,1800,,showblocks,1824,,smiley,1848,,source-rtl,1872,,source,1896,,sourcedialog-rtl,1920,,sourcedialog,1944,,specialchar,1968,,table,1992,,templates-rtl,2016,,templates,2040,,uicolor,2064,,redo-rtl,2088,,redo,2112,,undo-rtl,2136,,undo,2160,",
"icons_hidpi.png"):c("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,creatediv,432,auto,docprops-rtl,456,auto,docprops,480,auto,find-rtl,504,auto,find,528,auto,replace,552,auto,flash,576,auto,button,600,auto,checkbox,624,auto,form,648,auto,hiddenfield,672,auto,imagebutton,696,auto,radio,720,auto,select-rtl,744,auto,select,768,auto,textarea-rtl,792,auto,textarea,816,auto,textfield-rtl,840,auto,textfield,864,auto,horizontalrule,888,auto,iframe,912,auto,image,936,auto,image2,960,auto,indent-rtl,984,auto,indent,1008,auto,outdent-rtl,1032,auto,outdent,1056,auto,justifyblock,1080,auto,justifycenter,1104,auto,justifyleft,1128,auto,justifyright,1152,auto,language,1176,auto,anchor-rtl,1200,auto,anchor,1224,auto,link,1248,auto,unlink,1272,auto,bulletedlist-rtl,1296,auto,bulletedlist,1320,auto,numberedlist-rtl,1344,auto,numberedlist,1368,auto,mathjax,1392,auto,maximize,1416,auto,newpage-rtl,1440,auto,newpage,1464,auto,pagebreak-rtl,1488,auto,pagebreak,1512,auto,pastefromword-rtl,1536,auto,pastefromword,1560,auto,pastetext-rtl,1584,auto,pastetext,1608,auto,placeholder,1632,auto,preview-rtl,1656,auto,preview,1680,auto,print,1704,auto,removeformat,1728,auto,save,1752,auto,selectall,1776,auto,showblocks-rtl,1800,auto,showblocks,1824,auto,smiley,1848,auto,source-rtl,1872,auto,source,1896,auto,sourcedialog-rtl,1920,auto,sourcedialog,1944,auto,specialchar,1968,auto,table,1992,auto,templates-rtl,2016,auto,templates,2040,auto,uicolor,2064,auto,redo-rtl,2088,auto,redo,2112,auto,undo-rtl,2136,auto,undo,2160,auto",
"icons.png")}()})();