X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=ckeditor.js;h=cfdeec4a3a288d8a6ec039fa5cac191b0ca6ae46;hp=b625d7d4c304b33b2f248d2130787a184a36e4eb;hb=9b6ca941425f97c9d5103a30101a7ac805cf675d;hpb=9ff13aaba26bcf5e5315d53a58465507b3c44196 diff --git a/ckeditor.js b/ckeditor.js index b625d7d..cfdeec4 100644 --- a/ckeditor.js +++ b/ckeditor.js @@ -2,417 +2,420 @@ 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)return;window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"D2LI",version:"4.1",revision:"80c139aa",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),d=0;d=0;o--)if(n[o].priority<=i){n.splice(o+1,0,j);return{removeListener:l}}n.unshift(j)}return{removeListener:l}}, -once:function(){var a=arguments[1];arguments[1]=function(b){b.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,b=function(){a=1},d=0,f=function(){d=1};return function(i,j,l){var n=c(this)[i],i=a,m=d;a=d=0;if(n){var o=n.listeners;if(o.length)for(var o=o.slice(0),k,h=0;h=0&&d.listeners.splice(f,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(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(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,c,this)},CKEDITOR.editor.prototype.fireOnce=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); -CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:location.protocol== -"https:"};a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera;if(a.webkit)b.indexOf("chrome")>-1?a.chrome=true:a.safari=true;var g=0;if(a.ie){g=a.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=g==9;a.ie8Compat=g==8;a.ie7Compat=g==7;a.ie6Compat=g<7||a.quirks}if(a.gecko){var e=b.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");g=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}a.opera&&(g=parseFloat(c.version()));a.air&&(g=parseFloat(b.match(/ adobeair\/(\d+)/)[1])); -a.webkit&&(g=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=g;a.isCompatible=a.iOS&&g>=534||!a.mobile&&(a.ie&&g>6||a.gecko&&g>=10801||a.opera&&g>=9.5||a.air&&g>=1||a.webkit&&g>=522||false);a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown");if(a.quirks)a.cssClass=a.cssClass+" cke_browser_quirks";if(a.ie){a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version));if(a.quirks)a.cssClass=a.cssClass+" cke_browser_iequirks"}if(a.gecko)if(g< -10900)a.cssClass=a.cssClass+" cke_browser_gecko18";else if(g<=11E3)a.cssClass=a.cssClass+" cke_browser_gecko19";if(a.air)a.cssClass=a.cssClass+" cke_browser_air";return a}()); -"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 b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b= -CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status="basic_ready";b&&b._load?b():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; -(function(){var b=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(a,b){if(!a&&!b)return true;if(!a||!b||a.length!=b.length)return false;for(var e=0;e"+b+""):e.push('');return e.join("")},htmlEncode:function(a){return(""+a).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,b){var e=b(a);e.prototype=a.prototype;return e},setTimeout:function(a,b,e,d,c){c||(c=window);e||(e=c);return c.setTimeout(function(){d?a.apply(e,[].concat(d)):a.apply(e)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g; -return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if(typeof b=="function")for(var e=0,d=a.length;e=0?a[e]:null},bind:function(a,b){return function(){return a.apply(b,arguments)}},createClass:function(a){var b=a.$, -e=a.base,d=a.privates||a._,c=a.proto,a=a.statics;!b&&(b=function(){e&&this.base.apply(this,arguments)});if(d)var i=b,b=function(){var a=this._||(this._={}),b;for(b in d){var g=d[b];a[b]=typeof g=="function"?CKEDITOR.tools.bind(g,this):g}i.apply(this,arguments)};if(e){b.prototype=this.prototypedCopy(e.prototype);b.prototype.constructor=b;b.base=e;b.baseProto=e.prototype;b.prototype.base=function(){this.base=e.prototype.base;e.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(b.prototype, -c,true);a&&this.extend(b,a,true);return b},addFunction:function(a,g){return b.push(function(){return a.apply(g||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var g=b[a];return g&&g.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(e){b=CKEDITOR.tools.trim(e+"")+"px";return a.test(b)?b:e||""}}(),convertToPx:function(){var a;return function(b){if(!a){a=CKEDITOR.dom.element.createFromHtml('
', -CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,e=arguments.length;b=0;p--)if(n[p].priority<=l){n.splice(p+1,0,i);return{removeListener:m}}n.unshift(i)}return{removeListener:m}}, +once:function(){var b=arguments[1];arguments[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,a=function(){b=1},d=0,j=function(){d=1};return function(l,i,m){var n=c(this)[l],l=b,r=d;b=d=0;if(n){var p=n.listeners;if(p.length)for(var p=p.slice(0),g,h=0;h=0&&d.listeners.splice(j,1)}},removeAllListeners:function(){var b=c(this),a;for(a in b)delete b[a]},hasListeners:function(b){return(b=c(this)[b])&&b.listeners.length>0}}}()); +CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,c){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,c,this)},CKEDITOR.editor.prototype.fireOnce=function(a,c){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); +CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),c=window.opera,b={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var b=document.domain,a=window.location.hostname;return b!=a&&b!="["+a+"]"},secure:location.protocol== +"https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var f=0;if(b.ie){f=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=f==9;b.ie8Compat=f==8;b.ie7Compat=f==7;b.ie6Compat=f<7||b.quirks}if(b.gecko){var e=a.match(/rv:([\d\.]+)/);if(e){e=e[1].split(".");f=e[0]*1E4+(e[1]||0)*100+(e[2]||0)*1}}b.opera&&(f=parseFloat(c.version()));b.air&&(f=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); +b.webkit&&(f=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=f;b.isCompatible=b.iOS&&f>=534||!b.mobile&&(b.ie&&f>6||b.gecko&&f>=10801||b.opera&&f>=9.5||b.air&&f>=1||b.webkit&&f>=522||false);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(f< +10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(f<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";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 a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= +CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; +(function(){var a=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});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"+a+""):e.push('');return e.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(//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,d,c){c||(c=window);e||(e=c);return c.setTimeout(function(){d?b.apply(e,[].concat(d)):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,d=b.length;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,d=b.privates||b._,c=b.proto,b=b.statics;!a&&(a=function(){e&&this.base.apply(this,arguments)});if(d)var l=a,a=function(){var b=this._||(this._={}),a;for(a in d){var f=d[a];b[a]=typeof f=="function"?CKEDITOR.tools.bind(f,this):f}l.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}}c&&this.extend(a.prototype, +c,true);b&&this.extend(a,b,true);return a},addFunction:function(b,f){return a.push(function(){return b.apply(f||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var f=a[b];return f&&f.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('
', +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;a8)&&c)b=c+":"+b;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b= -b?new CKEDITOR.dom.element(b):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(){var b=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return b})()},write:function(b){this.$.open("text/html","replace");CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain); -this.$.write(b);this.$.close()}});CKEDITOR.dom.nodeList=function(b){this.$=b};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(b){if(b<0||b>=this.$.length)return null;return(b=this.$[b])?new CKEDITOR.dom.node(b):null}};CKEDITOR.dom.element=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)}; -CKEDITOR.dom.element.get=function(b){return(b=typeof b=="string"?document.getElementById(b)||document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(b,c){var a=new CKEDITOR.dom.element("div",c);a.setHtml(b);return a.getFirst().remove()}; -CKEDITOR.dom.element.setMarker=function(b,c,a,g){var e=c.getCustomData("list_marker_id")||c.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),d=c.getCustomData("list_marker_names")||c.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[e]=c;d[a]=1;return c.setCustomData(a,g)};CKEDITOR.dom.element.clearAllMarkers=function(b){for(var c in b)CKEDITOR.dom.element.clearMarkers(b,b[c],1)}; -CKEDITOR.dom.element.clearMarkers=function(b,c,a){var g=c.getCustomData("list_marker_names"),e=c.getCustomData("list_marker_id"),d;for(d in g)c.removeCustomData(d);c.removeCustomData("list_marker_names");if(a){c.removeCustomData("list_marker_id");delete b[e]}}; -(function(){function b(a){for(var b=0,e=0,d=c[a].length;e]*>/g, -""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(true));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:function(){var a=function(a){return this.$.innerHTML=a};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(a){try{return this.$.innerHTML= -a}catch(b){this.$.innerHTML="";var c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return a}}:a}(),setText:function(a){CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(a){return this.$.innerText=a}:function(a){return this.$.textContent=a};return this.setText(a)},getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)? -function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a=this.$.attributes.getNamedItem(a);return(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified? -this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag, -getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a=parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}: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 a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var b=this.$.scopeName;b!="HTML"&&(a=b.toLowerCase()+":"+a)}return(this.getName=function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&(a&&!a(b))&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&(a&&!a(b))&& -(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var b=0;b0&&(b>2||!c[a[0].nodeName]||b==2&&!c[a[1].nodeName])},hasAttribute:function(){function a(a){a=this.$.attributes.getNamedItem(a); -return!(!a||!a.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(b){return b=="name"?!!this.$.name:a.call(this,b)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$,a=a.$;if(c!=a){var d;if(b)for(;d=c.lastChild;)a.insertBefore(c.removeChild(d),a.firstChild);else for(;d=c.firstChild;)a.appendChild(c.removeChild(d))}},mergeSiblings:function(){function a(a,b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var f=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();){f.push(b); -b=c?b.getNext():b.getPrevious();if(!b||b.type!=CKEDITOR.NODE_ELEMENT)return}if(a.isIdentical(b)){for(var i=c?a.getLast():a.getFirst();f.length;)f.shift().move(a,!c);b.moveChildren(a,!c);b.remove();i&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings()}}}return function(b){if(b===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a, -b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(b,c){b=="class"?this.$.className=c:b=="style"?this.$.style.cssText=c:b=="tabindex"?this.$.tabIndex=c:b=="checked"?this.$.checked=c:b=="contenteditable"?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if(b=="src"&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}else a.apply(this,arguments); -return this}:a}(),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=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();c0)l(0,b===true?j:b===false?f:j<0?j:f);if(c&&(i<0||d>0))l(i<0?i: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=0&&b0&&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}});var c={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,e){if(typeof c=="number"){if(e&&(!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 e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(e=e-b.call(this,a));return e}})();CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document;this.$=b.type==CKEDITOR.NODE_DOCUMENT?b.$.createDocumentFragment():b}; -CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(b){b=b.$;b.parentNode.insertBefore(this.$,b.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 b(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 d,n=c.startContainer;d=c.endContainer;var m=c.startOffset,o=c.endOffset,k,h=this.guard,s=this.type,g=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var e=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),t=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(o):d.getNext();this._.guardLTR=function(a,b){return(!b||!e.equals(a))&&(!t|| -!a.equals(t))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var F=n.type==CKEDITOR.NODE_ELEMENT?n:n.getParent(),z=n.type==CKEDITOR.NODE_ELEMENT?m?n.getChild(m-1):null:n.getPrevious();this._.guardRTL=function(a,b){return(!b||!F.equals(a))&&(!z||!a.equals(z))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var q=a?this._.guardRTL:this._.guardLTR;k=h?function(a,b){return q(a,b)===false?false:h(a,b)}:q;if(this.current)d=this.current[g](false,s,k);else{if(a)d.type== -CKEDITOR.NODE_ELEMENT&&(d=o>0?d.getChild(o-1):k(d,true)===false?null:d.getPreviousSourceNode(true,s,k));else{d=n;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(m)))d=k(n,true)===false?null:n.getNextSourceNode(true,s,k)}d&&k(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[g](false,s,k)}this.end();return this.current=null}function c(a){for(var c,d=null;c=b.call(this,a);)d=c;return d} -CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return b.call(this)},previous:function(){return b.call(this,1)},checkForward:function(){return b.call(this,0,1)!==false},checkBackward:function(){return b.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.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};CKEDITOR.dom.element.prototype.isBlockBoundary=function(b){b=b?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,b||{}):CKEDITOR.dtd.$block;return this.getComputedStyle("float")=="none"&&a[this.getComputedStyle("display")]||b[this.getName()]};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(d){var n,m;n=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(m=d.getParent())&&c(m);n=a?n:n||c(d);return!!(b^n)}};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!e(a)&&!d(a)}return function(c){var d=!CKEDITOR.env.ie?c.is&&c.is("br"):c.getText&&g.test(c.getText());if(d){d=c.getParent();c=c.getNext(b);d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&& -c.isBlockBoundary())}return!!(a^d)}};var g=/^[\t\r\n ]*(?: |\xa0)$/,e=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(d(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty));return a&&(!CKEDITOR.env.ie?a.is&&a.is("br"):a.getText&&g.test(a.getText()))?a:false}})(); -CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var c=b instanceof CKEDITOR.dom.document;this.document=c?b:b.getDocument();this.root=c?b.getBody():b}; -(function(){function b(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),k=CKEDITOR.dom.walker.bogus();return function(h){if(c(h)||b(h))return true;if(k(h)&&!a)return a=true;return h.type==CKEDITOR.NODE_TEXT&&(h.hasAscendant("pre")||CKEDITOR.tools.trim(h.getText()).length)||h.type==CKEDITOR.NODE_ELEMENT&&!h.is(d)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(k){return c(k)||b(k)?true:!a&&f(k)|| -k.type==CKEDITOR.NODE_ELEMENT&&k.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return!i(a)&&!j(a)}var g=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},e=function(a,b,c,k){a.optimizeBookmark();var h=a.startContainer,d=a.endContainer,g=a.startOffset,e=a.endOffset,f,i;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(e);else if(d.getChildCount()>0)if(e>=d.getChildCount()){d=d.append(a.document.createText(""));i=true}else d=d.getChild(e); -if(h.type==CKEDITOR.NODE_TEXT){h.split(g);h.equals(d)&&(d=h.getNext())}else if(g)if(g>=h.getChildCount()){h=h.append(a.document.createText(""));f=true}else h=h.getChild(g).getPrevious();else{h=h.append(a.document.createText(""),1);f=true}var g=h.getParents(),e=d.getParents(),j,q,p;for(j=0;j0&&!r.equals(d)&&(C=l.append(r.clone()));if(!g[c]||r.$.parentNode!=g[c].$.parentNode)for(r=r.getPrevious();r;){if(r.equals(g[c])||r.equals(h))break;y=r.getPrevious();if(b==2)l.$.insertBefore(r.$.cloneNode(true),l.$.firstChild);else{r.remove();b==1&&l.$.insertBefore(r.$,l.$.firstChild)}r=y}l&&(l=C)}if(b==2){q=a.startContainer;if(q.type==CKEDITOR.NODE_TEXT){q.$.data=q.$.data+q.$.nextSibling.data; -q.$.parentNode.removeChild(q.$.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(q&&p&&(h.$.parentNode!=q.$.parentNode||d.$.parentNode!=p.$.parentNode)){b=p.getIndex();f&&p.$.parentNode==h.$.parentNode&&b--;if(k&&q.type==CKEDITOR.NODE_ELEMENT){k=CKEDITOR.dom.element.createFromHtml(' ',a.document);k.insertAfter(q);q.mergeSiblings(false); -a.moveToBookmark({startNode:k})}else a.setStart(p.getParent(),b)}a.collapse(true)}f&&h.remove();i&&d.$.parentNode&&d.remove()},d={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},f=CKEDITOR.dom.walker.bogus(),i=new CKEDITOR.dom.walker.whitespaces,j=new CKEDITOR.dom.walker.bookmark,l=/^[\t\r\n ]*(?: |\xa0)$/;CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root); +CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,c){a.append(this,c);return a},clone:function(a,c){var b=this.$.cloneNode(a),f=function(b){b["data-cke-expando"]&&(b["data-cke-expando"]=false);if(b.nodeType==CKEDITOR.NODE_ELEMENT){c||b.removeAttribute("id",false);if(a)for(var b=b.childNodes,d=0;d8)&&c)a=c+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a= +a?new CKEDITOR.dom.element(a):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(){var a=new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return a})()},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.isCustomDomain()&&(this.$.domain=document.domain); +this.$.write(a);this.$.close()}});CKEDITOR.dom.nodeList=function(a){this.$=a};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,c){typeof a=="string"&&(a=(c?c.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)}; +CKEDITOR.dom.element.get=function(a){return(a=typeof a=="string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,c){var b=new CKEDITOR.dom.element("div",c);b.setHtml(a);return b.getFirst().remove()}; +CKEDITOR.dom.element.setMarker=function(a,c,b,f){var e=c.getCustomData("list_marker_id")||c.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),d=c.getCustomData("list_marker_names")||c.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[e]=c;d[b]=1;return c.setCustomData(b,f)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var c in a)CKEDITOR.dom.element.clearMarkers(a,a[c],1)}; +CKEDITOR.dom.element.clearMarkers=function(a,c,b){var f=c.getCustomData("list_marker_names"),e=c.getCustomData("list_marker_id"),d;for(d in f)c.removeCustomData(d);c.removeCustomData("list_marker_names");if(b){c.removeCustomData("list_marker_id");delete a[e]}}; +(function(){function a(b){for(var a=0,e=0,d=c[b].length;e]*>/g, +""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(true));return b.innerHTML},getClientRect:function(){var b=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return b},setHtml:function(){var b=function(b){return this.$.innerHTML=b};return CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(b){try{return this.$.innerHTML= +b}catch(a){this.$.innerHTML="";var c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=b;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return b}}:b}(),setText:function(b){CKEDITOR.dom.element.prototype.setText=this.$.innerText!=void 0?function(b){return this.$.innerText=b}:function(b){return this.$.textContent=b};return this.setText(b)},getAttribute:function(){var b=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)? +function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":b=this.$.getAttribute(b,2);b!==0&&this.$.tabIndex===0&&(b=null);return b;case "checked":b=this.$.attributes.getNamedItem(b);return(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified? +this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:b}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]}:function(b){var a=this.getWindow().$.getComputedStyle(this.$,null);return a?a.getPropertyValue(b):""},getDtd:function(){var b=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag, +getTabIndex:CKEDITOR.env.ie?function(){var b=this.$.tabIndex;b===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(b=-1);return b}:CKEDITOR.env.webkit?function(){var b=this.$.tabIndex;if(b==void 0){b=parseInt(this.getAttribute("tabindex"),10);isNaN(b)&&(b=-1)}return b}: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 b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var a=this.$.scopeName;a!="HTML"&&(b=a.toLowerCase()+":"+b)}return(this.getName=function(){return b})()},getValue:function(){return this.$.value},getFirst:function(b){var a=this.$.firstChild;(a=a&&new CKEDITOR.dom.node(a))&&(b&&!b(a))&&(a=a.getNext(b));return a},getLast:function(b){var a=this.$.lastChild;(a=a&&new CKEDITOR.dom.node(a))&&(b&&!b(a))&& +(a=a.getPrevious(b));return a},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][b];for(var a=0;a0&&(a>2||!c[b[0].nodeName]||a==2&&!c[b[1].nodeName])},hasAttribute:function(){function b(b){b=this.$.attributes.getNamedItem(b); +return!(!b||!b.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(a){return a=="name"?!!this.$.name:b.call(this,a)}:b}(),hide:function(){this.setStyle("display","none")},moveChildren:function(b,a){var c=this.$,b=b.$;if(c!=b){var d;if(a)for(;d=c.lastChild;)b.insertBefore(c.removeChild(d),b.firstChild);else for(;d=c.firstChild;)b.appendChild(c.removeChild(d))}},mergeSiblings:function(){function b(b,a,c){if(a&&a.type==CKEDITOR.NODE_ELEMENT){for(var j=[];a.data("cke-bookmark")||a.isEmptyInlineRemoveable();){j.push(a); +a=c?a.getNext():a.getPrevious();if(!a||a.type!=CKEDITOR.NODE_ELEMENT)return}if(b.isIdentical(a)){for(var l=c?b.getLast():b.getFirst();j.length;)j.shift().move(b,!c);a.moveChildren(b,!c);a.remove();l&&l.type==CKEDITOR.NODE_ELEMENT&&l.mergeSiblings()}}}return function(a){if(a===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){b(this,this.getNext(),true);b(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(b, +a){this.$.setAttribute(b,a);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(a,c){a=="class"?this.$.className=c:a=="style"?this.$.style.cssText=c:a=="tabindex"?this.$.tabIndex=c:a=="checked"?this.$.checked=c:a=="contenteditable"?b.call(this,"contentEditable",c):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(a,c){if(a=="src"&&c.match(/^http:\/\//))try{b.apply(this,arguments)}catch(d){}else b.apply(this,arguments); +return this}:b}(),setAttributes:function(b){for(var a in b)this.setAttribute(a,b[a]);return this},setValue:function(b){this.$.value=b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(b){b=="class"?b="className":b=="tabindex"?b="tabIndex":b=="contenteditable"&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var a=0;a< +b.length;a++)this.removeAttribute(b[a]);else for(a in b)b.hasOwnProperty(a)&&this.removeAttribute(a)},removeStyle:function(b){var a=this.$.style;if(!a.removeProperty&&(b=="border"||b=="margin"||b=="padding")){var c=["top","left","right","bottom"],d;b=="border"&&(d=["color","style","width"]);for(var a=[],j=0;j=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+b+")")}else this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", +"none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var b,a=this.getElementsByTag("*"),c=0,d=a.count();c0)m(0,a===true?i:a===false?j:i<0?i:j);if(c&&(l<0||d>0))m(l<0?l:d,0)},setState:function(b,a,c){a=a||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(a+"_on");this.removeClass(a+"_off");this.removeClass(a+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled"); +break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(a+"_disabled");this.removeClass(a+"_off");this.removeClass(a+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(a+"_off");this.removeClass(a+"_on");this.removeClass(a+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(a){b.src=b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)}, +copyAttributes:function(b,a){for(var c=this.$.attributes,a=a||{},d=0;d=0&&a0&&c;)c=b(c,a.shift());else c=b(c,a);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu", +function(b){b.data.getTarget().hasClass("cke_enable_context_menu")||b.data.preventDefault()})},getDirection:function(b){return b?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(b,a){b="data-"+b;if(a===void 0)return this.getAttribute(b);a===false?this.removeAttribute(b):this.setAttribute(b,a);return null},getEditor:function(){var b=CKEDITOR.instances, +a,c;for(a in b){c=b[a];if(c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null}});var c={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(b,c,e){if(typeof c=="number"){if(e&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-a.call(this,b);this.setStyle(b,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(b, +c){var e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||0;c&&(e=e-a.call(this,b));return e}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a}; +CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.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 a(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 d,n=c.startContainer;d=c.endContainer;var r=c.startOffset,p=c.endOffset,g,h=this.guard,u=this.type,f=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var k=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),e=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(p):d.getNext();this._.guardLTR=function(a,b){return(!b||!k.equals(a))&&(!e|| +!a.equals(e))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var F=n.type==CKEDITOR.NODE_ELEMENT?n:n.getParent(),D=n.type==CKEDITOR.NODE_ELEMENT?r?n.getChild(r-1):null:n.getPrevious();this._.guardRTL=function(a,b){return(!b||!F.equals(a))&&(!D||!a.equals(D))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var B=a?this._.guardRTL:this._.guardLTR;g=h?function(a,b){return B(a,b)===false?false:h(a,b)}:B;if(this.current)d=this.current[f](false,u,g);else{if(a)d.type== +CKEDITOR.NODE_ELEMENT&&(d=p>0?d.getChild(p-1):g(d,true)===false?null:d.getPreviousSourceNode(true,u,g));else{d=n;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(r)))d=g(n,true)===false?null:n.getNextSourceNode(true,u,g)}d&&g(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[f](false,u,g)}this.end();return this.current=null}function c(b){for(var c,d=null;c=a.call(this,b);)d=c;return d} +CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return c.call(this)},lastBackward:function(){return c.call(this,1)},reset:function(){delete this.current;this._={}}}});var b={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};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){a=a?CKEDITOR.tools.extend({},CKEDITOR.dtd.$block,a||{}):CKEDITOR.dtd.$block;return this.getComputedStyle("float")=="none"&&b[this.getComputedStyle("display")]||a[this.getName()]};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(d){var n,r;n=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(r=d.getParent())&&c(r);n=a?n:n||c(d);return!!(b^n)}};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!e(a)&&!d(a)}return function(c){var d=!CKEDITOR.env.ie?c.is&&c.is("br"):c.getText&&f.test(c.getText());if(d){d=c.getParent();c=c.getNext(b);d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&& +c.isBlockBoundary())}return!!(a^d)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,e=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark();CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(d(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty));return a&&(!CKEDITOR.env.ie?a.is&&a.is("br"):a.getText&&f.test(a.getText()))?a:false}})(); +CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var c=a instanceof CKEDITOR.dom.document;this.document=c?a:a.getDocument();this.root=c?a.getBody():a}; +(function(){function a(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),g=CKEDITOR.dom.walker.bogus();return function(h){if(c(h)||b(h))return true;if(g(h)&&!a)return a=true;return h.type==CKEDITOR.NODE_TEXT&&(h.hasAscendant("pre")||CKEDITOR.tools.trim(h.getText()).length)||h.type==CKEDITOR.NODE_ELEMENT&&!h.is(d)?false:true}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(g){return c(g)||b(g)?true:!a&&j(g)|| +g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return!l(a)&&!i(a)}var f=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},e=function(a,b,c,g){a.optimizeBookmark();var h=a.startContainer,d=a.endContainer,f=a.startOffset,k=a.endOffset,e,j;if(d.type==CKEDITOR.NODE_TEXT)d=d.split(k);else if(d.getChildCount()>0)if(k>=d.getChildCount()){d=d.append(a.document.createText(""));j=true}else d=d.getChild(k); +if(h.type==CKEDITOR.NODE_TEXT){h.split(f);h.equals(d)&&(d=h.getNext())}else if(f)if(f>=h.getChildCount()){h=h.append(a.document.createText(""));e=true}else h=h.getChild(f).getPrevious();else{h=h.append(a.document.createText(""),1);e=true}var f=h.getParents(),k=d.getParents(),l,i,q;for(l=0;l0&&!s.equals(d)&&(A=m.append(s.clone()));if(!f[c]||s.$.parentNode!=f[c].$.parentNode)for(s=s.getPrevious();s;){if(s.equals(f[c])||s.equals(h))break;v=s.getPrevious();if(b==2)m.$.insertBefore(s.$.cloneNode(true),m.$.firstChild);else{s.remove();b==1&&m.$.insertBefore(s.$,m.$.firstChild)}s=v}m&&(m=A)}if(b==2){i=a.startContainer;if(i.type==CKEDITOR.NODE_TEXT){i.$.data=i.$.data+i.$.nextSibling.data; +i.$.parentNode.removeChild(i.$.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(i&&q&&(h.$.parentNode!=i.$.parentNode||d.$.parentNode!=q.$.parentNode)){b=q.getIndex();e&&q.$.parentNode==h.$.parentNode&&b--;if(g&&i.type==CKEDITOR.NODE_ELEMENT){g=CKEDITOR.dom.element.createFromHtml(' ',a.document);g.insertAfter(i);i.mergeSiblings(false); +a.moveToBookmark({startNode:g})}else a.setStart(q.getParent(),b)}a.collapse(true)}e&&h.remove();j&&d.$.parentNode&&d.remove()},d={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},j=CKEDITOR.dom.walker.bogus(),l=new CKEDITOR.dom.walker.whitespaces,i=new CKEDITOR.dom.walker.bookmark,m=/^[\t\r\n ]*(?: |\xa0)$/;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,d,h,g=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){d="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",d+(g?"C":"S"))}if(!g){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",d+"E");h=this.clone();h.collapse();h.insertNode(c)}h= -this.clone();h.collapse(true);h.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(g?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:g}},createBookmark2:function(a){var b=this.startContainer,c=this.endContainer,d=this.startOffset,h=this.endOffset,g=this.collapsed,e,f;if(!b||!c)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((e=b.getChild(d))&&e.type==CKEDITOR.NODE_TEXT&&d>0&&e.getPrevious().type== -CKEDITOR.NODE_TEXT){b=e;d=0}e&&e.type==CKEDITOR.NODE_ELEMENT&&(d=e.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(f=b.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;){b=f;d=d+f.getLength()}if(!g){if(c.type==CKEDITOR.NODE_ELEMENT){if((e=c.getChild(h))&&e.type==CKEDITOR.NODE_TEXT&&h>0&&e.getPrevious().type==CKEDITOR.NODE_TEXT){c=e;h=0}e&&e.type==CKEDITOR.NODE_ELEMENT&&(h=e.getIndex(1))}for(;c.type==CKEDITOR.NODE_TEXT&&(f=c.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;){c=f;h=h+f.getLength()}}}return{start:b.getAddress(a), -end:g?null:c.getAddress(a),startOffset:d,endOffset:h,normalized:a,collapsed:g,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,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,d=this.endOffset,h;if(a.type==CKEDITOR.NODE_ELEMENT){h=a.getChildCount();if(h>c)a=a.getChild(c);else if(h<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){h=b.getChildCount();if(h>d)b=b.getChild(d).getPreviousSourceNode(true);else if(h<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,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>= +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,g,h,d=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){g="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",g+(d?"C":"S"))}if(!d){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id",g+"E");h=this.clone();h.collapse();h.insertNode(c)}h= +this.clone();h.collapse(true);h.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?g+(d?"C":"S"):b,endNode:a?g+"E":c,serializable:a,collapsed:d}},createBookmark2:function(a){var b=this.startContainer,c=this.endContainer,g=this.startOffset,h=this.endOffset,d=this.collapsed,f,k;if(!b||!c)return{start:0,end:0};if(a){if(b.type==CKEDITOR.NODE_ELEMENT){if((f=b.getChild(g))&&f.type==CKEDITOR.NODE_TEXT&&g>0&&f.getPrevious().type== +CKEDITOR.NODE_TEXT){b=f;g=0}f&&f.type==CKEDITOR.NODE_ELEMENT&&(g=f.getIndex(1))}for(;b.type==CKEDITOR.NODE_TEXT&&(k=b.getPrevious())&&k.type==CKEDITOR.NODE_TEXT;){b=k;g=g+k.getLength()}if(!d){if(c.type==CKEDITOR.NODE_ELEMENT){if((f=c.getChild(h))&&f.type==CKEDITOR.NODE_TEXT&&h>0&&f.getPrevious().type==CKEDITOR.NODE_TEXT){c=f;h=0}f&&f.type==CKEDITOR.NODE_ELEMENT&&(h=f.getIndex(1))}for(;c.type==CKEDITOR.NODE_TEXT&&(k=c.getPrevious())&&k.type==CKEDITOR.NODE_TEXT;){c=k;h=h+k.getLength()}}}return{start:b.getAddress(a), +end:d?null:c.getAddress(a),startOffset:g,endOffset:h,normalized:a,collapsed:d,is2:true}},moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,g=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);g?this.setEnd(g,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,g=this.endOffset,h;if(a.type==CKEDITOR.NODE_ELEMENT){h=a.getChildCount();if(h>c)a=a.getChild(c);else if(h<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){h=b.getChildCount();if(h>g)b=b.getChild(g).getPreviousSourceNode(true);else if(h<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,g=this.endContainer,c=c.equals(g)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(g);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, -d=this.startOffset,h=this.collapsed;if((!a||h)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d=c.getIndex()+1;c=c.getParent()}else{var g=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(g,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(h){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!h&&c&&c.type== -CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()||c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var d=this.getCommonAncestor(),h=this.root,g,e,f,i,j,l=false,q,p;q=this.startContainer;p=this.startOffset;if(q.type==CKEDITOR.NODE_TEXT){if(p){q=!CKEDITOR.tools.trim(q.substring(0,p)).length&&q;l=!!q}if(q&&!(i=q.getPrevious()))f=q.getParent()}else{p&& -(i=q.getChild(p-1)||q.getLast());i||(f=q)}for(;f||i;){if(f&&!i){!j&&f.equals(d)&&(j=true);if(c?f.isBlockBoundary():!h.contains(f))break;if(!l||f.getComputedStyle("display")!="inline"){l=false;j?g=f:this.setStartBefore(f)}i=f.getPrevious()}for(;i;){q=false;if(i.type==CKEDITOR.NODE_COMMENT)i=i.getPrevious();else{if(i.type==CKEDITOR.NODE_TEXT){p=i.getText();/[^\s\ufeff]/.test(p)&&(i=null);q=/[\s\ufeff]$/.test(p)}else if((i.$.offsetWidth>0||b&&i.is("br"))&&!i.data("cke-bookmark"))if(l&&CKEDITOR.dtd.$removeEmpty[i.getName()]){p= -i.getText();if(/[^\s\ufeff]/.test(p))i=null;else for(var A=i.$.getElementsByTagName("*"),r=0,C;C=A[r++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){i=null;break}i&&(q=!!p.length)}else i=null;q&&(l?j?g=f:f&&this.setStartBefore(f):l=true);if(i){q=i.getPrevious();if(!f&&!q){f=i;i=null;break}i=q}else f=null}}f&&(f=f.getParent())}q=this.endContainer;p=this.endOffset;f=i=null;j=l=false;if(q.type==CKEDITOR.NODE_TEXT){q=!CKEDITOR.tools.trim(q.substring(p)).length&&q;l=!(q&&q.getLength());if(q&& -!(i=q.getNext()))f=q.getParent()}else(i=q.getChild(p))||(f=q);for(;f||i;){if(f&&!i){!j&&f.equals(d)&&(j=true);if(c?f.isBlockBoundary():!h.contains(f))break;if(!l||f.getComputedStyle("display")!="inline"){l=false;j?e=f:f&&this.setEndAfter(f)}i=f.getNext()}for(;i;){q=false;if(i.type==CKEDITOR.NODE_TEXT){p=i.getText();/[^\s\ufeff]/.test(p)&&(i=null);q=/^[\s\ufeff]/.test(p)}else if(i.type==CKEDITOR.NODE_ELEMENT){if((i.$.offsetWidth>0||b&&i.is("br"))&&!i.data("cke-bookmark"))if(l&&CKEDITOR.dtd.$removeEmpty[i.getName()]){p= -i.getText();if(/[^\s\ufeff]/.test(p))i=null;else{A=i.$.getElementsByTagName("*");for(r=0;C=A[r++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){i=null;break}}i&&(q=!!p.length)}else i=null}else q=1;q&&l&&(j?e=f:this.setEndAfter(f));if(i){q=i.getNext();if(!f&&!q){f=i;i=null;break}i=q}else f=null}f&&(f=f.getParent())}if(g&&e){d=g.contains(e)?e:g;this.setStartBefore(d);this.setEndAfter(d)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:f=new CKEDITOR.dom.range(this.root); -h=this.root;f.setStartAt(h,CKEDITOR.POSITION_AFTER_START);f.setEnd(this.startContainer,this.startOffset);f=new CKEDITOR.dom.walker(f);var y,u,x=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=function(a){var b=x(a);b||(y=a);return b},c=function(a){var b=I(a);!b&&(a.is&&a.is("br"))&&(u=a);return b};f.guard=I;f=f.lastBackward();y=y||h;this.setStartAt(y,!y.is("br")&&(!f&&this.checkStartOfBlock()||f&&y.contains(f))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END); -if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){f=this.clone();f=new CKEDITOR.dom.walker(f);var G=CKEDITOR.dom.walker.whitespaces(),E=CKEDITOR.dom.walker.bookmark();f.evaluator=function(a){return!G(a)&&!E(a)};if((f=f.previous())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("br"))break}f=this.clone();f.collapse();f.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:I;y=null;f=f.lastForward();y=y||h;this.setEndAt(y,!f&&this.checkEndOfBlock()||f&& -y.contains(f)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);u&&this.setEndAfter(u)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),h=this.startContainer,f=this.endContainer,g=this.startOffset,e=this.endOffset,i=1,j=1;if(h&&h.type==CKEDITOR.NODE_TEXT)if(g)if(g>=h.getLength())d.setStartAfter(h);else{d.setStartBefore(h);i=0}else d.setStartBefore(h);if(f&&f.type==CKEDITOR.NODE_TEXT)if(e)if(e>=f.getLength())d.setEndAfter(f);else{d.setEndAfter(f); -j=0}else d.setEndBefore(f);var d=new CKEDITOR.dom.walker(d),l=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var q;d.guard=function(b,d){if(l(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(q)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false;!d&&b.type==CKEDITOR.NODE_ELEMENT&&(q=b);return true};if(i)(h=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward": -"next"]())&&this.setStartAt(h,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(j){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!i&&!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)}, +g=this.startOffset,h=this.collapsed;if((!a||h)&&c&&c.type==CKEDITOR.NODE_TEXT){if(g)if(g>=c.getLength()){g=c.getIndex()+1;c=c.getParent()}else{var d=c.split(g),g=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(d,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{g=c.getIndex();c=c.getParent()}this.setStart(c,g);if(h){this.collapse(true);return}}c=this.endContainer;g=this.endOffset;if(!b&&!h&&c&&c.type== +CKEDITOR.NODE_TEXT){if(g){g>=c.getLength()||c.split(g);g=c.getIndex()+1}else g=c.getIndex();c=c.getParent();this.setEnd(c,g)}},enlarge:function(a,b){switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var g=this.getCommonAncestor(),h=this.root,d,f,k,e,j,l=false,i,q;i=this.startContainer;q=this.startOffset;if(i.type==CKEDITOR.NODE_TEXT){if(q){i=!CKEDITOR.tools.trim(i.substring(0,q)).length&&i;l=!!i}if(i&&!(e=i.getPrevious()))k=i.getParent()}else{q&& +(e=i.getChild(q-1)||i.getLast());e||(k=i)}for(;k||e;){if(k&&!e){!j&&k.equals(g)&&(j=true);if(c?k.isBlockBoundary():!h.contains(k))break;if(!l||k.getComputedStyle("display")!="inline"){l=false;j?d=k:this.setStartBefore(k)}e=k.getPrevious()}for(;e;){i=false;if(e.type==CKEDITOR.NODE_COMMENT)e=e.getPrevious();else{if(e.type==CKEDITOR.NODE_TEXT){q=e.getText();/[^\s\ufeff]/.test(q)&&(e=null);i=/[\s\ufeff]$/.test(q)}else if((e.$.offsetWidth>0||b&&e.is("br"))&&!e.data("cke-bookmark"))if(l&&CKEDITOR.dtd.$removeEmpty[e.getName()]){q= +e.getText();if(/[^\s\ufeff]/.test(q))e=null;else for(var m=e.$.getElementsByTagName("*"),s=0,A;A=m[s++];)if(!CKEDITOR.dtd.$removeEmpty[A.nodeName.toLowerCase()]){e=null;break}e&&(i=!!q.length)}else e=null;i&&(l?j?d=k:k&&this.setStartBefore(k):l=true);if(e){i=e.getPrevious();if(!k&&!i){k=e;e=null;break}e=i}else k=null}}k&&(k=k.getParent())}i=this.endContainer;q=this.endOffset;k=e=null;j=l=false;if(i.type==CKEDITOR.NODE_TEXT){i=!CKEDITOR.tools.trim(i.substring(q)).length&&i;l=!(i&&i.getLength());if(i&& +!(e=i.getNext()))k=i.getParent()}else(e=i.getChild(q))||(k=i);for(;k||e;){if(k&&!e){!j&&k.equals(g)&&(j=true);if(c?k.isBlockBoundary():!h.contains(k))break;if(!l||k.getComputedStyle("display")!="inline"){l=false;j?f=k:k&&this.setEndAfter(k)}e=k.getNext()}for(;e;){i=false;if(e.type==CKEDITOR.NODE_TEXT){q=e.getText();/[^\s\ufeff]/.test(q)&&(e=null);i=/^[\s\ufeff]/.test(q)}else if(e.type==CKEDITOR.NODE_ELEMENT){if((e.$.offsetWidth>0||b&&e.is("br"))&&!e.data("cke-bookmark"))if(l&&CKEDITOR.dtd.$removeEmpty[e.getName()]){q= +e.getText();if(/[^\s\ufeff]/.test(q))e=null;else{m=e.$.getElementsByTagName("*");for(s=0;A=m[s++];)if(!CKEDITOR.dtd.$removeEmpty[A.nodeName.toLowerCase()]){e=null;break}}e&&(i=!!q.length)}else e=null}else i=1;i&&l&&(j?f=k:this.setEndAfter(k));if(e){i=e.getNext();if(!k&&!i){k=e;e=null;break}e=i}else k=null}k&&(k=k.getParent())}if(d&&f){g=d.contains(f)?f:d;this.setStartBefore(g);this.setEndAfter(g)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:k=new CKEDITOR.dom.range(this.root); +h=this.root;k.setStartAt(h,CKEDITOR.POSITION_AFTER_START);k.setEnd(this.startContainer,this.startOffset);k=new CKEDITOR.dom.walker(k);var v,o,x=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=function(a){var b=x(a);b||(v=a);return b},c=function(a){var b=I(a);!b&&(a.is&&a.is("br"))&&(o=a);return b};k.guard=I;k=k.lastBackward();v=v||h;this.setStartAt(v,!v.is("br")&&(!k&&this.checkStartOfBlock()||k&&v.contains(k))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END); +if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){k=this.clone();k=new CKEDITOR.dom.walker(k);var G=CKEDITOR.dom.walker.whitespaces(),C=CKEDITOR.dom.walker.bookmark();k.evaluator=function(a){return!G(a)&&!C(a)};if((k=k.previous())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br"))break}k=this.clone();k.collapse();k.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);k=new CKEDITOR.dom.walker(k);k.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:I;v=null;k=k.lastForward();v=v||h;this.setEndAt(v,!k&&this.checkEndOfBlock()||k&& +v.contains(k)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);o&&this.setEndAfter(o)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,g=this.clone(),h=this.startContainer,d=this.endContainer,e=this.startOffset,f=this.endOffset,j=1,i=1;if(h&&h.type==CKEDITOR.NODE_TEXT)if(e)if(e>=h.getLength())g.setStartAfter(h);else{g.setStartBefore(h);j=0}else g.setStartBefore(h);if(d&&d.type==CKEDITOR.NODE_TEXT)if(f)if(f>=d.getLength())g.setEndAfter(d);else{g.setEndAfter(d); +i=0}else g.setEndBefore(d);var g=new CKEDITOR.dom.walker(g),l=CKEDITOR.dom.walker.bookmark();g.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var m;g.guard=function(b,g){if(l(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||g&&b.equals(m)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())return false;!g&&b.type==CKEDITOR.NODE_ELEMENT&&(m=b);return true};if(j)(h=g[a==CKEDITOR.SHRINK_ELEMENT?"lastForward": +"next"]())&&this.setStartAt(h,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(i){g.reset();(g=g[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(g,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!j&&!i)}},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(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer= -a;this.endOffset=b}g(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}g(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(), -a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}g(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type== -CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}g(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();CKEDITOR.env.ie||d.appendBogus();this.insertNode(d);this.moveToBookmark(c);return d},splitBlock:function(a){var b= -new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=b.block,h=c.block,f=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!d){d=this.fixBlock(true,a);h=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}h||(h=this.fixBlock(false,a))}a=d&&this.checkStartOfBlock();b=h&&this.checkEndOfBlock();this.deleteContents();if(d&&d.equals(h))if(b){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root); -this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END);h=null}else if(a){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d=null}else{h=this.splitElement(d);!CKEDITOR.env.ie&&!d.is("ul","ol")&&d.appendBogus()}return{previousBlock:d,nextBlock:h,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(d){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||d.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(),d=this[b?"endPath":"startPath"](),m=d.block||d.blockLimit,f;m&&!m.equals(d.root)&&!m.getFirst(a(m));){f= -m.getParent();this[b?"setEndAt":"setStartAt"](m,CKEDITOR.POSITION_AFTER_END);m.remove(1);m=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 d=b==CKEDITOR.START,f=this.clone();f.collapse(d);f[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f); -f.evaluator=c(d);return f[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.ltrim(a.substring(0,c));l.test(a)&&this.trim(0,1)}this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a= -this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT){a=CKEDITOR.tools.rtrim(a.substring(c));l.test(a)&&this.trim(1,0)}this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START); +a;this.endOffset=b}f(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}f(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(), +a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}f(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type== +CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}f(this)},fixBlock:function(a,b){var c=this.createBookmark(),g=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(g);g.trim();CKEDITOR.env.ie||g.appendBogus();this.insertNode(g);this.moveToBookmark(c);return g},splitBlock:function(a){var b= +new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),g=b.block,h=c.block,d=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!g){g=this.fixBlock(true,a);h=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}h||(h=this.fixBlock(false,a))}a=g&&this.checkStartOfBlock();b=h&&this.checkEndOfBlock();this.deleteContents();if(g&&g.equals(h))if(b){d=new CKEDITOR.dom.elementPath(this.startContainer,this.root); +this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END);h=null}else if(a){d=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g=null}else{h=this.splitElement(g);!CKEDITOR.env.ie&&!g.is("ul","ol")&&g.appendBogus()}return{previousBlock:g,nextBlock:h,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:d}},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(g){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||g.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(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));){f= +e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=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 d=b==CKEDITOR.START,g=this.clone();g.collapse(d);g[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);g=new CKEDITOR.dom.walker(g); +g.evaluator=c(d);return g[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.ltrim(b.substring(0,c));m.test(b)&&this.trim(0,1)}this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(b.block||b.blockLimit,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkBackward()},checkEndOfBlock:function(){var b= +this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.rtrim(b.substring(c));m.test(b)&&this.trim(1,0)}this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START); c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);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(b,c){if(b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable(false)){this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var d=0;b;){if(b.type==CKEDITOR.NODE_TEXT){c&&this.checkEndOfBlock()&&l.test(b.getText())?this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(b,c?CKEDITOR.POSITION_AFTER_END: -CKEDITOR.POSITION_BEFORE_START);d=1;break}if(b.type==CKEDITOR.NODE_ELEMENT)if(b.isEditable()){this.moveToPosition(b,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);d=1}else c&&(b.is("br")&&this.checkEndOfBlock())&&this.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);var f=b,h=d,g=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(false)&&(g=f[c?"getLast":"getFirst"](a));!h&&!g&&(g=f[c?"getPrevious":"getNext"](a));b=g}return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)}, +b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var d=0;a;){if(a.type==CKEDITOR.NODE_TEXT){c&&this.checkEndOfBlock()&&m.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END: +CKEDITOR.POSITION_BEFORE_START);d=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable()){this.moveToPosition(a,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);d=1}else c&&(a.is("br")&&this.checkEndOfBlock())&&this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);var g=a,h=d,e=void 0;g.type==CKEDITOR.NODE_ELEMENT&&g.isEditable(false)&&(e=g[c?"getLast":"getFirst"](b));!h&&!e&&(e=g[c?"getPrevious":"getNext"](b));a=e}return!!d},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 d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a= this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml(" ",this.document),b,c,d,h=this.clone();h.optimize();if(d=h.startContainer.type==CKEDITOR.NODE_TEXT){c=h.startContainer.getText();b=h.startContainer.split(h.startOffset); a.insertAfter(h.startContainer)}else h.insertNode(a);a.scrollIntoView();if(d){h.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; -(function(){function b(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function c(a,b,c){for(a=a.getNextSourceNode(b,null,c);!g(a);)a=a.getNextSourceNode(b,null,c);return a}var a=/^[\r\n\t ]+$/,g=CKEDITOR.dom.walker.bookmark(false,true),e=CKEDITOR.dom.walker.whitespaces(true),d=function(a){return g(a)&&e(a)};b.prototype={getNextParagraph:function(b){b=b||"p";if(!CKEDITOR.dtd[this.range.root.getName()][b])return null;var e, -j,l,n,m,o;if(!this._.started){j=this.range.clone();j.shrink(CKEDITOR.NODE_ELEMENT,true);n=j.endContainer.hasAscendant("pre",true)||j.startContainer.hasAscendant("pre",true);j.enlarge(this.forceBrBreak&&!n||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!j.collapsed){n=new CKEDITOR.dom.walker(j.clone());var k=CKEDITOR.dom.walker.bookmark(true,true);n.evaluator=k;this._.nextNode=n.next();n=new CKEDITOR.dom.walker(j.clone());n.evaluator=k;n=n.previous();this._.lastNode= -n.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){k=this.range.clone();k.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(k.checkEndOfBlock()){k=new CKEDITOR.dom.elementPath(k.endContainer,k.root);this._.lastNode=(k.block||k.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=j.document.createText("");this._.lastNode.insertAfter(n)}j= -null}this._.started=1}k=this._.nextNode;n=this._.lastNode;for(this._.nextNode=null;k;){var h=0,s=k.hasAscendant("pre"),w=k.type!=CKEDITOR.NODE_ELEMENT,v=0;if(w)k.type==CKEDITOR.NODE_TEXT&&a.test(k.getText())&&(w=0);else{var t=k.getName();if(k.isBlockBoundary(this.forceBrBreak&&!s&&{br:1})){if(t=="br")w=1;else if(!j&&!k.getChildCount()&&t!="hr"){e=k;l=k.equals(n);break}if(j){j.setEndAt(k,CKEDITOR.POSITION_BEFORE_START);if(t!="br")this._.nextNode=k}h=1}else{if(k.getFirst()){if(!j){j=this.range.clone(); -j.setStartAt(k,CKEDITOR.POSITION_BEFORE_START)}k=k.getFirst();continue}w=1}}if(w&&!j){j=this.range.clone();j.setStartAt(k,CKEDITOR.POSITION_BEFORE_START)}l=(!h||w)&&k.equals(n);if(j&&!h)for(;!k.getNext(d)&&!l;){t=k.getParent();if(t.isBlockBoundary(this.forceBrBreak&&!s&&{br:1})){h=1;w=0;l||t.equals(n);j.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);break}k=t;w=1;l=k.equals(n);v=1}w&&j.setEndAt(k,CKEDITOR.POSITION_AFTER_END);k=c(k,v,n);if((l=!k)||h&&j)break}if(!e){if(!j){this._.docEndMarker&&this._.docEndMarker.remove(); -return this._.nextNode=null}e=new CKEDITOR.dom.elementPath(j.startContainer,j.root);k=e.blockLimit;h={div:1,th:1,td:1};e=e.block;if(!e&&k&&!this.enforceRealBlocks&&h[k.getName()]&&j.checkStartOfBlock()&&j.checkEndOfBlock()&&!k.equals(j.root))e=k;else if(!e||this.enforceRealBlocks&&e.getName()=="li"){e=this.range.document.createElement(b);j.extractContents().appendTo(e);e.trim();j.insertNode(e);m=o=true}else if(e.getName()!="li"){if(!j.checkStartOfBlock()||!j.checkEndOfBlock()){e=e.clone(false);j.extractContents().appendTo(e); -e.trim();o=j.splitBlock();m=!o.wasStartOfBlock;o=!o.wasEndOfBlock;j.insertNode(e)}}else if(!l)this._.nextNode=e.equals(n)?null:c(j.getBoundaryNodes().endNode,1,n)}if(m)(j=e.getPrevious())&&j.type==CKEDITOR.NODE_ELEMENT&&(j.getName()=="br"?j.remove():j.getLast()&&j.getLast().$.nodeName.toLowerCase()=="br"&&j.getLast().remove());if(o)(j=e.getLast())&&j.type==CKEDITOR.NODE_ELEMENT&&j.getName()=="br"&&(CKEDITOR.env.ie||j.getPrevious(g)||j.getNext(g))&&j.remove();if(!this._.nextNode)this._.nextNode=l|| -e.equals(n)||!n?null:c(e,1,n);return e}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}})(); -CKEDITOR.command=function(b,c){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&b.focus();return this.fire("exec")===false?true:c.exec.call(this,b,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}this.enable();return this.fire("refresh",{editor:a,path:b})===false?true:c.refresh&&c.refresh.apply(this,arguments)!== -false};var a;this.checkAllowed=function(){return typeof a=="boolean"?a:a=b.filter.checkFeature(this)};CKEDITOR.tools.extend(this,c,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!c.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(b){if(this.state==b||!this.checkAllowed())return false;this.previousState=this.state;this.state=b;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON): +(function(){function a(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function c(a,b,c){for(a=a.getNextSourceNode(b,null,c);!f(a);)a=a.getNextSourceNode(b,null,c);return a}var b=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),e=CKEDITOR.dom.walker.whitespaces(true),d=function(a){return f(a)&&e(a)};a.prototype={getNextParagraph:function(a){a=a||"p";if(!CKEDITOR.dtd[this.range.root.getName()][a])return null;var e, +i,m,n,r,p;if(!this._.started){i=this.range.clone();i.shrink(CKEDITOR.NODE_ELEMENT,true);n=i.endContainer.hasAscendant("pre",true)||i.startContainer.hasAscendant("pre",true);i.enlarge(this.forceBrBreak&&!n||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!i.collapsed){n=new CKEDITOR.dom.walker(i.clone());var g=CKEDITOR.dom.walker.bookmark(true,true);n.evaluator=g;this._.nextNode=n.next();n=new CKEDITOR.dom.walker(i.clone());n.evaluator=g;n=n.previous();this._.lastNode= +n.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){g=this.range.clone();g.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(g.checkEndOfBlock()){g=new CKEDITOR.dom.elementPath(g.endContainer,g.root);this._.lastNode=(g.block||g.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=i.document.createText("");this._.lastNode.insertAfter(n)}i= +null}this._.started=1}g=this._.nextNode;n=this._.lastNode;for(this._.nextNode=null;g;){var h=0,u=g.hasAscendant("pre"),w=g.type!=CKEDITOR.NODE_ELEMENT,k=0;if(w)g.type==CKEDITOR.NODE_TEXT&&b.test(g.getText())&&(w=0);else{var t=g.getName();if(g.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){if(t=="br")w=1;else if(!i&&!g.getChildCount()&&t!="hr"){e=g;m=g.equals(n);break}if(i){i.setEndAt(g,CKEDITOR.POSITION_BEFORE_START);if(t!="br")this._.nextNode=g}h=1}else{if(g.getFirst()){if(!i){i=this.range.clone(); +i.setStartAt(g,CKEDITOR.POSITION_BEFORE_START)}g=g.getFirst();continue}w=1}}if(w&&!i){i=this.range.clone();i.setStartAt(g,CKEDITOR.POSITION_BEFORE_START)}m=(!h||w)&&g.equals(n);if(i&&!h)for(;!g.getNext(d)&&!m;){t=g.getParent();if(t.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){h=1;w=0;m||t.equals(n);i.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);break}g=t;w=1;m=g.equals(n);k=1}w&&i.setEndAt(g,CKEDITOR.POSITION_AFTER_END);g=c(g,k,n);if((m=!g)||h&&i)break}if(!e){if(!i){this._.docEndMarker&&this._.docEndMarker.remove(); +return this._.nextNode=null}e=new CKEDITOR.dom.elementPath(i.startContainer,i.root);g=e.blockLimit;h={div:1,th:1,td:1};e=e.block;if(!e&&g&&!this.enforceRealBlocks&&h[g.getName()]&&i.checkStartOfBlock()&&i.checkEndOfBlock()&&!g.equals(i.root))e=g;else if(!e||this.enforceRealBlocks&&e.getName()=="li"){e=this.range.document.createElement(a);i.extractContents().appendTo(e);e.trim();i.insertNode(e);r=p=true}else if(e.getName()!="li"){if(!i.checkStartOfBlock()||!i.checkEndOfBlock()){e=e.clone(false);i.extractContents().appendTo(e); +e.trim();p=i.splitBlock();r=!p.wasStartOfBlock;p=!p.wasEndOfBlock;i.insertNode(e)}}else if(!m)this._.nextNode=e.equals(n)?null:c(i.getBoundaryNodes().endNode,1,n)}if(r)(i=e.getPrevious())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.getName()=="br"?i.remove():i.getLast()&&i.getLast().$.nodeName.toLowerCase()=="br"&&i.getLast().remove());if(p)(i=e.getLast())&&i.type==CKEDITOR.NODE_ELEMENT&&i.getName()=="br"&&(CKEDITOR.env.ie||i.getPrevious(f)||i.getNext(f))&&i.remove();if(!this._.nextNode)this._.nextNode=m|| +e.equals(n)||!n?null:c(e,1,n);return e}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); +CKEDITOR.command=function(a,c){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:c.exec.call(this,a,b)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}this.enable();return this.fire("refresh",{editor:a,path:b})===false?true:c.refresh&&c.refresh.apply(this,arguments)!== +false};var b;this.checkAllowed=function(){return typeof b=="boolean"?b:b=a.filter.checkFeature(this)};CKEDITOR.tools.extend(this,c,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!c.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(a){if(this.state==a||!this.checkAllowed())return false;this.previousState=this.state;this.state=a;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:"",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 b(a,b,d,h,f){var m=b.name;if((h||typeof a.elements!="function"||a.elements(m))&&(!a.match||a.match(b))){if(h=!f){a:if(a.nothingRequired)h=true;else{if(f=a.requiredClasses){m=b.classes;for(h=0;h0;){e=d[--m];if(f&&(e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&z.$inline[e.name])){if(!g){g=new CKEDITOR.htmlParser.element(b);g.insertAfter(a);c.push({check:"parent-down",el:g})}g.add(e,0)}else{g=null;e.insertAfter(a);h.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e.type== -CKEDITOR.NODE_ELEMENT&&!z[h.name][e.name])&&c.push({check:"el-up",el:e})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function s(a,b,c){var d,h;for(d=0;d0;){k=d[--f];if(e&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&D.$inline[k.name])){if(!j){j=new CKEDITOR.htmlParser.element(b);j.insertAfter(a);c.push({check:"parent-down",el:j})}j.add(k,0)}else{j=null;k.insertAfter(a);h.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(k.type== +CKEDITOR.NODE_ELEMENT&&!D[h.name][k.name])&&c.push({check:"el-up",el:k})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function u(a,b,c){var d,g;for(d=0;d";if(m in this._.cachedChecks)return this._.cachedChecks[m];h=f(a).$1;e=h.styles;var o=h.classes;h.name=h.elements;h.classes=o=o?o.split(/\s*,\s*/):[];h.styles=d(e);h.attributes=d(h.attributes);h.children=[];o.length&&(h.attributes["class"]= -o.join(" "));if(e)h.attributes.style=CKEDITOR.tools.writeCssText(h.styles);e=h}else{h=a.getDefinition();e=h.styles;o=h.attributes||{};if(e){e=q(e);o.style=CKEDITOR.tools.writeCssText(e,true)}else e={};e={name:h.element,attributes:o,classes:o["class"]?o["class"].split(/\s+/):[],styles:e,children:[]}}var o=CKEDITOR.tools.clone(e),k=[],i;if(b!==false&&(i=this._.transformations[e.name])){for(h=0;h0?false:CKEDITOR.tools.objectCompare(e.attributes,o.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[m]=b);return b}};var r={styles:1,attributes:1,classes:1},C={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},y=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,u={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},x=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 d=a.attributes[b];if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],h=d&&d.match(/^(\d+)(?:\.\d*)?px$/);h?a.attributes[c]=h[1]:d==A&&(a.attributes[c]=A)}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:w,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,h=c.attributes,e,f,m,g;a.name=c.element;for(e in h)if(e=="class"){c=a.classes.join("|");for(m=h[e].split(/\s+/);g=m.pop();)c.indexOf(g)== --1&&a.classes.push(g)}else a.attributes[e]=h[e];for(f in d)a.styles[f]=d[f]}}}})(); -(function(){CKEDITOR.focusManager=function(b){if(b.focusManager)return b.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:b};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(){this._.timer&&clearTimeout(this._.timer);if(!this.hasFocus&&!this._.locked){var b=CKEDITOR.currentInstance;b&&b.focusManager.blur(1);this.hasFocus=true;(b=this._.editor.container)&&b.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked= -1},unlock:function(){delete this._.locked},blur:function(b){function c(){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 a=CKEDITOR.focusManager._.blurDelay;b||!a?c.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;c.call(this)},a,this)}},add:function(b,c){var a=b.getCustomData("focusmanager");if(!a||a!=this){a&&a.remove(b);var a= -"focus",g="blur";if(c)if(CKEDITOR.env.ie){a="focusin";g="focusout"}else CKEDITOR.event.useCapture=1;var e={blur:function(){b.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=b;this.focus()}};b.on(a,e.focus,this);b.on(g,e.blur,this);if(c)CKEDITOR.event.useCapture=0;b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",e)}},remove:function(b){b.removeCustomData("focusmanager");var c=b.removeCustomData("focusmanager_handlers");b.removeListener("blur", -c.blur);b.removeListener("focus",c.focus)}}})();CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:b};return this}; -(function(){var b,c=function(a){var a=a.data,c=a.getKeystroke(),d=this.keystrokes[c],f=this._.editor;b=f.fire("key",{keyCode:c})===false;if(!b){d&&(b=f.execCommand(d,{from:"keystrokeHandler"})!==false);b||(b=!!this.blockedKeystrokes[c])}b&&a.preventDefault(true);return!b},a=function(a){if(b){b=false;a.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(b){b.on("keydown",c,this);if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)b.on("keypress",a,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,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sk:1,sl:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(b,c,a){if(!b||!CKEDITOR.lang.languages[b])b=this.detect(c,b);this[b]?a(b,this[b]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+ -b+".js"),function(){a(b,this[b])},this)},detect:function(b,c){var a=this.languages,c=c||navigator.userLanguage||navigator.language||b,g=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=g[1],g=g[2];a[e+"-"+g]?e=e+"-"+g:a[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||b}}})(); -CKEDITOR.scriptLoader=function(){var b={},c={};return{load:function(a,g,e,d){var f=typeof a=="string";f&&(a=[a]);e||(e=CKEDITOR);var i=a.length,j=[],l=[],n=function(a){g&&(f?g.call(e,a):g.call(e,j,l))};if(i===0)n(true);else{var m=function(a,b){(b?j:l).push(a);if(--i<=0){d&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");n(b)}},o=function(a,d){b[a]=1;var h=c[a];delete c[a];for(var e=0;e -1)){var h=new CKEDITOR.dom.element("script");h.setAttributes({type:"text/javascript",src:a});if(g)if(CKEDITOR.env.ie)h.$.onreadystatechange=function(){if(h.$.readyState=="loaded"||h.$.readyState=="complete"){h.$.onreadystatechange=null;o(a,true)}};else{h.$.onload=function(){setTimeout(function(){o(a,true)},0)};h.$.onerror=function(){o(a,false)}}h.appendTo(CKEDITOR.document.getHead())}}};d&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var h=0;h=0)i=a.langCode;else{i=a.langCode.replace(/-.*/,"");i=i!=a.langCode&&CKEDITOR.tools.indexOf(k,i)>=0?i:CKEDITOR.tools.indexOf(k,"en")>=0?"en":k[0]}if(!g.langEntries||!g.langEntries[i])f.push(CKEDITOR.getUrl(g.path+"lang/"+i+".js"));else{a.lang[o]=g.langEntries[i];i=null}}e.push(i);d.push(g)}CKEDITOR.scriptLoader.load(f, -function(){for(var c=["beforeInit","init","afterInit"],f=0;f";if(e in this._.cachedChecks)return this._.cachedChecks[e];h=j(a).$1;g=h.styles;var k=h.classes;h.name=h.elements;h.classes=k=k?k.split(/\s*,\s*/): +[];h.styles=d(g);h.attributes=d(h.attributes);h.children=[];k.length&&(h.attributes["class"]=k.join(" "));if(g)h.attributes.style=CKEDITOR.tools.writeCssText(h.styles);g=h}else{h=a.getDefinition();g=h.styles;k=h.attributes||{};if(g){g=B(g);k.style=CKEDITOR.tools.writeCssText(g,true)}else g={};g={name:h.element,attributes:k,classes:k["class"]?k["class"].split(/\s+/):[],styles:g,children:[]}}var k=CKEDITOR.tools.clone(g),o=[],p;if(b!==false&&(p=this._.transformations[g.name])){for(h=0;h0?false:CKEDITOR.tools.objectCompare(g.attributes,k.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[e]=b);return b}};var s={styles:1,attributes:1,classes:1},A={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},v=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,o={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/, +classes:/\(([^\)]+)\)/},x=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 d=a.attributes[b];if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],h=d&&d.match(/^(\d+)(?:\.\d*)?px$/); +h?a.attributes[c]=h[1]:d==z&&(a.attributes[c]=z)}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:w,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,h=c.attributes, +g,e,k,f;a.name=c.element;for(g in h)if(g=="class"){c=a.classes.join("|");for(k=h[g].split(/\s+/);f=k.pop();)c.indexOf(f)==-1&&a.classes.push(f)}else a.attributes[g]=h[g];for(e in d)a.styles[e]=d[e]}}}})(); +(function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(){this._.timer&&clearTimeout(this._.timer);if(!this.hasFocus&&!this._.locked){var a=CKEDITOR.currentInstance;a&&a.focusManager.blur(1);this.hasFocus=true;(a=this._.editor.container)&&a.addClass("cke_focus");this._.editor.fire("focus")}},lock:function(){this._.locked= +1},unlock:function(){delete this._.locked},blur:function(a){function c(){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;a||!b?c.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;c.call(this)},b,this)}},add:function(a,c){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b= +"focus",f="blur";if(c)if(CKEDITOR.env.ie){b="focusin";f="focusout"}else CKEDITOR.event.useCapture=1;var e={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.currentActive=a;this.focus()}};a.on(b,e.focus,this);a.on(f,e.blur,this);if(c)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",e)}},remove:function(a){a.removeCustomData("focusmanager");var c=a.removeCustomData("focusmanager_handlers");a.removeListener("blur", +c.blur);a.removeListener("focus",c.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this}; +(function(){var a,c=function(b){var b=b.data,c=b.getKeystroke(),d=this.keystrokes[c],j=this._.editor;a=j.fire("key",{keyCode:c})===false;if(!a){d&&(a=j.execCommand(d,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[c])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",c,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,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,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},load:function(a,c,b){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(c,a);this[a]?b(a,this[a]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+ +a+".js"),function(){b(a,this[a])},this)},detect:function(a,c){var b=this.languages,c=c||navigator.userLanguage||navigator.language||a,f=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),e=f[1],f=f[2];b[e+"-"+f]?e=e+"-"+f:b[e]||(e=null);CKEDITOR.lang.detect=e?function(){return e}:function(a){return a};return e||a}}})(); +CKEDITOR.scriptLoader=function(){var a={},c={};return{load:function(b,f,e,d){var j=typeof b=="string";j&&(b=[b]);e||(e=CKEDITOR);var l=b.length,i=[],m=[],n=function(a){f&&(j?f.call(e,a):f.call(e,i,m))};if(l===0)n(true);else{var r=function(a,b){(b?i:m).push(a);if(--l<=0){d&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");n(b)}},p=function(b,d){a[b]=1;var h=c[b];delete c[b];for(var g=0;g +1)){var h=new CKEDITOR.dom.element("script");h.setAttributes({type:"text/javascript",src:b});if(f)if(CKEDITOR.env.ie)h.$.onreadystatechange=function(){if(h.$.readyState=="loaded"||h.$.readyState=="complete"){h.$.onreadystatechange=null;p(b,true)}};else{h.$.onload=function(){setTimeout(function(){p(b,true)},0)};h.$.onerror=function(){p(b,false)}}h.appendTo(CKEDITOR.document.getHead())}}};d&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var h=0;h=0)p=a.langCode;else{p=a.langCode.replace(/-.*/,"");p=p!=a.langCode&&CKEDITOR.tools.indexOf(o,p)>=0?p:CKEDITOR.tools.indexOf(o,"en")>=0?"en":o[0]}if(!j.langEntries||!j.langEntries[p])e.push(CKEDITOR.getUrl(j.path+"lang/"+p+".js"));else{a.lang[k]=j.langEntries[p];p=null}}g.push(p);d.push(j)}CKEDITOR.scriptLoader.load(e, +function(){for(var c=["beforeInit","init","afterInit"],e=0;e]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}}; -(function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={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(a){for(var g,e,d=0,f;g=this._.htmlPartsRegex.exec(a);){e=g.index;if(e>d){d=a.substring(d,e);if(f)f.push(d);else this.onText(d)}d= -this._.htmlPartsRegex.lastIndex;if(e=g[1]){e=e.toLowerCase();if(f&&CKEDITOR.dtd.$cdata[e]){this.onCDATA(f.join(""));f=null}if(!f){this.onTagClose(e);continue}}if(f)f.push(g[0]);else if(e=g[3]){e=e.toLowerCase();if(!/="/.test(e)){var i={},j;g=g[4];var l=!!(g&&g.charAt(g.length-1)=="/");if(g)for(;j=b.exec(g);){var n=j[1].toLowerCase();j=j[2]||j[3]||j[4]||"";i[n]=!j&&c[n]?n:j}this.onTagOpen(e,i,l);!f&&CKEDITOR.dtd.$cdata[e]&&(f=[])}}else if(e=g[2])this.onComment(e)}if(a.length>d)this.onText(a.substring(d, -a.length))}}})(); -CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("<",b)},openTagClose:function(b,c){c?this._.output.push(" />"):this._.output.push(">")},attribute:function(b,c){typeof c=="string"&&(c=CKEDITOR.tools.htmlEncodeAttr(c));this._.output.push(" ",b,'="',c,'"')},closeTag:function(b){this._.output.push("")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("<\!--",b,"--\>")},write:function(b){this._.output.push(b)}, -reset:function(){this._.output=[];this._.indent=false},getHtml:function(b){var c=this._.output.join("");b&&this.reset();return c}}});"use strict"; -(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,c=CKEDITOR.tools.indexOf(b,this),a=this.previous,g=this.next;a&&(a.next=g);g&&(g.previous=a);b.splice(c,1);this.parent=null},replaceWith:function(b){var c=this.parent.children,a=CKEDITOR.tools.indexOf(c,this),g=b.previous=this.previous,e=b.next=this.next;g&&(g.next=b);e&&(e.previous=b);c[a]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var c=b.parent.children, -a=CKEDITOR.tools.indexOf(c,b),g=b.next;c.splice(a+1,0,this);this.next=b.next;this.previous=b;b.next=this;g&&(g.previous=this);this.parent=b.parent},insertBefore:function(b){var c=b.parent.children,a=CKEDITOR.tools.indexOf(c,b);c.splice(a,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next=this);b.previous=this;this.parent=b.parent}}})();"use strict";CKEDITOR.htmlParser.comment=function(b){this.value=b;this._={isBlockLike:false}}; -CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(b){var c=this.value;if(!(c=b.onComment(c,this))){this.remove();return false}if(typeof c!="string"){this.replaceWith(c);return false}this.value=c;return true},writeHtml:function(b,c){c&&this.filter(c);b.comment(this.value)}});"use strict"; -(function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b){if(!(this.value=b.onText(this.value,this))){this.remove();return false}},writeHtml:function(b,c){c&&this.filter(c);b.text(this.value)}})})();"use strict"; -(function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}}; -(function(){function b(a){return a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),a={ol:1,ul:1},g=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(e,d,f){function i(a){var b;if(s.length>0)for(var c=0;c=0;b--)if(a==s[b].name){s.splice(b,1);return}for(var c=[],d=[],e=v;e!=h&&e.name!=a;){e._.isBlockLike||d.unshift(e);c.push(e);e=e.returnPoint||e.parent}if(e!=h){for(b=0;b0?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; +(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={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 f,e,d=0,j;f=this._.htmlPartsRegex.exec(b);){e=f.index;if(e>d){d=b.substring(d,e);if(j)j.push(d);else this.onText(d)}d= +this._.htmlPartsRegex.lastIndex;if(e=f[1]){e=e.toLowerCase();if(j&&CKEDITOR.dtd.$cdata[e]){this.onCDATA(j.join(""));j=null}if(!j){this.onTagClose(e);continue}}if(j)j.push(f[0]);else if(e=f[3]){e=e.toLowerCase();if(!/="/.test(e)){var l={},i;f=f[4];var m=!!(f&&f.charAt(f.length-1)=="/");if(f)for(;i=a.exec(f);){var n=i[1].toLowerCase();i=i[2]||i[3]||i[4]||"";l[n]=!i&&c[n]?n:i}this.onTagOpen(e,l,m);!j&&CKEDITOR.dtd.$cdata[e]&&(j=[])}}else if(e=f[2])this.onComment(e)}if(b.length>d)this.onText(b.substring(d, +b.length))}}})(); +CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("<",a)},openTagClose:function(a,c){c?this._.output.push(" />"):this._.output.push(">")},attribute:function(a,c){typeof c=="string"&&(c=CKEDITOR.tools.htmlEncodeAttr(c));this._.output.push(" ",a,'="',c,'"')},closeTag:function(a){this._.output.push("")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("<\!--",a,"--\>")},write:function(a){this._.output.push(a)}, +reset:function(){this._.output=[];this._.indent=false},getHtml:function(a){var c=this._.output.join("");a&&this.reset();return c}}});"use strict"; +(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,c=CKEDITOR.tools.indexOf(a,this),b=this.previous,f=this.next;b&&(b.next=f);f&&(f.previous=b);a.splice(c,1);this.parent=null},replaceWith:function(a){var c=this.parent.children,b=CKEDITOR.tools.indexOf(c,this),f=a.previous=this.previous,e=a.next=this.next;f&&(f.next=a);e&&(e.previous=a);c[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var c=a.parent.children, +b=CKEDITOR.tools.indexOf(c,a),f=a.next;c.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;f&&(f.previous=this);this.parent=a.parent},insertBefore:function(a){var c=a.parent.children,b=CKEDITOR.tools.indexOf(c,a);c.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:false}}; +CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a){var c=this.value;if(!(c=a.onComment(c,this))){this.remove();return false}if(typeof c!="string"){this.replaceWith(c);return false}this.value=c;return true},writeHtml:function(a,c){c&&this.filter(c);a.comment(this.value)}});"use strict"; +(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a){if(!(this.value=a.onText(this.value,this))){this.remove();return false}},writeHtml:function(a,c){c&&this.filter(c);a.text(this.value)}})})();"use strict"; +(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}}; +(function(){function a(a){return a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var c=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},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(e,d,j){function l(a){var b;if(u.length>0)for(var c=0;c=0;b--)if(a==u[b].name){u.splice(b,1);return}for(var c=[],d=[],g=k;g!=h&&g.name!=a;){g._.isBlockLike||d.unshift(g);c.push(g);g=g.returnPoint||g.parent}if(g!=h){for(b=0;b0?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){a.onRoot(this);this.filterChildren(a)},filterChildren:function(a,b){if(this.childrenFilteredBy!=a.id){if(b&&!this.parent)a.onRoot(this);this.childrenFilteredBy=a.id;for(var c=0;c=0;g--)if(n=b[g]){n.pri=c;a.splice(e,0,n)}}}function a(a,b,c){if(b)for(var e in b){var l=a[e];a[e]=g(l,b[e],c);l||a.$length++}}function g(a,b,g){if(b){b.pri=g;if(a){if(a.splice)c(a,b,g);else{a=a.pri>g?[b,a]:[a,b];a.filter=e}return a}return b.filter=b}}function e(a){for(var b= -a.type||a instanceof CKEDITOR.htmlParser.fragment,c=0;c=0;f--)if(n=b[f]){n.pri=c;a.splice(e,0,n)}}}function b(a,b,c){if(b)for(var e in b){var m=a[e];a[e]=f(m,b[e],c);m||a.$length++}}function f(a,b,f){if(b){b.pri=f;if(a){if(a.splice)c(a,b,f);else{a=a.pri>f?[b,a]:[a,b];a.filter=e}return a}return b.filter=b}}function e(a){for(var b= +a.type||a instanceof CKEDITOR.htmlParser.fragment,c=0;c7||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))h=false;else{h=a(e);h=!h||e.name=="form"&&h.name=="input"}h&&e.add(m(b))}}}function o(a,b){if((!u||!CKEDITOR.env.ie)&&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(F))){if(c.index){f(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&u&&(!b||a.parent.name in s))return true;if(!u)if((c=a.previous)&&c.name=="br"||!c||d(c))return true}return false}var k={elements:{}},u=c=="html",s=CKEDITOR.tools.extend({},A),w;for(w in s)"#"in q[w]||delete s[w];for(w in s)k.elements[w]=h(u,b.config.fillEmptyBlocks!==false);k.root=h(u);k.elements.br=function(a){return function(b){if(b.parent.type!= -CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=b.next;c&&e(c);)c=c.next;var h=g(b);!c&&d(b.parent)?i(b.parent,m(a)):d(c)&&(h&&!d(h))&&f(c,m(a))}}}}(u);return k}function c(a){return a.enterMode!=CKEDITOR.ENTER_BR&&a.autoParagraph!==false?a.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false}function a(a){for(a=a.children[a.children.length-1];a&&e(a);)a=a.previous;return a}function g(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 d(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in A||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function f(a,b){var c=a.parent.children,d=CKEDITOR.tools.indexOf(c,a);c.splice(d,0,b);c=a.previous;a.previous=b;b.next=a;b.parent=a.parent;if(c){b.previous=c;c.next=b}}function i(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 j(a){var b=a.parent.children,c=CKEDITOR.tools.indexOf(b,a),d=a.previous,a=a.next;d&&(d.next=a);a&&(a.previous=d);b.splice(c,1)}function l(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function n(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function m(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} -function o(a){return a.replace(u,function(a,b,c){return"<"+b+c.replace(x,function(a,b){return!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function k(a){return a.replace(I,function(a){return""+encodeURIComponent(a)+""})}function h(a){return a.replace(G,function(a,b){return decodeURIComponent(b)})}function s(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,function(a){return"<\!--"+z+"{C}"+encodeURIComponent(a).replace(/--/g, -"%2D%2D")+"--\>"})}function w(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function v(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 t(a,b){for(var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),m=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,d=[//gi, -//gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),h=0;h"});a=a.replace(m,function(a,b,d){return"<\!--"+z+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\>"});return a.replace(/(['"]).*?\1/g,function(a){return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g, -function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})})}CKEDITOR.htmlDataProcessor=function(a){var d,e,m=this;this.editor=a;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(r);d.addRules(b(a,"data"));e.addRules(C);e.addRules(b(a,"html"));a.on("toHtml",function(b){var b=b.data,d=b.dataValue,d=t(d,a),d=o(d),d=k(d),d=d.replace(E,"$1cke:$2"),d=d.replace(L,""), -d=CKEDITOR.env.opera?d:d.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=b.context||a.editable().getName(),m;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";d="
"+d+"
";m=1}e=a.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," ");m&&(d=d.replace(/^
|<\/pre>$/gi,""));d=d.replace(Q,"$1$2");d=h(d);d=w(d);b.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,b.context,b.fixForBody===false?false:c(a.config))},
-null,null,5);a.on("toHtml",function(a){a.data.dataValue.filterChildren(m.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=s(b)},null,null,15);a.on("toDataFormat",function(b){b.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(b.data.dataValue,a.editable().getName(),c(a.config))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(m.htmlFilter,true)},
-null,null,10);a.on("toDataFormat",function(b){var c=b.data.dataValue,d=m.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=w(c);c=v(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor;!b&&b!==null&&(b=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:b,fixForBody:c,dontFilter:!!d}).dataValue},toDataFormat:function(a){return this.editor.fire("toDataFormat",{dataValue:a}).dataValue}};var F=/(?: |\xa0)$/,
-z="{cke_protected}",q=CKEDITOR.dtd,p=["caption","colgroup","col","thead","tfoot","tbody"],A=CKEDITOR.tools.extend({},q.$blockLimit,q.$block),r={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},C={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,e=0;e-1&&d>-1&&c!=d)){c=l(a);d=l(b)}return c>d?1:-1})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},param:function(a){a.children=[];a.isEmpty=true;return a},a:function(a){if(!a.children.length&&
-!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false},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];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&&i(a,
-b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""}},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};for(var y in{input:1,textarea:1}){r.elements[y]=n;C.elements[y]=m}var u=/<(a|area|img|input|source)\b([^>]*)>/gi,x=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,I=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
-G=/([^<]*)<\/cke:encoded>/gi,E=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,Q=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict";
-CKEDITOR.htmlParser.element=function(b,c){this.name=b;this.attributes=c||{};this.children=[];var a=b||"",g=a.match(/^cke:(.*)/);g&&(a=g[1]);a=!(!CKEDITOR.dtd.$nonBodyContent[a]&&!CKEDITOR.dtd.$block[a]&&!CKEDITOR.dtd.$listItem[a]&&!CKEDITOR.dtd.$tableContent[a]&&!(CKEDITOR.dtd.$nonEditable[a]||a=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:a,hasInlineStarted:this.isEmpty||!a}};
-CKEDITOR.htmlParser.cssStyle=function(b){var c={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,b,e){b=="font-family"&&(e=e.replace(/["']/g,""));c[b.toLowerCase()]=e});return{rules:c,populate:function(a){var b=this.toString();if(b)a instanceof CKEDITOR.dom.element?a.setAttribute("style",b):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=b:a.style=b},toString:function(){var a=[],b;
-for(b in c)c[b]&&a.push(b,":",c[b],";");return a.join("")}}};
-(function(){var b=function(a,b){a=a[0];b=b[0];return ab?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a){var b=this,c,d;if(!b.parent)a.onRoot(b);for(;;){c=b.name;if(!(d=a.onElementName(c))){this.remove();return false}b.name=d;if(!(b=a.onElement(b))){this.remove();return false}if(b!==
-this){this.replaceWith(b);return false}if(b.name==c)break;if(b.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(b);return false}if(!b.name){this.replaceWithChildren();return false}}c=b.attributes;var f,i;for(f in c){i=f;for(d=c[f];;)if(i=a.onAttributeName(f))if(i!=f){delete c[f];f=i}else break;else{delete c[f];break}i&&((d=a.onAttribute(b,i,d))===false?delete c[i]:c[i]=d)}b.isEmpty||this.filterChildren(a);return true},filterChildren:c.filterChildren,writeHtml:function(a,c){c&&this.filter(c);var e=this.name,
-d=[],f=this.attributes,i,j;a.openTag(e,f);for(i in f)d.push([i,f[i]]);a.sortAttributes&&d.sort(b);i=0;for(j=d.length;i7||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem))h=false;else{h=b(e);h=!h||e.name=="form"&&h.name=="input"}h&&e.add(g(a))}}}function k(a,b){if((!p||!CKEDITOR.env.ie)&&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(F))){if(c.index){j(a,new CKEDITOR.htmlParser.text(a.value.substring(0,c.index)));a.value=c[0]}if(CKEDITOR.env.ie&&p&&(!b||a.parent.name in r))return true;if(!p)if((c=a.previous)&&c.name=="br"||!c||d(c))return true}return false}var o={elements:{}},p=c=="html",r=CKEDITOR.tools.extend({},z),u;for(u in r)"#"in B[u]||delete r[u];for(u in r)o.elements[u]=h(p,a.config.fillEmptyBlocks!==false);o.root=h(p);o.elements.br=function(a){return function(b){if(b.parent.type!=
+CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=b.next;c&&e(c);)c=c.next;var h=f(b);!c&&d(b.parent)?l(b.parent,g(a)):d(c)&&(h&&!d(h))&&j(c,g(a))}}}}(p);return o}function c(a){return a.enterMode!=CKEDITOR.ENTER_BR&&a.autoParagraph!==false?a.enterMode==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 f(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 d(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in z||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function j(a,b){var c=a.parent.children,g=CKEDITOR.tools.indexOf(c,a);c.splice(g,0,b);c=a.previous;a.previous=b;b.next=a;b.parent=a.parent;if(c){b.previous=c;c.next=b}}function l(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 i(a){var b=a.parent.children,c=CKEDITOR.tools.indexOf(b,a),g=a.previous,a=a.next;g&&(g.next=a);a&&(a.previous=g);b.splice(c,1)}function m(a){var b=a.parent;return b?CKEDITOR.tools.indexOf(b.children,a):-1}function n(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function r(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}
+function p(a){return a.replace(o,function(a,b,c){return"<"+b+c.replace(x,function(a,b){return!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function g(a,b){return a.replace(b,function(a,b,c){a.indexOf("/g,">")+"");return""+encodeURIComponent(a)+""})}function h(a){return a.replace(C,function(a,b){return decodeURIComponent(b)})}function u(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,
+function(a){return"<\!--"+D+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function w(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function k(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 t(a,b){for(var c=[],g=b.config.protectedSource,d=b._.dataStore||(b._.dataStore=
+{id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,g=[//gi,//gi].concat(g),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),h=0;h"});a=a.replace(e,function(a,b,g){return"<\!--"+D+(b?"{C}":"")+encodeURIComponent(c[g]).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(b){var d,e,f=this;this.editor=b;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(s);d.addRules(a(b,"data"));e.addRules(A);e.addRules(a(b,"html"));b.on("toHtml",function(a){var a=
+a.data,d=a.dataValue,d=t(d,b),d=g(d,G),d=p(d),d=g(d,I),d=d.replace(Q,"$1cke:$2"),d=d.replace(E,""),d=CKEDITOR.env.opera?d:d.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),e=a.context||b.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&e=="pre"){e="div";d="
"+d+"
";f=1}e=b.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," ");f&&(d=d.replace(/^
|<\/pre>$/gi,""));d=d.replace(L,"$1$2");
+d=h(d);d=w(d);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.context,a.fixForBody===false?false:c(b.config))},null,null,5);b.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,true)},null,null,10);b.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=u(b)},null,null,15);b.on("toDataFormat",function(a){a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(a.data.dataValue,b.editable().getName(),
+c(b.config))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){var c=a.data.dataValue,g=f.writer;g.reset();c.writeChildrenHtml(g);c=g.getHtml(true);c=w(c);c=k(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,g){var d=this.editor;!b&&b!==null&&(b=d.editable().getName());return d.fire("toHtml",{dataValue:a,context:b,fixForBody:c,dontFilter:!!g}).dataValue},
+toDataFormat:function(a){return this.editor.fire("toDataFormat",{dataValue:a}).dataValue}};var F=/(?: |\xa0)$/,D="{cke_protected}",B=CKEDITOR.dtd,q=["caption","colgroup","col","thead","tfoot","tbody"],z=CKEDITOR.tools.extend({},B.$blockLimit,B.$block),s={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},A={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"],g,d=0;d-1&&g>-1&&c!=g)){c=m(a);g=m(b)}return c>g?1:-1})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=
+b)}},param:function(a){a.children=[];a.isEmpty=true;return a},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false},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];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&&l(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""}},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)A.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})};for(var v in{input:1,textarea:1}){s.elements[v]=n;A.elements[v]=r}var o=/<(a|area|img|input|source)\b([^>]*)>/gi,
+x=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,I=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,C=/([^<]*)<\/cke:encoded>/gi,Q=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,L=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,E=/]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict";
+CKEDITOR.htmlParser.element=function(a,c){this.name=a;this.attributes=c||{};this.children=[];var b=a||"",f=b.match(/^cke:(.*)/);f&&(b=f[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[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}};
+CKEDITOR.htmlParser.cssStyle=function(a){var c={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,f,e){f=="font-family"&&(e=e.replace(/["']/g,""));c[f.toLowerCase()]=e});return{rules:c,populate:function(a){var c=this.toString();if(c)a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c},toString:function(){var a=[],f;
+for(f in c)c[f]&&a.push(f,":",c[f],";");return a.join("")}}};
+(function(){var a=function(a,c){a=a[0];c=c[0];return ac?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a){var c=this,e,d;if(!c.parent)a.onRoot(c);for(;;){e=c.name;if(!(d=a.onElementName(e))){this.remove();return false}c.name=d;if(!(c=a.onElement(c))){this.remove();return false}if(c!==
+this){this.replaceWith(c);return false}if(c.name==e)break;if(c.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(c);return false}if(!c.name){this.replaceWithChildren();return false}}e=c.attributes;var j,l;for(j in e){l=j;for(d=e[j];;)if(l=a.onAttributeName(j))if(l!=j){delete e[j];j=l}else break;else{delete e[j];break}l&&((d=a.onAttribute(c,l,d))===false?delete e[l]:e[l]=d)}c.isEmpty||this.filterChildren(a);return true},filterChildren:c.filterChildren,writeHtml:function(b,c){c&&this.filter(c);var e=this.name,
+d=[],j=this.attributes,l,i;b.openTag(e,j);for(l in j)d.push([l,j[l]]);b.sortAttributes&&d.sort(a);l=0;for(i=d.length;l{voiceLabel}<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation">{bottomHtml}'));b=CKEDITOR.dom.element.createFromHtml(e.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.lang.editor,
-topHtml:l?''+l+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:n?''+n+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(g==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();b.insertAfter(c)}else c.append(b);a.container=b;l&&a.ui.space("top").unselectable();n&&a.ui.space("bottom").unselectable();c=
-a.config.width;g=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));g&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(g));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}function g(a){var b=a.element;if(a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&b.is("textarea")){var c=b.$.form&&new CKEDITOR.dom.element(b.$.form);if(c){var e=function(){a.updateElement()};c.on("submit",e);if(!c.$.submit.nodeName&&!c.$.submit.length)c.$.submit=
-CKEDITOR.tools.override(c.$.submit,function(b){return function(){a.updateElement();b.apply?b.apply(this,arguments):b()}});a.on("destroy",function(){c.removeListener("submit",e)})}}}CKEDITOR.replace=function(a,c){return b(a,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,c,e){return b(a,c,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b'+m+"":"",contentId:a.ui.spaceId("contents"),bottomHtml:n?''+n+"":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(f==CKEDITOR.ELEMENT_MODE_REPLACE){c.hide();b.insertAfter(c)}else c.append(b);a.container=b;m&&a.ui.space("top").unselectable();n&&a.ui.space("bottom").unselectable();c=
+a.config.width;f=a.config.height;c&&b.setStyle("width",CKEDITOR.tools.cssLength(c));f&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}function f(a){var b=a.element;if(a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&b.is("textarea")){var c=b.$.form&&new CKEDITOR.dom.element(b.$.form);if(c){var e=function(){a.updateElement()};c.on("submit",e);if(!c.$.submit.nodeName&&!c.$.submit.length)c.$.submit=
+CKEDITOR.tools.override(c.$.submit,function(b){return function(){a.updateElement();b.apply?b.apply(this,arguments):b()}});a.on("destroy",function(){c.removeListener("submit",e)})}}}CKEDITOR.replace=function(b,c){return a(b,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,c,e){return a(b,c,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b",i="",a=f+a.replace(g,function(){return i+f})+i}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return e.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");n(this,"text",a)},insertElement:function(b){d(this);for(var c=this.editor,e=c.config.enterMode, -h=c.getSelection(),g=h.getRanges(),i=b.getName(),j=CKEDITOR.dtd.$block[i],l,n,z,q=g.length-1;q>=0;q--){l=g[q];if(!l.checkReadOnly()){l.deleteContents(1);n=!q&&b||b.clone(1);var p,A;if(j)for(;(p=l.getCommonAncestor(0,1))&&(A=CKEDITOR.dtd[p.getName()])&&(!A||!A[i]);)if(p.getName()in CKEDITOR.dtd.span)l.splitElement(p);else if(l.checkStartOfBlock()&&l.checkEndOfBlock()){l.setStartBefore(p);l.collapse(true);p.remove()}else l.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",c.editable());l.insertNode(n);z|| -(z=n)}}if(z){l.moveToPosition(z,CKEDITOR.POSITION_AFTER_END);if(j)if((b=z.getNext(a))&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$block))b.getDtd()["#"]?l.moveToElementEditStart(b):l.moveToElementEditEnd(z);else if(!b&&e!=CKEDITOR.ENTER_BR){b=l.fixBlock(true,e==CKEDITOR.ENTER_DIV?"div":"p");l.moveToElementEditStart(b)}}h.selectRanges([l]);f(this,CKEDITOR.env.opera)},setData:function(a,b){!b&&this.editor.dataProcessor&&(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")}, +"\n")),a=a.replace(/\t/g,"    "),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var f=/\n{2}/g;if(f.test(a))var i="<"+c+">",k="",a=i+a.replace(f,function(){return k+i})+k}a=a.replace(/\n/g,"
");b||(a=a.replace(RegExp("
(?=)"),function(a){return e.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");n(this,"text",a)},insertElement:function(a){d(this);for(var c=this.editor,g=c.config.enterMode, +e=c.getSelection(),f=e.getRanges(),i=a.getName(),k=CKEDITOR.dtd.$block[i],m,n,l,B=f.length-1;B>=0;B--){m=f[B];if(!m.checkReadOnly()){m.deleteContents(1);n=!B&&a||a.clone(1);var q,z;if(k)for(;(q=m.getCommonAncestor(0,1))&&(z=CKEDITOR.dtd[q.getName()])&&(!z||!z[i]);)if(q.getName()in CKEDITOR.dtd.span)m.splitElement(q);else if(m.checkStartOfBlock()&&m.checkEndOfBlock()){m.setStartBefore(q);m.collapse(true);q.remove()}else m.splitBlock(g==CKEDITOR.ENTER_DIV?"div":"p",c.editable());m.insertNode(n);l|| +(l=n)}}if(l){m.moveToPosition(l,CKEDITOR.POSITION_AFTER_END);if(k)if((a=l.getNext(b))&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$block))a.getDtd()["#"]?m.moveToElementEditStart(a):m.moveToElementEditEnd(l);else if(!a&&g!=CKEDITOR.ENTER_BR){a=m.fixBlock(true,g==CKEDITOR.ENTER_DIV?"div":"p");m.moveToElementEditStart(a)}}e.selectRanges([m]);j(this,CKEDITOR.env.opera)},setData:function(a,b){!b&&this.editor.dataProcessor&&(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.editor.fire("dataReady")}, getData:function(a){var b=this.getHtml();!a&&this.editor.dataProcessor&&(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 a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")|| -a.config.ignoreEmptyParagraph!==false&&(b=b.replace(i,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml", +a.config.ignoreEmptyParagraph!==false&&(b=b.replace(l,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml", function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+ a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=a.readOnly;a.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);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&& -this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var d=a.config.contentsLangDirection;this.getDirection(1)!=d&&this.changeAttr("dir",d);var h=CKEDITOR.getCss();if(h){d=b.getHead();if(!d.getCustomData("stylesheet")){h=b.appendStyleText(h);h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement);d.setCustomData("stylesheet",h);h.data("cke-temp",1)}}d= -b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",d+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=a.getTarget();b.is("a")&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.keyCode,d;if(c in{8:1,46:1}){var h=a.getSelection(),b=h.getRanges()[0],g=b.startPath(),f,k,o,c=c==8;if(h=e(h)){a.fire("saveSnapshot"); -b.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START);h.remove();b.select();a.fire("saveSnapshot");d=1}else if(b.collapsed)if((f=g.block)&&b[c?"checkStartOfBlock":"checkEndOfBlock"]()&&(o=f[c?"getPrevious":"getNext"](j))&&o.is("table")){a.fire("saveSnapshot");b[c?"checkEndOfBlock":"checkStartOfBlock"]()&&f.remove();b["moveToElementEdit"+(c?"End":"Start")](o);b.select();a.fire("saveSnapshot");d=1}else if(g.blockLimit&&g.blockLimit.is("td")&&(k=g.blockLimit.getAscendant("table"))&&b.checkBoundaryOfElement(k, -c?CKEDITOR.START:CKEDITOR.END)&&(o=k[c?"getPrevious":"getNext"](j))){a.fire("saveSnapshot");b["moveToElementEdit"+(c?"End":"Start")](o);b.checkStartOfBlock()&&b.checkEndOfBlock()?o.remove():b.select();a.fire("saveSnapshot");d=1}else if((k=g.contains(["td","th","caption"]))&&b.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END))if((o=k[c?"getPreviousSourceNode":"getNextSourceNode"](1,CKEDITOR.NODE_ELEMENT))&&!o.isReadOnly()&&b.root.contains(o)){b[c?"moveToElementEditEnd":"moveToElementEditStart"](o); -b.select();d=1}}return!d});CKEDITOR.env.ie&&this.attachListener(this,"click",c);!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b=b.data.getTarget();if(!b.getOuterHtml().replace(i,"")){var c=a.createRange(); -c.moveToElementEditStart(b);c.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 i=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi, -j=CKEDITOR.dom.walker.whitespaces(true),l=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.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)}});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty(); -c.fire("lockSnapshot");b(a);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=this.lang.editor+", "+this.name;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+ -this.lang.common.editorHelp+"");c.append(e);a.changeAttr("aria-describedby",d)}}})});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,d){var e,g,h,f,k=[],i=d.range.startContainer;e=d.range.startPath();for(var i=j[i.getName()],l=0,n=a.getChildren(),w=n.count(),s=-1,t=-1,D=0,z=e.contains(j.$list);l-1)k[s].firstNotAllowed=1;if(t>-1)k[t].lastNotAllowed=1;return k}function d(a,c){var e=[],g=a.getChildren(),h=g.count(), -f,o=0,i=j[c],l=!a.is(j.$inline)||a.is("br");for(l&&e.push(" ");o ", -r.document);r.insertNode(x);r.setStartAfter(x)}I=new CKEDITOR.dom.elementPath(r.startContainer);p.endPath=G=new CKEDITOR.dom.elementPath(r.endContainer);if(!r.collapsed){var u=G.block||G.blockLimit,Q=r.getCommonAncestor();u&&(!u.equals(Q)&&!u.contains(Q)&&r.checkEndOfBlock())&&p.zombies.push(u);r.deleteContents()}for(;(E=b(r.startContainer)&&r.startContainer.getChild(r.startOffset-1))&&b(E)&&E.isBlockBoundary()&&I.contains(E);)r.moveToPosition(E,CKEDITOR.POSITION_BEFORE_END);g(r,p.blockLimit,I,G); -if(x){r.setEndBefore(x);r.collapse();x.remove()}x=r.startPath();if(u=x.contains(e,false,1)){r.splitElement(u);p.inlineStylesRoot=u;p.inlineStylesPeak=x.lastElement}x=r.createBookmark();(u=x.startNode.getPrevious(a))&&b(u)&&e(u)&&y.push(u);(u=x.startNode.getNext(a))&&b(u)&&e(u)&&y.push(u);for(u=x.startNode;(u=u.getParent())&&e(u);)y.push(u);r.moveToBookmark(x);if(t){E=t;t=p.range;if(p.type=="text"&&p.inlineStylesRoot){x=E;E=p.inlineStylesPeak;r=E.getDocument().createText("{cke-peak}");for(y=p.inlineStylesRoot.getParent();!E.equals(y);){r= -r.appendTo(E.clone());E=E.getParent()}E=r.getOuterHtml().replace("{cke-peak}",x)}x=p.blockLimit.getName();if(/^\s+|\s+$/.test(E)&&"span"in CKEDITOR.dtd[x]){var L=' ';E=L+E+L}E=p.editor.dataProcessor.toHtml(E,null,false,p.dontFilter);x=t.document.createElement("body");x.setHtml(E);if(L){x.getFirst().remove();x.getLast().remove()}if((L=t.startPath().block)&&!(L.getChildCount()==1&&L.getBogus()))a:{var D;if(x.getChildCount()==1&&b(D=x.getFirst())&&D.is(n)){L=D.getElementsByTag("*"); -t=0;for(r=L.count();t0;else{B=D.startPath();if(!G.isBlock&&(N=p.editor.config.enterMode!=CKEDITOR.ENTER_BR&&p.editor.config.autoParagraph!==false?p.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!B.block&&B.blockLimit&&B.blockLimit.equals(D.root)){N= -L.createElement(N);!CKEDITOR.env.ie&&N.appendBogus();D.insertNode(N);!CKEDITOR.env.ie&&(J=N.getBogus())&&J.remove();D.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}if((B=D.startPath().block)&&!B.equals(H)){if(J=B.getBogus()){J.remove();E.push(B)}H=B}G.firstNotAllowed&&(r=1);if(r&&G.isElement){B=D.startContainer;for(K=null;B&&!j[B.getName()][G.name];){if(B.equals(t)){B=null;break}K=B;B=B.getParent()}if(B){if(K){O=D.splitElement(K);p.zombies.push(O);p.zombies.push(K)}}else{K=t.getName();P=!x;B=x== -I.length-1;K=d(G.node,K);for(var M=[],R=K.length,T=0,U=void 0,V=0,W=-1;T1&&g&&g.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];g=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;g&&d[1]--;var f;g=e;if(!g.isCollapsed){f=g.getRangeAt(0);f.setStart(g.anchorNode,g.anchorOffset);f.setEnd(g.focusNode,g.focusOffset);f=f.collapsed}f&&d.unshift(d.pop())}}c.setText(c.getText().replace(/\u200B/g,""));if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}} -var f,i,j=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(a){function e(){var a=g.getSelection();a&&a.removeAllRanges()}var g=a.editor;g.define("selectionChange",{errorProof:1});g.on("contentDom",function(){var a=g.document,e=CKEDITOR.document,f=g.editable(),o=a.getBody(),m=a.getDocumentElement(),i=f.isInline(),j;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();if(j!==0){a=g.getSelection().getNative();if(a.isCollapsed&&a.anchorNode==f.$){a=g.createRange(); -a.moveToElementEditStart(f);a.select()}}},null,null,-2);f.attachListener(f,"focus",function(){g.unlockSelection(j);j=0},null,null,-1);f.attachListener(f,"mousedown",function(){j=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||i){var n,p=function(){n=g.getSelection(1);n.lock()};l?f.attachListener(f,"beforedeactivate",p,null,null,-1):f.attachListener(g,"selectionCheck",p,null,null,-1);f.attachListener(f,"blur",function(){g.lockSelection(n);j=1},null,null,-1)}if(CKEDITOR.env.ie&&!i){var A;f.attachListener(f, -"mousedown",function(a){a.data.$.button==2&&g.document.$.selection.type=="None"&&(A=g.window.getScrollPosition())});f.attachListener(f,"mouseup",function(a){if(a.data.$.button==2&&A){g.document.$.documentElement.scrollLeft=A.x;g.document.$.documentElement.scrollTop=A.y}A=null});if(a.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)m.on("mousedown",function(a){function b(a){a=a.data.$;if(d){var c=o.$.createTextRange();try{c.moveToPoint(a.x,a.y)}catch(e){}d.setEndPoint(f.compareEndPoints("StartToStart", -c)<0?"EndToEnd":"StartToStart",c);d.select()}}function c(){m.removeListener("mousemove",b);e.removeListener("mouseup",c);m.removeListener("mouseup",c);d.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7){m.on("mousedown",function(a){if(a.data.getTarget().is("html")){e.on("mouseup",r); -m.on("mouseup",r)}});var r=function(){e.removeListener("mouseup",r);m.removeListener("mouseup",r);var b=CKEDITOR.document.$.selection,c=b.createRange();b.type!="None"&&c.parentElement().ownerDocument==a.$&&c.select()}}}}f.attachListener(f,"selectionchange",b,g);f.attachListener(f,"keyup",c,g);f.attachListener(f,"focus",function(){g.forceNextSelectionCheck();g.selectionChange(1)});if(i?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var C;f.attachListener(f,"mousedown",function(){C=1}); -f.attachListener(a.getDocumentElement(),"mouseup",function(){C&&c.call(g);C=0})}else f.attachListener(CKEDITOR.env.ie?f:a.getDocumentElement(),"mouseup",c,g);if(CKEDITOR.env.webkit)a.on("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:d(g.editable())}},null,null,-1)});g.on("contentDomUnload",g.forceNextSelectionCheck,g);g.on("dataReady",function(){g.selectionChange(1)});CKEDITOR.env.ie9Compat&&g.on("beforeDestroy",e,null, -null,9);CKEDITOR.env.webkit&&g.on("setData",e);g.on("contentDomUnload",function(){g.unlockSelection()})});CKEDITOR.on("instanceReady",function(a){var b=a.editor,c=b.editable();if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=e(c);a&&(a.getCustomData("ready")?d(c):a.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){d(c)},null,null,-1);var g,f,a=function(){var a=b.document,d=e(c);if(d){a=a.$.defaultView.getSelection();a.type=="Caret"&&a.anchorNode==d.$&&(f=1);g= -d.getText();d.setText(g.replace(/\u200B/g,""))}},i=function(){var a=b.document,d=e(c);if(d){d.setText(g);if(f){a.$.defaultView.getSelection().setPosition(d.$,d.getLength());f=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",i);b.on("beforeGetData",a,null,null,0);b.on("getData",i)}});CKEDITOR.editor.prototype.selectionChange=function(a){(a?b:c).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if(this._.savedSelection&&!a)return this._.savedSelection;return(a=this.editable())?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";CKEDITOR.dom.selection=function(a){var b=a instanceof CKEDITOR.dom.element;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody(); -this.isLocked=0;this._={cache:{}};if(CKEDITOR.env.webkit){a=this.document.getWindow().$.getSelection();if(a.type=="None"&&this.document.getActive().equals(this.root)||a.type=="Caret"&&a.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT){var c=new CKEDITOR.dom.range(this.root);c.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START);b=this.document.$.createRange();b.setStart(c.startContainer.$,c.startOffset);b.collapse(1);var d=this.root.on("focus",function(a){a.cancel()},null,null,-100);a.addRange(b); -d.removeListener()}}var a=this.getNative(),e;if(a)if(a.getRangeAt)e=(c=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(c.commonAncestorContainer);else{try{c=a.createRange()}catch(g){}e=c&&CKEDITOR.dom.element.get(c.item&&c.item(0)||c.parentElement())}if(!e||!this.root.equals(e)&&!this.root.contains(e)){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 n={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(),d=c.type;if(d=="Text")b= -CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}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),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&n[d.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 d=b.parentElement(),e=d.ownerDocument;if(!d.hasChildNodes())return{container:d,offset:0};for(var g=d.children,f,i,m=b.duplicate(),k=0,j=g.length-1,l=-1,n,y;k<=j;){l=Math.floor((k+j)/2);f=g[l];m.moveToElementText(f);n=m.compareEndPoints("StartToStart",b);if(n>0)j=l-1;else if(n<0)k=l+1;else{if(CKEDITOR.env.ie9Compat&&f.tagName=="BR"){g=e.defaultView.getSelection(); -return{container:g[c?"anchorNode":"focusNode"],offset:g[c?"anchorOffset":"focusOffset"]}}return{container:d,offset:a(f)}}}if(l==-1||l==g.length-1&&n<0){m.moveToElementText(d);m.setEndPoint("StartToStart",b);e=m.text.replace(/(\r\n|\r)/g,"\n").length;g=d.childNodes;if(!e){f=g[g.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:g.length}:{container:f,offset:f.nodeValue.length}}for(d=g.length;e>0&&d>0;){i=g[--d];if(i.nodeType==CKEDITOR.NODE_TEXT){y=i;e=e-i.nodeValue.length}}return{container:y, -offset:-e}}m.collapse(n>0?true:false);m.setEndPoint(n>0?"StartToStart":"EndToStart",b);e=m.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:d,offset:a(f)+(n>0?0:1)};for(;e>0;)try{i=f[n>0?"previousSibling":"nextSibling"];if(i.nodeType==CKEDITOR.NODE_TEXT){e=e-i.nodeValue.length;y=i}f=i}catch(u){return{container:d,offset:a(f)}}return{container:y,offset:n>0?-e:y.nodeValue.length+e}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a= -new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e=b.getLength()?l.setStartAfter(b):l.setStartBefore(b));f&& -f.type==CKEDITOR.NODE_TEXT&&(j?l.setEndAfter(f):l.setEndBefore(f));b=new CKEDITOR.dom.walker(l);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=g.clone();g.setEndBefore(a);g.collapsed&&d.splice(e--,1);if(!(a.getPosition(l.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||d.splice(e+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],c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==CKEDITOR.NODE_ELEMENT&&n[c.getName()]&& -(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d.$});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();this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={}},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){if(a.length)if(this.isLocked){var b=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();!b.equals(this.root)&& -b.focus()}else{if(l){var c=CKEDITOR.dom.walker.whitespaces(true),e=/\ufeff|\u00a0/,f={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,i,j,t,F=b.getEnclosedNode();if(F&&F.type==CKEDITOR.NODE_ELEMENT&&F.getName()in n&&(!F.is("a")||!F.getText()))try{t=F.$.createControlRange();t.addElement(F.$);t.select();return}catch(z){}(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in f||b.endContainer.type==CKEDITOR.NODE_ELEMENT&& -b.endContainer.getName()in f)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);t=b.createBookmark();var f=t.startNode,q;if(!a)q=t.endNode;t=b.document.$.body.createTextRange();t.moveToElementText(f.$);t.moveStart("character",1);if(q){e=b.document.$.body.createTextRange();e.moveToElementText(q.$);t.setEndPoint("EndToEnd",e);t.moveEnd("character",-1)}else{i=f.getNext(c);j=f.hasAscendant("pre");i=!(i&&i.getText&&i.getText().match(e))&&(j||!f.hasPrevious()||f.getPrevious().is&&f.getPrevious().is("br"));j=b.document.createElement("span"); -j.setHtml("");j.insertBefore(f);i&&b.document.createText("").insertBefore(f)}b.setStartBefore(f);f.remove();if(a){if(i){t.moveStart("character",-1);t.select();b.document.$.selection.clear()}else t.select();b.moveToPosition(j,CKEDITOR.POSITION_BEFORE_START);j.remove()}else{b.setEndBefore(q);q.remove();t.select()}}else{q=this.getNative();if(!q)return;if(CKEDITOR.env.opera){b=this.document.$.createRange();b.selectNodeContents(this.root.$);q.addRange(b)}this.removeAllRanges();for(e=0;e=0){b.collapse(1);t.setEnd(b.endContainer.$,b.endOffset)}else throw p;}q.addRange(t)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)},selectBookmarks:function(a){for(var b=[],c=0;c]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="
"+f+"
";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(f);b=e}else f?b=n(c?[a.getHtml()]:j(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,i;if((i=c.getPrevious(y))&&i.is&&i.is("pre")){d=l(i.getHtml(),/\n$/,"")+ -"\n\n"+l(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+d+"
":c.setHtml(d);i.remove()}}else c&&h(b)}function j(a){a.getName();var b=[];l(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"
"+c+"
"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function l(a,b,c){var d="",e="",a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,
-b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function n(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",
-a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function m(a){var b=this._.definition,c=b.attributes,b=b.styles,d=t(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=F(f,c[f]))){e=a.hasAttribute(f);a.removeAttribute(f)}for(var g in b)if(!(this._.definition.fullMatch&&a.getStyle(g)!=F(g,b[g],true))){e=e||!!a.getStyle(g);a.removeStyle(g)}k(a,d,q[a.getName()]);
-e&&(this._.definition.alwaysRemoveElement?h(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?h(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function o(a){for(var b=t(this),c=a.getElementsByTag(this.element),d=c.count();--d>=0;)m.call(this,c.getItem(d));for(var e in b)if(e!=this.element){c=a.getElementsByTag(e);for(d=c.count()-1;d>=0;d--){var f=c.getItem(d);k(f,b[e])}}}function k(a,b,c){if(b=b&&b.attributes)for(var d=0;d]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,i=CKEDITOR.dom.walker.whitespaces(true),m=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.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)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",
+function(){var a=b.editable();if(a&&a.isInline()){var c=this.lang.editor+", "+this.name;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);a.changeAttr("title",c);if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var d=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml(''+this.lang.common.editorHelp+"");c.append(e);a.changeAttr("aria-describedby",d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");
+var n=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function c(b,d){var g,e,h,f,o=[],i=d.range.startContainer;g=d.range.startPath();for(var i=k[i.getName()],j=0,m=b.getChildren(),n=m.count(),l=-1,u=-1,t=0,w=g.contains(k.$list);j-1)o[l].firstNotAllowed=1;if(u>-1)o[u].lastNotAllowed=1;return o}function d(b,c){var e=[],h=b.getChildren(),f=h.count(),i,o=0,j=k[c],p=!b.is(k.$inline)||b.is("br");for(p&&e.push(" ");o ",s.document);s.insertNode(x);s.setStartAfter(x)}I=new CKEDITOR.dom.elementPath(s.startContainer);q.endPath=G=new CKEDITOR.dom.elementPath(s.endContainer);if(!s.collapsed){var o=G.block||G.blockLimit,Q=s.getCommonAncestor();
+o&&(!o.equals(Q)&&!o.contains(Q)&&s.checkEndOfBlock())&&q.zombies.push(o);s.deleteContents()}for(;(C=a(s.startContainer)&&s.startContainer.getChild(s.startOffset-1))&&a(C)&&C.isBlockBoundary()&&I.contains(C);)s.moveToPosition(C,CKEDITOR.POSITION_BEFORE_END);f(s,q.blockLimit,I,G);if(x){s.setEndBefore(x);s.collapse();x.remove()}x=s.startPath();if(o=x.contains(e,false,1)){s.splitElement(o);q.inlineStylesRoot=o;q.inlineStylesPeak=x.lastElement}x=s.createBookmark();(o=x.startNode.getPrevious(b))&&a(o)&&
+e(o)&&v.push(o);(o=x.startNode.getNext(b))&&a(o)&&e(o)&&v.push(o);for(o=x.startNode;(o=o.getParent())&&e(o);)v.push(o);s.moveToBookmark(x);if(t){C=t;t=q.range;if(q.type=="text"&&q.inlineStylesRoot){x=C;C=q.inlineStylesPeak;s=C.getDocument().createText("{cke-peak}");for(v=q.inlineStylesRoot.getParent();!C.equals(v);){s=s.appendTo(C.clone());C=C.getParent()}C=s.getOuterHtml().replace("{cke-peak}",x)}x=q.blockLimit.getName();if(/^\s+|\s+$/.test(C)&&"span"in CKEDITOR.dtd[x]){var L=' ';
+C=L+C+L}C=q.editor.dataProcessor.toHtml(C,null,false,q.dontFilter);x=t.document.createElement("body");x.setHtml(C);if(L){x.getFirst().remove();x.getLast().remove()}if((L=t.startPath().block)&&!(L.getChildCount()==1&&L.getBogus()))a:{var E;if(x.getChildCount()==1&&a(E=x.getFirst())&&E.is(l)){L=E.getElementsByTag("*");t=0;for(s=L.count();t0;else{y=E.startPath();if(!G.isBlock&&(N=q.editor.config.enterMode!=CKEDITOR.ENTER_BR&&q.editor.config.autoParagraph!==false?q.editor.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false)&&!y.block&&y.blockLimit&&y.blockLimit.equals(E.root)){N=L.createElement(N);!CKEDITOR.env.ie&&N.appendBogus();E.insertNode(N);!CKEDITOR.env.ie&&(J=N.getBogus())&&J.remove();E.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}if((y=
+E.startPath().block)&&!y.equals(H)){if(J=y.getBogus()){J.remove();C.push(y)}H=y}G.firstNotAllowed&&(s=1);if(s&&G.isElement){y=E.startContainer;for(K=null;y&&!k[y.getName()][G.name];){if(y.equals(t)){y=null;break}K=y;y=y.getParent()}if(y){if(K){O=E.splitElement(K);q.zombies.push(O);q.zombies.push(K)}}else{K=t.getName();P=!x;y=x==I.length-1;K=d(G.node,K);for(var M=[],R=K.length,T=0,U=void 0,V=0,W=-1;T1&&f&&f.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];f=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;f&&d[1]--;var i;f=e;if(!f.isCollapsed){i=f.getRangeAt(0);i.setStart(f.anchorNode,f.anchorOffset);i.setEnd(f.focusNode,f.focusOffset);i=i.collapsed}i&&d.unshift(d.pop())}}c.setText(j(c.getText()));if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function j(a){return a.replace(/\u200B( )?/g,
+function(a){return a[1]?" ":""})}var l,i,m=CKEDITOR.dom.walker.invisible(1);CKEDITOR.on("instanceCreated",function(b){function g(){var a=e.getSelection();a&&a.removeAllRanges()}var e=b.editor;e.define("selectionChange",{errorProof:1});e.on("contentDom",function(){var b=e.document,g=CKEDITOR.document,f=e.editable(),i=b.getBody(),j=b.getDocumentElement(),p=f.isInline(),m;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();if(m!==0){a=e.getSelection().getNative();if(a.isCollapsed&&
+a.anchorNode==f.$){a=e.createRange();a.moveToElementEditStart(f);a.select()}}},null,null,-2);f.attachListener(f,"focus",function(){e.unlockSelection(m);m=0},null,null,-1);f.attachListener(f,"mousedown",function(){m=0});if(CKEDITOR.env.ie||CKEDITOR.env.opera||p){var l,r=function(){l=e.getSelection(1);l.lock()};n?f.attachListener(f,"beforedeactivate",r,null,null,-1):f.attachListener(e,"selectionCheck",r,null,null,-1);f.attachListener(f,"blur",function(){e.lockSelection(l);m=1},null,null,-1)}if(CKEDITOR.env.ie&&
+!p){var s;f.attachListener(f,"mousedown",function(a){a.data.$.button==2&&e.document.$.selection.type=="None"&&(s=e.window.getScrollPosition())});f.attachListener(f,"mouseup",function(a){if(a.data.$.button==2&&s){e.document.$.documentElement.scrollLeft=s.x;e.document.$.documentElement.scrollTop=s.y}s=null});if(b.$.compatMode!="BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)j.on("mousedown",function(a){function b(a){a=a.data.$;if(d){var c=i.$.createTextRange();try{c.moveToPoint(a.x,
+a.y)}catch(e){}d.setEndPoint(f.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);d.select()}}function c(){j.removeListener("mousemove",b);g.removeListener("mouseup",c);j.removeListener("mouseup",c);d.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y7){j.on("mousedown",
+function(a){if(a.data.getTarget().is("html")){g.on("mouseup",A);j.on("mouseup",A)}});var A=function(){g.removeListener("mouseup",A);j.removeListener("mouseup",A);var a=CKEDITOR.document.$.selection,c=a.createRange();a.type!="None"&&c.parentElement().ownerDocument==b.$&&c.select()}}}}f.attachListener(f,"selectionchange",a,e);f.attachListener(f,"keyup",c,e);f.attachListener(f,"focus",function(){e.forceNextSelectionCheck();e.selectionChange(1)});if(p?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera){var v;
+f.attachListener(f,"mousedown",function(){v=1});f.attachListener(b.getDocumentElement(),"mouseup",function(){v&&c.call(e);v=0})}else f.attachListener(CKEDITOR.env.ie?f:b.getDocumentElement(),"mouseup",c,e);CKEDITOR.env.webkit&&f.attachListener(b,"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:d(f)}},null,null,-1)});e.on("contentDomUnload",e.forceNextSelectionCheck,e);e.on("dataReady",function(){e.selectionChange(1)});CKEDITOR.env.ie9Compat&&
+e.on("beforeDestroy",g,null,null,9);CKEDITOR.env.webkit&&e.on("setData",g);e.on("contentDomUnload",function(){e.unlockSelection()})});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")?d(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){d(b.editable())},null,null,-1);var c,f,a=function(){var a=b.editable();if(a)if(a=e(a)){var d=b.document.$.defaultView.getSelection();
+d.type=="Caret"&&d.anchorNode==a.$&&(f=1);c=a.getText();a.setText(j(c))}},i=function(){var a=b.editable();if(a)if(a=e(a)){a.setText(c);if(f){b.document.$.defaultView.getSelection().setPosition(a.$,a.getLength());f=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",i);b.on("beforeGetData",a,null,null,0);b.on("getData",i)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:c).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){if(this._.savedSelection&&!a)return this._.savedSelection;
+return(a=this.editable())?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 n=typeof window.getSelection!="function";CKEDITOR.dom.selection=function(a){var b=a instanceof CKEDITOR.dom.element;this.document=
+a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(CKEDITOR.env.webkit){a=this.document.getWindow().$.getSelection();if(a.type=="None"&&this.document.getActive().equals(this.root)||a.type=="Caret"&&a.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT){var c=new CKEDITOR.dom.range(this.root);c.moveToPosition(this.root,CKEDITOR.POSITION_AFTER_START);b=this.document.$.createRange();b.setStart(c.startContainer.$,c.startOffset);b.collapse(1);
+var d=this.root.on("focus",function(a){a.cancel()},null,null,-100);a.addRange(b);d.removeListener()}}var a=this.getNative(),e;if(a)if(a.getRangeAt)e=(c=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(c.commonAncestorContainer);else{try{c=a.createRange()}catch(f){}e=c&&CKEDITOR.dom.element.get(c.item&&c.item(0)||c.parentElement())}if(!e||!this.root.equals(e)&&!this.root.contains(e)){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=n?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:n?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;
+try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}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),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset-c.startOffset==1&&r[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=
+CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=n?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement(),e=d.ownerDocument;if(!d.hasChildNodes())return{container:d,offset:0};for(var f=d.children,h,i,j=b.duplicate(),m=0,p=f.length-1,l=-1,n,o;m<=p;){l=Math.floor((m+p)/2);h=f[l];j.moveToElementText(h);n=j.compareEndPoints("StartToStart",b);if(n>0)p=l-1;else if(n<0)m=l+1;else{if(CKEDITOR.env.ie9Compat&&
+h.tagName=="BR"){f=e.defaultView.getSelection();return{container:f[c?"anchorNode":"focusNode"],offset:f[c?"anchorOffset":"focusOffset"]}}return{container:d,offset:a(h)}}}if(l==-1||l==f.length-1&&n<0){j.moveToElementText(d);j.setEndPoint("StartToStart",b);e=j.text.replace(/(\r\n|\r)/g,"\n").length;f=d.childNodes;if(!e){h=f[f.length-1];return h.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:f.length}:{container:h,offset:h.nodeValue.length}}for(d=f.length;e>0&&d>0;){i=f[--d];if(i.nodeType==CKEDITOR.NODE_TEXT){o=
+i;e=e-i.nodeValue.length}}return{container:o,offset:-e}}j.collapse(n>0?true:false);j.setEndPoint(n>0?"StartToStart":"EndToStart",b);e=j.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:d,offset:a(h)+(n>0?0:1)};for(;e>0;)try{i=h[n>0?"previousSibling":"nextSibling"];if(i.nodeType==CKEDITOR.NODE_TEXT){e=e-i.nodeValue.length;o=i}h=i}catch(x){return{container:d,offset:a(h)}}return{container:o,offset:n>0?-e:o.nodeValue.length+e}};return function(){var a=this.getNative(),c=a&&a.createRange(),
+d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root);d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e=b.getLength()?l.setStartAfter(b):l.setStartBefore(b));i&&i.type==CKEDITOR.NODE_TEXT&&(m?l.setEndAfter(i):l.setEndBefore(i));b=new CKEDITOR.dom.walker(l);b.evaluator=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.isReadOnly()){var b=f.clone();f.setEndBefore(a);f.collapsed&&d.splice(e--,1);if(!(a.getPosition(l.endContainer)&CKEDITOR.POSITION_CONTAINS)){b.setStartAfter(a);b.collapsed||d.splice(e+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],c,d,e=2;e&&(!(c=a.getEnclosedNode())||!(c.type==
+CKEDITOR.NODE_ELEMENT&&r[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d.$});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=n?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();this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={}},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){if(a.length)if(this.isLocked){var b=CKEDITOR.document.getActive();this.unlock();
+this.selectRanges(a);this.lock();!b.equals(this.root)&&b.focus()}else{if(n){var c=CKEDITOR.dom.walker.whitespaces(true),e=/\ufeff|\u00a0/,i={table:1,tbody:1,tr:1};if(a.length>1){b=a[a.length-1];a[0].setEnd(b.endContainer,b.endOffset)}var b=a[0],a=b.collapsed,k,j,m,l=b.getEnclosedNode();if(l&&l.type==CKEDITOR.NODE_ELEMENT&&l.getName()in r&&(!l.is("a")||!l.getText()))try{m=l.$.createControlRange();m.addElement(l.$);m.select();return}catch(B){}(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in
+i||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in i)&&b.shrink(CKEDITOR.NODE_ELEMENT,true);m=b.createBookmark();var i=m.startNode,q;if(!a)q=m.endNode;m=b.document.$.body.createTextRange();m.moveToElementText(i.$);m.moveStart("character",1);if(q){e=b.document.$.body.createTextRange();e.moveToElementText(q.$);m.setEndPoint("EndToEnd",e);m.moveEnd("character",-1)}else{k=i.getNext(c);j=i.hasAscendant("pre");k=!(k&&k.getText&&k.getText().match(e))&&(j||!i.hasPrevious()||i.getPrevious().is&&
+i.getPrevious().is("br"));j=b.document.createElement("span");j.setHtml("");j.insertBefore(i);k&&b.document.createText("").insertBefore(i)}b.setStartBefore(i);i.remove();if(a){if(k){m.moveStart("character",-1);m.select();b.document.$.selection.clear()}else m.select();b.moveToPosition(j,CKEDITOR.POSITION_BEFORE_START);j.remove()}else{b.setEndBefore(q);q.remove();m.select()}}else{q=this.getNative();if(!q)return;if(CKEDITOR.env.opera){b=this.document.$.createRange();b.selectNodeContents(this.root.$);
+q.addRange(b)}this.removeAllRanges();for(e=0;e=0){b.collapse(1);m.setEnd(b.endContainer.$,b.endOffset)}else throw z;}q.addRange(m)}}this.reset();this.root.fire("selectionchange")}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)},selectBookmarks:function(a){for(var b=[],c=0;c<
+a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return 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[n?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}})();
+CKEDITOR.editor.prototype.attachStyleStateChange=function(a,c){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var c=0;c]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(d);d.$.outerHTML="
"+f+"
";d.copyAttributes(g.getFirst());d=g.getFirst().remove()}else d.setHtml(f);b=d}else f?b=n(c?[a.getHtml()]:i(a),b):a.moveChildren(b);b.replace(a);if(e){var c=b,j;if((j=c.getPrevious(v))&&j.is&&j.is("pre")){e=m(j.getHtml(),/\n$/,"")+ +"\n\n"+m(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="
"+e+"
":c.setHtml(e);j.remove()}}else c&&h(b)}function i(a){a.getName();var b=[];m(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"
"+c+"
"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function m(a,b,c){var e="",d="",a=a.replace(/(^]+data-cke-bookmark.*?\/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 n(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var e=0;e"),d=d.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",
+a.length-1)+" "});if(c){var f=b.clone();f.setHtml(d);c.append(f)}else b.setHtml(d)}return c||b}function r(a){var b=this._.definition,c=b.attributes,b=b.styles,d=t(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&&CKEDITOR.tools.isEmpty(b),f;for(f in c)if(!((f=="class"||this._.definition.fullMatch)&&a.getAttribute(f)!=F(f,c[f]))){e=a.hasAttribute(f);a.removeAttribute(f)}for(var i in b)if(!(this._.definition.fullMatch&&a.getStyle(i)!=F(i,b[i],true))){e=e||!!a.getStyle(i);a.removeStyle(i)}g(a,d,B[a.getName()]);
+e&&(this._.definition.alwaysRemoveElement?h(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?h(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function p(a){for(var b=t(this),c=a.getElementsByTag(this.element),d=c.count();--d>=0;)r.call(this,c.getItem(d));for(var e in b)if(e!=this.element){c=a.getElementsByTag(e);for(d=c.count()-1;d>=0;d--){var f=c.getItem(d);g(f,b[e])}}}function g(a,b,c){if(b=b&&b.attributes)for(var d=0;d",a||b.name,"");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||"",d="";c.length&&(c=c.replace(A,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(A,";");f=="inherit"?d=d+g:c=c+g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d}})();CKEDITOR.styleCommand=function(b,c){this.requiredContent=this.allowedContent=this.style=b;CKEDITOR.tools.extend(this,c,true)};
-CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(b,c,a){CKEDITOR.stylesSet.addExternal(b,c,"");CKEDITOR.stylesSet.load(b,a)};
-CKEDITOR.editor.prototype.getStylesSet=function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);else{var c=this,a=c.config.stylesCombo_stylesSet||c.config.stylesSet;if(a===false)b(null);else if(a instanceof Array){c._.stylesDefinitions=a;b(a)}else{a||(a="default");var a=a.split(":"),g=a[0];CKEDITOR.stylesSet.addExternal(g,a[1]?a.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(g,function(a){c._.stylesDefinitions=a[g];b(c._.stylesDefinitions)})}}};
-CKEDITOR.dom.comment=function(b,c){typeof b=="string"&&(b=(c?c.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}});
-(function(){var b={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(b[c]=1);var a={};for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(a[c]=1);CKEDITOR.dom.elementPath=function(c,e){var d=null,f=null,i=[],e=e||c.getDocument().getBody(),j=c;do if(j.type==CKEDITOR.NODE_ELEMENT){i.push(j);if(!this.lastElement){this.lastElement=j;if(j.is(CKEDITOR.dtd.$object))continue}var l=j.getName();if(!f){!d&&a[l]&&(d=j);if(b[l]){var n;if(n=!d){if(l=l=="div"){a:{l=
-j.getChildren();n=0;for(var m=l.count();n-1}:typeof b=="function"?g=b:typeof b=="object"&&(g=
-function(a){return a.getName()in b});var e=this.elements,d=e.length;c&&d--;if(a){e=Array.prototype.slice.call(e,0);e.reverse()}for(c=0;c=g){d=e.createText("");d.insertAfter(this)}else{b=e.createText("");b.insertAfter(d);b.remove()}return d},substring:function(b,
-c){return typeof c!="number"?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,c)}});
-(function(){function b(a,b,c){var d=a.serializable,f=b[c?"endContainer":"startContainer"],i=c?"endOffset":"startOffset",j=d?b.document.getById(a.startNode):a.startNode,a=d?b.document.getById(a.endNode):a.endNode;if(f.equals(j.getPrevious())){b.startOffset=b.startOffset-f.getLength()-a.getPrevious().getLength();f=a.getNext()}else if(f.equals(a.getPrevious())){b.startOffset=b.startOffset-f.getLength();f=a.getNext()}f.equals(j.getParent())&&b[i]++;f.equals(a.getParent())&&b[i]++;b[c?"endContainer":"startContainer"]=
-f;return b}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,c)};var c={createIterator:function(){var a=this,b=CKEDITOR.dom.walker.bookmark(),c=[],d;return{getNextRange:function(f){d=d==void 0?0:d+1;var i=a[d];if(i&&a.length>1){if(!d)for(var j=a.length-1;j>=0;j--)c.unshift(a[j].createBookmark(true));if(f)for(var l=0;a[d+l+1];){for(var n=i.document,f=0,j=n.getById(c[l].endNode),n=n.getById(c[l+
-1].startNode);;){j=j.getNextSourceNode(false);if(n.equals(j))f=1;else if(b(j)||j.type==CKEDITOR.NODE_ELEMENT&&j.isBlockBoundary())continue;break}if(!f)break;l++}for(i.moveToBookmark(c.shift());l--;){j=a[++d];j.moveToBookmark(c.shift());i.setEnd(j.endContainer,j.endOffset)}}return i}}},createBookmarks:function(a){for(var c=[],e,d=0;db?-1:1}),e=0,f;e',CKEDITOR.document);b.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=b.getComputedStyle("border-top-color")==b.getComputedStyle("border-right-color")}catch(c){CKEDITOR.env.hc=false}b.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(b=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var a=0;a"}});
+(function(){var a={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(a[c]=1);var b={};for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(b[c]=1);CKEDITOR.dom.elementPath=function(c,e){var d=null,j=null,l=[],e=e||c.getDocument().getBody(),i=c;do if(i.type==CKEDITOR.NODE_ELEMENT){l.push(i);if(!this.lastElement){this.lastElement=i;if(i.is(CKEDITOR.dtd.$object))continue}var m=i.getName();if(!j){!d&&b[m]&&(d=i);if(a[m]){var n;if(n=!d){if(m=m=="div"){a:{m=
+i.getChildren();n=0;for(var r=m.count();n-1}:typeof a=="function"?f=a:typeof a=="object"&&(f=
+function(b){return b.getName()in a});var e=this.elements,d=e.length;c&&d--;if(b){e=Array.prototype.slice.call(e,0);e.reverse()}for(c=0;c=f){d=e.createText("");d.insertAfter(this)}else{a=e.createText("");a.insertAfter(d);a.remove()}return d},substring:function(a,
+c){return typeof c!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,c)}});
+(function(){function a(a,c,e){var d=a.serializable,j=c[e?"endContainer":"startContainer"],l=e?"endOffset":"startOffset",i=d?c.document.getById(a.startNode):a.startNode,a=d?c.document.getById(a.endNode):a.endNode;if(j.equals(i.getPrevious())){c.startOffset=c.startOffset-j.getLength()-a.getPrevious().getLength();j=a.getNext()}else if(j.equals(a.getPrevious())){c.startOffset=c.startOffset-j.getLength();j=a.getNext()}j.equals(i.getParent())&&c[l]++;j.equals(a.getParent())&&c[l]++;c[e?"endContainer":"startContainer"]=
+j;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,c)};var c={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),e=[],d;return{getNextRange:function(j){d=d==void 0?0:d+1;var l=a[d];if(l&&a.length>1){if(!d)for(var i=a.length-1;i>=0;i--)e.unshift(a[i].createBookmark(true));if(j)for(var m=0;a[d+m+1];){for(var n=l.document,j=0,i=n.getById(e[m].endNode),n=n.getById(e[m+
+1].startNode);;){i=i.getNextSourceNode(false);if(n.equals(i))j=1;else if(c(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary())continue;break}if(!j)break;m++}for(l.moveToBookmark(e.shift());m--;){i=a[++d];i.moveToBookmark(e.shift());l.setEnd(i.endContainer,i.endOffset)}}return l}}},createBookmarks:function(b){for(var c=[],e,d=0;db?-1:1}),e=0,f;e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=a.getComputedStyle("border-top-color")==a.getComputedStyle("border-right-color")}catch(c){CKEDITOR.env.hc=false}a.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(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var b=0;bc;c++){var f=a,h=c,d;d=parseInt(a[c],16);d=("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2);f[h]=d}return"#"+a.join("")}}(),c=function(){var b=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(c,
 a){return b.output({from:c,to:a})}}(),f={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};] ")};
@@ -518,8 +521,8 @@ g=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_
 i&&e[g](b):i||e[g](b);return!i?c:!0}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return!a.test(c)?b:!0}},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 g.test(CKEDITOR.tools.trim(a))},
 a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in w)w[c].remove();w={}}var a=a.editor._.storedDialogs,d;for(d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,e=CKEDITOR.dialog._.dialogDefinitions[a];
 null===CKEDITOR.dialog._.currentTop&&J(this);if("function"==typeof e)c=this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,c),c.show();else{if("failed"==e)throw K(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,
-b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})})();CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(p){p.on("contentDom",function(){var u=p.editable();u.attachListener(u,"dblclick",function(q){if(p.readOnly)return!1;q={element:q.data.getTarget()};p.fire("doubleclick",q);q.dialog&&p.openDialog(q.dialog);return 1})})}});CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var b=a.addCommand("about",new CKEDITOR.dialogCommand("about"));b.modes={wysiwyg:1,source:1};b.canUndo=!1;b.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.title,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}});(function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{en:1,ar:1,bg:1,ca:1,et:1,cs:1,cy:1,da:1,de:1,el:1,eo:1,es:1,fa:1,fi:1,fr:1,gu:1,he:1,hi:1,hr:1,hu:1,it:1,ja:1,km: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,sk:1,sl:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},init:function(b){var c=this;b.addCommand("a11yHelp",{exec:function(){var a=b.langCode,a=c.availableLangs[a]?a:c.availableLangs[a.replace(/-.*/,"")]?a.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+
-"dialogs/lang/"+a+".js"),function(){b.lang.a11yhelp=c.langEntries[a];b.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});b.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js")}})})();(function(){function f(c){var a=this.att,c=c&&c.hasAttribute(a)&&c.getAttribute(a)||"";void 0!==c&&this.setValue(c)}function g(){for(var c,a=0;a=CKEDITOR.env.version;if(!c.getById("cke_pastebin")){var f=a.getSelection(),h=f.createBookmarks(),i=new CKEDITOR.dom.element(e.is("body")&&
-!CKEDITOR.env.ie&&!CKEDITOR.env.opera?"body":"div",c);i.setAttribute("id","cke_pastebin");CKEDITOR.env.opera&&i.appendBogus();var o=0,c=c.getWindow();j?(i.insertAfter(h[0].startNode),i.setStyle("display","inline")):(CKEDITOR.env.webkit?(e.append(i),i.addClass("cke_editable"),o=(e.is("body")?e:CKEDITOR.dom.element.get(i.$.offsetParent)).getDocumentPosition().y):e.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(i),i.setStyles({position:"absolute",top:c.getScrollPosition().y-
-o+10+"px",width:"1px",height:Math.max(1,c.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}));(j=i.getParent().isReadOnly())?(i.setOpacity(0),i.setAttribute("contenteditable",!0)):i.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-1000px");a.on("selectionChange",l,null,null,0);j&&i.focus();j=new CKEDITOR.dom.range(i);j.selectNodeContents(i);var g=j.select();if(CKEDITOR.env.ie)var k=e.once("blur",function(){a.lockSelection(g)});var m=CKEDITOR.document.getWindow().getScrollPosition().y;
-setTimeout(function(){if(CKEDITOR.env.webkit||CKEDITOR.env.opera)CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=m;k&&k.removeListener();CKEDITOR.env.ie&&e.focus();f.selectBookmarks(h);i.remove();var d;if(CKEDITOR.env.webkit&&(d=i.getFirst())&&d.is&&d.hasClass("Apple-style-span"))i=d;a.removeListener("selectionChange",l);b(i.getHtml())},0)}}function o(){if(CKEDITOR.env.ie){a.focus();f();var d=a.focusManager;d.lock();if(a.editable().fire(q)&&!k("paste"))return d.unlock(),
-!1;d.unlock()}else try{if(a.editable().fire(q)&&!a.document.$.execCommand("Paste",!1,null))throw 0;}catch(b){return!1}return!0}function p(d){if("wysiwyg"==a.mode)switch(d.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:d=a.editable();f();!CKEDITOR.env.ie&&d.fire("beforepaste");(CKEDITOR.env.opera||CKEDITOR.env.gecko&&10900>CKEDITOR.env.version)&&d.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},0)}}function u(d){var b=
-{type:"auto"},c=a.fire("beforePaste",b);j(d,function(a){a=a.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,"");c&&g(b.type,a,0,1)})}function s(){if("wysiwyg"==a.mode){var b=n("Paste");a.getCommand("cut").setState(n("Cut"));a.getCommand("copy").setState(n("Copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function n(b){var c;if(t&&b in{Paste:1,Cut:1})return CKEDITOR.TRISTATE_DISABLED;if("Paste"==b){CKEDITOR.env.ie&&(m=1);try{c=a.document.$.queryCommandEnabled(b)||CKEDITOR.env.webkit}catch(e){}m=
-0}else b=a.getSelection(),c=b.getRanges(),c=b.getType()!=CKEDITOR.SELECTION_NONE&&!(1==c.length&&c[0].collapsed);return c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}var m=0,r=0,t=0,q=CKEDITOR.env.ie?"beforepaste":"paste";(function(){a.on("key",p);a.on("contentDom",b);a.on("selectionChange",function(a){t=a.data.selection.getRanges()[0].checkReadOnly();s()});a.contextMenu&&a.contextMenu.addListener(function(a,b){t=b.getRanges()[0].checkReadOnly();return{cut:n("Cut"),copy:n("Copy"),paste:n("Paste")}})})();
-(function(){function b(c,d,e,l,j){var f=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:f,command:d,toolbar:"clipboard,"+l});a.addMenuItems&&a.addMenuItem(d,{label:f,command:d,group:"clipboard",order:j})}b("Cut","cut",e("cut"),10,1);b("Copy","copy",e("copy"),20,4);b("Paste","paste",c(),30,8)})();a.getClipboardData=function(b,c){function e(a){a.removeListener();a.cancel();c(a.data)}function l(a){a.removeListener();a.cancel();g=!0;c({type:h,dataValue:a.data})}function j(){this.customTitle=
-b&&b.title}var f=!1,h="auto",g=!1;c||(c=b,b=null);a.on("paste",e,null,null,0);a.on("beforePaste",function(a){a.removeListener();f=true;h=a.data.type},null,null,1E3);!1===o()&&(a.removeListener("paste",e),f&&a.fire("pasteDialog",j)?(a.on("pasteDialogCommit",l),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",l);setTimeout(function(){g||c(null)},10)})):c(null))}}function w(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&& -!a.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko||CKEDITOR.env.opera){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function x(a,b){function e(a){return CKEDITOR.tools.repeat("

",~~(a/2))+(1==a%2?"
":"")}b=b.replace(/\s+/g," ").replace(/> +<").replace(/
/gi,"
");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1")&& -(b=b.replace(/^(

(
|)<\/div>)(?!$|(
(
|)<\/div>))/g,"
").replace(/^(
(
|)<\/div>){2}(?!$)/g,"
"),b.match(/
(
|)<\/div>/)&&(b="

"+b.replace(/(

(
|)<\/div>)+/g,function(a){return e(a.split("
").length+1)})+"

"),b=b.replace(/<\/div>
/g,"
"),b=b.replace(/<\/?div>/g,""));if((CKEDITOR.env.gecko||CKEDITOR.env.opera)&&a.enterMode!=CKEDITOR.ENTER_BR)CKEDITOR.env.gecko&&(b=b.replace(/^

$/,"
")),-1
")&&(b="

"+ -b.replace(/(
){2,}/g,function(a){return e(a.length/4)})+"

");return p(a,b)}function y(){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},e=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),c={p:1,br:1,"cke:br":1},f=CKEDITOR.dtd,h=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),k=function(a){delete a.name;a.add(new CKEDITOR.htmlParser.text(" "))}, -g=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=!0;for(a.add(c);c=b.children.shift();)a.add(c)}};a.addRules({elements:{h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,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:k,th:k,$:function(a){var j=a.name,g;if(h[j])return!1;delete a.attributes;if("br"==j)return a;if(b[j])a.name= -"p";else if(e[j])delete a.name;else if(f[j]){g=new CKEDITOR.htmlParser.element("cke:br");g.isEmpty=!0;if(CKEDITOR.dtd.$empty[j])return g;a.add(g,0);g=g.clone();g.isEmpty=!0;a.add(g);delete a.name}c[a.name]||delete a.name;return a}}});return a}function z(a,b,e){var b=new CKEDITOR.htmlParser.fragment.fromHtml(b),c=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(c,e);var b=c.getHtml(),b=b.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(){2,}/g,"").replace(/()(<\/?p>|
)/g, -"$2").replace(/(<\/?p>|
)()/g,"$1").replace(/<(cke:)?br( \/)?>/g,"
").replace(/

<\/p>/g,""),f=0,b=b.replace(/<\/?p>/g,function(a){if("

"==a){if(1<++f)return"

"}else if(0<--f)return"

";return a}).replace(/

<\/p>/g,"");return p(a,b)}function p(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("
",2*(a.length/7))}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"<$1div>")); -return b}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var b;v(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));a.on("paste",function(a){var b=a.data.dataValue,f=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"    ")})),-1')&& -(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/
/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var h,k,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(h=g.getFirst())&&h.type==CKEDITOR.NODE_ELEMENT&&(h.hasClass("cke_editable")||h.hasClass("cke_contents"));)g=k=h;k&&(b=k.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b, -c){if(c.toLowerCase()in f){a.data.preSniffing="html";return"<"+c}return b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,c){if(c in f){a.data.endsWithEOL=1;return""}return b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(e){var e=e.data,c=e.type,f=e.dataValue,h,k=a.config.clipboard_defaultContentType||"html";h="html"==c||"html"==e.preSniffing?"html":w(f);"htmlifiedtext"==h?f=x(a.config,f):"text"==c&&"html"== -h&&(f=z(a.config,f,b||(b=y(a))));e.startsWithEOL&&(f='
'+f);e.endsWithEOL&&(f+='
');"auto"==c&&(c="html"==h||"html"==k?"html":"text");e.type=c;e.dataValue=f;delete e.preSniffing;delete e.startsWithEOL;delete e.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;a.insertHtml(b.dataValue,b.type);setTimeout(function(){a.fire("afterPaste")},0)},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}})})();(function(){var c='=CKEDITOR.env.version;if(!c.getById("cke_pastebin")){var f=a.getSelection(),h=f.createBookmarks(), +i=new CKEDITOR.dom.element(e.is("body")&&!CKEDITOR.env.ie&&!CKEDITOR.env.opera?"body":"div",c);i.setAttribute("id","cke_pastebin");CKEDITOR.env.opera&&i.appendBogus();var o=0,c=c.getWindow();j?(i.insertAfter(h[0].startNode),i.setStyle("display","inline")):(CKEDITOR.env.webkit?(e.append(i),i.addClass("cke_editable"),o=(e.is("body")?e:CKEDITOR.dom.element.get(i.$.offsetParent)).getDocumentPosition().y):e.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(i),i.setStyles({position:"absolute", +top:c.getScrollPosition().y-o+10+"px",width:"1px",height:Math.max(1,c.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}));(j=i.getParent().isReadOnly())?(i.setOpacity(0),i.setAttribute("contenteditable",!0)):i.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-1000px");a.on("selectionChange",l,null,null,0);j&&i.focus();j=new CKEDITOR.dom.range(i);j.selectNodeContents(i);var g=j.select();if(CKEDITOR.env.ie)var k=e.once("blur",function(){a.lockSelection(g)});var m= +CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){if(CKEDITOR.env.webkit||CKEDITOR.env.opera)CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=m;k&&k.removeListener();CKEDITOR.env.ie&&e.focus();f.selectBookmarks(h);i.remove();var d;if(CKEDITOR.env.webkit&&(d=i.getFirst())&&d.is&&d.hasClass("Apple-style-span"))i=d;a.removeListener("selectionChange",l);b(i.getHtml())},0)}}function o(){if(CKEDITOR.env.ie){a.focus();f();var d=a.focusManager;d.lock(); +if(a.editable().fire(q)&&!k("paste"))return d.unlock(),!1;d.unlock()}else try{if(a.editable().fire(q)&&!a.document.$.execCommand("Paste",!1,null))throw 0;}catch(b){return!1}return!0}function p(d){if("wysiwyg"==a.mode)switch(d.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:d=a.editable();f();!CKEDITOR.env.ie&&d.fire("beforepaste");(CKEDITOR.env.opera||CKEDITOR.env.gecko&&10900>CKEDITOR.env.version)&&d.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot"), +setTimeout(function(){a.fire("saveSnapshot")},0)}}function u(d){var b={type:"auto"},c=a.fire("beforePaste",b);j(d,function(a){a=a.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,"");c&&g(b.type,a,0,1)})}function s(){if("wysiwyg"==a.mode){var b=n("Paste");a.getCommand("cut").setState(n("Cut"));a.getCommand("copy").setState(n("Copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function n(b){var c;if(t&&b in{Paste:1,Cut:1})return CKEDITOR.TRISTATE_DISABLED;if("Paste"==b){CKEDITOR.env.ie&& +(m=1);try{c=a.document.$.queryCommandEnabled(b)||CKEDITOR.env.webkit}catch(e){}m=0}else b=a.getSelection(),c=b.getRanges(),c=b.getType()!=CKEDITOR.SELECTION_NONE&&!(1==c.length&&c[0].collapsed);return c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}var m=0,r=0,t=0,q=CKEDITOR.env.ie?"beforepaste":"paste";(function(){a.on("key",p);a.on("contentDom",b);a.on("selectionChange",function(a){t=a.data.selection.getRanges()[0].checkReadOnly();s()});a.contextMenu&&a.contextMenu.addListener(function(a,b){t= +b.getRanges()[0].checkReadOnly();return{cut:n("Cut"),copy:n("Copy"),paste:n("Paste")}})})();(function(){function b(c,d,e,l,j){var f=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:f,command:d,toolbar:"clipboard,"+l});a.addMenuItems&&a.addMenuItem(d,{label:f,command:d,group:"clipboard",order:j})}b("Cut","cut",e("cut"),10,1);b("Copy","copy",e("copy"),20,4);b("Paste","paste",c(),30,8)})();a.getClipboardData=function(b,c){function e(a){a.removeListener();a.cancel();c(a.data)} +function l(a){a.removeListener();a.cancel();g=!0;c({type:h,dataValue:a.data})}function j(){this.customTitle=b&&b.title}var f=!1,h="auto",g=!1;c||(c=b,b=null);a.on("paste",e,null,null,0);a.on("beforePaste",function(a){a.removeListener();f=true;h=a.data.type},null,null,1E3);!1===o()&&(a.removeListener("paste",e),f&&a.fire("pasteDialog",j)?(a.on("pasteDialogCommit",l),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",l);setTimeout(function(){g||c(null)},10)})): +c(null))}}function x(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko||CKEDITOR.env.opera){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function y(a,b){function e(a){return CKEDITOR.tools.repeat("

",~~(a/2))+(1== +a%2?"
":"")}b=b.replace(/\s+/g," ").replace(/> +<").replace(/
/gi,"
");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1")&&(b=b.replace(/^(

(
|)<\/div>)(?!$|(
(
|)<\/div>))/g,"
").replace(/^(
(
|)<\/div>){2}(?!$)/g,"
"),b.match(/
(
|)<\/div>/)&&(b="

"+b.replace(/(

(
|)<\/div>)+/g,function(a){return e(a.split("
").length+1)})+"

"),b= +b.replace(/<\/div>
/g,"
"),b=b.replace(/<\/?div>/g,""));if((CKEDITOR.env.gecko||CKEDITOR.env.opera)&&a.enterMode!=CKEDITOR.ENTER_BR)CKEDITOR.env.gecko&&(b=b.replace(/^

$/,"
")),-1
")&&(b="

"+b.replace(/(
){2,}/g,function(a){return e(a.length/4)})+"

");return p(a,b)}function z(){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},e=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),c={p:1, +br:1,"cke:br":1},f=CKEDITOR.dtd,h=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),k=function(a){delete a.name;a.add(new CKEDITOR.htmlParser.text(" "))},g=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=!0;for(a.add(c);c=b.children.shift();)a.add(c)}};a.addRules({elements:{h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,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:k,th:k,$:function(a){var j=a.name,g;if(h[j])return!1;delete a.attributes;if("br"==j)return a;if(b[j])a.name="p";else if(e[j])delete a.name;else if(f[j]){g=new CKEDITOR.htmlParser.element("cke:br");g.isEmpty=!0;if(CKEDITOR.dtd.$empty[j])return g;a.add(g,0);g=g.clone();g.isEmpty=!0;a.add(g);delete a.name}c[a.name]||delete a.name;return a}}});return a}function A(a,b,e){var b=new CKEDITOR.htmlParser.fragment.fromHtml(b), +c=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(c,e);var b=c.getHtml(),b=b.replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(){2,}/g,"").replace(/()(<\/?p>|
)/g,"$2").replace(/(<\/?p>|
)()/g,"$1").replace(/<(cke:)?br( \/)?>/g,"
").replace(/

<\/p>/g,""),f=0,b=b.replace(/<\/?p>/g,function(a){if("

"==a){if(1<++f)return"

"}else if(0<--f)return"

";return a}).replace(/

<\/p>/g,"");return p(a,b)}function p(a,b){a.enterMode== +CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("
",2*(a.length/7))}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"<$1div>"));return b}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var b;w(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));a.on("paste",function(a){var b=a.data.dataValue,f=CKEDITOR.dtd.$block;-1 <\/span>/gi, +" "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"    ")})),-1')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/
/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var h,k,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(h= +g.getFirst())&&h.type==CKEDITOR.NODE_ELEMENT&&(h.hasClass("cke_editable")||h.hasClass("cke_contents"));)g=k=h;k&&(b=k.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,c){if(c.toLowerCase()in f){a.data.preSniffing="html";return"<"+c}return b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,c){if(c in f){a.data.endsWithEOL=1;return""}return b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null, +null,3);a.on("paste",function(e){var e=e.data,c=e.type,f=e.dataValue,h,k=a.config.clipboard_defaultContentType||"html";h="html"==c||"html"==e.preSniffing?"html":x(f);"htmlifiedtext"==h?f=y(a.config,f):"text"==c&&"html"==h&&(f=A(a.config,f,b||(b=z(a))));e.startsWithEOL&&(f='
'+f);e.endsWithEOL&&(f+='
');"auto"==c&&(c="html"==h||"html"==k?"html":"text");e.type=c;e.dataValue=f;delete e.preSniffing;delete e.startsWithEOL;delete e.endsWithEOL},null,null,6);a.on("paste", +function(b){b=b.data;a.insertHtml(b.dataValue,b.type);setTimeout(function(){a.fire("afterPaste")},0)},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}})})();(function(){var c=' {label}{arrowHtml}', m=CKEDITOR.addTemplate("buttonArrow",''+(CKEDITOR.env.hc?"▼":"")+""),n=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,b){var c=CKEDITOR.env,i=this._.id=CKEDITOR.tools.getNextId(),f="",e=this.command,l;this._.editor=a;var d={id:i,button:this,editor:a,focus:function(){CKEDITOR.document.getById(i).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},o=CKEDITOR.tools.addFunction(function(a){if(d.onkey)return a=new CKEDITOR.dom.event(a),!1!==d.onkey(d,a.getKeystroke())}),p=CKEDITOR.tools.addFunction(function(a){var b;d.onfocus&&(b= @@ -689,10 +693,11 @@ CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.en CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(e,a,b,d){a=a||"80%";b=b||"70%";"string"==typeof a&&(1a&&(a=640);420>b&&(b=420);var f=parseInt((window.screen.height-b)/2,10),g=parseInt((window.screen.width-a)/2,10),d=(d||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+ a+",height="+b+",top="+f+",left="+g,c=window.open("",null,d,!0);if(!c)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(c.moveTo(g,f),c.resizeTo(a,b)),c.focus(),c.location.href=e}catch(h){window.open(e,null,d,!0)}return!0}});(function(){function g(a,c){var d=[];if(c)for(var b in c)d.push(b+"="+encodeURIComponent(c[b]));else return a;return a+(-1!=a.indexOf("?")?"&":"?")+d.join("&")}function i(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function k(){var a=this.getDialog(),c=a.getParentEditor();c._.filebrowserSe=this;var d=c.config["filebrowser"+i(a.getName())+"WindowWidth"]||c.config.filebrowserWindowWidth||"80%",a=c.config["filebrowser"+i(a.getName())+"WindowHeight"]||c.config.filebrowserWindowHeight||"70%", b=this.filebrowser.params||{};b.CKEditor=c.name;b.CKEditorFuncNum=c._.filebrowserFn;b.langCode||(b.langCode=c.langCode);b=g(this.filebrowser.url,b);c.popup(b,d,a,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function l(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return!a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!a.getContentElement(this["for"][0],this["for"][1]).getAction()?!1:!0}function m(a,c,d){var b=d.params||{}; -b.CKEditor=a.name;b.CKEditorFuncNum=a._.filebrowserFn;b.langCode||(b.langCode=a.langCode);c.action=g(d.url,b);c.filebrowser=d}function j(a,c,d,b){var e,g;for(g in b)if(e=b[g],("hbox"==e.type||"vbox"==e.type||"fieldset"==e.type)&&j(a,c,d,e.children),e.filebrowser)if("string"==typeof e.filebrowser&&(e.filebrowser={action:"fileButton"==e.type?"QuickUpload":"Browse",target:e.filebrowser}),"Browse"==e.filebrowser.action){var f=e.filebrowser.url;void 0===f&&(f=a.config["filebrowser"+i(c)+"BrowseUrl"],void 0=== -f&&(f=a.config.filebrowserBrowseUrl));f&&(e.onClick=k,e.filebrowser.url=f,e.hidden=!1)}else if("QuickUpload"==e.filebrowser.action&&e["for"]&&(f=e.filebrowser.url,void 0===f&&(f=a.config["filebrowser"+i(c)+"UploadUrl"],void 0===f&&(f=a.config.filebrowserUploadUrl)),f)){var h=e.onClick;e.onClick=function(a){var b=a.sender;return h&&h.call(b,a)===false?false:l.call(b,a)};e.filebrowser.url=f;e.hidden=!1;m(a,d.getContents(e["for"][0]).get(e["for"][1]),e.filebrowser)}}function h(a,c,d){if(-1!==d.indexOf(";")){for(var d= -d.split(";"),b=0;bCKEDITOR.env.version||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;");b.editable().hasFocus&& @@ -855,15 +860,16 @@ a.name&&this.controlInfo[a.name])return this.controlInfo[a.name].paused},getScay 10)&&window.scayt.uiTags[d]:parseInt(b[d],10);"object"==typeof a.plugins.wsc?c.push(1):c.push(0);return c},loadEngine:function(a){if(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version||CKEDITOR.env.opera||CKEDITOR.env.air)return a.fire("showScaytState");if(!0===this.engineLoaded)return r.apply(a);if(-1==this.engineLoaded)return CKEDITOR.on("scaytReady",function(){r.apply(a)});CKEDITOR.on("scaytReady",r,a);CKEDITOR.on("scaytReady",function(){this.engineLoaded=!0},this,null,0);this.engineLoaded=-1;var c= document.location.protocol,c=-1!=c.search(/https?:/)?c:"http:",c=a.config.scayt_srcUrl||c+"//svc.webspellchecker.net/scayt26/loader__base.js",b=d.parseUrl(c).path+"/";void 0==window.scayt?(CKEDITOR._djScaytConfig={baseUrl:b,addOnLoad:[function(){CKEDITOR.fireOnce("scaytReady")}],isDebug:!1},CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",async:"true",src:c}}))):CKEDITOR.fireOnce("scaytReady");return null},parseUrl:function(a){var c;return a.match&& (c=a.match(/(.*)[\/\\](.*?\.\w+)$/))?{path:c[1],file:c[2]}:a}};var d=CKEDITOR.plugins.scayt,s=function(a,c,b,d,e,k,g){a.addCommand(d,e);a.addMenuItem(d,{label:b,command:d,group:k,order:g})},v={preserveState:!0,editorFocus:!1,canUndo:!1,exec:function(a){if(d.isScaytReady(a)){var c=d.isScaytEnabled(a);this.setState(c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON);a=d.getScayt(a);a.focus();a.setDisabled(c)}else!a.config.scayt_autoStartup&&0<=d.engineLoaded&&(a.focus(),this.setState(CKEDITOR.TRISTATE_DISABLED), -d.loadEngine(a))}};CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",beforeInit:function(a){var c=a.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",b="";if((c=c.split("|"))&&c.length)for(var d=0;d