NMandapaty/ArcticVoice

View on GitHub
public/assets/ckeditor/init.js

Summary

Maintainability
A
0 mins
Test Coverage
(function(){"undefined"!=typeof window.CKEDITOR_BASEPATH&&null!==window.CKEDITOR_BASEPATH||(window.CKEDITOR_BASEPATH="/assets/ckeditor/")}).call(this),function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,t={timestamp:"G6DE",version:"4.5.10",revision:"b47abaf",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var t=window.CKEDITOR_BASEPATH||"";if(!t)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var o=n[i].src.match(e);if(o){t=o[1];break}}if(-1==t.indexOf(":/")&&"//"!=t.slice(0,2)&&(t=0===t.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+t:location.href.match(/^[^\?]*\/(?:)/)[0]+t),!t)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return t}(),getUrl:function(e){return-1==e.indexOf(":/")&&0!==e.indexOf("/")&&(e=this.basePath+e),this.timestamp&&"/"!=e.charAt(e.length-1)&&!/[&?]t=/.test(e)&&(e+=(0<=e.indexOf("?")?"&":"?")+"t="+this.timestamp),e},domReady:function(){function e(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",e,!1),t()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),t())}catch(e){}}function t(){for(var e;e=n.shift();)e()}var n=[];return function(t){function i(){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(i,1)}e()}if(n.push(t),"complete"===document.readyState&&setTimeout(e,1),1==n.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",e),window.attachEvent("onload",e),t=!1;try{t=!window.frameElement}catch(e){}document.documentElement.doScroll&&t&&i()}}}()},n=window.CKEDITOR_GETURL;if(n){var i=t.getUrl;t.getUrl=function(e){return n.call(t,e)||i.call(t,e)}}return t}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(e){var t,n=CKEDITOR.event.prototype;for(t in n)null==e[t]&&(e[t]=n[t])},CKEDITOR.event.prototype=function(){function e(e){var i=t(this);return i[e]||(i[e]=new n(e))}var t=function(e){return e=e.getPrivate&&e.getPrivate()||e._||(e._={}),e.events||(e.events={})},n=function(e){this.name=e,this.listeners=[]};return n.prototype={getListenerIndex:function(e){for(var t=0,n=this.listeners;t<n.length;t++)if(n[t].fn==e)return t;return-1}},{define:function(t,n){var i=e.call(this,t);CKEDITOR.tools.extend(i,n,!0)},on:function(t,n,i,o,a){function r(e,a,r,l){return e={name:t,sender:this,editor:e,data:a,listenerData:o,stop:r,cancel:l,removeListener:s},!1!==n.call(i,e)&&e.data}function s(){c.removeListener(t,n)}var l=e.call(this,t);if(0>l.getListenerIndex(n)){l=l.listeners,i||(i=this),isNaN(a)&&(a=10);var c=this;r.fn=n,r.priority=a;for(var d=l.length-1;0<=d;d--)if(l[d].priority<=a)return l.splice(d+1,0,r),{removeListener:s};l.unshift(r)}return{removeListener:s}},once:function(){var e=Array.prototype.slice.call(arguments),t=e[1];return e[1]=function(e){return e.removeListener(),t.apply(this,arguments)},this.on.apply(this,e)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:function(){var e=0,n=function(){e=1},i=0,o=function(){i=1};return function(a,r,s){var l=t(this)[a];a=e;var c=i;if(e=i=0,l){var d=l.listeners;if(d.length)for(var u,d=d.slice(0),h=0;h<d.length;h++){if(l.errorProof)try{u=d[h].call(this,s,r,n,o)}catch(e){}else u=d[h].call(this,s,r,n,o);if(!1===u?i=1:"undefined"!=typeof u&&(r=u),e||i)break}}return r=!i&&("undefined"==typeof r||r),e=a,i=c,r}}(),fireOnce:function(e,n,i){return n=this.fire(e,n,i),delete t(this)[e],n},removeListener:function(e,n){var i=t(this)[e];if(i){var o=i.getListenerIndex(n);0<=o&&i.listeners.splice(o,1)}},removeAllListeners:function(){var e,n=t(this);for(e in n)delete n[e]},hasListeners:function(e){return(e=t(this)[e])&&0<e.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]),CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fire.call(this,e,t,this)},CKEDITOR.editor.prototype.fireOnce=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fireOnce.call(this,e,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var e=navigator.userAgent.toLowerCase(),t=e.match(/edge[ \/](\d+.?\d*)/),n=-1<e.indexOf("trident/"),n=!(!t&&!n),n={ie:n,edge:!!t,webkit:!n&&-1<e.indexOf(" applewebkit/"),air:-1<e.indexOf(" adobeair/"),mac:-1<e.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<e.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(e),isCustomDomain:function(){if(!this.ie)return!1;var e=document.domain,t=window.location.hostname;return e!=t&&e!="["+t+"]"},secure:"https:"==location.protocol};n.gecko="Gecko"==navigator.product&&!n.webkit&&!n.ie,n.webkit&&(-1<e.indexOf("chrome")?n.chrome=!0:n.safari=!0);var i=0;return n.ie&&(i=t?parseFloat(t[1]):n.quirks||!document.documentMode?parseFloat(e.match(/msie (\d+)/)[1]):document.documentMode,n.ie9Compat=9==i,n.ie8Compat=8==i,n.ie7Compat=7==i,n.ie6Compat=7>i||n.quirks),n.gecko&&(t=e.match(/rv:([\d\.]+)/))&&(t=t[1].split("."),i=1e4*t[0]+100*(t[1]||0)+1*(t[2]||0)),n.air&&(i=parseFloat(e.match(/ adobeair\/(\d+)/)[1])),n.webkit&&(i=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),n.version=i,n.isCompatible=!(n.ie&&7>i||n.gecko&&4e4>i||n.webkit&&534>i),n.hidpi=2<=window.devicePixelRatio,n.needsBrFiller=n.gecko||n.webkit||n.ie&&10<i,n.needsNbspFiller=n.ie&&11>i,n.cssClass="cke_browser_"+(n.ie?"ie":n.gecko?"gecko":n.webkit?"webkit":"unknown"),n.quirks&&(n.cssClass+=" cke_browser_quirks"),n.ie&&(n.cssClass+=" cke_browser_ie"+(n.quirks?"6 cke_browser_iequirks":n.version)),n.air&&(n.cssClass+=" cke_browser_air"),n.iOS&&(n.cssClass+=" cke_browser_ios"),n.hidpi&&(n.cssClass+=" cke_hidpi"),n}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var e=document.createElement("script");e.type="text/javascript",e.src=CKEDITOR.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(e)}},CKEDITOR.loadFullCoreTimeout=0,CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)},function(){CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():t&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1e3*t))})}(),CKEDITOR.status="basic_loaded"}(),CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:t})},CKEDITOR.error=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:e,additionalData:t})},CKEDITOR.on("log",function(e){if(window.console&&window.console.log){var t=console[e.data.type]?e.data.type:"log",n=e.data.errorCode;(e=e.data.additionalData)?console[t]("[CKEDITOR] Error code: "+n+".",e):console[t]("[CKEDITOR] Error code: "+n+"."),console[t]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+n)}},null,null,999),CKEDITOR.dom={},function(){var e=[],t=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",n=/&/g,i=/>/g,o=/</g,a=/"/g,r=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,s={lt:"<",gt:">",amp:"&",quot:'"',nbsp:"\xa0",shy:"\xad"},l=function(e,t){return"#"==t[0]?String.fromCharCode(parseInt(t.slice(1),10)):s[t]};CKEDITOR.on("reset",function(){e=[]}),CKEDITOR.tools={arrayCompare:function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0},getIndex:function(e,t){for(var n=0;n<e.length;++n)if(t(e[n]))return n;return-1},clone:function(e){var t;if(e&&e instanceof Array){t=[];for(var n=0;n<e.length;n++)t[n]=CKEDITOR.tools.clone(e[n]);return t}if(null===e||"object"!=typeof e||e instanceof String||e instanceof Number||e instanceof Boolean||e instanceof Date||e instanceof RegExp||e.nodeType||e.window===e)return e;t=new e.constructor;for(n in e)t[n]=CKEDITOR.tools.clone(e[n]);return t},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},extend:function(e){var t,n,i=arguments.length;"boolean"==typeof(t=arguments[i-1])?i--:"boolean"==typeof(t=arguments[i-2])&&(n=arguments[i-1],i-=2);for(var o=1;o<i;o++){var a,r=arguments[o];for(a in r)!0!==t&&null!=e[a]||(!n||a in n)&&(e[a]=r[a])}return e},prototypedCopy:function(e){var t=function(){};return t.prototype=e,new t},copy:function(e){var t,n={};for(t in e)n[t]=e[t];return n},isArray:function(e){return"[object Array]"==Object.prototype.toString.call(e)},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(e,n,i){return i?t+e+":"+n+";"+e+":"+n:(i={},i[e]=n,i[t+e]=n,i)},cssStyleToDomStyle:function(){var e=document.createElement("div").style,t="undefined"!=typeof e.cssFloat?"cssFloat":"undefined"!=typeof e.styleFloat?"styleFloat":"float";return function(e){return"float"==e?t:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(e){e=[].concat(e);for(var t,n=[],i=0;i<e.length;i++)(t=e[i])&&(/@import|[{}]/.test(t)?n.push("<style>"+t+"</style>"):n.push('<link type="text/css" rel=stylesheet href="'+t+'">'));return n.join("")},htmlEncode:function(e){return void 0===e||null===e?"":String(e).replace(n,"&amp;").replace(i,"&gt;").replace(o,"&lt;")},htmlDecode:function(e){return e.replace(r,l)},htmlEncodeAttr:function(e){return CKEDITOR.tools.htmlEncode(e).replace(a,"&quot;")},htmlDecodeAttr:function(e){return CKEDITOR.tools.htmlDecode(e)},transformPlainTextToHtml:function(e,t){var n=t==CKEDITOR.ENTER_BR,i=this.htmlEncode(e.replace(/\r\n/g,"\n")),i=i.replace(/\t/g,"&nbsp;&nbsp; &nbsp;"),o=t==CKEDITOR.ENTER_P?"p":"div";if(!n){var a=/\n{2}/g;if(a.test(i))var r="<"+o+">",s="</"+o+">",i=r+i.replace(a,function(){return s+r})+s}return i=i.replace(/\n/g,"<br>"),n||(i=i.replace(new RegExp("<br>(?=</"+o+">)"),function(e){return CKEDITOR.tools.repeat(e,2)})),i=i.replace(/^ | $/g,"&nbsp;"),i=i.replace(/(>|\s) /g,function(e,t){return t+"&nbsp;"}).replace(/ (?=<)/g,"&nbsp;")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var e="e",t=0;8>t;t++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e},override:function(e,t){var n=t(e);return n.prototype=e.prototype,n},setTimeout:function(e,t,n,i,o){return o||(o=window),n||(n=o),o.setTimeout(function(){i?e.apply(n,[].concat(i)):e.apply(n)},t||0)},trim:function(){var e=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(t){return t.replace(e,"")}}(),ltrim:function(){var e=/^[ \t\n\r]+/g;return function(t){return t.replace(e,"")}}(),rtrim:function(){var e=/[ \t\n\r]+$/g;return function(t){return t.replace(e,"")}}(),indexOf:function(e,t){if("function"==typeof t){for(var n=0,i=e.length;n<i;n++)if(t(e[n]))return n}else{if(e.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1},search:function(e,t){var n=CKEDITOR.tools.indexOf(e,t);return 0<=n?e[n]:null},bind:function(e,t){return function(){return e.apply(t,arguments)}},createClass:function(e){var t=e.$,n=e.base,i=e.privates||e._,o=e.proto;if(e=e.statics,!t&&(t=function(){n&&this.base.apply(this,arguments)}),i)var a=t,t=function(){var e,t=this._||(this._={});for(e in i){var n=i[e];t[e]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}a.apply(this,arguments)};return n&&(t.prototype=this.prototypedCopy(n.prototype),t.prototype.constructor=t,t.base=n,t.baseProto=n.prototype,t.prototype.base=function(){this.base=n.prototype.base,n.apply(this,arguments),this.base=arguments.callee}),o&&this.extend(t.prototype,o,!0),e&&this.extend(t,e,!0),t},addFunction:function(t,n){return e.push(function(){return t.apply(n||this,arguments)})-1},removeFunction:function(t){e[t]=null},callFunction:function(t){var n=e[t];return n&&n.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var e,t=/^-?\d+\.?\d*px$/;return function(n){return e=CKEDITOR.tools.trim(n+"")+"px",t.test(e)?e:n||""}}(),convertToPx:function(){var e;return function(t){return e||(e=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document),CKEDITOR.document.getBody().append(e)),/%$/.test(t)?t:(e.setStyle("width",t),e.$.clientWidth)}}(),repeat:function(e,t){return Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;t<n;t++){var i=arguments[t];try{e=i();break}catch(e){}}return e},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(e){return function(){var t=arguments,n=this;window.setTimeout(function(){e.apply(n,t)},0)}},normalizeCssText:function(e,t){var n,i=[],o=CKEDITOR.tools.parseCssText(e,!0,t);for(n in o)i.push(n+":"+o[n]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(e){return e.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(e,t,n,i){for(e=[t,n,i],t=0;3>t;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")})},normalizeHex:function(e){return e.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(e,t,n,i){return e=t.toLowerCase(),3==e.length&&(e=e.split(""),e=[e[0],e[0],e[1],e[1],e[2],e[2]].join("")),"#"+e+i})},parseCssText:function(e,t,n){var i={};return n&&(e=new CKEDITOR.dom.element("span").setAttribute("style",e).getAttribute("style")||""),e&&(e=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(e))),e&&";"!=e?(e.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,n,o){t&&(n=n.toLowerCase(),"font-family"==n&&(o=o.replace(/\s*,\s*/g,",")),o=CKEDITOR.tools.trim(o)),i[n]=o}),i):i},writeCssText:function(e,t){var n,i=[];for(n in e)i.push(n+":"+e[n]);return t&&i.sort(),i.join("; ")},objectCompare:function(e,t,n){var i;if(!e&&!t)return!0;if(!e||!t)return!1;for(i in e)if(e[i]!=t[i])return!1;if(!n)for(i in t)if(e[i]!=t[i])return!1;return!0},objectKeys:function(e){var t,n=[];for(t in e)n.push(t);return n},convertArrayToObject:function(e,t){var n={};1==arguments.length&&(t=!0);for(var i=0,o=e.length;i<o;++i)n[e[i]]=t;return n},fixDomain:function(){for(var e;;)try{e=window.parent.document.domain;break}catch(t){if(e=e?e.replace(/.+?(?:\.|$)/,""):document.domain,!e)break;document.domain=e}return!!e},eventsBuffer:function(e,t,n){function i(){a=(new Date).getTime(),o=!1,n?t.call(n):t()}var o,a=0;return{input:function(){if(!o){var t=(new Date).getTime()-a;t<e?o=setTimeout(i,e-t):i()}},reset:function(){o&&clearTimeout(o),o=a=0}}},enableHtml5Elements:function(e,t){for(var n,i="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),o=i.length;o--;)n=e.createElement(i[o]),t&&e.appendChild(n)},checkIfAnyArrayItemMatches:function(e,t){for(var n=0,i=e.length;n<i;++n)if(e[n].match(t))return!0;return!1},checkIfAnyObjectPropertyMatches:function(e,t){for(var n in e)if(n.match(t))return!0;return!1},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==",getCookie:function(e){e=e.toLowerCase();for(var t,n,i=document.cookie.split(";"),o=0;o<i.length;o++)if(t=i[o].split("="),n=decodeURIComponent(CKEDITOR.tools.trim(t[0]).toLowerCase()),n===e)return decodeURIComponent(1<t.length?t[1]:"");return null},setCookie:function(e,t){document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path=/"},getCsrfToken:function(){var e=CKEDITOR.tools.getCookie("ckCsrfToken");if(!e||40!=e.length){var e=[],t="";if(window.crypto&&window.crypto.getRandomValues)e=new Uint8Array(40),window.crypto.getRandomValues(e);else for(var n=0;40>n;n++)e.push(Math.floor(256*Math.random()));for(n=0;n<e.length;n++)var i="abcdefghijklmnopqrstuvwxyz0123456789".charAt(e[n]%36),t=t+(.5<Math.random()?i.toUpperCase():i);e=t,CKEDITOR.tools.setCookie("ckCsrfToken",e)}return e},escapeCss:function(e){return e?window.CSS&&CSS.escape?CSS.escape(e):isNaN(parseInt(e.charAt(0),10))?e:"\\3"+e.charAt(0)+" "+e.substring(1,e.length):""}}}(),CKEDITOR.dtd=function(){var e=CKEDITOR.tools.extend,t=function(e,t){for(var n=CKEDITOR.tools.clone(e),i=1;i<arguments.length;i++){t=arguments[i];for(var o in t)delete n[o]}return n},n={},i={},o={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},a={command:1,link:1,meta:1,noscript:1,script:1,style:1},r={},s={"#":1},l={center:1,dir:1,noframes:1};return e(n,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},s,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1}),e(i,o,n,l),t={a:t(n,{a:1,button:1}),abbr:n,address:i,area:r,article:i,aside:i,audio:e({source:1,track:1},i),b:n,base:r,bdi:n,bdo:n,blockquote:i,body:i,br:r,button:t(n,{a:1,button:1}),canvas:n,caption:i,cite:n,code:n,col:r,colgroup:{col:1},command:r,datalist:e({option:1},n),dd:i,del:n,details:e({summary:1},i),dfn:n,div:i,dl:{dt:1,dd:1},dt:i,em:n,embed:r,fieldset:e({legend:1},i),figcaption:i,figure:e({figcaption:1},i),footer:i,form:i,h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:e({title:1,base:1},a),header:i,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:r,html:e({head:1,body:1},i,a),i:n,iframe:s,img:r,input:r,ins:n,kbd:n,keygen:r,label:n,legend:n,li:i,link:r,main:i,map:i,mark:n,menu:e({li:1},i),meta:r,meter:t(n,{meter:1}),nav:i,noscript:e({link:1,meta:1,style:1},n),object:e({param:1},n),ol:{li:1},optgroup:{option:1},option:s,output:n,p:n,param:r,pre:n,progress:t(n,{progress:1}),q:n,rp:n,rt:n,ruby:e({rp:1,rt:1},n),s:n,samp:n,script:s,section:i,select:{optgroup:1,option:1},small:n,source:r,span:n,strong:n,style:s,sub:n,summary:e({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},n),sup:n,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:i,textarea:s,tfoot:{tr:1},th:i,thead:{tr:1},time:t(n,{time:1}),title:s,tr:{th:1,td:1},track:r,u:n,ul:{li:1},"var":n,video:e({source:1,track:1},i),wbr:r,acronym:n,applet:e({param:1},i),basefont:r,big:n,center:i,dialog:r,dir:{li:1},font:n,isindex:r,noframes:i,strike:n,tt:n},e(t,{$block:e({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},o,l),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:n,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:e({body:1,head:1,html:1},t.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}}),t}(),CKEDITOR.dom.event=function(e){this.$=e},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var e=this.getKey();return(this.$.ctrlKey||this.$.metaKey)&&(e+=CKEDITOR.CTRL),this.$.shiftKey&&(e+=CKEDITOR.SHIFT),this.$.altKey&&(e+=CKEDITOR.ALT),e},preventDefault:function(e){var t=this.$;t.preventDefault?t.preventDefault():t.returnValue=!1,e&&this.stopPropagation()},stopPropagation:function(){var e=this.$;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getTarget:function(){var e=this.$.target||this.$.srcElement;return e?new CKEDITOR.dom.node(e):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var e=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),y:this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(e){e&&(this.$=e)},CKEDITOR.dom.domObject.prototype=function(){var e=function(e,t){return function(n){"undefined"!=typeof CKEDITOR&&e.fire(t,new CKEDITOR.dom.event(n))}};return{getPrivate:function(){var e;return(e=this.getCustomData("_"))||this.setCustomData("_",e={}),e},on:function(t){var n=this.getCustomData("_cke_nativeListeners");return n||(n={},this.setCustomData("_cke_nativeListeners",n)),n[t]||(n=n[t]=e(this,t),this.$.addEventListener?this.$.addEventListener(t,n,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+t,n)),CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(e){if(CKEDITOR.event.prototype.removeListener.apply(this,arguments),!this.hasListeners(e)){var t=this.getCustomData("_cke_nativeListeners"),n=t&&t[e];n&&(this.$.removeEventListener?this.$.removeEventListener(e,n,!1):this.$.detachEvent&&this.$.detachEvent("on"+e,n),delete t[e])}},removeAllListeners:function(){var e,t=this.getCustomData("_cke_nativeListeners");for(e in t){var n=t[e];this.$.detachEvent?this.$.detachEvent("on"+e,n):this.$.removeEventListener&&this.$.removeEventListener(e,n,!1),delete t[e]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(e){var t={};CKEDITOR.on("reset",function(){t={}}),e.equals=function(e){try{return e&&e.$===this.$}catch(e){return!1}},e.setCustomData=function(e,n){var i=this.getUniqueId();return(t[i]||(t[i]={}))[e]=n,this},e.getCustomData=function(e){var n=this.$["data-cke-expando"];return(n=n&&t[n])&&e in n?n[e]:null},e.removeCustomData=function(e){var n,i,o=this.$["data-cke-expando"],o=o&&t[o];return o&&(n=o[e],i=e in o,delete o[e]),i?n:null},e.clearCustomData=function(){this.removeAllListeners();var e=this.$["data-cke-expando"];e&&delete t[e]},e.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())},CKEDITOR.event.implementOn(e)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(e){return e?new CKEDITOR.dom[e.nodeType==CKEDITOR.NODE_DOCUMENT?"document":e.nodeType==CKEDITOR.NODE_ELEMENT?"element":e.nodeType==CKEDITOR.NODE_TEXT?"text":e.nodeType==CKEDITOR.NODE_COMMENT?"comment":e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](e):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(e,t){return e.append(this,t),e},clone:function(e,t){function n(i){if(i["data-cke-expando"]&&(i["data-cke-expando"]=!1),(i.nodeType==CKEDITOR.NODE_ELEMENT||i.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(t||i.nodeType!=CKEDITOR.NODE_ELEMENT||i.removeAttribute("id",!1),e)){i=i.childNodes;for(var o=0;o<i.length;o++)n(i[o])}}function i(t){if(t.type==CKEDITOR.NODE_ELEMENT||t.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(t.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var n=t.getName();":"==n[0]&&t.renameNode(n.substring(1))}if(e)for(n=0;n<t.getChildCount();n++)i(t.getChild(n))}}var o=this.$.cloneNode(e);return n(o),o=new CKEDITOR.dom.node(o),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&i(o),o},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){return e.$.parentNode.insertBefore(this.$,e.$.nextSibling),e},insertBefore:function(e){return e.$.parentNode.insertBefore(this.$,e.$),e},insertBeforeMe:function(e){return this.$.parentNode.insertBefore(e.$,this.$),e},getAddress:function(e){for(var t=[],n=this.getDocument().$.documentElement,i=this.$;i&&i!=n;){var o=i.parentNode;o&&t.unshift(this.getIndex.call({$:i},e)),i=o}return t},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){function t(e,i){var o=i?e.nextSibling:e.previousSibling;return o&&o.nodeType==CKEDITOR.NODE_TEXT?n(o)?t(o,i):o:null}function n(e){return!e.nodeValue||e.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var i,o=this.$,a=-1;if(!this.$.parentNode||e&&o.nodeType==CKEDITOR.NODE_TEXT&&n(o)&&!t(o)&&!t(o,!0))return-1;do e&&o!=this.$&&o.nodeType==CKEDITOR.NODE_TEXT&&(i||n(o))||(a++,i=o.nodeType==CKEDITOR.NODE_TEXT);while(o=o.previousSibling);return a},getNextSourceNode:function(e,t,n){if(n&&!n.call){var i=n;n=function(e){return!e.equals(i)}}e=!e&&this.getFirst&&this.getFirst();var o;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&!1===n(this,!0))return null;e=this.getNext()}for(;!e&&(o=(o||this).getParent());){if(n&&!1===n(o,!0))return null;e=o.getNext()}return!e||n&&!1===n(e)?null:t&&t!=e.type?e.getNextSourceNode(!1,t,n):e},getPreviousSourceNode:function(e,t,n){if(n&&!n.call){var i=n;n=function(e){return!e.equals(i)}}e=!e&&this.getLast&&this.getLast();var o;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&!1===n(this,!0))return null;e=this.getPrevious()}for(;!e&&(o=(o||this).getParent());){if(n&&!1===n(o,!0))return null;e=o.getPrevious()}return!e||n&&!1===n(e)?null:t&&e.type!=t?e.getPreviousSourceNode(!1,t,n):e},getPrevious:function(e){var t,n=this.$;do t=(n=n.previousSibling)&&10!=n.nodeType&&new CKEDITOR.dom.node(n);while(t&&e&&!e(t));return t},getNext:function(e){var t,n=this.$;do t=(n=n.nextSibling)&&new CKEDITOR.dom.node(n);while(t&&e&&!e(t));return t},getParent:function(e){var t=this.$.parentNode;return t&&(t.nodeType==CKEDITOR.NODE_ELEMENT||e&&t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(t):null},getParents:function(e){var t=this,n=[];do n[e?"push":"unshift"](t);while(t=t.getParent());return n},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;var t=this.contains?this:this.getParent();do if(t.contains(e))return t;while(t=t.getParent());return null},getPosition:function(e){var t=this.$,n=e.$;if(t.compareDocumentPosition)return t.compareDocumentPosition(n);if(t==n)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.type==CKEDITOR.NODE_ELEMENT){if(t.contains){if(t.contains(n))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(n.contains(t))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in t)return 0>t.sourceIndex||0>n.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<n.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}t=this.getAddress(),e=e.getAddress();for(var n=Math.min(t.length,e.length),i=0;i<n;i++)if(t[i]!=e[i])return t[i]<e[i]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return t.length<e.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(e,t){var n,i,o=this.$;t||(o=o.parentNode),"function"==typeof e?(i=!0,n=e):(i=!1,n=function(t){return t="string"==typeof t.nodeName?t.nodeName.toLowerCase():"","string"==typeof e?t==e:t in e});for(;o;){if(n(i?new CKEDITOR.dom.node(o):o))return new CKEDITOR.dom.node(o);try{o=o.parentNode}catch(e){o=null}}return null},hasAscendant:function(e,t){var n=this.$;for(t||(n=n.parentNode);n;){if(n.nodeName&&n.nodeName.toLowerCase()==e)return!0;n=n.parentNode}return!1},move:function(e,t){e.append(this.remove(),t)},remove:function(e){var t=this.$,n=t.parentNode;if(n){if(e)for(;e=t.firstChild;)n.insertBefore(t.removeChild(e),t);n.removeChild(t)}return this},replace:function(e){this.insertBefore(e),e.remove()},trim:function(){this.ltrim(),this.rtrim()},ltrim:function(){for(var e;this.getFirst&&(e=this.getFirst());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.ltrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(n-t.length),this.$.removeChild(this.$.firstChild))}break}},rtrim:function(){for(var e;this.getLast&&(e=this.getLast());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.rtrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(t.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild))}break}CKEDITOR.env.needsBrFiller&&(e=this.$.lastChild)&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)},isReadOnly:function(e){var t=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(t=this.getParent()),CKEDITOR.env.edge&&t&&t.is("textarea","input")&&(e=!0),!e&&t&&"undefined"!=typeof t.$.isContentEditable)return!(t.$.isContentEditable||t.data("cke-editable"));for(;t;){if(t.data("cke-editable"))return!1;if(t.hasAttribute("contenteditable"))return"false"==t.getAttribute("contenteditable");t=t.getParent()}return!0}}),CKEDITOR.dom.window=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var e=this.$.document,t="CSS1Compat"==e.compatMode;return{width:(t?e.documentElement.clientWidth:e.body.clientWidth)||0,height:(t?e.documentElement.clientHeight:e.body.clientHeight)||0}},getScrollPosition:function(){var e=this.$;return"pageXOffset"in e?{x:e.pageXOffset||0,y:e.pageYOffset||0}:(e=e.document,{x:e.documentElement.scrollLeft||e.body.scrollLeft||0,y:e.documentElement.scrollTop||e.body.scrollTop||0})},getFrame:function(){var e=this.$.frameElement;return e?new CKEDITOR.dom.element.get(e):null}}),CKEDITOR.dom.document=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(e){if(this.$.createStyleSheet)this.$.createStyleSheet(e);else{var t=new CKEDITOR.dom.element("link");t.setAttributes({rel:"stylesheet",type:"text/css",href:e}),this.getHead().append(t)}},appendStyleText:function(e){if(this.$.createStyleSheet){var t=this.$.createStyleSheet("");t.cssText=e}else{var n=new CKEDITOR.dom.element("style",this);n.append(new CKEDITOR.dom.text(e,this)),this.getHead().append(n)}return t||n.$.sheet},createElement:function(e,t){var n=new CKEDITOR.dom.element(e,this);return t&&(t.attributes&&n.setAttributes(t.attributes),t.styles&&n.setStyles(t.styles)),n},createText:function(e){return new CKEDITOR.dom.text(e,this)},focus:function(){this.getWindow().focus()},getActive:function(){var e;try{e=this.$.activeElement}catch(e){return null}return new CKEDITOR.dom.element(e)},getById:function(e){return(e=this.$.getElementById(e))?new CKEDITOR.dom.element(e):null},getByAddress:function(e,t){for(var n=this.$.documentElement,i=0;n&&i<e.length;i++){var o=e[i];if(t)for(var a=-1,r=0;r<n.childNodes.length;r++){var s=n.childNodes[r];if((!0!==t||3!=s.nodeType||!s.previousSibling||3!=s.previousSibling.nodeType)&&(a++,
a==o)){n=s;break}}else n=n.childNodes[o]}return n?new CKEDITOR.dom.node(n):null},getElementsByTag:function(e,t){return CKEDITOR.env.ie&&8>=document.documentMode||!t||(e=t+":"+e),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e=e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(e){this.$.open("text/html","replace"),CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();</script>")),this.$.write(e),this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");return e||(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,!0),this.setCustomData("html5ShivFrag",e)),e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null}},CKEDITOR.dom.element=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createElement(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,t){var n=new CKEDITOR.dom.element("div",t);return n.setHtml(e),n.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,t,n,i){var o=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),a=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,a[n]=1,t.setCustomData(n,i)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var t in e)CKEDITOR.dom.element.clearMarkers(e,e[t],1)},CKEDITOR.dom.element.clearMarkers=function(e,t,n){var i,o=t.getCustomData("list_marker_names"),a=t.getCustomData("list_marker_id");for(i in o)t.removeCustomData(i);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[a])},function(){function e(e,t){return-1<(" "+e+" ").replace(a," ").indexOf(" "+t+" ")}function t(e){var t=!0;return e.$.id||(e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||e.removeAttribute("id")}}function n(e,t){var n=CKEDITOR.tools.escapeCss(e.$.id);return"#"+n+" "+t.split(/,\s*/).join(", #"+n+" ")}function i(e){for(var t=0,n=0,i=r[e].length;n<i;n++)t+=parseInt(this.getComputedStyle(r[e][n])||0,10)||0;return t}var o=document.createElement("_").classList,o="undefined"!=typeof o&&null!==String(o.add).match(/\[Native code\]/gi),a=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:o?function(e){return this.$.classList.add(e),this}:function(t){var n=this.$.className;return n&&(e(n,t)||(n+=" "+t)),this.$.className=n||t,this},removeClass:o?function(e){var t=this.$;return t.classList.remove(e),t.className||t.removeAttribute("class"),this}:function(t){var n=this.getAttribute("class");return n&&e(n,t)&&((n=n.replace(new RegExp("(?:^|\\s+)"+t+"(?=\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",n):this.removeAttribute("class")),this},hasClass:function(t){return e(this.$.className,t)},append:function(e,t){return"string"==typeof e&&(e=this.getDocument().createElement(e)),t?this.$.insertBefore(e.$,this.$.firstChild):this.$.appendChild(e.$),e},appendHtml:function(e){if(this.$.childNodes.length){var t=new CKEDITOR.dom.element("div",this.getDocument());t.setHtml(e),t.moveChildren(this)}else this.setHtml(e)},appendText:function(e){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(e){if(e||CKEDITOR.env.needsBrFiller){for(e=this.getLast();e&&e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(e.getText());)e=e.getPrevious();e&&e.is&&e.is("br")||(e=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&e.setAttribute("type","_moz"),this.append(e))}},breakParent:function(e,t){var n=new CKEDITOR.dom.range(this.getDocument());n.setStartAfter(this),n.setEndAfter(e);var i,o=n.extractContents(!1,t||!1);if(n.insertNode(this.remove()),CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(n=new CKEDITOR.dom.element("div");i=o.getFirst();)i.$.style.backgroundColor&&(i.$.style.backgroundColor=i.$.style.backgroundColor),n.append(i);n.insertAfter(this),n.remove(!0)}else o.insertAfterNode(this)},contains:document.compareDocumentPosition?function(e){return!!(16&this.$.compareDocumentPosition(e.$))}:function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(e.$)},focus:function(){function e(){try{this.$.focus()}catch(e){}}return function(t){t?CKEDITOR.tools.setTimeout(e,100,this):e.call(this)}}(),getHtml:function(){var e=this.$.innerHTML;return CKEDITOR.env.ie?e.replace(/<\?[^>]*>/g,""):e},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var e=this.$.ownerDocument.createElement("div");return e.appendChild(this.$.cloneNode(!0)),e.innerHTML},getClientRect:function(){var e=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return!e.width&&(e.width=e.right-e.left),!e.height&&(e.height=e.bottom-e.top),e},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(e){try{var t=this.$;if(this.getParent())return t.innerHTML=e;var n=this.getDocument()._getHtml5ShivFrag();return n.appendChild(t),t.innerHTML=e,n.removeChild(t),e}catch(n){for(this.$.innerHTML="",t=new CKEDITOR.dom.element("body",this.getDocument()),t.$.innerHTML=e,t=t.getChildren();t.count();)this.append(t.getItem(0));return e}}:function(e){return this.$.innerHTML=e},setText:function(){var e=document.createElement("p");return e.innerHTML="x",e=e.textContent,function(t){this.$[e?"textContent":"innerText"]=t}}(),getAttribute:function(){var e=function(e){return this.$.getAttribute(e,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e){switch(e){case"class":e="className";break;case"http-equiv":e="httpEquiv";break;case"name":return this.$.name;case"tabindex":return e=this.$.getAttribute(e,2),0!==e&&0===this.$.tabIndex&&(e=null),e;case"checked":return e=this.$.attributes.getNamedItem(e),(e.specified?e.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[e];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(e,2)}:e}(),getAttributes:function(e){var t,n={},i=this.$.attributes;for(e=CKEDITOR.tools.isArray(e)?e:[],t=0;t<i.length;t++)-1===CKEDITOR.tools.indexOf(e,i[t].name)&&(n[i[t].name]=i[t].value);return n},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""}:function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var e=this.$.tabIndex;return 0!==e||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?e:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var e=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var t=this.$.scopeName;"HTML"!=t&&(e=t.toLowerCase()+":"+e)}return this.getName=function(){return e},this.getName()},getValue:function(){return this.$.value},getFirst:function(e){var t=this.$.firstChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getNext(e)),t},getLast:function(e){var t=this.$.lastChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getPrevious(e)),t},getStyle:function(e){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]},is:function(){var e=this.getName();if("object"==typeof arguments[0])return!!arguments[0][e];for(var t=0;t<arguments.length;t++)if(arguments[t]==e)return!0;return!1},isEditable:function(e){var t=this.getName();return!(this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[t]||CKEDITOR.dtd.$empty[t]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())&&(!1===e||(e=CKEDITOR.dtd[t]||CKEDITOR.dtd.span,!(!e||!e["#"])))},isIdentical:function(e){var t=this.clone(0,1);if(e=e.clone(0,1),t.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),t.$.isEqualNode)return t.$.style.cssText=CKEDITOR.tools.normalizeCssText(t.$.style.cssText),e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText),t.$.isEqualNode(e.$);if(t=t.getOuterHtml(),e=e.getOuterHtml(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var n=this.getParent();n.type==CKEDITOR.NODE_ELEMENT&&(n=n.clone(),n.setHtml(t),t=n.getHtml(),n.setHtml(e),e=n.getHtml())}return t==e},isVisible:function(){var e,t,n=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility");return n&&CKEDITOR.env.webkit&&(e=this.getWindow(),!e.equals(CKEDITOR.document.getWindow())&&(t=e.$.frameElement)&&(n=new CKEDITOR.dom.element(t).isVisible())),!!n},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var e=this.getChildren(),t=0,n=e.count();t<n;t++){var i=e.getItem(t);if((i.type!=CKEDITOR.NODE_ELEMENT||!i.data("cke-bookmark"))&&(i.type==CKEDITOR.NODE_ELEMENT&&!i.isEmptyInlineRemoveable()||i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText())))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var e=this.$.attributes,t=0;t<e.length;t++){var n=e[t];switch(n.nodeName){case"class":if(this.getAttribute("class"))return!0;case"data-cke-expando":continue;default:if(n.specified)return!0}}return!1}:function(){var e=this.$.attributes,t=e.length,n={"data-cke-expando":1,_moz_dirty:1};return 0<t&&(2<t||!n[e[0].nodeName]||2==t&&!n[e[1].nodeName])},hasAttribute:function(){function e(e){var t=this.$.attributes.getNamedItem(e);if("input"==this.getName())switch(e){case"class":return 0<this.$.className.length;case"checked":return!!this.$.checked;case"value":return e=this.getAttribute("type"),"checkbox"==e||"radio"==e?"on"!=this.$.value:!!this.$.value}return!!t&&t.specified}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(t){return"name"==t?!!this.$.name:e.call(this,t)}:e:function(e){return!!this.$.attributes.getNamedItem(e)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(e,t){var n=this.$;if(e=e.$,n!=e){var i;if(t)for(;i=n.lastChild;)e.insertBefore(n.removeChild(i),e.firstChild);else for(;i=n.firstChild;)e.appendChild(n.removeChild(i))}},mergeSiblings:function(){function e(e,t,n){if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(var i=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(i.push(t),t=n?t.getNext():t.getPrevious(),!t||t.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(t)){for(var o=n?e.getLast():e.getFirst();i.length;)i.shift().move(e,!n);t.moveChildren(e,!n),t.remove(),o&&o.type==CKEDITOR.NODE_ELEMENT&&o.mergeSiblings()}}}return function(t){(!1===t||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(e(this,this.getNext(),!0),e(this,this.getPrevious()))}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var e=function(e,t){return this.$.setAttribute(e,t),this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(t,n){return"class"==t?this.$.className=n:"style"==t?this.$.style.cssText=n:"tabindex"==t?this.$.tabIndex=n:"checked"==t?this.$.checked=n:"contenteditable"==t?e.call(this,"contentEditable",n):e.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,n){if("src"==t&&n.match(/^http:\/\//))try{e.apply(this,arguments)}catch(e){}else e.apply(this,arguments);return this}:e}(),setAttributes:function(e){for(var t in e)this.setAttribute(t,e[t]);return this},setValue:function(e){return this.$.value=e,this},removeAttribute:function(){var e=function(e){this.$.removeAttribute(e)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e){"class"==e?e="className":"tabindex"==e?e="tabIndex":"contenteditable"==e&&(e="contentEditable"),this.$.removeAttribute(e)}:e}(),removeAttributes:function(e){if(CKEDITOR.tools.isArray(e))for(var t=0;t<e.length;t++)this.removeAttribute(e[t]);else for(t in e=e||this.getAttributes())e.hasOwnProperty(t)&&this.removeAttribute(t)},removeStyle:function(e){var t=this.$.style;if(t.removeProperty||"border"!=e&&"margin"!=e&&"padding"!=e)t.removeProperty?t.removeProperty(e):t.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(e)),this.$.style.cssText||this.removeAttribute("style");else{var n,i=["top","left","right","bottom"];"border"==e&&(n=["color","style","width"]);for(var t=[],o=0;o<i.length;o++)if(n)for(var a=0;a<n.length;a++)t.push([e,i[o],n[a]].join("-"));else t.push([e,i[o]].join("-"));for(e=0;e<t.length;e++)this.removeStyle(t[e])}},setStyle:function(e,t){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]=t,this},setStyles:function(e){for(var t in e)this.setStyle(t,e[t]);return this},setOpacity:function(e){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(e=Math.round(100*e),this.setStyle("filter",100<=e?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+e+")")):this.setStyle("opacity",e)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var e,t=this.getElementsByTag("*"),n=0,i=t.count();n<i;n++)e=t.getItem(n),e.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var e=this;"html"!=e.getName();){if("static"!=e.getComputedStyle("position"))return e;e=e.getParent()}return null},getDocumentPosition:function(e){var t=0,n=0,i=this.getDocument(),o=i.getBody(),a="BackCompat"==i.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var r=this.$.getBoundingClientRect(),s=i.$.documentElement,l=s.clientTop||o.$.clientTop||0,c=s.clientLeft||o.$.clientLeft||0,d=!0;CKEDITOR.env.ie&&(d=i.getDocumentElement().contains(this),i=i.getBody().contains(this),d=a&&i||!a&&d),d&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(t=o.$.scrollLeft||s.scrollLeft,n=o.$.scrollTop||s.scrollTop):(n=a?o.$:s,t=n.scrollLeft,n=n.scrollTop),t=r.left+t-c,n=r.top+n-l)}else for(l=this,c=null;l&&"body"!=l.getName()&&"html"!=l.getName();){for(t+=l.$.offsetLeft-l.$.scrollLeft,n+=l.$.offsetTop-l.$.scrollTop,l.equals(this)||(t+=l.$.clientLeft||0,n+=l.$.clientTop||0);c&&!c.equals(l);)t-=c.$.scrollLeft,n-=c.$.scrollTop,c=c.getParent();c=l,l=(r=l.$.offsetParent)?new CKEDITOR.dom.element(r):null}return e&&(r=this.getWindow(),l=e.getWindow(),!r.equals(l)&&r.$.frameElement&&(e=new CKEDITOR.dom.element(r.$.frameElement).getDocumentPosition(e),t+=e.x,n+=e.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||a||(t+=this.$.clientLeft?1:0,n+=this.$.clientTop?1:0),{x:t,y:n}},scrollIntoView:function(e){var t=this.getParent();if(t)do if((t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight)&&!t.is("body")&&this.scrollIntoParent(t,e,1),t.is("html")){var n=t.getWindow();try{var i=n.$.frameElement;i&&(t=new CKEDITOR.dom.element(i))}catch(e){}}while(t=t.getParent())},scrollIntoParent:function(e,t,n){function i(t,n){/body|html/.test(e.getName())?e.getWindow().$.scrollBy(t,n):(e.$.scrollLeft+=t,e.$.scrollTop+=n)}function o(e,t){var n={x:0,y:0};if(!e.is(d?"body":"html")){var i=e.$.getBoundingClientRect();n.x=i.left,n.y=i.top}return i=e.getWindow(),i.equals(t)||(i=o(CKEDITOR.dom.element.get(i.$.frameElement),t),n.x+=i.x,n.y+=i.y),n}function a(e,t){return parseInt(e.getComputedStyle("margin-"+t)||0,10)||0}var r,s,l,c;!e&&(e=this.getWindow()),l=e.getDocument();var d="BackCompat"==l.$.compatMode;e instanceof CKEDITOR.dom.window&&(e=d?l.getBody():l.getDocumentElement()),l=e.getWindow(),s=o(this,l);var u=o(e,l),h=this.$.offsetHeight;r=this.$.offsetWidth;var f=e.$.clientHeight,m=e.$.clientWidth;l=s.x-a(this,"left")-u.x||0,c=s.y-a(this,"top")-u.y||0,r=s.x+r+a(this,"right")-(u.x+m)||0,s=s.y+h+a(this,"bottom")-(u.y+f)||0,(0>c||0<s)&&i(0,!0===t?c:!1===t?s:0>c?c:s),n&&(0>l||0<r)&&i(0>l?l:r,0)},setState:function(e,t,n){switch(t=t||"cke",e){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on"),this.removeClass(t+"_off"),this.removeClass(t+"_disabled"),n&&this.setAttribute("aria-pressed",!0),n&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled"),this.removeClass(t+"_off"),this.removeClass(t+"_on"),n&&this.setAttribute("aria-disabled",!0),n&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off"),this.removeClass(t+"_on"),this.removeClass(t+"_disabled"),n&&this.removeAttribute("aria-pressed"),n&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var e=this.$;try{e.contentWindow.document}catch(t){e.src=e.src}return e&&new CKEDITOR.dom.document(e.contentWindow.document)},copyAttributes:function(e,t){var n=this.$.attributes;t=t||{};for(var i=0;i<n.length;i++){var o,a=n[i],r=a.nodeName.toLowerCase();r in t||("checked"==r&&(o=this.getAttribute(r))?e.setAttribute(r,o):CKEDITOR.env.ie&&!this.hasAttribute(r)||(o=this.getAttribute(r),null===o&&(o=a.nodeValue),e.setAttribute(r,o)))}""!==this.$.style.cssText&&(e.$.style.cssText=this.$.style.cssText)},renameNode:function(e){if(this.getName()!=e){var t=this.getDocument();e=new CKEDITOR.dom.element(e,t),this.copyAttributes(e),this.moveChildren(e),this.getParent(!0)&&this.$.parentNode.replaceChild(e.$,this.$),e.$["data-cke-expando"]=this.$["data-cke-expando"],this.$=e.$,delete this.getName}},getChild:function(){function e(e,t){var n=e.childNodes;if(0<=t&&t<n.length)return n[t]}return function(t){var n=this.$;if(t.slice)for(t=t.slice();0<t.length&&n;)n=e(n,t.shift());else n=e(n,t);return n?new CKEDITOR.dom.node(n):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function e(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(t){t.data.getTarget().getAscendant(e,!0)||t.data.preventDefault()})},getDirection:function(e){return e?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(e,t){return e="data-"+e,void 0===t?this.getAttribute(e):(!1===t?this.removeAttribute(e):this.setAttribute(e,t),null)},getEditor:function(){var e,t,n=CKEDITOR.instances;for(e in n)if(t=n[e],t.element.equals(this)&&t.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return t;return null},find:function(e){var i=t(this);return e=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(n(this,e))),i(),e},findOne:function(e){var i=t(this);return e=this.$.querySelector(n(this,e)),i(),e?new CKEDITOR.dom.element(e):null},forEach:function(e,t,n){if(!(n||t&&this.type!=t))var i=e(this);if(!1!==i){n=this.getChildren();for(var o=0;o<n.count();o++)i=n.getItem(o),i.type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):t&&i.type!=t||e(i)}}});var r={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(e,t,n){"number"==typeof t&&(!n||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(t-=i.call(this,e)),this.setStyle(e,t+"px"))},CKEDITOR.dom.element.prototype.getSize=function(e,t){var n=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(e)],this.$["client"+CKEDITOR.tools.capitalize(e)])||0;return t&&(n-=i.call(this,e)),n}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document,this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){e=e.$,e.parentNode.insertBefore(this.$,e.nextSibling)},getHtml:function(){var e=new CKEDITOR.dom.element("div");return this.clone(1,1).appendTo(e),e.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function e(e,t){var n=this.range;if(this._.end)return null;if(!this._.start){if(this._.start=1,n.collapsed)return this.end(),null;n.optimize()}var i,o=n.startContainer;i=n.endContainer;var a,r=n.startOffset,s=n.endOffset,l=this.guard,c=this.type,d=e?"getPreviousSourceNode":"getNextSourceNode";if(!e&&!this._.guardLTR){var u=i.type==CKEDITOR.NODE_ELEMENT?i:i.getParent(),h=i.type==CKEDITOR.NODE_ELEMENT?i.getChild(s):i.getNext();this._.guardLTR=function(e,t){return!(t&&u.equals(e)||h&&e.equals(h)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}if(e&&!this._.guardRTL){var f=o.type==CKEDITOR.NODE_ELEMENT?o:o.getParent(),m=o.type==CKEDITOR.NODE_ELEMENT?r?o.getChild(r-1):null:o.getPrevious();this._.guardRTL=function(e,t){return!(t&&f.equals(e)||m&&e.equals(m)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}var g=e?this._.guardRTL:this._.guardLTR;for(a=l?function(e,t){return!1!==g(e,t)&&l(e,t)}:g,this.current?i=this.current[d](!1,c,a):(e?i.type==CKEDITOR.NODE_ELEMENT&&(i=0<s?i.getChild(s-1):!1===a(i,!0)?null:i.getPreviousSourceNode(!0,c,a)):(i=o,i.type==CKEDITOR.NODE_ELEMENT&&((i=i.getChild(r))||(i=!1===a(o,!0)?null:o.getNextSourceNode(!0,c,a)))),i&&!1===a(i)&&(i=null));i&&!this._.end;){if(this.current=i,this.evaluator&&!1===this.evaluator(i)){if(t&&this.evaluator)return!1}else if(!t)return i;i=i[d](!1,c,a)}return this.end(),this.current=null}function t(t){for(var n,i=null;n=e.call(this,t);)i=n;return i}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(e){this.range=e,this._={}},proto:{end:function(){this._.end=1},next:function(){return e.call(this)},previous:function(){return e.call(this,1)},checkForward:function(){return!1!==e.call(this,0,1)},checkBackward:function(){return!1!==e.call(this,1,1)},lastForward:function(){return t.call(this)},lastBackward:function(){return t.call(this,1)},reset:function(){delete this.current,this._={}}}});var n={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},i={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(e){return!("none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in i||!n[this.getComputedStyle("display")])||!!(this.is(CKEDITOR.dtd.$block)||e&&this.is(e))},CKEDITOR.dom.walker.blockBoundary=function(e){return function(t){return!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary(e))}},CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})},CKEDITOR.dom.walker.bookmark=function(e,t){function n(e){return e&&e.getName&&"span"==e.getName()&&e.data("cke-bookmark")}return function(i){var o,a;return o=i&&i.type!=CKEDITOR.NODE_ELEMENT&&(a=i.getParent())&&n(a),o=e?o:o||n(i),!!(t^o)}},CKEDITOR.dom.walker.whitespaces=function(e){return function(t){var n;return t&&t.type==CKEDITOR.NODE_TEXT&&(n=!CKEDITOR.tools.trim(t.getText())||CKEDITOR.env.webkit&&t.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE),!!(e^n)}},CKEDITOR.dom.walker.invisible=function(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.env.webkit?1:0;return function(i){return t(i)?i=1:(i.type==CKEDITOR.NODE_TEXT&&(i=i.getParent()),i=i.$.offsetWidth<=n),!!(e^i)}},CKEDITOR.dom.walker.nodeType=function(e,t){return function(n){return!!(t^n.type==e)}},CKEDITOR.dom.walker.bogus=function(e){function t(e){return!a(e)&&!r(e)}return function(n){var i=CKEDITOR.env.needsBrFiller?n.is&&n.is("br"):n.getText&&o.test(n.getText());return i&&(i=n.getParent(),n=n.getNext(t),i=i.isBlockBoundary()&&(!n||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary())),!!(e^i)}},CKEDITOR.dom.walker.temp=function(e){return function(t){return t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent()),t=t&&t.hasAttribute("data-cke-temp"),!!(e^t)}};var o=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,a=CKEDITOR.dom.walker.whitespaces(),r=CKEDITOR.dom.walker.bookmark(),s=CKEDITOR.dom.walker.temp(),l=function(e){return r(e)||a(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$inline)&&!e.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(e){return function(t){return t=a(t)||r(t)||s(t),!!(e^t)}};var c=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(e){return function(t){for(var n=0,i=t.getChildCount();n<i;++n)if(!c(t.getChild(n)))return!!e;return!e}};var d=CKEDITOR.dom.walker.empty(),u=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(e){var t,n={};for(t in e)CKEDITOR.dtd[t]["#"]&&(n[t]=1);return n}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(e){return function(t){return t=!c(t)&&!!(t.type==CKEDITOR.NODE_TEXT||t.type==CKEDITOR.NODE_ELEMENT&&(t.is(CKEDITOR.dtd.$inline)||t.is("hr")||"false"==t.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&t.is(u)&&d(t))),!!(e^t)}},CKEDITOR.dom.element.prototype.getBogus=function(){var e=this;do e=e.getPreviousSourceNode();while(l(e));return!(!e||!(CKEDITOR.env.needsBrFiller?e.is&&e.is("br"):e.getText&&o.test(e.getText())))&&e}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null,this.collapsed=!0;var t=e instanceof CKEDITOR.dom.document;this.document=t?e:e.getDocument(),this.root=t?e.getBody():e},function(){function e(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset}function t(e,t,n,i,o){function a(e,t,n,i){var a=n?e.getPrevious():e.getNext();return i&&l?a:(d||i?t.append(e.clone(!0,o),n):(e.remove(),c&&t.append(e)),a)}function r(){var e,t,n,i=Math.min(v.length,b.length);for(e=0;e<i;e++)if(t=v[e],n=b[e],!t.equals(n))return e;return e-1}function s(){var t=K-1,n=f&&m&&!p.equals(T);t<y-1||t<_-1||n?(n?e.moveToPosition(T,CKEDITOR.POSITION_BEFORE_START):_==t+1&&h?e.moveToPosition(b[t],CKEDITOR.POSITION_BEFORE_END):e.moveToPosition(b[t+1],CKEDITOR.POSITION_BEFORE_START),i&&(t=v[t+1])&&t.type==CKEDITOR.NODE_ELEMENT&&(n=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',e.document),n.insertAfter(t),t.mergeSiblings(!1),e.moveToBookmark({startNode:n}))):e.collapse(!0)}e.optimizeBookmark();var l=0===t,c=1==t,d=2==t;t=d||c;var u,h,f,m,g,E,p=e.startContainer,T=e.endContainer,C=e.startOffset,I=e.endOffset;if(d&&T.type==CKEDITOR.NODE_TEXT&&p.equals(T))p=e.document.createText(p.substring(C,I)),n.append(p);else{T.type==CKEDITOR.NODE_TEXT?d?E=!0:T=T.split(I):0<T.getChildCount()?I>=T.getChildCount()?(T=T.getChild(I-1),h=!0):T=T.getChild(I):m=h=!0,p.type==CKEDITOR.NODE_TEXT?d?g=!0:p.split(C):0<p.getChildCount()?0===C?(p=p.getChild(C),u=!0):p=p.getChild(C-1):f=u=!0;for(var O,D,R,v=p.getParents(),b=T.getParents(),K=r(),y=v.length-1,_=b.length-1,k=n,N=-1,S=K;S<=y;S++){for(D=v[S],R=D.getNext(),S!=y||D.equals(b[S])&&y<_?t&&(O=k.append(D.clone(0,o))):u?a(D,k,!1,f):g&&k.append(e.document.createText(D.substring(C)));R;){if(R.equals(b[S])){N=S;break}R=a(R,k)}k=O}for(k=n,S=K;S<=_;S++)if(n=b[S],R=n.getPrevious(),n.equals(v[S]))t&&(k=k.getChild(0));else{if(S!=_||n.equals(v[S])&&_<y?t&&(O=k.append(n.clone(0,o))):h?a(n,k,!1,m):E&&k.append(e.document.createText(n.substring(0,I))),S>N)for(;R;)R=a(R,k,!0);k=O}d||s()}}function n(){var e=!1,t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!0),i=CKEDITOR.dom.walker.bogus();return function(o){return!(!n(o)&&!t(o))||(i(o)&&!e?e=!0:!(o.type==CKEDITOR.NODE_TEXT&&(o.hasAscendant("pre")||CKEDITOR.tools.trim(o.getText()).length)||o.type==CKEDITOR.NODE_ELEMENT&&!o.is(a)))}}function i(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(1);return function(i){return!(!n(i)&&!t(i))||(!e&&r(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$removeEmpty))}}function o(e){return function(){var t;return this[e?"getPreviousNode":"getNextNode"](function(e){return!t&&c(e)&&(t=e),l(e)&&!(r(e)&&e.equals(t))})}}var a={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},r=CKEDITOR.dom.walker.bogus(),s=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.editable(),c=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var e=new CKEDITOR.dom.range(this.root);return e._setStartContainer(this.startContainer),e.startOffset=this.startOffset,e._setEndContainer(this.endContainer),e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(e){var n=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,2,n,!1,"undefined"==typeof e||e),n},deleteContents:function(e){this.collapsed||t(this,0,null,e)},extractContents:function(e,n){var i=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,1,i,e,"undefined"==typeof n||n),i},createBookmark:function(e){var t,n,i,o,a=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml("&nbsp;"),e&&(i="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",i+(a?"C":"S"))),a||(n=t.clone(),n.setHtml("&nbsp;"),e&&n.setAttribute("id",i+"E"),o=this.clone(),o.collapse(),o.insertNode(n)),o=this.clone(),o.collapse(!0),o.insertNode(t),n?(this.setStartAfter(t),this.setEndBefore(n)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:e?i+(a?"C":"S"):t,endNode:e?i+"E":n,serializable:e,collapsed:a}},createBookmark2:function(){function e(e){var t,i=e.container,o=e.offset;t=i;var a=o;if(t=t.type!=CKEDITOR.NODE_ELEMENT||0===a||a==t.getChildCount()?0:t.getChild(a-1).type==CKEDITOR.NODE_TEXT&&t.getChild(a).type==CKEDITOR.NODE_TEXT,t&&(i=i.getChild(o-1),o=i.getLength()),i.type==CKEDITOR.NODE_ELEMENT&&0<o){e:{for(t=i;o--;)if(a=t.getChild(o).getIndex(!0),0<=a){o=a;break e}o=-1}o+=1}if(i.type==CKEDITOR.NODE_TEXT){for(t=i,a=0;(t=t.getPrevious())&&t.type==CKEDITOR.NODE_TEXT;)a+=t.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;t=a,i.getText()?o+=t:(a=i.getPrevious(n),t?(o=t,i=a?a.getNext():i.getParent().getFirst()):(i=i.getParent(),o=a?a.getIndex(!0)+1:0))}e.container=i,e.offset=o}function t(e,t){var n=t.getCustomData("cke-fillingChar");if(n){var i=e.container;n.equals(i)&&(e.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=e.offset&&(e.offset=i.getIndex(),e.container=i.getParent()))}}var n=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(n){var i=this.collapsed,o={container:this.startContainer,offset:this.startOffset},a={container:this.endContainer,offset:this.endOffset};return n&&(e(o),t(o,this.root),i||(e(a),t(a,this.root))),{start:o.container.getAddress(n),end:i?null:a.container.getAddress(n),startOffset:o.offset,endOffset:a.offset,normalized:n,collapsed:i,is2:!0}}}(),moveToBookmark:function(e){if(e.is2){var t=this.document.getByAddress(e.start,e.normalized),n=e.startOffset,i=e.end&&this.document.getByAddress(e.end,e.normalized);e=e.endOffset,this.setStart(t,n),i?this.setEnd(i,e):this.collapse(!0)}else t=(n=e.serializable)?this.document.getById(e.startNode):e.startNode,
e=n?this.document.getById(e.endNode):e.endNode,this.setStartBefore(t),t.remove(),e?(this.setEndBefore(e),e.remove()):this.collapse(!0)},getBoundaryNodes:function(){var e,t=this.startContainer,n=this.endContainer,i=this.startOffset,o=this.endOffset;if(t.type==CKEDITOR.NODE_ELEMENT)if(e=t.getChildCount(),e>i)t=t.getChild(i);else if(1>e)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=new CKEDITOR.dom.node(t),t=t.getNextSourceNode()||t}if(n.type==CKEDITOR.NODE_ELEMENT)if(e=n.getChildCount(),e>o)n=n.getChild(o).getPreviousSourceNode(!0);else if(1>e)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n)}return t.getPosition(n)&CKEDITOR.POSITION_FOLLOWING&&(t=n),{startNode:t,endNode:n}},getCommonAncestor:function(e,t){var n=this.startContainer,i=this.endContainer,n=n.equals(i)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(i);return t&&!n.is?n.getParent():n},optimize:function(){var e=this.startContainer,t=this.startOffset;e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setStartAfter(e):this.setStartBefore(e)),e=this.endContainer,t=this.endOffset,e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setEndAfter(e):this.setEndBefore(e))},optimizeBookmark:function(){var e=this.startContainer,t=this.endContainer;e.is&&e.is("span")&&e.data("cke-bookmark")&&this.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),t&&t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setEndAt(t,CKEDITOR.POSITION_AFTER_END)},trim:function(e,t){var n=this.startContainer,i=this.startOffset,o=this.collapsed;if((!e||o)&&n&&n.type==CKEDITOR.NODE_TEXT){if(i)if(i>=n.getLength())i=n.getIndex()+1,n=n.getParent();else{var a=n.split(i),i=n.getIndex()+1,n=n.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(a,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(this.endOffset+=1)}else i=n.getIndex(),n=n.getParent();if(this.setStart(n,i),o)return void this.collapse(!0)}n=this.endContainer,i=this.endOffset,t||o||!n||n.type!=CKEDITOR.NODE_TEXT||(i?(i>=n.getLength()||n.split(i),i=n.getIndex()+1):i=n.getIndex(),n=n.getParent(),this.setEnd(n,i))},enlarge:function(e,t){function n(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")?null:e}var i=new RegExp(/[^\s\ufeff]/);switch(e){case CKEDITOR.ENLARGE_INLINE:var o=1;case CKEDITOR.ENLARGE_ELEMENT:var a=function(e,t){var n=new CKEDITOR.dom.range(m);n.setStart(e,t),n.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);var o,n=new CKEDITOR.dom.walker(n);for(n.guard=function(e){return!(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())};o=n.next();){if(o.type!=CKEDITOR.NODE_TEXT)return!1;if(h=o!=e?o.getText():o.substring(t),i.test(h))return!1}return!0};if(this.collapsed)break;var r,s,l,c,d,u,h,f=this.getCommonAncestor(),m=this.root,g=!1;u=this.startContainer;var E=this.startOffset;for(u.type==CKEDITOR.NODE_TEXT?(E&&(u=!CKEDITOR.tools.trim(u.substring(0,E)).length&&u,g=!!u),u&&((c=u.getPrevious())||(l=u.getParent()))):(E&&(c=u.getChild(E-1)||u.getLast()),c||(l=u)),l=n(l);l||c;){if(l&&!c){if(!d&&l.equals(f)&&(d=!0),o?l.isBlockBoundary():!m.contains(l))break;g&&"inline"==l.getComputedStyle("display")||(g=!1,d?r=l:this.setStartBefore(l)),c=l.getPrevious()}for(;c;)if(u=!1,c.type==CKEDITOR.NODE_COMMENT)c=c.getPrevious();else{if(c.type==CKEDITOR.NODE_TEXT)h=c.getText(),i.test(h)&&(c=null),u=/[\s\ufeff]$/.test(h);else if((c.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||t&&c.is("br"))&&!c.data("cke-bookmark"))if(g&&CKEDITOR.dtd.$removeEmpty[c.getName()]){if(h=c.getText(),i.test(h))c=null;else for(var p,E=c.$.getElementsByTagName("*"),T=0;p=E[T++];)if(!CKEDITOR.dtd.$removeEmpty[p.nodeName.toLowerCase()]){c=null;break}c&&(u=!!h.length)}else c=null;if(u&&(g?d?r=l:l&&this.setStartBefore(l):g=!0),c){if(u=c.getPrevious(),!l&&!u){l=c,c=null;break}c=u}else l=null}l&&(l=n(l.getParent()))}for(u=this.endContainer,E=this.endOffset,l=c=null,d=g=!1,u.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(u.substring(E)).length?g=!0:(g=!u.getLength(),E==u.getLength()?(c=u.getNext())||(l=u.getParent()):a(u,E)&&(l=u.getParent())):(c=u.getChild(E))||(l=u);l||c;){if(l&&!c){if(!d&&l.equals(f)&&(d=!0),o?l.isBlockBoundary():!m.contains(l))break;g&&"inline"==l.getComputedStyle("display")||(g=!1,d?s=l:l&&this.setEndAfter(l)),c=l.getNext()}for(;c;){if(u=!1,c.type==CKEDITOR.NODE_TEXT)h=c.getText(),a(c,0)||(c=null),u=/^[\s\ufeff]/.test(h);else if(c.type==CKEDITOR.NODE_ELEMENT){if((0<c.$.offsetWidth||t&&c.is("br"))&&!c.data("cke-bookmark"))if(g&&CKEDITOR.dtd.$removeEmpty[c.getName()]){if(h=c.getText(),i.test(h))c=null;else for(E=c.$.getElementsByTagName("*"),T=0;p=E[T++];)if(!CKEDITOR.dtd.$removeEmpty[p.nodeName.toLowerCase()]){c=null;break}c&&(u=!!h.length)}else c=null}else u=1;if(u&&g&&(d?s=l:this.setEndAfter(l)),c){if(u=c.getNext(),!l&&!u){l=c,c=null;break}c=u}else l=null}l&&(l=n(l.getParent()))}r&&s&&(f=r.contains(s)?s:r,this.setStartBefore(f),this.setEndAfter(f));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=new CKEDITOR.dom.range(this.root),m=this.root,l.setStartAt(m,CKEDITOR.POSITION_AFTER_START),l.setEnd(this.startContainer,this.startOffset),l=new CKEDITOR.dom.walker(l);var C,I,O=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,R=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable"))if(D){if(D.equals(e))return void(D=null)}else D=e;else if(D)return;var t=O(e);return t||(C=e),t},o=function(e){var t=R(e);return!t&&e.is&&e.is("br")&&(I=e),t};if(l.guard=R,l=l.lastBackward(),C=C||m,this.setStartAt(C,!C.is("br")&&(!l&&this.checkStartOfBlock()||l&&C.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone(),l=new CKEDITOR.dom.walker(l);var v=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark();if(l.evaluator=function(e){return!v(e)&&!b(e)},(l=l.previous())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone(),l.collapse(),l.setEndAt(m,CKEDITOR.POSITION_BEFORE_END),l=new CKEDITOR.dom.walker(l),l.guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?o:R,C=D=I=null,l=l.lastForward(),C=C||m,this.setEndAt(C,!l&&this.checkEndOfBlock()||l&&C.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),I&&this.setEndAfter(I)}},shrink:function(e,t,n){if(!this.collapsed){e=e||CKEDITOR.SHRINK_TEXT;var i=this.clone(),o=this.startContainer,a=this.endContainer,r=this.startOffset,s=this.endOffset,l=1,c=1;o&&o.type==CKEDITOR.NODE_TEXT&&(r?r>=o.getLength()?i.setStartAfter(o):(i.setStartBefore(o),l=0):i.setStartBefore(o)),a&&a.type==CKEDITOR.NODE_TEXT&&(s?s>=a.getLength()?i.setEndAfter(a):(i.setEndAfter(a),c=0):i.setEndBefore(a));var i=new CKEDITOR.dom.walker(i),d=CKEDITOR.dom.walker.bookmark();i.evaluator=function(t){return t.type==(e==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var u;return i.guard=function(t,i){return!!d(t)||!(e==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||i&&t.equals(u)||!1===n&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()||t.type==CKEDITOR.NODE_ELEMENT&&t.hasAttribute("contenteditable"))&&(i||t.type!=CKEDITOR.NODE_ELEMENT||(u=t),!0)},l&&(o=i[e==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(o,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),c&&(i.reset(),(i=i[e==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(i,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!l&&!c)}},insertNode:function(e){this.optimizeBookmark(),this.trim(!1,!0);var t=this.startContainer,n=t.getChild(this.startOffset);n?e.insertBefore(n):t.append(e),e.getParent()&&e.getParent().equals(this.endContainer)&&this.endOffset++,this.setStartBefore(e)},moveToPosition:function(e,t){this.setStartAt(e,t),this.collapse(!0)},moveToRange:function(e){this.setStart(e.startContainer,e.startOffset),this.setEnd(e.endContainer,e.endOffset)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e.type==CKEDITOR.NODE_TEXT?e.getLength():e.getChildCount())},setStart:function(t,n){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(n=t.getIndex(),t=t.getParent()),this._setStartContainer(t),this.startOffset=n,this.endContainer||(this._setEndContainer(t),this.endOffset=n),e(this)},setEnd:function(t,n){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(n=t.getIndex()+1,t=t.getParent()),this._setEndContainer(t),this.endOffset=n,this.startContainer||(this._setStartContainer(t),this.startOffset=n),e(this)},setStartAfter:function(e){this.setStart(e.getParent(),e.getIndex()+1)},setStartBefore:function(e){this.setStart(e.getParent(),e.getIndex())},setEndAfter:function(e){this.setEnd(e.getParent(),e.getIndex()+1)},setEndBefore:function(e){this.setEnd(e.getParent(),e.getIndex())},setStartAt:function(t,n){switch(n){case CKEDITOR.POSITION_AFTER_START:this.setStart(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setStart(t,t.getLength()):this.setStart(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(t)}e(this)},setEndAt:function(t,n){switch(n){case CKEDITOR.POSITION_AFTER_START:this.setEnd(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setEnd(t,t.getLength()):this.setEnd(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(t)}e(this)},fixBlock:function(e,t){var n=this.createBookmark(),i=this.document.createElement(t);this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),this.insertNode(i);var o=i.getBogus();return o&&o.remove(),i.appendBogus(),this.moveToBookmark(n),i},splitBlock:function(e,t){var n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),i=new CKEDITOR.dom.elementPath(this.endContainer,this.root),o=n.block,a=i.block,r=null;return n.blockLimit.equals(i.blockLimit)?("br"!=e&&(o||(o=this.fixBlock(!0,e),a=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),a||(a=this.fixBlock(!1,e))),n=o&&this.checkStartOfBlock(),i=a&&this.checkEndOfBlock(),this.deleteContents(),o&&o.equals(a)&&(i?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),a=null):n?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),o=null):(a=this.splitElement(o,t||!1),o.is("ul","ol")||o.appendBogus())),{previousBlock:o,nextBlock:a,wasStartOfBlock:n,wasEndOfBlock:i,elementPath:r}):null},splitElement:function(e,t){if(!this.collapsed)return null;this.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var n=this.extractContents(!1,t||!1),i=e.clone(!1,t||!1);return n.appendTo(i),i.insertAfter(e),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),i},removeEmptyBlocksAtEnd:function(){function e(e){return function(i){return!(t(i)||n(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isEmptyInlineRemoveable()||e.is("table")&&i.is("caption"))}}var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var n,i=this.createBookmark(),o=this[t?"endPath":"startPath"](),a=o.block||o.blockLimit;a&&!a.equals(o.root)&&!a.getFirst(e(a));)n=a.getParent(),this[t?"setEndAt":"setStartAt"](a,CKEDITOR.POSITION_AFTER_END),a.remove(1),a=n;this.moveToBookmark(i)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(e,t){var n=t==CKEDITOR.START,o=this.clone();return o.collapse(n),o[n?"setStartAt":"setEndAt"](e,n?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),o=new CKEDITOR.dom.walker(o),o.evaluator=i(n),o[n?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var e=this.startContainer,t=this.startOffset;return CKEDITOR.env.ie&&t&&e.type==CKEDITOR.NODE_TEXT&&(e=CKEDITOR.tools.ltrim(e.substring(0,t)),s.test(e)&&this.trim(0,1)),this.trim(),e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),t=this.clone(),t.collapse(!0),t.setStartAt(e.block||e.blockLimit,CKEDITOR.POSITION_AFTER_START),e=new CKEDITOR.dom.walker(t),e.evaluator=n(),e.checkBackward()},checkEndOfBlock:function(){var e=this.endContainer,t=this.endOffset;return CKEDITOR.env.ie&&e.type==CKEDITOR.NODE_TEXT&&(e=CKEDITOR.tools.rtrim(e.substring(t)),s.test(e)&&this.trim(1,0)),this.trim(),e=new CKEDITOR.dom.elementPath(this.endContainer,this.root),t=this.clone(),t.collapse(!1),t.setEndAt(e.block||e.blockLimit,CKEDITOR.POSITION_BEFORE_END),e=new CKEDITOR.dom.walker(t),e.evaluator=n(),e.checkForward()},getPreviousNode:function(e,t,n){var i=this.clone();return i.collapse(1),i.setStartAt(n||this.root,CKEDITOR.POSITION_AFTER_START),n=new CKEDITOR.dom.walker(i),n.evaluator=e,n.guard=t,n.previous()},getNextNode:function(e,t,n){var i=this.clone();return i.collapse(),i.setEndAt(n||this.root,CKEDITOR.POSITION_BEFORE_END),n=new CKEDITOR.dom.walker(i),n.evaluator=e,n.guard=t,n.next()},checkReadOnly:function(){function e(e,t){for(;e;){if(e.type==CKEDITOR.NODE_ELEMENT){if("false"==e.getAttribute("contentEditable")&&!e.data("cke-editable"))return 0;if(e.is("html")||"true"==e.getAttribute("contentEditable")&&(e.contains(t)||e.equals(t)))break}e=e.getParent()}return 1}return function(){var t=this.startContainer,n=this.endContainer;return!(e(t,n)&&e(n,t))}}(),moveToElementEditablePosition:function(e,t){if(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEditable(!1))return this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var n=0;e;){if(e.type==CKEDITOR.NODE_TEXT){t&&this.endContainer&&this.checkEndOfBlock()&&s.test(e.getText())?this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),n=1;break}if(e.type==CKEDITOR.NODE_ELEMENT)if(e.isEditable())this.moveToPosition(e,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),n=1;else if(t&&e.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);else if("false"==e.getAttribute("contenteditable")&&e.is(CKEDITOR.dtd.$block))return this.setStartBefore(e),this.setEndAfter(e),!0;var i=e,o=n,a=void 0;i.type==CKEDITOR.NODE_ELEMENT&&i.isEditable(!1)&&(a=i[t?"getLast":"getFirst"](c)),o||a||(a=i[t?"getPrevious":"getNext"](c)),e=a}return!!n},moveToClosestEditablePosition:function(e,t){var n,i,o,a=0,r=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];return e?(n=new CKEDITOR.dom.range(this.root),n.moveToPosition(e,r[t?0:1])):n=this.clone(),e&&!e.is(CKEDITOR.dtd.$block)?a=1:(i=n[t?"getNextEditableNode":"getPreviousEditableNode"]())&&(a=1,(o=i.type==CKEDITOR.NODE_ELEMENT)&&i.is(CKEDITOR.dtd.$block)&&"false"==i.getAttribute("contenteditable")?(n.setStartAt(i,CKEDITOR.POSITION_BEFORE_START),n.setEndAt(i,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&o&&i.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(n.setEnd(i,0),n.collapse()):n.moveToPosition(i,r[t?1:0])),a&&this.moveToRange(n),!!a},moveToElementEditStart:function(e){return this.moveToElementEditablePosition(e)},moveToElementEditEnd:function(e){return this.moveToElementEditablePosition(e,!0)},getEnclosedNode:function(){var e=this.clone();if(e.optimize(),e.startContainer.type!=CKEDITOR.NODE_ELEMENT||e.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var e=new CKEDITOR.dom.walker(e),t=CKEDITOR.dom.walker.bookmark(!1,!0),n=CKEDITOR.dom.walker.whitespaces(!0);e.evaluator=function(e){return n(e)&&t(e)};var i=e.next();return e.reset(),i&&i.equals(e.previous())?i:null},getTouchedStartNode:function(){var e=this.startContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.startOffset)||e},getTouchedEndNode:function(){var e=this.endContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.endOffset-1)||e},getNextEditableNode:o(),getPreviousEditableNode:o(1),scrollIntoView:function(){var e,t,n,i=new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",this.document),o=this.clone();o.optimize(),(n=o.startContainer.type==CKEDITOR.NODE_TEXT)?(t=o.startContainer.getText(),e=o.startContainer.split(o.startOffset),i.insertAfter(o.startContainer)):o.insertNode(i),i.scrollIntoView(),n&&(o.startContainer.setText(t),e.remove()),i.remove()},_setStartContainer:function(e){this.startContainer=e},_setEndContainer:function(e){this.endContainer=e}}}(),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 e(e){1>arguments.length||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(e){var t=[];return e.forEach(function(e){if("true"==e.getAttribute("contenteditable"))return t.push(e),!1},CKEDITOR.NODE_ELEMENT,!0),t}function n(e,i,o,a){e:{null==a&&(a=t(o));for(var r;r=a.shift();)if(r.getDtd().p){a={element:r,remaining:a};break e}a=null}return a?(r=CKEDITOR.filter.instances[a.element.data("cke-filter")])&&!r.check(i)?n(e,i,o,a.remaining):(i=new CKEDITOR.dom.range(a.element),i.selectNodeContents(a.element),i=i.createIterator(),i.enlargeBr=e.enlargeBr,i.enforceRealBlocks=e.enforceRealBlocks,i.activeFilter=i.filter=r,e._.nestedEditable={element:a.element,container:o,remaining:a.remaining,iterator:i},1):0}function i(e,t,n){return!!t&&(e=e.clone(),e.collapse(!n),e.checkBoundaryOfElement(t,n?CKEDITOR.START:CKEDITOR.END))}var o=/^[\r\n\t ]+$/,a=CKEDITOR.dom.walker.bookmark(!1,!0),r=CKEDITOR.dom.walker.whitespaces(!0),s=function(e){return a(e)&&r(e)},l={dd:1,dt:1,li:1};e.prototype={getNextParagraph:function(e){var t,r,c,d,u;if(e=e||"p",this._.nestedEditable){if(t=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,t;if(this.activeFilter=this.filter,n(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;if(!this._.started){var h=this.range.clone();r=h.startPath();var f=h.endPath(),m=!h.collapsed&&i(h,r.block),g=!h.collapsed&&i(h,f.block,1);h.shrink(CKEDITOR.SHRINK_ELEMENT,!0),m&&h.setStartAt(r.block,CKEDITOR.POSITION_BEFORE_END),g&&h.setEndAt(f.block,CKEDITOR.POSITION_AFTER_START),r=h.endContainer.hasAscendant("pre",!0)||h.startContainer.hasAscendant("pre",!0),h.enlarge(this.forceBrBreak&&!r||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),h.collapsed||(r=new CKEDITOR.dom.walker(h.clone()),f=CKEDITOR.dom.walker.bookmark(!0,!0),r.evaluator=f,this._.nextNode=r.next(),r=new CKEDITOR.dom.walker(h.clone()),r.evaluator=f,r=r.previous(),this._.lastNode=r.getNextSourceNode(!0,null,h.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(f=this.range.clone(),f.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),f.checkEndOfBlock()&&(f=new CKEDITOR.dom.elementPath(f.endContainer,f.root),this._.lastNode=(f.block||f.blockLimit).getNextSourceNode(!0))),this._.lastNode&&h.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=h.document.createText(""),this._.lastNode.insertAfter(r)),h=null),this._.started=1,r=h}for(f=this._.nextNode,h=this._.lastNode,this._.nextNode=null;f;){var m=0,g=f.hasAscendant("pre"),E=f.type!=CKEDITOR.NODE_ELEMENT,p=0;if(E)f.type==CKEDITOR.NODE_TEXT&&o.test(f.getText())&&(E=0);else{var T=f.getName();if(CKEDITOR.dtd.$block[T]&&"false"==f.getAttribute("contenteditable")){t=f,n(this,e,t);break}if(f.isBlockBoundary(this.forceBrBreak&&!g&&{br:1})){if("br"==T)E=1;else if(!r&&!f.getChildCount()&&"hr"!=T){t=f,c=f.equals(h);break}r&&(r.setEndAt(f,CKEDITOR.POSITION_BEFORE_START),"br"!=T&&(this._.nextNode=f)),m=1}else{if(f.getFirst()){r||(r=this.range.clone(),r.setStartAt(f,CKEDITOR.POSITION_BEFORE_START)),f=f.getFirst();continue}E=1}}if(E&&!r&&(r=this.range.clone(),r.setStartAt(f,CKEDITOR.POSITION_BEFORE_START)),c=(!m||E)&&f.equals(h),r&&!m)for(;!f.getNext(s)&&!c;){if(T=f.getParent(),T.isBlockBoundary(this.forceBrBreak&&!g&&{br:1})){m=1,E=0,c||T.equals(h),r.setEndAt(T,CKEDITOR.POSITION_BEFORE_END);break}f=T,E=1,c=f.equals(h),p=1}if(E&&r.setEndAt(f,CKEDITOR.POSITION_AFTER_END),f=this._getNextSourceNode(f,p,h),(c=!f)||m&&r)break}if(!t){if(!r)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;t=new CKEDITOR.dom.elementPath(r.startContainer,r.root),f=t.blockLimit,m={div:1,th:1,td:1},t=t.block,!t&&f&&!this.enforceRealBlocks&&m[f.getName()]&&r.checkStartOfBlock()&&r.checkEndOfBlock()&&!f.equals(r.root)?t=f:!t||this.enforceRealBlocks&&t.is(l)?(t=this.range.document.createElement(e),r.extractContents().appendTo(t),t.trim(),r.insertNode(t),d=u=!0):"li"!=t.getName()?r.checkStartOfBlock()&&r.checkEndOfBlock()||(t=t.clone(!1),r.extractContents().appendTo(t),t.trim(),u=r.splitBlock(),d=!u.wasStartOfBlock,u=!u.wasEndOfBlock,r.insertNode(t)):c||(this._.nextNode=t.equals(h)?null:this._getNextSourceNode(r.getBoundaryNodes().endNode,1,h))}return d&&(d=t.getPrevious())&&d.type==CKEDITOR.NODE_ELEMENT&&("br"==d.getName()?d.remove():d.getLast()&&"br"==d.getLast().$.nodeName.toLowerCase()&&d.getLast().remove()),u&&(d=t.getLast())&&d.type==CKEDITOR.NODE_ELEMENT&&"br"==d.getName()&&(!CKEDITOR.env.needsBrFiller||d.getPrevious(a)||d.getNext(a))&&d.remove(),this._.nextNode||(this._.nextNode=c||t.equals(h)||!h?null:this._getNextSourceNode(t,1,h)),t},_getNextSourceNode:function(e,t,n){function i(e){return!(e.equals(n)||e.equals(o))}var o=this.range.root;for(e=e.getNextSourceNode(t,null,i);!a(e);)e=e.getNextSourceNode(t,null,i);return e}},CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,t){this.uiItems=[],this.exec=function(n){return!(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())&&(this.editorFocus&&e.focus(),!1===this.fire("exec")||!1!==t.exec.call(this,e,n))},this.refresh=function(e,n){return!(this.readOnly||!e.readOnly)||(this.context&&!n.isContextFor(this.context)||!this.checkAllowed(!0)?(this.disable(),!0):(this.startDisabled||this.enable(),this.modes&&!this.modes[e.mode]&&this.disable(),!1===this.fire("refresh",{editor:e,path:n})||t.refresh&&!1!==t.refresh.apply(this,arguments)))};var n;this.checkAllowed=function(t){return t||"boolean"!=typeof n?n=e.activeFilter.checkFeature(this):n},CKEDITOR.tools.extend(this,t,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!t.context,state:CKEDITOR.TRISTATE_DISABLED}),CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){return!(this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())&&(this.previousState=this.state,this.state=e,this.fire("state"),!0)},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1e4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function e(e,t,n,i,o){var a,s;e=[];for(a in t){s=t[a],s="boolean"==typeof s?{}:"function"==typeof s?{match:s}:y(s),"$"!=a.charAt(0)&&(s.elements=a),n&&(s.featureName=n.toLowerCase());var l=s;l.elements=r(l.elements,/\s+/)||null,l.propertiesOnly=l.propertiesOnly||!0===l.elements;var c=/\s*,\s*/,d=void 0;for(d in S){l[d]=r(l[d],c)||null;var u=l,h=w[d],f=r(l[w[d]],c),m=l[d],g=[],E=!0,T=void 0;f?E=!1:f={};for(T in m)"!"==T.charAt(0)&&(T=T.slice(1),g.push(T),f[T]=!0,E=!1);for(;T=g.pop();)m[T]=m["!"+T],delete m["!"+T];u[h]=!E&&f||null}l.match=l.match||null,i.push(s),e.push(s)}t=o.elements,o=o.generic;var C;for(n=0,i=e.length;n<i;++n){a=y(e[n]),s=!0===a.classes||!0===a.styles||!0===a.attributes,l=a,d=h=c=void 0;for(c in S)l[c]=p(l[c]);u=!0;for(d in w){c=w[d],h=l[c],f=[],m=void 0;for(m in h)-1<m.indexOf("*")?f.push(new RegExp("^"+m.replace(/\*/g,".*")+"$")):f.push(m);h=f,h.length&&(l[c]=h,u=!1)}if(l.nothingRequired=u,l.noProperties=!(l.attributes||l.classes||l.styles),!0===a.elements||null===a.elements)o[s?"unshift":"push"](a);else for(C in l=a.elements,delete a.elements,l)t[C]?t[C][s?"unshift":"push"](a):t[C]=[a]}}function t(e,t,i,o){if((!e.match||e.match(t))&&(o||s(e,t))&&(e.propertiesOnly||(i.valid=!0),i.allAttributes||(i.allAttributes=n(e.attributes,t.attributes,i.validAttributes)),i.allStyles||(i.allStyles=n(e.styles,t.styles,i.validStyles)),!i.allClasses)){if(e=e.classes,t=t.classes,o=i.validClasses,e)if(!0===e)e=!0;else{for(var a,r=0,l=t.length;r<l;++r)a=t[r],o[a]||(o[a]=e(a));e=!1}else e=!1;i.allClasses=e}}function n(e,t,n){if(!e)return!1;if(!0===e)return!0;for(var i in t)n[i]||(n[i]=e(i));return!1}function i(e,t,n){if(!e.match||e.match(t)){if(e.noProperties)return!1;if(n.hadInvalidAttribute=o(e.attributes,t.attributes)||n.hadInvalidAttribute,n.hadInvalidStyle=o(e.styles,t.styles)||n.hadInvalidStyle,e=e.classes,t=t.classes,e){for(var i=!1,a=!0===e,r=t.length;r--;)(a||e(t[r]))&&(t.splice(r,1),i=!0);e=i}else e=!1;n.hadInvalidClass=e||n.hadInvalidClass}}function o(e,t){if(!e)return!1;var n,i=!1,o=!0===e;for(n in t)(o||e(n))&&(delete t[n],i=!0);return i}function a(e,t,n){return!(e.disabled||e.customConfig&&!n||!t)&&(e._.cachedChecks={},!0)}function r(e,t){if(!e)return!1;if(!0===e)return e;if("string"==typeof e)return e=_(e),"*"==e||CKEDITOR.tools.convertArrayToObject(e.split(t));if(CKEDITOR.tools.isArray(e))return!!e.length&&CKEDITOR.tools.convertArrayToObject(e);var n,i={},o=0;for(n in e)i[n]=e[n],o++;return!!o&&i}function s(e,t){if(e.nothingRequired)return!0;var n,i,o,a;if(o=e.requiredClasses)for(a=t.classes,n=0;n<o.length;++n)if(i=o[n],"string"==typeof i){if(-1==CKEDITOR.tools.indexOf(a,i))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(a,i))return!1;return l(t.styles,e.requiredStyles)&&l(t.attributes,e.requiredAttributes)}function l(e,t){if(!t)return!0;for(var n,i=0;i<t.length;++i)if(n=t[i],"string"==typeof n){if(!(n in e))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(e,n))return!1;return!0}function c(e){if(!e)return{};e=e.split(/\s*,\s*/).sort();for(var t={};e.length;)t[e.shift()]="cke-test";return t}function d(e){var t,n,i,o,a={},r=1;for(e=_(e);t=e.match(x);)(n=t[2])?(i=u(n,"styles"),o=u(n,"attrs"),n=u(n,"classes")):i=o=n=null,a["$"+r++]={elements:t[1],classes:n,styles:i,attributes:o},e=e.slice(t[0].length);return a}function u(e,t){var n=e.match(A[t]);return n?_(n[1]):null}function h(e){var t=e.styleBackup=e.attributes.style,n=e.classBackup=e.attributes["class"];e.styles||(e.styles=CKEDITOR.tools.parseCssText(t||"",1)),e.classes||(e.classes=n?n.split(/\s+/):[])}function f(e,n,o,a){var r,s=0;if(a.toHtml&&(n.name=n.name.replace(L,"$1")),a.doCallbacks&&e.elementCallbacks){e:{r=e.elementCallbacks;for(var l,c=0,d=r.length;c<d;++c)if(l=r[c](n)){r=l;break e}r=void 0}if(r)return r}if(a.doTransform&&(r=e._.transformations[n.name])){for(h(n),c=0;c<r.length;++c)O(e,n,r[c]);g(n)}if(a.doFilter){e:{c=n.name,d=e._,e=d.allowedRules.elements[c],r=d.allowedRules.generic,c=d.disallowedRules.elements[c],d=d.disallowedRules.generic,l=a.skipRequired;var u,f,m={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1};if(e||r){if(h(n),c)for(u=0,f=c.length;u<f;++u)if(!1===i(c[u],n,m)){e=null;break e}if(d)for(u=0,f=d.length;u<f;++u)i(d[u],n,m);if(e)for(u=0,f=e.length;u<f;++u)t(e[u],n,m,l);if(r)for(u=0,f=r.length;u<f;++u)t(r[u],n,m,l);e=m}else e=null}if(!e||!e.valid)return o.push(n),1;f=e.validAttributes;var p=e.validStyles;r=e.validClasses;var c=n.attributes,T=n.styles,d=n.classes;l=n.classBackup;var C,I,D=n.styleBackup,R=[],m=[],v=/^data-cke-/;if(u=!1,delete c.style,delete c["class"],delete n.classBackup,delete n.styleBackup,!e.allAttributes)for(C in c)f[C]||(v.test(C)?C==(I=C.replace(/^data-cke-saved-/,""))||f[I]||(delete c[C],u=!0):(delete c[C],u=!0));if(!e.allStyles||e.hadInvalidStyle){for(C in T)e.allStyles||p[C]?R.push(C+":"+T[C]):u=!0;R.length&&(c.style=R.sort().join("; "))}else D&&(c.style=D);if(!e.allClasses||e.hadInvalidClass){for(C=0;C<d.length;++C)(e.allClasses||r[d[C]])&&m.push(d[C]);m.length&&(c["class"]=m.sort().join(" ")),l&&m.length<l.split(/\s+/).length&&(u=!0)}else l&&(c["class"]=l);if(u&&(s=1),!a.skipFinalValidation&&!E(n))return o.push(n),1}return a.toHtml&&(n.name=n.name.replace(B,"cke:$1")),s}function m(e){var t,n=[];for(t in e)-1<t.indexOf("*")&&n.push(t.replace(/\*/g,".*"));return n.length?new RegExp("^(?:"+n.join("|")+")$"):null}function g(e){var t,n=e.attributes;delete n.style,delete n["class"],(t=CKEDITOR.tools.writeCssText(e.styles,!0))&&(n.style=t),e.classes.length&&(n["class"]=e.classes.sort().join(" "))}function E(e){switch(e.name){case"a":if(!(e.children.length||e.attributes.name||e.attributes.id))return!1;break;case"img":if(!e.attributes.src)return!1}return!0}function p(e){if(!e)return!1;if(!0===e)return!0;var t=m(e);return function(n){return n in e||t&&n.match(t)}}function T(){return new CKEDITOR.htmlParser.element("br")}function C(e){return e.type==CKEDITOR.NODE_ELEMENT&&("br"==e.name||K.$block[e.name])}function I(e,t,n){var i=e.name;if(K.$empty[i]||!e.children.length)"hr"==i&&"br"==t?e.replaceWith(T()):(e.parent&&n.push({check:"it",el:e.parent}),e.remove());else if(K.$block[i]||"tr"==i)if("br"==t)e.previous&&!C(e.previous)&&(t=T(),t.insertBefore(e)),e.next&&!C(e.next)&&(t=T(),t.insertAfter(e)),e.replaceWithChildren();else{var o,i=e.children;e:{o=K[t];for(var a,r=0,s=i.length;r<s;++r)if(a=i[r],a.type==CKEDITOR.NODE_ELEMENT&&!o[a.name]){o=!1;break e}o=!0}if(o)e.name=t,e.attributes={},n.push({check:"parent-down",el:e});else{o=e.parent;for(var l,c,r=o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==o.name,s=i.length;0<s;)a=i[--s],r&&(a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&K.$inline[a.name])?(l||(l=new CKEDITOR.htmlParser.element(t),l.insertAfter(e),n.push({check:"parent-down",el:l})),l.add(a,0)):(l=null,c=K[o.name]||K.span,a.insertAfter(e),o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||a.type!=CKEDITOR.NODE_ELEMENT||c[a.name]||n.push({check:"el-up",el:a}));e.remove()}}else i in{style:1,script:1}?e.remove():(e.parent&&n.push({check:"it",el:e.parent}),e.replaceWithChildren())}function O(e,t,n){var i,o;for(i=0;i<n.length;++i)if(o=n[i],!(o.check&&!e.check(o.check,!1)||o.left&&!o.left(t))){o.right(t,N);break}}function D(e,t){var n,i,o,a,r=t.getDefinition(),s=r.attributes,l=r.styles;if(e.name!=r.element)return!1;for(n in s)if("class"==n){for(r=s[n].split(/\s+/),o=e.classes.join("|");a=r.pop();)if(-1==o.indexOf(a))return!1}else if(e.attributes[n]!=s[n])return!1;for(i in l)if(e.styles[i]!=l[i])return!1;return!0}function R(e,t){var n,i;return"string"==typeof e?n=e:e instanceof CKEDITOR.style?i=e:(n=e[0],i=e[1]),[{element:n,left:i,right:function(e,n){n.transform(e,t)}}]}function v(e){return function(t){return D(t,e)}}function b(e){return function(t,n){n[e](t)}}var K=CKEDITOR.dtd,y=CKEDITOR.tools.copy,_=CKEDITOR.tools.trim,k=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2,CKEDITOR.filter=function(e){if(this.allowedContent=[],this.disallowedContent=[],this.elementCallbacks=null,this.disabled=!1,this.editor=null,this.id=CKEDITOR.tools.getNextNumber(),this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}},CKEDITOR.filter.instances[this.id]=this,e instanceof CKEDITOR.editor){e=this.editor=e,this.customConfig=!0;var t=e.config.allowedContent;!0===t?this.disabled=!0:(t||(this.customConfig=!1),this.allow(t,"config",1),this.allow(e.config.extraAllowedContent,"extra",1),
this.allow(k[e.enterMode]+" "+k[e.shiftEnterMode],"default",1),this.disallow(e.config.disallowedContent))}else this.customConfig=!1,this.allow(e,"default",1)},CKEDITOR.filter.instances={},CKEDITOR.filter.prototype={allow:function(t,n,i){if(!a(this,t,i))return!1;var o,r;if("string"==typeof t)t=d(t);else if(t instanceof CKEDITOR.style){if(t.toAllowedContentRules)return this.allow(t.toAllowedContentRules(this.editor),n,i);o=t.getDefinition(),t={},i=o.attributes,t[o.element]=o={styles:o.styles,requiredStyles:o.styles&&CKEDITOR.tools.objectKeys(o.styles)},i&&(i=y(i),o.classes=i["class"]?i["class"].split(/\s+/):null,o.requiredClasses=o.classes,delete i["class"],o.attributes=i,o.requiredAttributes=i&&CKEDITOR.tools.objectKeys(i))}else if(CKEDITOR.tools.isArray(t)){for(o=0;o<t.length;++o)r=this.allow(t[o],n,i);return r}return e(this,t,n,this.allowedContent,this._.allowedRules),!0},applyTo:function(e,t,n,i){if(this.disabled)return!1;var o,a=this,r=[],s=this.editor&&this.editor.config.protectedSource,l=!1,c={doFilter:!n,doTransform:!0,doCallbacks:!0,toHtml:t};e.forEach(function(e){if(e.type==CKEDITOR.NODE_ELEMENT){if("off"==e.attributes["data-cke-filter"])return!1;if(!t||"span"!=e.name||!~CKEDITOR.tools.objectKeys(e.attributes).join("|").indexOf("data-cke-"))if(o=f(a,e,r,c),1&o)l=!0;else if(2&o)return!1}else if(e.type==CKEDITOR.NODE_COMMENT&&e.value.match(/^\{cke_protected\}(?!\{C\})/)){var n;e:{var i=decodeURIComponent(e.value.replace(/^\{cke_protected\}/,""));n=[];var d,u,h;if(s)for(u=0;u<s.length;++u)if((h=i.match(s[u]))&&h[0].length==i.length){n=!0;break e}i=CKEDITOR.htmlParser.fragment.fromHtml(i),1==i.children.length&&(d=i.children[0]).type==CKEDITOR.NODE_ELEMENT&&f(a,d,n,c),n=!n.length}n||r.push(e)}},null,!0),r.length&&(l=!0);var d;e=[],i=k[i||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var u;n=r.pop();)n.type==CKEDITOR.NODE_ELEMENT?I(n,i,e):n.remove();for(;d=e.pop();)if(n=d.el,n.parent)switch(u=K[n.parent.name]||K.span,d.check){case"it":K.$removeEmpty[n.name]&&!n.children.length?I(n,i,e):E(n)||I(n,i,e);break;case"el-up":n.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||u[n.name]||I(n,i,e);break;case"parent-down":n.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||u[n.name]||I(n.parent,i,e)}return l},checkFeature:function(e){return!(!this.disabled&&e)||(e.toFeature&&(e=e.toFeature(this.editor)),!e.requiredContent||this.check(e.requiredContent))},disable:function(){this.disabled=!0},disallow:function(t){return!!a(this,t,!0)&&("string"==typeof t&&(t=d(t)),e(this,t,null,this.disallowedContent,this._.disallowedRules),!0)},addContentForms:function(e){if(!this.disabled&&e){var t,n,i,o=[];for(t=0;t<e.length&&!i;++t)n=e[t],("string"==typeof n||n instanceof CKEDITOR.style)&&this.check(n)&&(i=n);if(i){for(t=0;t<e.length;++t)o.push(R(e[t],i));this.addTransformations(o)}}},addElementCallback:function(e){this.elementCallbacks||(this.elementCallbacks=[]),this.elementCallbacks.push(e)},addFeature:function(e){return!(!this.disabled&&e)||(e.toFeature&&(e=e.toFeature(this.editor)),this.allow(e.allowedContent,e.name),this.addTransformations(e.contentTransformations),this.addContentForms(e.contentForms),!e.requiredContent||!this.customConfig&&!this.disallowedContent.length||this.check(e.requiredContent))},addTransformations:function(e){var t,n;if(!this.disabled&&e){var i,o=this._.transformations;for(i=0;i<e.length;++i){t=e[i];var a=void 0,r=void 0,s=void 0,l=void 0,c=void 0,d=void 0;for(n=[],r=0;r<t.length;++r)s=t[r],"string"==typeof s?(s=s.split(/\s*:\s*/),l=s[0],c=null,d=s[1]):(l=s.check,c=s.left,d=s.right),a||(a=s,a=a.element?a.element:l?l.match(/^([a-z0-9]+)/i)[0]:a.left.getDefinition().element),c instanceof CKEDITOR.style&&(c=v(c)),n.push({check:l==a?null:l,left:c,right:"string"==typeof d?b(d):d});t=a,o[t]||(o[t]=[]),o[t].push(n)}}},check:function(e,t,n){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(e)){for(var i=e.length;i--;)if(this.check(e[i],t,n))return!0;return!1}var o,a;if("string"==typeof e){if(a=e+"<"+(!1===t?"0":"1")+(n?"1":"0")+">",a in this._.cachedChecks)return this._.cachedChecks[a];i=d(e).$1,o=i.styles;var r=i.classes;i.name=i.elements,i.classes=r=r?r.split(/\s*,\s*/):[],i.styles=c(o),i.attributes=c(i.attributes),i.children=[],r.length&&(i.attributes["class"]=r.join(" ")),o&&(i.attributes.style=CKEDITOR.tools.writeCssText(i.styles)),o=i}else i=e.getDefinition(),o=i.styles,r=i.attributes||{},o&&!CKEDITOR.tools.isEmpty(o)?(o=y(o),r.style=CKEDITOR.tools.writeCssText(o,!0)):o={},o={name:i.element,attributes:r,classes:r["class"]?r["class"].split(/\s+/):[],styles:o,children:[]};var s,r=CKEDITOR.tools.clone(o),l=[];if(!1!==t&&(s=this._.transformations[o.name])){for(i=0;i<s.length;++i)O(this,o,s[i]);g(o)}return f(this,r,l,{doFilter:!0,doTransform:!1!==t,skipRequired:!n,skipFinalValidation:!n}),t=!(0<l.length)&&!!CKEDITOR.tools.objectCompare(o.attributes,r.attributes,!0),"string"==typeof e&&(this._.cachedChecks[a]=t),t},getAllowedEnterMode:function(){var e=["p","div","br"],t={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(n,i){var o,a=e.slice();if(this.check(k[n]))return n;for(i||(a=a.reverse());o=a.pop();)if(this.check(o))return t[o];return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id],delete this._,delete this.allowedContent,delete this.disallowedContent}};var N,S={styles:1,attributes:1,classes:1},w={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},x=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,A={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},L=/^cke:(object|embed|param)$/,B=/^(object|embed|param)$/;N=CKEDITOR.filter.transformationsTools={sizeToStyle:function(e){this.lengthToStyle(e,"width"),this.lengthToStyle(e,"height")},sizeToAttribute:function(e){this.lengthToAttribute(e,"width"),this.lengthToAttribute(e,"height")},lengthToStyle:function(e,t,n){if(n=n||t,!(n in e.styles)){var i=e.attributes[t];i&&(/^\d+$/.test(i)&&(i+="px"),e.styles[n]=i)}delete e.attributes[t]},lengthToAttribute:function(e,t,n){if(n=n||t,!(n in e.attributes)){var i=e.styles[t],o=i&&i.match(/^(\d+)(?:\.\d*)?px$/);o?e.attributes[n]=o[1]:"cke-test"==i&&(e.attributes[n]="cke-test")}delete e.styles[t]},alignmentToStyle:function(e){if(!("float"in e.styles)){var t=e.attributes.align;"left"!=t&&"right"!=t||(e.styles["float"]=t)}delete e.attributes.align},alignmentToAttribute:function(e){if(!("align"in e.attributes)){var t=e.styles["float"];"left"!=t&&"right"!=t||(e.attributes.align=t)}delete e.styles["float"]},matchesStyle:D,transform:function(e,t){if("string"==typeof t)e.name=t;else{var n,i,o,a,r=t.getDefinition(),s=r.styles,l=r.attributes;e.name=r.element;for(n in l)if("class"==n)for(r=e.classes.join("|"),o=l[n].split(/\s+/);a=o.pop();)-1==r.indexOf(a)&&e.classes.push(a);else e.attributes[n]=l[n];for(i in s)e.styles[i]=s[i]}}}}(),function(){CKEDITOR.focusManager=function(e){return e.focusManager?e.focusManager:(this.hasFocus=!1,this.currentActive=null,this._={editor:e},this)},CKEDITOR.focusManager._={blurDelay:200},CKEDITOR.focusManager.prototype={focus:function(e){this._.timer&&clearTimeout(this._.timer),e&&(this.currentActive=e),this.hasFocus||this._.locked||((e=CKEDITOR.currentInstance)&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(e){function t(){if(this.hasFocus){this.hasFocus=!1;var e=this._.editor.container;e&&e.removeClass("cke_focus"),this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var n=CKEDITOR.focusManager._.blurDelay;e||!n?t.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer,t.call(this)},n,this)}},add:function(e,t){var n=e.getCustomData("focusmanager");if(!n||n!=this){n&&n.remove(e);var n="focus",i="blur";t&&(CKEDITOR.env.ie?(n="focusin",i="focusout"):CKEDITOR.event.useCapture=1);var o={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(e)}};e.on(n,o.focus,this),e.on(i,o.blur,this),t&&(CKEDITOR.event.useCapture=0),e.setCustomData("focusmanager",this),e.setCustomData("focusmanager_handlers",o)}},remove:function(e){e.removeCustomData("focusmanager");var t=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",t.blur),e.removeListener("focus",t.focus)}}}(),CKEDITOR.keystrokeHandler=function(e){return e.keystrokeHandler?e.keystrokeHandler:(this.keystrokes={},this.blockedKeystrokes={},this._={editor:e},this)},function(){var e,t=function(t){t=t.data;var n=t.getKeystroke(),i=this.keystrokes[n],o=this._.editor;return e=!1===o.fire("key",{keyCode:n,domEvent:t}),e||(i&&(e=!1!==o.execCommand(i,{from:"keystrokeHandler"})),e||(e=!!this.blockedKeystrokes[n])),e&&t.preventDefault(!0),!e},n=function(t){e&&(e=!1,t.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(e){e.on("keydown",t,this),CKEDITOR.env.gecko&&CKEDITOR.env.mac&&e.on("keypress",n,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,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(e,t,n){e&&CKEDITOR.lang.languages[e]||(e=this.detect(t,e));var i=this;t=function(){i[e].dir=i.rtl[e]?"rtl":"ltr",n(e,i[e])},this[e]?t():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),t,this)},detect:function(e,t){var n=this.languages;t=t||navigator.userLanguage||navigator.language||e;var i=t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=i[1],i=i[2];return n[o+"-"+i]?o=o+"-"+i:n[o]||(o=null),CKEDITOR.lang.detect=o?function(){return o}:function(e){return e},o||e}}}(),CKEDITOR.scriptLoader=function(){var e={},t={};return{load:function(n,i,o,a){var r="string"==typeof n;r&&(n=[n]),o||(o=CKEDITOR);var s=n.length,l=[],c=[],d=function(e){i&&(r?i.call(o,e):i.call(o,l,c))};if(0===s)d(!0);else{var u=function(e,t){(t?l:c).push(e),0>=--s&&(a&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),d(t))},h=function(n,i){e[n]=1;var o=t[n];delete t[n];for(var a=0;a<o.length;a++)o[a](n,i)},f=function(n){if(e[n])u(n,!0);else{var o=t[n]||(t[n]=[]);if(o.push(u),!(1<o.length)){var a=new CKEDITOR.dom.element("script");a.setAttributes({type:"text/javascript",src:n}),i&&(CKEDITOR.env.ie&&8>=CKEDITOR.env.version?a.$.onreadystatechange=function(){"loaded"!=a.$.readyState&&"complete"!=a.$.readyState||(a.$.onreadystatechange=null,h(n,!0))}:(a.$.onload=function(){setTimeout(function(){h(n,!0)},0)},a.$.onerror=function(){h(n,!1)})),a.appendTo(CKEDITOR.document.getHead())}}};a&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var m=0;m<s;m++)f(n[m])}},queue:function(){function e(){var e;(e=t[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var t=[];return function(n,i){var o=this;t.push({scriptUrl:n,callback:function(){i&&i.apply(this,arguments),t.shift(),e.call(o)}}),1==t.length&&e.call(this)}}()}}(),CKEDITOR.resourceManager=function(e,t){this.basePath=e,this.fileName=t,this.registered={},this.loaded={},this.externals={},this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(e,t){if(this.registered[e])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.');var n=this.registered[e]=t||{};return n.name=e,n.path=this.getPath(e),CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",n),this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(t&&t.dir||this.basePath+e+"/")},getFilePath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+(t?t.file:this.fileName+".js"))},addExternal:function(e,t,n){e=e.split(",");for(var i=0;i<e.length;i++){var o=e[i];n||(t=t.replace(/[^\/]+$/,function(e){return n=e,""})),this.externals[o]={dir:t,file:n||this.fileName+".js"}}},load:function(e,t,n){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var i=this.loaded,o=this.registered,a=[],r={},s={},l=0;l<e.length;l++){var c=e[l];if(c)if(i[c]||o[c])s[c]=this.get(c);else{var d=this.getFilePath(c);a.push(d),d in r||(r[d]=[]),r[d].push(c)}}CKEDITOR.scriptLoader.load(a,function(e,o){if(o.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+r[o[0]].join(",")+'" was not found at "'+o[0]+'".');for(var a=0;a<e.length;a++)for(var l=r[e[a]],c=0;c<l.length;c++){var d=l[c];s[d]=this.get(d),i[d]=1}t.call(n,s)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(e){var t={};return function(n,i,o){var a={},r=function(n){e.call(this,n,function(e){CKEDITOR.tools.extend(a,e);var n,s=[];for(n in e){var l=e[n],c=l&&l.requires;if(!t[n]){if(l.icons)for(var d=l.icons.split(","),u=d.length;u--;)CKEDITOR.skin.addIcon(d[u],l.path+"icons/"+(CKEDITOR.env.hidpi&&l.hidpi?"hidpi/":"")+d[u]+".png");t[n]=1}if(c)for(c.split&&(c=c.split(",")),l=0;l<c.length;l++)a[c[l]]||s.push(c[l])}if(s.length)r.call(this,s);else{for(n in a)l=a[n],l.onLoad&&!l.onLoad._called&&(!1===l.onLoad()&&delete a[n],l.onLoad._called=1);i&&i.call(o||window,a)}},this)};r.call(this,n)}}),CKEDITOR.plugins.setLang=function(e,t,n){var i=this.get(e);e=i.langEntries||(i.langEntries={}),i=i.lang||(i.lang=[]),i.split&&(i=i.split(",")),-1==CKEDITOR.tools.indexOf(i,t)&&i.push(t),e[t]=n},CKEDITOR.ui=function(e){return e.ui?e.ui:(this.items={},this.instances={},this.editor=e,this._={handlers:{}},this)},CKEDITOR.ui.prototype={add:function(e,t,n){n.name=e.toLowerCase();var i=this.items[e]={type:t,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(i,n)},get:function(e){return this.instances[e]},create:function(e){var t=this.items[e],n=t&&this._.handlers[t.type],i=t&&t.command&&this.editor.getCommand(t.command),n=n&&n.create.apply(this,t.args);return this.instances[e]=n,i&&i.uiItems.push(n),n&&!n.type&&(n.type=t.type),n},addHandler:function(e,t){this._.handlers[e]=t},space:function(e){return CKEDITOR.document.getById(this.spaceId(e))},spaceId:function(e){return this.editor.id+"_"+e}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function e(e,o,r){if(CKEDITOR.event.call(this),e=e&&CKEDITOR.tools.clone(e),void 0!==o){if(!(o instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!r)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!n(o,r))throw Error('The specified element mode is not supported on element: "'+o.getName()+'".');this.element=o,this.elementMode=r,this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(o.getId()||o.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={},this.commands={},this.templates={},this.name=this.name||t(),this.id=CKEDITOR.tools.getNextId(),this.status="unloaded",this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config),this.ui=new CKEDITOR.ui(this),this.focusManager=new CKEDITOR.focusManager(this),this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this),this.on("readOnly",i),this.on("selectionChange",function(e){a(this,e.data.path)}),this.on("activeFilterChange",function(){a(this,this.elementPath(),!0)}),this.on("mode",i),this.on("instanceReady",function(){this.config.startupFocus&&this.focus()}),CKEDITOR.fire("instanceCreated",null,this),CKEDITOR.add(this),CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?s(this,e):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function t(){do var e="editor"+ ++f;while(CKEDITOR.instances[e]);return e}function n(e,t){return t==CKEDITOR.ELEMENT_MODE_INLINE?e.is(CKEDITOR.dtd.$editable)||e.is("textarea"):t==CKEDITOR.ELEMENT_MODE_REPLACE?!e.is(CKEDITOR.dtd.$nonBodyContent):1}function i(){var e,t=this.commands;for(e in t)o(this,t[e])}function o(e,t){t[t.startDisabled?"disable":e.readOnly&&!t.readOnly?"disable":t.modes[e.mode]?"enable":"disable"]()}function a(e,t,n){if(t){var i,o,a=e.commands;for(o in a)i=a[o],(n||i.contextSensitive)&&i.refresh(e,t)}}function r(e){var t=e.config.customConfig;if(!t)return!1;var t=CKEDITOR.getUrl(t),n=m[t]||(m[t]={});return n.fn?(n.fn.call(e,e.config),CKEDITOR.getUrl(e.config.customConfig)!=t&&r(e)||e.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(t,function(){n.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){},r(e)}),!0}function s(e,t){e.on("customConfigLoaded",function(){if(t){if(t.on)for(var n in t.on)e.on(n,t.on[n]);CKEDITOR.tools.extend(e.config,t,!0),delete e.config.on}n=e.config,e.readOnly=!!n.readOnly||(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.element.is("textarea")?e.element.hasAttribute("disabled")||e.element.hasAttribute("readonly"):e.element.isReadOnly():e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.element.hasAttribute("disabled")||e.element.hasAttribute("readonly"))),e.blockless=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!(e.element.is("textarea")||CKEDITOR.dtd[e.element.getName()].p),e.tabIndex=n.tabIndex||e.element&&e.element.getAttribute("tabindex")||0,e.activeEnterMode=e.enterMode=e.blockless?CKEDITOR.ENTER_BR:n.enterMode,e.activeShiftEnterMode=e.shiftEnterMode=e.blockless?CKEDITOR.ENTER_BR:n.shiftEnterMode,n.skin&&(CKEDITOR.skinName=n.skin),e.fireOnce("configLoaded"),e.dataProcessor=new CKEDITOR.htmlDataProcessor(e),e.filter=e.activeFilter=new CKEDITOR.filter(e),l(e)}),t&&null!=t.customConfig&&(e.config.customConfig=t.customConfig),r(e)||e.fireOnce("customConfigLoaded")}function l(e){CKEDITOR.skin.loadPart("editor",function(){c(e)})}function c(e){CKEDITOR.lang.load(e.config.language,e.config.defaultLanguage,function(t,n){var i=e.config.title;e.langCode=t,e.lang=CKEDITOR.tools.prototypedCopy(n),e.title="string"==typeof i||!1===i?i:[e.lang.editor,e.name].join(", "),e.config.contentsLangDirection||(e.config.contentsLangDirection=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.element.getDirection(1):e.lang.dir),e.fire("langLoaded"),d(e)})}function d(e){e.getStylesSet(function(t){e.once("loaded",function(){e.fire("stylesSet",{styles:t})},null,null,1),u(e)})}function u(e){var t=e.config,n=t.plugins,i=t.extraPlugins,o=t.removePlugins;if(i)var a=new RegExp("(?:^|,)(?:"+i.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),n=n.replace(a,""),n=n+(","+i);if(o)var r=new RegExp("(?:^|,)(?:"+o.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),n=n.replace(r,"");CKEDITOR.env.air&&(n+=",adobeair"),CKEDITOR.plugins.load(n.split(","),function(n){var i=[],o=[],a=[];e.plugins=n;for(var s in n){var l,c=n[s],d=c.lang,u=null,h=c.requires;if(CKEDITOR.tools.isArray(h)&&(h=h.join(",")),h&&(l=h.match(r)))for(;h=l.pop();)CKEDITOR.error("editor-plugin-required",{plugin:h.replace(",",""),requiredBy:s});d&&!e.lang[s]&&(d.split&&(d=d.split(",")),0<=CKEDITOR.tools.indexOf(d,e.langCode)?u=e.langCode:(u=e.langCode.replace(/-.*/,""),u=u!=e.langCode&&0<=CKEDITOR.tools.indexOf(d,u)?u:0<=CKEDITOR.tools.indexOf(d,"en")?"en":d[0]),c.langEntries&&c.langEntries[u]?(e.lang[s]=c.langEntries[u],u=null):a.push(CKEDITOR.getUrl(c.path+"lang/"+u+".js"))),o.push(u),i.push(c)}CKEDITOR.scriptLoader.load(a,function(){for(var n=["beforeInit","init","afterInit"],a=0;a<n.length;a++)for(var r=0;r<i.length;r++){var s=i[r];0===a&&o[r]&&s.lang&&s.langEntries&&(e.lang[s.name]=s.langEntries[o[r]]),s[n[a]]&&s[n[a]](e)}for(e.fireOnce("pluginsLoaded"),t.keystrokes&&e.setKeystroke(e.config.keystrokes),r=0;r<e.config.blockedKeystrokes.length;r++)e.keystrokeHandler.blockedKeystrokes[e.config.blockedKeystrokes[r]]=1;e.status="loaded",e.fireOnce("loaded"),CKEDITOR.fire("instanceLoaded",null,e)})})}function h(){var e=this.element;if(e&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var t=this.getData();return this.config.htmlEncodeOutput&&(t=CKEDITOR.tools.htmlEncode(t)),e.is("textarea")?e.setValue(t):e.setHtml(t),!0}return!1}e.prototype=CKEDITOR.editor.prototype,CKEDITOR.editor=e;var f=0,m={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(e,t){t.name=e.toLowerCase();var n=new CKEDITOR.command(this,t);return this.mode&&o(this,n),this.commands[e]=n},_attachToForm:function(){function e(e){n.updateElement(),n._.required&&!i.getValue()&&!1===n.fire("required")&&e.data.preventDefault()}function t(e){return!!(e&&e.call&&e.apply)}var n=this,i=n.element,o=new CKEDITOR.dom.element(i.$.form);i.is("textarea")&&o&&(o.on("submit",e),t(o.$.submit)&&(o.$.submit=CKEDITOR.tools.override(o.$.submit,function(t){return function(){e(),t.apply?t.apply(this):t()}})),n.on("destroy",function(){o.removeListener("submit",e)}))},destroy:function(e){this.fire("beforeDestroy"),!e&&h.call(this),this.editable(null),this.filter&&(this.filter.destroy(),delete this.filter),delete this.activeFilter,this.status="destroyed",this.fire("destroy"),this.removeAllListeners(),CKEDITOR.remove(this),CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(e){if(!e){if(e=this.getSelection(),!e)return null;e=e.getStartElement()}return e?new CKEDITOR.dom.elementPath(e,this.editable()):null},createRange:function(){var e=this.editable();return e?new CKEDITOR.dom.range(e):null},execCommand:function(e,t){var n=this.getCommand(e),i={name:e,commandData:t,command:n};return!(!n||n.state==CKEDITOR.TRISTATE_DISABLED||!1===this.fire("beforeCommandExec",i)||(i.returnValue=n.exec(i.commandData),n.async||!1===this.fire("afterCommandExec",i)))&&i.returnValue},getCommand:function(e){return this.commands[e]},getData:function(e){!e&&this.fire("beforeGetData");var t=this._.data;return"string"!=typeof t&&(t=(t=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?t.is("textarea")?t.getValue():t.getHtml():""),t={dataValue:t},!e&&this.fire("getData",t),t.dataValue},getSnapshot:function(){var e=this.fire("getSnapshot");return"string"!=typeof e&&(e=(e=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?e.is("textarea")?e.getValue():e.getHtml():""),e},loadSnapshot:function(e){this.fire("loadSnapshot",e)},setData:function(e,t,n){var i=!0,o=t;t&&"object"==typeof t&&(n=t.internal,o=t.callback,i=!t.noSnapshot),!n&&i&&this.fire("saveSnapshot"),!o&&n||this.once("dataReady",function(e){!n&&i&&this.fire("saveSnapshot"),o&&o.call(e.editor)}),e={dataValue:e},!n&&this.fire("setData",e),this._.data=e.dataValue,!n&&this.fire("afterSetData",e)},setReadOnly:function(e){e=null==e||e,this.readOnly!=e&&(this.readOnly=e,this.keystrokeHandler.blockedKeystrokes[8]=+e,this.editable().setReadOnly(e),this.fire("readOnly"))},insertHtml:function(e,t,n){this.fire("insertHtml",{dataValue:e,mode:t,range:n})},insertText:function(e){this.fire("insertText",e)},insertElement:function(e){this.fire("insertElement",e)},getSelectedHtml:function(e){var t=this.editable(),n=this.getSelection(),n=n&&n.getRanges();if(!t||!n||0===n.length)return null;for(var i,o,a,r=new CKEDITOR.dom.documentFragment,s=0;s<n.length;s++){var l=n[s],c=l.startContainer;c.getName&&"tr"==c.getName()?(i||(i=c.getAscendant("table").clone(),i.append(c.getAscendant("tbody").clone()),r.append(i),i=i.findOne("tbody")),o&&o.equals(c)||(o=c,a=c.clone(),i.append(a)),a.append(l.cloneContents())):r.append(l.cloneContents())}return t=i?r:t.getHtmlFromRange(n[0]),e?t.getHtml():t},extractSelectedHtml:function(e,t){var n=this.editable(),i=this.getSelection().getRanges();return n&&0!==i.length?(i=i[0],n=n.extractHtmlFromRange(i,t),t||this.getSelection().selectRanges([i]),e?n.getHtml():n):null},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return h.call(this)},setKeystroke:function(){for(var e,t,n=this.keystrokeHandler.keystrokes,i=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],o=i.length;o--;)e=i[o],t=0,CKEDITOR.tools.isArray(e)&&(t=e[1],e=e[0]),t?n[e]=t:delete n[e]},addFeature:function(e){return this.filter.addFeature(e)},setActiveFilter:function(e){e||(e=this.filter),this.activeFilter!==e&&(this.activeFilter=e,this.fire("activeFilterChange"),e===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(e.getAllowedEnterMode(this.enterMode),e.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(e,t){e=e?this.blockless?CKEDITOR.ENTER_BR:e:this.enterMode,t=t?this.blockless?CKEDITOR.ENTER_BR:t:this.shiftEnterMode,this.activeEnterMode==e&&this.activeShiftEnterMode==t||(this.activeEnterMode=e,this.activeShiftEnterMode=t,this.fire("activeEnterModeChange"))},showNotification:function(e){alert(e)}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var e=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,t={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(n){for(var i,o,a,r=0;i=this._.htmlPartsRegex.exec(n);)if(o=i.index,o>r&&(r=n.substring(r,o),a?a.push(r):this.onText(r)),r=this._.htmlPartsRegex.lastIndex,!(o=i[1])||(o=o.toLowerCase(),a&&CKEDITOR.dtd.$cdata[o]&&(this.onCDATA(a.join("")),a=null),a))if(a)a.push(i[0]);else if(o=i[3]){if(o=o.toLowerCase(),!/="/.test(o)){var s,l={},c=i[4];if(i=!!i[5],c)for(;s=e.exec(c);){var d=s[1].toLowerCase();s=s[2]||s[3]||s[4]||"",l[d]=!s&&t[d]?d:CKEDITOR.tools.htmlDecodeAttr(s)}this.onTagOpen(o,l,i),!a&&CKEDITOR.dtd.$cdata[o]&&(a=[])}}else(o=i[2])&&this.onComment(o);else this.onTagClose(o);n.length>r&&this.onText(n.substring(r,n.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("<",e)},openTagClose:function(e,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(e,t){"string"==typeof t&&(t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){this._.output.push("</",e,">")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("<!--",e,"-->")},write:function(e){this._.output.push(e)},reset:function(){this._.output=[],this._.indent=!1},getHtml:function(e){var t=this._.output.join("");return e&&this.reset(),t}}}),function(){CKEDITOR.htmlParser.node=function(){},CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,t=CKEDITOR.tools.indexOf(e,this),n=this.previous,i=this.next;n&&(n.next=i),i&&(i.previous=n),e.splice(t,1),this.parent=null},replaceWith:function(e){var t=this.parent.children,n=CKEDITOR.tools.indexOf(t,this),i=e.previous=this.previous,o=e.next=this.next;i&&(i.next=e),o&&(o.previous=e),t[n]=e,e.parent=this.parent,this.parent=null},insertAfter:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e),i=e.next;t.splice(n+1,0,this),this.next=e.next,this.previous=e,e.next=this,i&&(i.previous=this),this.parent=e.parent},insertBefore:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e);t.splice(n,0,this),this.next=e,(this.previous=e.previous)&&(e.previous.next=this),e.previous=this,this.parent=e.parent},getAscendant:function(e){for(var t=("function"==typeof e?e:"string"==typeof e?function(t){return t.name==e}:function(t){return t.name in e}),n=this.parent;n&&n.type==CKEDITOR.NODE_ELEMENT;){if(t(n))return n;n=n.parent}return null},wrapWith:function(e){return this.replaceWith(e),e.add(this),e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}}}(),CKEDITOR.htmlParser.comment=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e,t){var n=this.value;return(n=e.onComment(t,n,this))?"string"!=typeof n?(this.replaceWith(n),!1):(this.value=n,!0):(this.remove(),!1)},writeHtml:function(e,t){t&&this.filter(t),e.comment(this.value)}}),function(){CKEDITOR.htmlParser.text=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e,t){if(!(this.value=e.onText(t,this.value,this)))return this.remove(),!1},writeHtml:function(e,t){t&&this.filter(t),e.text(this.value)}})}(),function(){CKEDITOR.htmlParser.cdata=function(e){this.value=e},CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(e){e.write(this.value)}})}(),CKEDITOR.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(e){return!e.attributes["data-cke-survive"]&&("a"==e.name&&e.attributes.href||CKEDITOR.dtd.$removeEmpty[e.name])}var t=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),n={ol:1,ul:1},i=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),o={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(a,r,s){function l(e){var t;if(0<E.length)for(var n=0;n<E.length;n++){var i=E[n],o=i.name,a=CKEDITOR.dtd[o],r=T.name&&CKEDITOR.dtd[T.name];r&&!r[o]||e&&a&&!a[e]&&CKEDITOR.dtd[e]?o==T.name&&(u(T,T.parent,1),n--):(t||(c(),t=1),i=i.clone(),i.parent=T,T=i,E.splice(n,1),n--)}}function c(){for(;p.length;)u(p.shift(),T)}function d(e){if(e._.isBlockLike&&"pre"!=e.name&&"textarea"!=e.name){var t,n=e.children.length,i=e.children[n-1];i&&i.type==CKEDITOR.NODE_TEXT&&((t=CKEDITOR.tools.rtrim(i.value))?i.value=t:e.children.length=n-1)}}function u(t,n,i){n=n||T||g;var o=T;void 0===t.previous&&(h(n,t)&&(T=n,m.onTagOpen(s,{}),t.returnPoint=n=T),d(t),e(t)&&!t.children.length||n.add(t),"pre"==t.name&&(I=!1),"textarea"==t.name&&(C=!1)),t.returnPoint?(T=t.returnPoint,delete t.returnPoint):T=i?n:o}function h(e,t){if((e==g||"body"==e.name)&&s&&(!e.name||CKEDITOR.dtd[e.name][s])){var n,i;return(n=t.attributes&&(i=t.attributes["data-cke-real-element-type"])?i:t.name)&&n in CKEDITOR.dtd.$inline&&!(n in CKEDITOR.dtd.head)&&!t.isOrphan||t.type==CKEDITOR.NODE_TEXT}}function f(e,t){return(e in CKEDITOR.dtd.$listItem||e in CKEDITOR.dtd.$tableContent)&&(e==t||"dt"==e&&"dd"==t||"dd"==e&&"dt"==t)}var m=new CKEDITOR.htmlParser,g=r instanceof CKEDITOR.htmlParser.element?r:"string"==typeof r?new CKEDITOR.htmlParser.element(r):new CKEDITOR.htmlParser.fragment,E=[],p=[],T=g,C="textarea"==g.name,I="pre"==g.name;m.onTagOpen=function(o,a,r,s){if(a=new CKEDITOR.htmlParser.element(o,a),a.isUnknown&&r&&(a.isEmpty=!0),a.isOptionalClose=s,e(a))E.push(a);else{if("pre"==o)I=!0;else{if("br"==o&&I)return void T.add(new CKEDITOR.htmlParser.text("\n"));"textarea"==o&&(C=!0)}if("br"==o)p.push(a);else{for(;s=(r=T.name)?CKEDITOR.dtd[r]||(T._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i,!(a.isUnknown||T.isUnknown||s[o]);)if(T.isOptionalClose)m.onTagClose(r);else if(o in n&&r in n)r=T.children,(r=r[r.length-1])&&"li"==r.name||u(r=new CKEDITOR.htmlParser.element("li"),T),!a.returnPoint&&(a.returnPoint=T),T=r;else if(o in CKEDITOR.dtd.$listItem&&!f(o,r))m.onTagOpen("li"==o?"ul":"dl",{},0,1);else if(r in t&&!f(o,r))!a.returnPoint&&(a.returnPoint=T),T=T.parent;else{if(r in CKEDITOR.dtd.$inline&&E.unshift(T),!T.parent){a.isOrphan=1;break}u(T,T.parent,1)}l(o),c(),a.parent=T,a.isEmpty?u(a):T=a}}},m.onTagClose=function(e){for(var t=E.length-1;0<=t;t--)if(e==E[t].name)return void E.splice(t,1);for(var n=[],i=[],o=T;o!=g&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.returnPoint||o.parent;if(o!=g){for(t=0;t<n.length;t++){var a=n[t];u(a,a.parent)}T=o,o._.isBlockLike&&c(),u(o,o.parent),o==T&&(T=T.parent),E=E.concat(i)}"body"==e&&(s=!1)},m.onText=function(e){if(T._.hasInlineStarted&&!p.length||I||C||(e=CKEDITOR.tools.ltrim(e),0!==e.length)){var n=T.name,a=n?CKEDITOR.dtd[n]||(T._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i;!C&&!a["#"]&&n in t?(m.onTagOpen(o[n]||""),m.onText(e)):(c(),l(),I||C||(e=e.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," ")),e=new CKEDITOR.htmlParser.text(e),
h(T,e)&&this.onTagOpen(s,{},0,1),T.add(e))}},m.onCDATA=function(e){T.add(new CKEDITOR.htmlParser.cdata(e))},m.onComment=function(e){c(),l(),T.add(new CKEDITOR.htmlParser.comment(e))},m.parse(a);for(c();T!=g;)u(T,T.parent,1);return d(g),g},CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(e,t){isNaN(t)&&(t=this.children.length);var n=0<t?this.children[t-1]:null;if(n){if(e._.isBlockLike&&n.type==CKEDITOR.NODE_TEXT&&(n.value=CKEDITOR.tools.rtrim(n.value),0===n.value.length))return this.children.pop(),void this.add(e);n.next=e}e.previous=n,e.parent=this,this.children.splice(t,0,e),this._.hasInlineStarted||(this._.hasInlineStarted=e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&!e._.isBlockLike)},filter:function(e,t){t=this.getFilterContext(t),e.onRoot(t,this),this.filterChildren(e,!1,t)},filterChildren:function(e,t,n){if(this.childrenFilteredBy!=e.id)for(n=this.getFilterContext(n),t&&!this.parent&&e.onRoot(n,this),this.childrenFilteredBy=e.id,t=0;t<this.children.length;t++)!1===this.children[t].filter(e,n)&&t--},writeHtml:function(e,t){t&&this.filter(t),this.writeChildrenHtml(e)},writeChildrenHtml:function(e,t,n){var i=this.getFilterContext();for(n&&!this.parent&&t&&t.onRoot(i,this),t&&this.filterChildren(t,!1,i),t=0,n=this.children,i=n.length;t<i;t++)n[t].writeHtml(e)},forEach:function(e,t,n){if(!(n||t&&this.type!=t))var i=e(this);if(!1!==i){n=this.children;for(var o=0;o<n.length;o++)i=n[o],i.type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):t&&i.type!=t||e(i)}},getFilterContext:function(e){return e||{}}}}(),function(){function e(){this.rules=[]}function t(t,n,i,o){var a,r;for(a in n)(r=t[a])||(r=t[a]=new e),r.add(n[a],i,o)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(t){this.id=CKEDITOR.tools.getNextNumber(),this.elementNameRules=new e,this.attributeNameRules=new e,this.elementsRules={},this.attributesRules={},this.textRules=new e,this.commentRules=new e,this.rootRules=new e,t&&this.addRules(t,10)},proto:{addRules:function(e,n){var i;"number"==typeof n?i=n:n&&"priority"in n&&(i=n.priority),"number"!=typeof i&&(i=10),"object"!=typeof n&&(n={}),e.elementNames&&this.elementNameRules.addMany(e.elementNames,i,n),e.attributeNames&&this.attributeNameRules.addMany(e.attributeNames,i,n),e.elements&&t(this.elementsRules,e.elements,i,n),e.attributes&&t(this.attributesRules,e.attributes,i,n),e.text&&this.textRules.add(e.text,i,n),e.comment&&this.commentRules.add(e.comment,i,n),e.root&&this.rootRules.add(e.root,i,n)},applyTo:function(e){e.filter(this)},onElementName:function(e,t){return this.elementNameRules.execOnName(e,t)},onAttributeName:function(e,t){return this.attributeNameRules.execOnName(e,t)},onText:function(e,t,n){return this.textRules.exec(e,t,n)},onComment:function(e,t,n){return this.commentRules.exec(e,t,n)},onRoot:function(e,t){return this.rootRules.exec(e,t)},onElement:function(e,t){for(var n,i=[this.elementsRules["^"],this.elementsRules[t.name],this.elementsRules.$],o=0;3>o;o++)if(n=i[o]){if(n=n.exec(e,t,this),!1===n)return null;if(n&&n!=t)return this.onNode(e,n);if(t.parent&&!t.name)break}return t},onNode:function(e,t){var n=t.type;return n==CKEDITOR.NODE_ELEMENT?this.onElement(e,t):n==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,t.value)):n==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,t.value)):null},onAttribute:function(e,t,n,i){return(n=this.attributesRules[n])?n.exec(e,i,t,this):i}}}),CKEDITOR.htmlParser.filterRulesGroup=e,e.prototype={add:function(e,t,n){this.rules.splice(this.findIndex(t),0,{value:e,priority:t,options:n})},addMany:function(e,t,n){for(var i=[this.findIndex(t),0],o=0,a=e.length;o<a;o++)i.push({value:e[o],priority:t,options:n});this.rules.splice.apply(this.rules,i)},findIndex:function(e){for(var t=this.rules,n=t.length-1;0<=n&&e<t[n].priority;)n--;return n+1},exec:function(e,t){var n,i,o,a,r=t instanceof CKEDITOR.htmlParser.node||t instanceof CKEDITOR.htmlParser.fragment,s=Array.prototype.slice.call(arguments,1),l=this.rules,c=l.length;for(a=0;a<c;a++)if(r&&(n=t.type,i=t.name),o=l[a],!(e.nonEditable&&!o.options.applyToAll||e.nestedEditable&&o.options.excludeNestedEditable)){if(o=o.value.apply(null,s),!1===o||r&&o&&(o.name!=i||o.type!=n))return o;null!=o&&(s[0]=t=o)}return t},execOnName:function(e,t){for(var n,i=0,o=this.rules,a=o.length;t&&i<a;i++)n=o[i],e.nonEditable&&!n.options.applyToAll||e.nestedEditable&&n.options.excludeNestedEditable||(t=t.replace(n.value[0],n.value[1]));return t}}}(),function(){function e(e,t){function s(e){return e||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text("\xa0"):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function l(e,t){return function(o){if(o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var r,l,d=[],u=n(o);if(u)for(c(u,1)&&d.push(u);u;)a(u)&&(r=i(u))&&c(r)&&((l=i(r))&&!a(l)?d.push(r):(s(h).insertAfter(r),r.remove())),u=u.previous;for(u=0;u<d.length;u++)d[u].remove();(d=!e||!1!==("function"==typeof t?t(o):t))&&((h||CKEDITOR.env.needsBrFiller||o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(h||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||o.name in CKEDITOR.dtd.tr||o.name in CKEDITOR.dtd.$listItem))?(d=n(o),d=!d||"form"==o.name&&"input"==d.name):d=!1),d&&o.add(s(e))}}}function c(e,t){if((!h||CKEDITOR.env.needsBrFiller)&&e.type==CKEDITOR.NODE_ELEMENT&&"br"==e.name&&!e.attributes["data-cke-eol"])return!0;var n;return!!(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(E))&&(n.index&&(new CKEDITOR.htmlParser.text(e.value.substring(0,n.index)).insertBefore(e),e.value=n[0]),!CKEDITOR.env.needsBrFiller&&h&&(!t||e.parent.name in f)||!h&&((n=e.previous)&&"br"==n.name||!n||a(n))))}var d,u={elements:{}},h="html"==t,f=CKEDITOR.tools.extend({},I);for(d in f)"#"in T[d]||delete f[d];for(d in f)u.elements[d]=l(h,e.config.fillEmptyBlocks);return u.root=l(h,!1),u.elements.br=function(e){return function(t){if(t.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var n=t.attributes;if("data-cke-bogus"in n||"data-cke-eol"in n)delete n["data-cke-bogus"];else{for(n=t.next;n&&o(n);)n=n.next;var l=i(t);!n&&a(t.parent)?r(t.parent,s(e)):a(n)&&l&&!a(l)&&s(e).insertBefore(n)}}}}(h),u}function t(e,t){return e!=CKEDITOR.ENTER_BR&&!1!==t&&(e==CKEDITOR.ENTER_DIV?"div":"p")}function n(e){for(e=e.children[e.children.length-1];e&&o(e);)e=e.previous;return e}function i(e){for(e=e.previous;e&&o(e);)e=e.previous;return e}function o(e){return e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(e.value)||e.type==CKEDITOR.NODE_ELEMENT&&e.attributes["data-cke-bookmark"]}function a(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in I||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function r(e,t){var n=e.children[e.children.length-1];e.children.push(t),t.parent=e,n&&(n.next=t,t.previous=n)}function s(e){e=e.attributes,"false"!=e.contenteditable&&(e["data-cke-editable"]=e.contenteditable?"true":1),e.contenteditable="false"}function l(e){switch(e=e.attributes,e["data-cke-editable"]){case"true":e.contenteditable="true";break;case"1":delete e.contenteditable}}function c(e){return e.replace(b,function(e,t,n){return"<"+t+n.replace(K,function(e,t){return y.test(t)&&-1==n.indexOf("data-cke-saved-"+t)?" data-cke-saved-"+e+" data-cke-"+CKEDITOR.rnd+"-"+e:e})+">"})}function d(e,t){return e.replace(t,function(e,t,n){return 0===e.indexOf("<textarea")&&(e=t+f(n).replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</textarea>"),"<cke:encoded>"+encodeURIComponent(e)+"</cke:encoded>"})}function u(e){return e.replace(N,function(e,t){return decodeURIComponent(t)})}function h(e){return e.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(e){return"<!--"+p+"{C}"+encodeURIComponent(e).replace(/--/g,"%2D%2D")+"-->"})}function f(e){return e.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(e,t){return decodeURIComponent(t)})}function m(e,t){var n=t._.dataStore;return e.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(e,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(e,t){return n&&n[t]||""})}function g(e,t){var n=[],i=t.config.protectedSource,o=t._.dataStore||(t._.dataStore={id:1}),a=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,i=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(i);e=e.replace(/\x3c!--[\s\S]*?--\x3e/g,function(e){return"<!--{cke_tempcomment}"+(n.push(e)-1)+"-->"});for(var r=0;r<i.length;r++)e=e.replace(i[r],function(e){return e=e.replace(a,function(e,t,i){return n[i]}),/cke_temp(comment)?/.test(e)?e:"<!--{cke_temp}"+(n.push(e)-1)+"-->"});return e=e.replace(a,function(e,t,i){return"<!--"+p+(t?"{C}":"")+encodeURIComponent(n[i]).replace(/--/g,"%2D%2D")+"-->"}),e=e.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(e){return e.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(e,t){return o[o.id]=decodeURIComponent(t),"{cke_protected_"+o.id++ +"}"})}),e=e.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(e,n,i,o){return"<"+n+i+">"+m(f(o),t)+"</"+n+">"})}CKEDITOR.htmlDataProcessor=function(n){var i,o,a=this;this.editor=n,this.dataFilter=i=new CKEDITOR.htmlParser.filter,this.htmlFilter=o=new CKEDITOR.htmlParser.filter,this.writer=new CKEDITOR.htmlParser.basicWriter,i.addRules(O),i.addRules(D,{applyToAll:!0}),i.addRules(e(n,"data"),{applyToAll:!0}),o.addRules(R),o.addRules(v,{applyToAll:!0}),o.addRules(e(n,"html"),{applyToAll:!0}),n.on("toHtml",function(e){e=e.data;var i,o=e.dataValue,o=g(o,n),o=d(o,k),o=c(o),o=d(o,_),o=o.replace(S,"$1cke:$2"),o=o.replace(x,"<cke:$1$2></cke:$1>"),o=o.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),o=o.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");i=e.context||n.editable().getName();var a;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==i&&(i="div",o="<pre>"+o+"</pre>",a=1),i=n.document.createElement(i),i.setHtml("a"+o),o=i.getHtml().substr(1),o=o.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),""),a&&(o=o.replace(/^<pre>|<\/pre>$/gi,"")),o=o.replace(w,"$1$2"),o=u(o),o=f(o),i=!1!==e.fixForBody&&t(e.enterMode,n.config.autoParagraph),o=CKEDITOR.htmlParser.fragment.fromHtml(o,e.context,i),i&&(a=o,!a.children.length&&CKEDITOR.dtd[a.name][i]&&(i=new CKEDITOR.htmlParser.element(i),a.add(i))),e.dataValue=o},null,null,5),n.on("toHtml",function(e){e.data.filter.applyTo(e.data.dataValue,!0,e.data.dontFilter,e.data.enterMode)&&n.fire("dataFiltered")},null,null,6),n.on("toHtml",function(e){e.data.dataValue.filterChildren(a.dataFilter,!0)},null,null,10),n.on("toHtml",function(e){e=e.data;var t=e.dataValue,n=new CKEDITOR.htmlParser.basicWriter;t.writeChildrenHtml(n),t=n.getHtml(!0),e.dataValue=h(t)},null,null,15),n.on("toDataFormat",function(e){var i=e.data.dataValue;e.data.enterMode!=CKEDITOR.ENTER_BR&&(i=i.replace(/^<br *\/?>/i,"")),e.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(i,e.data.context,t(e.data.enterMode,n.config.autoParagraph))},null,null,5),n.on("toDataFormat",function(e){e.data.dataValue.filterChildren(a.htmlFilter,!0)},null,null,10),n.on("toDataFormat",function(e){e.data.filter.applyTo(e.data.dataValue,!1,!0)},null,null,11),n.on("toDataFormat",function(e){var t=e.data.dataValue,i=a.writer;i.reset(),t.writeChildrenHtml(i),t=i.getHtml(!0),t=f(t),t=m(t,n),e.data.dataValue=t},null,null,15)},CKEDITOR.htmlDataProcessor.prototype={toHtml:function(e,t,n,i){var o,a,r,s,l=this.editor;return t&&"object"==typeof t?(o=t.context,n=t.fixForBody,i=t.dontFilter,a=t.filter,r=t.enterMode,s=t.protectedWhitespaces):o=t,o||null===o||(o=l.editable().getName()),l.fire("toHtml",{dataValue:e,context:o,fixForBody:n,dontFilter:i,filter:a||l.filter,enterMode:r||l.enterMode,protectedWhitespaces:s}).dataValue},toDataFormat:function(e,t){var n,i,o;return t&&(n=t.context,i=t.filter,o=t.enterMode),n||null===n||(n=this.editor.editable().getName()),this.editor.fire("toDataFormat",{dataValue:e,filter:i||this.editor.filter,context:n,enterMode:o||this.editor.enterMode}).dataValue}};var E=/(?:&nbsp;|\xa0)$/,p="{cke_protected}",T=CKEDITOR.dtd,C="caption colgroup col thead tfoot tbody".split(" "),I=CKEDITOR.tools.extend({},T.$blockLimit,T.$block),O={elements:{input:s,textarea:s}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},R={elements:{embed:function(e){var t=e.parent;if(t&&"object"==t.name){var n=t.attributes.width,t=t.attributes.height;n&&(e.attributes.width=n),t&&(e.attributes.height=t)}},a:function(e){var t=e.attributes;if(!(e.children.length||t.name||t.id||e.attributes["data-cke-saved-name"]))return!1}}},v={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(e){var t=e.attributes;if(t){if(t["data-cke-temp"])return!1;for(var n,i=["name","href","src"],o=0;o<i.length;o++)n="data-cke-saved-"+i[o],n in t&&delete t[i[o]]}return e},table:function(e){e.children.slice(0).sort(function(e,t){var n,i;return e.type==CKEDITOR.NODE_ELEMENT&&t.type==e.type&&(n=CKEDITOR.tools.indexOf(C,e.name),i=CKEDITOR.tools.indexOf(C,t.name)),-1<n&&-1<i&&n!=i||(n=e.parent?e.getIndex():-1,i=t.parent?t.getIndex():-1),n>i?1:-1})},param:function(e){return e.children=[],e.isEmpty=!0,e},span:function(e){"Apple-style-span"==e.attributes["class"]&&delete e.name},html:function(e){delete e.attributes.contenteditable,delete e.attributes["class"]},body:function(e){delete e.attributes.spellcheck,delete e.attributes.contenteditable},style:function(e){var t=e.children[0];t&&t.value&&(t.value=CKEDITOR.tools.trim(t.value)),e.attributes.type||(e.attributes.type="text/css")},title:function(e){var t=e.children[0];!t&&r(e,t=new CKEDITOR.htmlParser.text),t.value=e.attributes["data-cke-title"]||""},input:l,textarea:l},attributes:{"class":function(e){return CKEDITOR.tools.ltrim(e.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(v.attributes.style=function(e){return e.replace(/(^|;)([^\:]+)/g,function(e){return e.toLowerCase()})});var b=/<(a|area|img|input|source)\b([^>]*)>/gi,K=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,y=/^(href|src|name)$/i,_=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,k=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,N=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,S=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,w=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,x=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),CKEDITOR.htmlParser.element=function(e,t){this.name=e,this.attributes=t||{},this.children=[];var n=e||"",i=n.match(/^cke:(.*)/);i&&(n=i[1]),n=!!(CKEDITOR.dtd.$nonBodyContent[n]||CKEDITOR.dtd.$block[n]||CKEDITOR.dtd.$listItem[n]||CKEDITOR.dtd.$tableContent[n]||CKEDITOR.dtd.$nonEditable[n]||"br"==n),this.isEmpty=!!CKEDITOR.dtd.$empty[e],this.isUnknown=!CKEDITOR.dtd[e],this._={isBlockLike:n,hasInlineStarted:this.isEmpty||!n}},CKEDITOR.htmlParser.cssStyle=function(e){var t={};return((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,n,i){"font-family"==n&&(i=i.replace(/["']/g,"")),t[n.toLowerCase()]=i}),{rules:t,populate:function(e){var t=this.toString();t&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",t):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=t:e.style=t)},toString:function(){var e,n=[];for(e in t)t[e]&&n.push(e,":",t[e],";");return n.join("")}}},function(){function e(e){return function(t){return t.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof e?t.name==e:t.name in e)}}var t=function(e,t){return e=e[0],t=t[0],e<t?-1:e>t?1:0},n=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:n.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,t){var n,i,o=this;if(t=o.getFilterContext(t),t.off)return!0;for(o.parent||e.onRoot(t,o);;){if(n=o.name,!(i=e.onElementName(t,n)))return this.remove(),!1;if(o.name=i,!(o=e.onElement(t,o)))return this.remove(),!1;if(o!==this)return this.replaceWith(o),!1;if(o.name==n)break;if(o.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(o),!1;if(!o.name)return this.replaceWithChildren(),!1}n=o.attributes;var a,r;for(a in n){for(i=n[a];;){if(!(r=e.onAttributeName(t,a))){delete n[a];break}if(r==a)break;delete n[a],a=r}r&&(!1===(i=e.onAttribute(t,o,r,i))?delete n[r]:n[r]=i)}return o.isEmpty||this.filterChildren(e,!1,t),!0},filterChildren:n.filterChildren,writeHtml:function(e,n){n&&this.filter(n);var i,o,a=this.name,r=[],s=this.attributes;e.openTag(a,s);for(i in s)r.push([i,s[i]]);for(e.sortAttributes&&r.sort(t),i=0,o=r.length;i<o;i++)s=r[i],e.attribute(s[0],s[1]);e.openTagClose(a,this.isEmpty),this.writeChildrenHtml(e),this.isEmpty||e.closeTag(a)},writeChildrenHtml:n.writeChildrenHtml,replaceWithChildren:function(){for(var e=this.children,t=e.length;t;)e[--t].insertAfter(this);this.remove()},forEach:n.forEach,getFirst:function(t){if(!t)return this.children.length?this.children[0]:null;"function"!=typeof t&&(t=e(t));for(var n=0,i=this.children.length;n<i;++n)if(t(this.children[n]))return this.children[n];return null},getHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;return this.writeChildrenHtml(e),e.getHtml()},setHtml:function(e){e=this.children=CKEDITOR.htmlParser.fragment.fromHtml(e).children;for(var t=0,n=e.length;t<n;++t)e[t].parent=this},getOuterHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;return this.writeHtml(e),e.getHtml()},split:function(e){for(var t=this.children.splice(e,this.children.length-e),n=this.clone(),i=0;i<t.length;++i)t[i].parent=n;return n.children=t,t[0]&&(t[0].previous=null),0<e&&(this.children[e-1].next=null),this.parent.add(n,this.getIndex()+1),n},addClass:function(e){if(!this.hasClass(e)){var t=this.attributes["class"]||"";this.attributes["class"]=t+(t?" ":"")+e}},removeClass:function(e){var t=this.attributes["class"];t&&((t=CKEDITOR.tools.trim(t.replace(new RegExp("(?:\\s+|^)"+e+"(?:\\s+|$)")," ")))?this.attributes["class"]=t:delete this.attributes["class"])},hasClass:function(e){var t=this.attributes["class"];return!!t&&new RegExp("(?:^|\\s)"+e+"(?=\\s|$)").test(t)},getFilterContext:function(e){var t=[];if(e||(e={off:!1,nonEditable:!1,nestedEditable:!1}),e.off||"off"!=this.attributes["data-cke-processor"]||t.push("off",!0),e.nonEditable||"false"!=this.attributes.contenteditable?e.nonEditable&&!e.nestedEditable&&"true"==this.attributes.contenteditable&&t.push("nestedEditable",!0):t.push("nonEditable",!0),t.length){e=CKEDITOR.tools.copy(e);for(var n=0;n<t.length;n+=2)e[t[n]]=t[n+1]}return e}},!0)}(),function(){var e={},t=/{([^}]+)}/g,n=/([\\'])/g,i=/\n/g,o=/\r/g;CKEDITOR.template=function(a){if(e[a])this.output=e[a];else{var r=a.replace(n,"\\$1").replace(i,"\\n").replace(o,"\\r").replace(t,function(e,t){return"',data['"+t+"']==undefined?'{"+t+"}':data['"+t+"'],'"});this.output=e[a]=Function("data","buffer","return buffer?buffer.push('"+r+"'):['"+r+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(e){CKEDITOR.instances[e.name]=e,e.on("focus",function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))}),e.on("blur",function(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}),CKEDITOR.fire("instance",null,e)},CKEDITOR.remove=function(e){delete CKEDITOR.instances[e.name]},function(){var e={};CKEDITOR.addTemplate=function(t,n){var i=e[t];return i?i:(i={name:t,source:n},CKEDITOR.fire("template",i),e[t]=new CKEDITOR.template(i.source))},CKEDITOR.getTemplate=function(t){return e[t]}}(),function(){var e=[];CKEDITOR.addCss=function(t){e.push(t)},CKEDITOR.getCss=function(){return e.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(e,t){if(!CKEDITOR.env.isCompatible)return null;if(e=CKEDITOR.dom.element.get(e),e.getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var n=new CKEDITOR.editor(t,e,CKEDITOR.ELEMENT_MODE_INLINE),i=e.is("textarea")?e:null;return i?(n.setData(i.getValue(),null,!0),e=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!n.readOnly+'" class="cke_textarea_inline">'+i.getValue()+"</div>",CKEDITOR.document),e.insertAfter(i),i.hide(),i.$.form&&n._attachToForm()):n.setData(e.getHtml(),null,!0),n.on("loaded",function(){n.fire("uiReady"),n.editable(e),n.container=e,n.ui.contentsElement=e,n.setData(n.getData(1)),n.resetDirty(),n.fire("contentDom"),n.mode="wysiwyg",n.fire("mode"),n.status="ready",n.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,n)},null,null,1e4),n.on("destroy",function(){i&&(n.container.clearCustomData(),n.container.remove(),i.show()),n.element.clearCustomData(),delete n.element}),n},CKEDITOR.inlineAll=function(){var e,t,n;for(n in CKEDITOR.dtd.$editable)for(var i=CKEDITOR.document.getElementsByTag(n),o=0,a=i.count();o<a;o++)e=i.getItem(o),"true"==e.getAttribute("contenteditable")&&(t={element:e,config:{}},!1!==CKEDITOR.fire("inline",t)&&CKEDITOR.inline(e,t.config))},CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function e(e,i,o,a){if(!CKEDITOR.env.isCompatible)return null;if(e=CKEDITOR.dom.element.get(e),e.getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var r=new CKEDITOR.editor(i,e,a);return a==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.setStyle("visibility","hidden"),r._.required=e.hasAttribute("required"),e.removeAttribute("required")),o&&r.setData(o,null,!0),r.on("loaded",function(){n(r),a==CKEDITOR.ELEMENT_MODE_REPLACE&&r.config.autoUpdateElement&&e.$.form&&r._attachToForm(),r.setMode(r.config.startupMode,function(){r.resetDirty(),r.status="ready",r.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,r)})}),r.on("destroy",t),r}function t(){var e=this.container,t=this.element;e&&(e.clearCustomData(),e.remove()),t&&(t.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t.show(),this._.required&&t.setAttribute("required","required")),delete this.element)}function n(e){var t=e.name,n=e.element,i=e.elementMode,o=e.fire("uiSpace",{space:"top",html:""}).html,a=e.fire("uiSpace",{space:"bottom",html:""}).html,r=new CKEDITOR.template('<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir="{langDir}" lang="{langCode}" role="application"'+(e.title?' aria-labelledby="cke_{name}_arialbl"':"")+">"+(e.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'),t=CKEDITOR.dom.element.createFromHtml(r.output({id:e.id,name:t,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.title,topHtml:o?'<span id="'+e.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+o+"</span>":"",contentId:e.ui.spaceId("contents"),bottomHtml:a?'<span id="'+e.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+a+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));i==CKEDITOR.ELEMENT_MODE_REPLACE?(n.hide(),t.insertAfter(n)):n.append(t),e.container=t,e.ui.contentsElement=e.ui.space("contents"),o&&e.ui.space("top").unselectable(),a&&e.ui.space("bottom").unselectable(),n=e.config.width,i=e.config.height,n&&t.setStyle("width",CKEDITOR.tools.cssLength(n)),i&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(i)),t.disableContextMenu(),CKEDITOR.env.webkit&&t.on("focus",function(){e.focus()}),e.fireOnce("uiReady")}CKEDITOR.replace=function(t,n){return e(t,n,null,CKEDITOR.ELEMENT_MODE_REPLACE)},CKEDITOR.appendTo=function(t,n,i){return e(t,n,i,CKEDITOR.ELEMENT_MODE_APPENDTO)},CKEDITOR.replaceAll=function(){for(var e=document.getElementsByTagName("textarea"),t=0;t<e.length;t++){var n=null,i=e[t];if(i.name||i.id){if("string"==typeof arguments[0]){if(!new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(i.className))continue}else if("function"==typeof arguments[0]&&(n={},!1===arguments[0](i,n)))continue;this.replace(i,n)}}},CKEDITOR.editor.prototype.addMode=function(e,t){(this._.modes||(this._.modes={}))[e]=t},CKEDITOR.editor.prototype.setMode=function(e,t){var n=this,i=this._.modes;if(e!=n.mode&&i&&i[e]){if(n.fire("beforeSetMode",e),n.mode){var o,a=n.checkDirty(),i=n._.previousModeData,r=0;n.fire("beforeModeUnload"),n.editable(0),n._.previousMode=n.mode,n._.previousModeData=o=n.getData(1),"source"==n.mode&&i==o&&(n.fire("lockSnapshot",{forceUpdate:!0}),r=1),n.ui.space("contents").setHtml(""),n.mode=""}else n._.previousModeData=n.getData(1);this._.modes[e](function(){n.mode=e,void 0!==a&&!a&&n.resetDirty(),r?n.fire("unlockSnapshot"):"wysiwyg"==e&&n.fire("saveSnapshot"),setTimeout(function(){n.fire("mode"),t&&t.call(n)},0)})}},CKEDITOR.editor.prototype.resize=function(e,t,n,i){var o=this.container,a=this.ui.space("contents"),r=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;i=i?this.container.getFirst(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")}):o,i.setSize("width",e,!0),r&&(r.style.width="1%");var s=(i.$.offsetHeight||0)-(a.$.clientHeight||0),o=Math.max(t-(n?0:s),0);t=n?t+s:t,a.setStyle("height",o+"px"),r&&(r.style.width="100%"),this.fire("resize",{outerHeight:t,contentsHeight:o,outerWidth:e||i.getSize("width")})},CKEDITOR.editor.prototype.getResizable=function(e){return e?this.ui.space("contents"):this.container},CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function e(e){var n,o=e.editor,a=e.data.path,s=a.blockLimit,l=e.data.selection,c=l.getRanges()[0];(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&(l=t(l,a))&&(l.appendBogus(),n=CKEDITOR.env.ie),r(o,a.block,s)&&c.collapsed&&!c.getCommonAncestor().isReadOnly()&&(a=c.clone(),a.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),s=new CKEDITOR.dom.walker(a),s.guard=function(e){return!i(e)||e.type==CKEDITOR.NODE_COMMENT||e.isReadOnly()},!s.checkForward()||a.checkStartOfBlock()&&a.checkEndOfBlock())&&(o=c.fixBlock(!0,o.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(o=o.getFirst(i))&&o.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(o.getText()).match(/^(?:&nbsp;|\xa0)$/)&&o.remove(),n=1,e.cancel()),n&&c.select()}function t(e,t){if(e.isFake)return 0;var n=t.block||t.blockLimit,o=n&&n.getLast(i);return!n||!n.isBlockBoundary()||o&&o.type==CKEDITOR.NODE_ELEMENT&&o.isBlockBoundary()||n.is("pre")||n.getBogus()?void 0:n}function n(e){var t=e.data.getTarget();t.is("input")&&(t=t.getAttribute("type"),"submit"!=t&&"reset"!=t||e.data.preventDefault())}function i(e){return d(e)&&u(e)}function o(e,t){return function(n){var i=n.data.$.toElement||n.data.$.fromElement||n.data.$.relatedTarget;(i=i&&i.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(i):null)&&(t.equals(i)||t.contains(i))||e.call(this,n)}}function a(e){function t(e){return function(t,o){if(o&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(a)&&(n=t),!(o||!i(t)||e&&f(t)))return!1}}var n,o=e.getRanges()[0];e=e.root;var a={table:1,ul:1,ol:1,dl:1};if(o.startPath().contains(a)){var r=o.clone();if(r.collapse(1),r.setStartAt(e,CKEDITOR.POSITION_AFTER_START),e=new CKEDITOR.dom.walker(r),e.guard=t(),e.checkBackward(),n)return r=o.clone(),r.collapse(),r.setEndAt(n,CKEDITOR.POSITION_AFTER_END),e=new CKEDITOR.dom.walker(r),e.guard=t(!0),n=!1,e.checkForward(),n}return null}function r(e,t,n){return!1!==e.config.autoParagraph&&e.activeEnterMode!=CKEDITOR.ENTER_BR&&(e.editable().equals(n)&&!t||t&&"true"==t.getAttribute("contenteditable"))}function s(e){return e.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==e.config.autoParagraph&&(e.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p")}function l(e){var t=e.editor;t.getSelection().scrollIntoView(),setTimeout(function(){t.fire("saveSnapshot")},0)}function c(e,t,n){var i=e.getCommonAncestor(t);for(t=e=n?t:e;(e=e.getParent())&&!i.equals(e)&&1==e.getChildCount();)t=e;t.remove()}var d,u,h,f,m,g,E,p,T;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(e,t){this.base(t.$||t),this.editor=e,this.status="unloaded",this.hasFocus=!1,this.setup()},proto:{focus:function(){var e;if(CKEDITOR.env.webkit&&!this.hasFocus&&(e=this.editor._.previousActive||this.getDocument().getActive(),this.contains(e)))return void e.focus();try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(e){if(!CKEDITOR.env.ie)throw e}CKEDITOR.env.safari&&!this.isInline()&&(e=CKEDITOR.document.getActive(),e.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(e,t){var n=Array.prototype.slice.call(arguments,0);return CKEDITOR.env.ie&&/^focus|blur$/.exec(e)&&(e="focus"==e?"focusin":"focusout",t=o(t,this),n[0]=e,n[1]=t),CKEDITOR.dom.element.prototype.on.apply(this,n)},attachListener:function(e){!this._.listeners&&(this._.listeners=[]);var t=Array.prototype.slice.call(arguments,1),t=e.on.apply(e,t);return this._.listeners.push(t),t},clearListeners:function(){var e=this._.listeners;try{for(;e.length;)e.pop().removeListener()}catch(e){}},restoreAttrs:function(){var e,t,n=this._.attrChanges;for(t in n)n.hasOwnProperty(t)&&(e=n[t],null!==e?this.setAttribute(t,e):this.removeAttribute(t))},attachClass:function(e){var t=this.getCustomData("classes");this.hasClass(e)||(!t&&(t=[]),t.push(e),this.setCustomData("classes",t),this.addClass(e))},changeAttr:function(e,t){var n=this.getAttribute(e);t!==n&&(!this._.attrChanges&&(this._.attrChanges={}),e in this._.attrChanges||(this._.attrChanges[e]=n),this.setAttribute(e,t))},insertText:function(e){this.editor.focus(),this.insertHtml(this.transformPlainTextToHtml(e),"text")},transformPlainTextToHtml:function(e){var t=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(e,t)},insertHtml:function(e,t,n){var i=this.editor;i.focus(),i.fire("saveSnapshot"),n||(n=i.getSelection().getRanges()[0]),g(this,t||"html",e,n),n.select(),l(this),this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(e,t,n){g(this,n||"html",e,t),this.editor.fire("afterInsertHtml",{intoRange:t})},insertElement:function(e,t){var n=this.editor;n.focus(),n.fire("saveSnapshot");var o=n.activeEnterMode,n=n.getSelection(),a=e.getName(),a=CKEDITOR.dtd.$block[a];t||(t=n.getRanges()[0]),this.insertElementIntoRange(e,t)&&(t.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),a&&((a=e.getNext(function(e){return i(e)&&!f(e)}))&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$block)?a.getDtd()["#"]?t.moveToElementEditStart(a):t.moveToElementEditEnd(e):a||o==CKEDITOR.ENTER_BR||(a=t.fixBlock(!0,o==CKEDITOR.ENTER_DIV?"div":"p"),t.moveToElementEditStart(a)))),n.selectRanges([t]),l(this)},insertElementIntoSelection:function(e){this.insertElement(e)},insertElementIntoRange:function(e,t){var n=this.editor,i=n.config.enterMode,o=e.getName(),a=CKEDITOR.dtd.$block[o];if(t.checkReadOnly())return!1;t.deleteContents(1),t.startContainer.type==CKEDITOR.NODE_ELEMENT&&t.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&E(t);var r,s;if(a)for(;(r=t.getCommonAncestor(0,1))&&(s=CKEDITOR.dtd[r.getName()])&&(!s||!s[o]);)r.getName()in CKEDITOR.dtd.span?t.splitElement(r):t.checkStartOfBlock()&&t.checkEndOfBlock()?(t.setStartBefore(r),t.collapse(!0),r.remove()):t.splitBlock(i==CKEDITOR.ENTER_DIV?"div":"p",n.editable());return t.insertNode(e),!0},setData:function(e,t){t||(e=this.editor.dataProcessor.toHtml(e)),this.setHtml(e),this.fixInitialSelection(),"unloaded"==this.status&&(this.status="ready"),this.editor.fire("dataReady")},getData:function(e){var t=this.getHtml();return e||(t=this.editor.dataProcessor.toDataFormat(t)),t},setReadOnly:function(e){this.setAttribute("contenteditable",!e)},detach:function(){this.removeClass("cke_editable"),this.status="detached";var e=this.editor;this._.detach(),delete e.document,delete e.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function e(){var e,t=n.getDocument().$,i=t.getSelection();e:if(i.anchorNode&&i.anchorNode==n.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=n.getDocument().getActive())&&e.equals(n)&&!i.anchorNode){e=!0;break e}e=void 0}e&&(e=new CKEDITOR.dom.range(n),e.moveToElementEditStart(n),
t=t.createRange(),t.setStart(e.startContainer.$,e.startOffset),t.collapse(!0),i.removeAllRanges(),i.addRange(t))}function t(){var e=n.getDocument().$,t=e.selection,i=n.getDocument().getActive();"None"==t.type&&i.equals(n)&&(t=new CKEDITOR.dom.range(n),e=e.body.createTextRange(),t.moveToElementEditStart(n),t=t.startContainer,t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent()),e.moveToElementText(t.$),e.collapse(!0),e.select())}var n=this;CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks)?this.hasFocus&&(this.focus(),t()):this.hasFocus?(this.focus(),e()):this.once("focus",function(){e()},null,null,-999)},getHtmlFromRange:function(e){return e.collapsed?new CKEDITOR.dom.documentFragment(e.document):(e={doc:this.getDocument(),range:e.clone()},p.eol.detect(e,this),p.bogus.exclude(e),p.cell.shrink(e),e.fragment=e.range.cloneContents(),p.tree.rebuild(e,this),p.eol.fix(e,this),new CKEDITOR.dom.documentFragment(e.fragment.$))},extractHtmlFromRange:function(e,t){var n=T,i={range:e,doc:e.document},o=this.getHtmlFromRange(e);if(e.collapsed)return e.optimize(),o;e.enlarge(CKEDITOR.ENLARGE_INLINE,1),n.table.detectPurge(i),i.bookmark=e.createBookmark(),delete i.range;var a=this.editor.createRange();if(a.moveToPosition(i.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START),i.targetBookmark=a.createBookmark(),n.list.detectMerge(i,this),n.table.detectRanges(i,this),n.block.detectMerge(i,this),i.tableContentsRanges?(n.table.deleteRanges(i),e.moveToBookmark(i.bookmark),i.range=e):(e.moveToBookmark(i.bookmark),i.range=e,e.extractContents(n.detectExtractMerge(i))),e.moveToBookmark(i.targetBookmark),e.optimize(),n.fixUneditableRangePosition(e),n.list.merge(i,this),n.table.purge(i,this),n.block.merge(i,this),t){if(n=e.startPath(),i=e.checkStartOfBlock()&&e.checkEndOfBlock()&&n.block&&!e.root.equals(n.block)){e:{var r,i=n.block.getElementsByTag("span"),a=0;if(i)for(;r=i.getItem(a++);)if(!u(r)){i=!0;break e}i=!1}i=!i}i&&(e.moveToPosition(n.block,CKEDITOR.POSITION_BEFORE_START),n.block.remove())}else n.autoParagraph(this.editor,e),h(e.startContainer)&&e.startContainer.appendBogus();return e.startContainer.mergeSiblings(),o},setup:function(){var e=this.editor;if(this.attachListener(e,"beforeGetData",function(){var t=this.getData();this.is("textarea")||!1!==e.config.ignoreEmptyParagraph&&(t=t.replace(m,function(e,t){return t})),e.setData(t,null,1)},this),this.attachListener(e,"getSnapshot",function(e){e.data=this.getData(1)},this),this.attachListener(e,"afterSetData",function(){this.setData(e.getData(1))},this),this.attachListener(e,"loadSnapshot",function(e){this.setData(e.data,1)},this),this.attachListener(e,"beforeFocus",function(){var t=e.getSelection();(t=t&&t.getNative())&&"Control"==t.type||this.focus()},this),this.attachListener(e,"insertHtml",function(e){this.insertHtml(e.data.dataValue,e.data.mode,e.data.range)},this),this.attachListener(e,"insertElement",function(e){this.insertElement(e.data)},this),this.attachListener(e,"insertText",function(e){this.insertText(e.data)},this),this.setReadOnly(e.readOnly),this.attachClass("cke_editable"),e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):e.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&e.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed"),this.attachClass("cke_contents_"+e.config.contentsLangDirection),e.keystrokeHandler.blockedKeystrokes[8]=+e.readOnly,e.keystrokeHandler.attach(this),this.on("blur",function(){this.hasFocus=!1},null,null,-1),this.on("focus",function(){this.hasFocus=!0},null,null,-1),e.focusManager.add(this),this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,e.once("contentDom",function(){e.focusManager.focus(this)},this)),this.isInline()&&this.changeAttr("tabindex",e.tabIndex),!this.is("textarea")){e.document=this.getDocument(),e.window=this.getWindow();var t=e.document;this.changeAttr("spellcheck",!e.config.disableNativeSpellChecker);var o=e.config.contentsLangDirection;this.getDirection(1)!=o&&this.changeAttr("dir",o);var r=CKEDITOR.getCss();if(r){var o=t.getHead(),s=o.getCustomData("stylesheet");s?r!=s.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?s.$.styleSheet.cssText=r:s.setText(r)):(r=t.appendStyleText(r),r=new CKEDITOR.dom.element(r.ownerNode||r.owningElement),o.setCustomData("stylesheet",r),r.data("cke-temp",1))}o=t.getCustomData("stylesheet_ref")||0,t.setCustomData("stylesheet_ref",o+1),this.setCustomData("cke_includeReadonly",!e.config.disableReadonlyStyling),this.attachListener(this,"click",function(e){e=e.data;var t=new CKEDITOR.dom.elementPath(e.getTarget(),this).contains("a");t&&2!=e.$.button&&t.isReadOnly()&&e.preventDefault()});var l={8:1,46:1};this.attachListener(e,"key",function(t){if(e.readOnly)return!0;var n,i=t.data.domEvent.getKey();if(i in l){t=e.getSelection();var o,r,s,c,u=t.getRanges()[0],h=u.startPath(),i=8==i;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(o=t.getSelectedElement())||(o=a(t))?(e.fire("saveSnapshot"),u.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),o.remove(),u.select(),e.fire("saveSnapshot"),n=1):u.collapsed&&((r=h.block)&&(c=r[i?"getPrevious":"getNext"](d))&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("table")&&u[i?"checkStartOfBlock":"checkEndOfBlock"]()?(e.fire("saveSnapshot"),u[i?"checkEndOfBlock":"checkStartOfBlock"]()&&r.remove(),u["moveToElementEdit"+(i?"End":"Start")](c),u.select(),e.fire("saveSnapshot"),n=1):h.blockLimit&&h.blockLimit.is("td")&&(s=h.blockLimit.getAscendant("table"))&&u.checkBoundaryOfElement(s,i?CKEDITOR.START:CKEDITOR.END)&&(c=s[i?"getPrevious":"getNext"](d))?(e.fire("saveSnapshot"),u["moveToElementEdit"+(i?"End":"Start")](c),u.checkStartOfBlock()&&u.checkEndOfBlock()?c.remove():u.select(),e.fire("saveSnapshot"),n=1):(s=h.contains(["td","th","caption"]))&&u.checkBoundaryOfElement(s,i?CKEDITOR.START:CKEDITOR.END)&&(n=1))}return!n}),e.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(t){t.data.getKeystroke()in l&&!this.getFirst(i)&&(this.appendBogus(),t=e.createRange(),t.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),t.select())}),this.attachListener(this,"dblclick",function(t){return!e.readOnly&&(t={element:t.data.getTarget()},void e.fire("doubleclick",t))}),CKEDITOR.env.ie&&this.attachListener(this,"click",n),CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(t){var n=t.data.getTarget();n.is("img","hr","input","textarea","select")&&!n.isReadOnly()&&(e.getSelection().selectElement(n),n.is("input","textarea","select")&&t.data.preventDefault())}),CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(t){(t=t.data.getTarget())&&t.is("img")&&e.getSelection().selectElement(t)}),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(t){if(2==t.data.$.button&&(t=t.data.getTarget(),!t.getOuterHtml().replace(m,""))){var n=e.createRange();n.moveToElementEditStart(t),n.select(!0)}}),CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(e){e.data.getTarget().is("input","select")&&e.data.preventDefault()}),this.attachListener(this,"mouseup",function(e){e.data.getTarget().is("input","textarea")&&e.data.preventDefault()})),CKEDITOR.env.webkit&&this.attachListener(e,"key",function(t){if(e.readOnly)return!0;if(t=t.data.domEvent.getKey(),t in l){var n=8==t,i=e.getSelection().getRanges()[0];if(t=i.startPath(),i.collapsed)e:{var o=t.block;if(o&&i[n?"checkStartOfBlock":"checkEndOfBlock"]()&&i.moveToClosestEditablePosition(o,!n)&&i.collapsed){if(i.startContainer.type==CKEDITOR.NODE_ELEMENT){var a=i.startContainer.getChild(i.startOffset-(n?1:0));if(a&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("hr")){e.fire("saveSnapshot"),a.remove(),t=!0;break e}}if(i=i.startPath().block,!i||i&&i.contains(o))t=void 0;else{e.fire("saveSnapshot");var r;(r=(n?i:o).getBogus())&&r.remove(),r=e.getSelection(),a=r.createBookmarks(),(n?o:i).moveChildren(n?i:o,!1),t.lastElement.mergeSiblings(),c(o,i,!n),r.selectBookmarks(a),t=!0}}else t=!1}else n=i,r=t.block,i=n.endPath().block,r&&i&&!r.equals(i)?(e.fire("saveSnapshot"),(o=r.getBogus())&&o.remove(),n.enlarge(CKEDITOR.ENLARGE_INLINE),n.deleteContents(),i.getParent()&&(i.moveChildren(r,!1),t.lastElement.mergeSiblings(),c(r,i,!0)),n=e.getSelection().getRanges()[0],n.collapse(1),n.optimize(),""===n.startContainer.getHtml()&&n.startContainer.appendBogus(),n.select(),t=!0):t=!1;if(!t)return;return e.getSelection().scrollIntoView(),e.fire("saveSnapshot"),!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1),this.clearListeners(),this.restoreAttrs();var e;if(e=this.removeCustomData("classes"))for(;e.length;)this.removeClass(e.pop());if(!this.is("textarea")){e=this.getDocument();var t=e.getHead();if(t.getCustomData("stylesheet")){var n=e.getCustomData("stylesheet_ref");--n?e.setCustomData("stylesheet_ref",n):(e.removeCustomData("stylesheet_ref"),t.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload"),delete this.editor}}}),CKEDITOR.editor.prototype.editable=function(e){var t=this._.editable;return t&&e?0:(arguments.length&&(t=this._.editable=e?e instanceof CKEDITOR.editable?e:new CKEDITOR.editable(this,e):(t&&t.detach(),null)),t)},CKEDITOR.on("instanceLoaded",function(t){var n=t.editor;n.on("insertElement",function(e){e=e.data,e.type==CKEDITOR.NODE_ELEMENT&&(e.is("input")||e.is("textarea"))&&("false"!=e.getAttribute("contentEditable")&&e.data("cke-editable",e.hasAttribute("contenteditable")?"true":"1"),e.setAttribute("contentEditable",!1))}),n.on("selectionChange",function(t){if(!n.readOnly){var i=n.getSelection();i&&!i.isLocked&&(i=n.checkDirty(),n.fire("lockSnapshot"),e(t),n.fire("unlockSnapshot"),!i&&n.resetDirty())}})}),CKEDITOR.on("instanceCreated",function(e){var t=e.editor;t.on("mode",function(){var e=t.editable();if(e&&e.isInline()){var n=t.title;e.changeAttr("role","textbox"),e.changeAttr("aria-label",n),n&&e.changeAttr("title",n);var i=t.fire("ariaEditorHelpLabel",{}).label;if(i&&(n=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var o=CKEDITOR.tools.getNextId(),i=CKEDITOR.dom.element.createFromHtml('<span id="'+o+'" class="cke_voice_label">'+i+"</span>");n.append(i),e.changeAttr("aria-describedby",o)}}})}),CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"),d=CKEDITOR.dom.walker.whitespaces(!0),u=CKEDITOR.dom.walker.bookmark(!1,!0),h=CKEDITOR.dom.walker.empty(),f=CKEDITOR.dom.walker.bogus(),m=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,g=function(){function e(e){return e.type==CKEDITOR.NODE_ELEMENT}function t(n,i){var o,a,r,s,l=[],c=i.range.startContainer;o=i.range.startPath();for(var c=d[c.getName()],u=0,h=n.getChildren(),f=h.count(),m=-1,g=-1,E=0,p=o.contains(d.$list);u<f;++u)o=h.getItem(u),e(o)?(r=o.getName(),p&&r in CKEDITOR.dtd.$list?l=l.concat(t(o,i)):(s=!!c[r],"br"!=r||!o.data("cke-eol")||u&&u!=f-1||(E=(a=u?l[u-1].node:h.getItem(u+1))&&(!e(a)||!a.is("br")),a=a&&e(a)&&d.$block[a.getName()]),-1!=m||s||(m=u),s||(g=u),l.push({isElement:1,isLineBreak:E,isBlock:o.isBlockBoundary(),hasBlockSibling:a,node:o,name:r,allowed:s}),a=E=0)):l.push({isElement:0,node:o,allowed:1});return-1<m&&(l[m].firstNotAllowed=1),-1<g&&(l[g].lastNotAllowed=1),l}function n(t,i){var o,a=[],r=t.getChildren(),s=r.count(),l=0,c=d[i],u=!t.is(d.$inline)||t.is("br");for(u&&a.push(" ");l<s;l++)o=r.getItem(l),e(o)&&!o.is(c)?a=a.concat(n(o,i)):a.push(o);return u&&a.push(" "),a}function o(t){return e(t.startContainer)&&t.startContainer.getChild(t.startOffset-1)}function a(t){return t&&e(t)&&(t.is(d.$removeEmpty)||t.is("a")&&!t.isBlockBoundary())}function l(t,n,i,o){var a,r,s=t.clone();s.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(a=new CKEDITOR.dom.walker(s).next())&&e(a)&&u[a.getName()]&&(r=a.getPrevious())&&e(r)&&!r.getParent().equals(t.startContainer)&&i.contains(r)&&o.contains(a)&&a.isIdentical(r)&&(a.moveChildren(r),a.remove(),l(t,n,i,o))}function c(t,n){function i(t,n){if(n.isBlock&&n.isElement&&!n.node.is("br")&&e(t)&&t.is("br"))return t.remove(),1}var o=n.endContainer.getChild(n.endOffset),a=n.endContainer.getChild(n.endOffset-1);o&&i(o,t[t.length-1]),a&&i(a,t[0])&&(n.setEnd(n.endContainer,n.endOffset-1),n.collapse())}var d=CKEDITOR.dtd,u={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},h={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},f=CKEDITOR.tools.extend({},d.$inline);return delete f.br,function(u,m,g,E){var p=u.editor,T=!1;if("unfiltered_html"==m&&(m="html",T=!0),!E.checkReadOnly()){var C=new CKEDITOR.dom.elementPath(E.startContainer,E.root).blockLimit||E.root;u={type:m,dontFilter:T,editable:u,editor:p,range:E,blockLimit:C,mergeCandidates:[],zombies:[]},m=u.range,E=u.mergeCandidates;var I,O;if("text"==u.type&&m.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(I=CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>",m.document),m.insertNode(I),m.setStartAfter(I)),T=new CKEDITOR.dom.elementPath(m.startContainer),u.endPath=C=new CKEDITOR.dom.elementPath(m.endContainer),!m.collapsed){var p=C.block||C.blockLimit,D=m.getCommonAncestor();p&&!p.equals(D)&&!p.contains(D)&&m.checkEndOfBlock()&&u.zombies.push(p),m.deleteContents()}for(;(O=o(m))&&e(O)&&O.isBlockBoundary()&&T.contains(O);)m.moveToPosition(O,CKEDITOR.POSITION_BEFORE_END);for(l(m,u.blockLimit,T,C),I&&(m.setEndBefore(I),m.collapse(),I.remove()),I=m.startPath(),(p=I.contains(a,!1,1))&&(m.splitElement(p),u.inlineStylesRoot=p,u.inlineStylesPeak=I.lastElement),I=m.createBookmark(),(p=I.startNode.getPrevious(i))&&e(p)&&a(p)&&E.push(p),(p=I.startNode.getNext(i))&&e(p)&&a(p)&&E.push(p),p=I.startNode;(p=p.getParent())&&a(p);)E.push(p);if(m.moveToBookmark(I),I=g){if(I=u.range,"text"==u.type&&u.inlineStylesRoot){for(O=u.inlineStylesPeak,m=O.getDocument().createText("{cke-peak}"),E=u.inlineStylesRoot.getParent();!O.equals(E);)m=m.appendTo(O.clone()),O=O.getParent();g=m.getOuterHtml().split("{cke-peak}").join(g)}if(O=u.blockLimit.getName(),/^\s+|\s+$/.test(g)&&"span"in CKEDITOR.dtd[O]){var R='<span data-cke-marker="1">&nbsp;</span>';g=R+g+R}if(g=u.editor.dataProcessor.toHtml(g,{context:null,fixForBody:!1,protectedWhitespaces:!!R,dontFilter:u.dontFilter,filter:u.editor.activeFilter,enterMode:u.editor.activeEnterMode}),O=I.document.createElement("body"),O.setHtml(g),R&&(O.getFirst().remove(),O.getLast().remove()),(R=I.startPath().block)&&(1!=R.getChildCount()||!R.getBogus()))e:{var v;if(1==O.getChildCount()&&e(v=O.getFirst())&&v.is(h)&&!v.hasAttribute("contenteditable")){for(R=v.getElementsByTag("*"),I=0,E=R.count();I<E;I++)if(m=R.getItem(I),!m.is(f))break e;v.moveChildren(v.getParent(1)),v.remove()}}u.dataWrapper=O,I=g}if(I){v=u.range,I=v.document;var b;O=u.blockLimit,E=0;var K,y,_,R=[];g=p=0;var k,N;m=v.startContainer;var S,T=u.endPath.elements[0],C=T.getPosition(m),D=!(!T.getCommonAncestor(m)||C==CKEDITOR.POSITION_IDENTICAL||C&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);for(m=t(u.dataWrapper,u),c(m,v);E<m.length;E++){if(C=m[E],b=C.isLineBreak){b=v,k=O;var w=void 0,x=void 0;C.hasBlockSibling?b=1:(w=b.startContainer.getAscendant(d.$block,1))&&w.is({div:1,p:1})?(x=w.getPosition(k),x==CKEDITOR.POSITION_IDENTICAL||x==CKEDITOR.POSITION_CONTAINS?b=0:(k=b.splitElement(w),b.moveToPosition(k,CKEDITOR.POSITION_AFTER_START),b=1)):b=0}if(b)g=0<E;else{if(b=v.startPath(),!C.isBlock&&r(u.editor,b.block,b.blockLimit)&&(_=s(u.editor))&&(_=I.createElement(_),_.appendBogus(),v.insertNode(_),CKEDITOR.env.needsBrFiller&&(K=_.getBogus())&&K.remove(),v.moveToPosition(_,CKEDITOR.POSITION_BEFORE_END)),(b=v.startPath().block)&&!b.equals(y)&&((K=b.getBogus())&&(K.remove(),R.push(b)),y=b),C.firstNotAllowed&&(p=1),p&&C.isElement){for(b=v.startContainer,k=null;b&&!d[b.getName()][C.name];){if(b.equals(O)){b=null;break}k=b,b=b.getParent()}if(b)k&&(N=v.splitElement(k),u.zombies.push(N),u.zombies.push(k));else{k=O.getName(),S=!E,b=E==m.length-1,k=n(C.node,k);for(var w=[],x=k.length,A=0,L=void 0,B=0,P=-1;A<x;A++)L=k[A]," "==L?(B||S&&!A||(w.push(new CKEDITOR.dom.text(" ")),P=w.length),B=1):(w.push(L),B=0);b&&P==w.length&&w.pop(),S=w}}if(S){for(;b=S.pop();)v.insertNode(b);S=0}else v.insertNode(C.node);C.lastNotAllowed&&E<m.length-1&&((N=D?T:N)&&v.setEndAt(N,CKEDITOR.POSITION_AFTER_START),p=0),v.collapse()}}1!=m.length?K=!1:(K=m[0],K=K.isElement&&"false"==K.node.getAttribute("contenteditable")),K&&(g=!0,b=m[0].node,v.setStartAt(b,CKEDITOR.POSITION_BEFORE_START),v.setEndAt(b,CKEDITOR.POSITION_AFTER_END)),u.dontMoveCaret=g,u.bogusNeededBlocks=R}K=u.range;var F;for(N=u.bogusNeededBlocks,S=K.createBookmark();y=u.zombies.pop();)y.getParent()&&(_=K.clone(),_.moveToElementEditStart(y),_.removeEmptyBlocksAtEnd());if(N)for(;y=N.pop();)CKEDITOR.env.needsBrFiller?y.appendBogus():y.append(K.document.createText("\xa0"));for(;y=u.mergeCandidates.pop();)y.mergeSiblings();if(K.moveToBookmark(S),!u.dontMoveCaret){for(y=o(K);y&&e(y)&&!y.is(d.$empty);){if(y.isBlockBoundary())K.moveToPosition(y,CKEDITOR.POSITION_BEFORE_END);else{if(a(y)&&y.getHtml().match(/(\s|&nbsp;)$/g)){F=null;break}F=K.clone(),F.moveToPosition(y,CKEDITOR.POSITION_BEFORE_END)}y=y.getLast(i)}F&&K.moveToRange(F)}}}}(),E=function(){function e(e){return e=new CKEDITOR.dom.walker(e),e.guard=function(e,t){return!t&&(e.type==CKEDITOR.NODE_ELEMENT?e.is(CKEDITOR.dtd.$tableContent):void 0)},e.evaluator=function(e){return e.type==CKEDITOR.NODE_ELEMENT},e}function t(e,t,n){return t=e.getDocument().createElement(t),e.append(t,n),t}function n(e){var t,n=e.count();for(n;0<n--;)t=e.getItem(n),CKEDITOR.tools.trim(t.getHtml())||(t.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&t.getChildCount()&&t.getFirst().remove())}return function(i){var o=i.startContainer,a=o.getAscendant("table",1),r=!1;n(a.getElementsByTag("td")),n(a.getElementsByTag("th")),a=i.clone(),a.setStart(o,0),a=e(a).lastBackward(),a||(a=i.clone(),a.setEndAt(o,CKEDITOR.POSITION_BEFORE_END),a=e(a).lastForward(),r=!0),a||(a=o),a.is("table")?(i.setStartAt(a,CKEDITOR.POSITION_BEFORE_START),i.collapse(!0),a.remove()):(a.is({tbody:1,thead:1,tfoot:1})&&(a=t(a,"tr",r)),a.is("tr")&&(a=t(a,a.getParent().is("thead")?"th":"td",r)),(o=a.getBogus())&&o.remove(),i.moveToPosition(a,r?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}(),p={eol:{detect:function(e,t){var n=e.range,i=n.clone(),o=n.clone(),a=new CKEDITOR.dom.elementPath(n.startContainer,t),r=new CKEDITOR.dom.elementPath(n.endContainer,t);i.collapse(1),o.collapse(),a.block&&i.checkBoundaryOfElement(a.block,CKEDITOR.END)&&(n.setStartAfter(a.block),e.prependEolBr=1),r.block&&o.checkBoundaryOfElement(r.block,CKEDITOR.START)&&(n.setEndBefore(r.block),e.appendEolBr=1)},fix:function(e,t){var n,i=t.getDocument();e.appendEolBr&&(n=this.createEolBr(i),e.fragment.append(n)),!e.prependEolBr||n&&!n.getPrevious()||e.fragment.append(this.createEolBr(i),1)},createEolBr:function(e){return e.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(e){var t=e.range.getBoundaryNodes(),n=t.startNode,t=t.endNode;!t||!f(t)||n&&n.equals(t)||e.range.setEndBefore(t)}},tree:{rebuild:function(e,t){var n,i=e.range,o=i.getCommonAncestor(),a=new CKEDITOR.dom.elementPath(o,t),r=new CKEDITOR.dom.elementPath(i.startContainer,t),i=new CKEDITOR.dom.elementPath(i.endContainer,t);if(o.type==CKEDITOR.NODE_TEXT&&(o=o.getParent()),a.blockLimit.is({tr:1,table:1})){var s=a.contains("table").getParent();n=function(e){return!e.equals(s)}}else if(a.block&&a.block.is(CKEDITOR.dtd.$listItem)&&(r=r.contains(CKEDITOR.dtd.$list),i=i.contains(CKEDITOR.dtd.$list),!r.equals(i))){var l=a.contains(CKEDITOR.dtd.$list).getParent();n=function(e){return!e.equals(l)}}n||(n=function(e){return!e.equals(a.block)&&!e.equals(a.blockLimit)}),this.rebuildFragment(e,t,o,n)},rebuildFragment:function(e,t,n,i){for(var o;n&&!n.equals(t)&&i(n);)o=n.clone(0,1),e.fragment.appendTo(o),e.fragment=o,n=n.getParent()}},cell:{shrink:function(e){e=e.range;var t=e.startContainer,n=e.endContainer,i=e.startOffset,o=e.endOffset;t.type==CKEDITOR.NODE_ELEMENT&&t.equals(n)&&t.is("tr")&&++i==o&&e.shrink(CKEDITOR.SHRINK_TEXT)}}},T=function(){function e(e,t){var n=e.getParent();n.is(CKEDITOR.dtd.$inline)&&e[t?"insertBefore":"insertAfter"](n)}function t(t,n,i){e(n),e(i,1);for(var o;o=i.getNext();)o.insertAfter(n),n=o;h(t)&&t.remove()}function n(e,t){var n=new CKEDITOR.dom.range(e);return n.setStartAfter(t.startNode),n.setEndBefore(t.endNode),n}return{list:{detectMerge:function(e,t){var i=n(t,e.bookmark),o=i.startPath(),a=i.endPath(),r=o.contains(CKEDITOR.dtd.$list),s=a.contains(CKEDITOR.dtd.$list);e.mergeList=r&&s&&r.getParent().equals(s.getParent())&&!r.equals(s),e.mergeListItems=o.block&&a.block&&o.block.is(CKEDITOR.dtd.$listItem)&&a.block.is(CKEDITOR.dtd.$listItem),(e.mergeList||e.mergeListItems)&&(i=i.clone(),i.setStartBefore(e.bookmark.startNode),i.setEndAfter(e.bookmark.endNode),e.mergeListBookmark=i.createBookmark())},merge:function(e,n){if(e.mergeListBookmark){var i=e.mergeListBookmark.startNode,o=e.mergeListBookmark.endNode,a=new CKEDITOR.dom.elementPath(i,n),r=new CKEDITOR.dom.elementPath(o,n);if(e.mergeList){var s=a.contains(CKEDITOR.dtd.$list),l=r.contains(CKEDITOR.dtd.$list);s.equals(l)||(l.moveChildren(s),l.remove())}e.mergeListItems&&(a=a.contains(CKEDITOR.dtd.$listItem),r=r.contains(CKEDITOR.dtd.$listItem),a.equals(r)||t(r,i,o)),i.remove(),o.remove()}}},block:{detectMerge:function(e,t){if(!e.tableContentsRanges&&!e.mergeListBookmark){var n=new CKEDITOR.dom.range(t);n.setStartBefore(e.bookmark.startNode),n.setEndAfter(e.bookmark.endNode),e.mergeBlockBookmark=n.createBookmark()}},merge:function(e,n){if(e.mergeBlockBookmark&&!e.purgeTableBookmark){var i=e.mergeBlockBookmark.startNode,o=e.mergeBlockBookmark.endNode,a=new CKEDITOR.dom.elementPath(i,n),r=new CKEDITOR.dom.elementPath(o,n),a=a.block,r=r.block;a&&r&&!a.equals(r)&&t(r,i,o),i.remove(),o.remove()}}},table:function(){function e(e){var n,o=[],a=new CKEDITOR.dom.walker(e),r=e.startPath().contains(i),s=e.endPath().contains(i),l={};return a.guard=function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d="visited_"+(c?"out":"in");if(a.getCustomData(d))return;CKEDITOR.dom.element.setMarker(l,a,d,1)}c&&r&&a.equals(r)?(n=e.clone(),n.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),o.push(n)):!c&&s&&a.equals(s)?(n=e.clone(),n.setStartAt(s,CKEDITOR.POSITION_AFTER_START),o.push(n)):((d=!c)&&(d=a.type==CKEDITOR.NODE_ELEMENT&&a.is(i)&&(!r||t(a,r))&&(!s||t(a,s))),d&&(n=e.clone(),n.selectNodeContents(a),o.push(n)))},a.lastForward(),CKEDITOR.dom.element.clearAllMarkers(l),o}function t(e,t){var n=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,i=e.getPosition(t);return i!==CKEDITOR.POSITION_IDENTICAL&&0===(i&n)}var i={td:1,th:1,caption:1};return{detectPurge:function(e){var t=e.range,n=t.clone();n.enlarge(CKEDITOR.ENLARGE_ELEMENT);var n=new CKEDITOR.dom.walker(n),o=0;if(n.evaluator=function(e){e.type==CKEDITOR.NODE_ELEMENT&&e.is(i)&&++o},n.checkForward(),1<o){var n=t.startPath().contains("table"),a=t.endPath().contains("table");n&&a&&t.checkBoundaryOfElement(n,CKEDITOR.START)&&t.checkBoundaryOfElement(a,CKEDITOR.END)&&(t=e.range.clone(),t.setStartBefore(n),t.setEndAfter(a),e.purgeTableBookmark=t.createBookmark())}},detectRanges:function(o,a){var r,s,l=n(a,o.bookmark),c=l.clone(),d=l.getCommonAncestor();d.is(CKEDITOR.dtd.$tableContent)&&!d.is(i)&&(d=d.getAscendant("table",!0)),s=d,d=new CKEDITOR.dom.elementPath(l.startContainer,s),s=new CKEDITOR.dom.elementPath(l.endContainer,s),d=d.contains("table"),s=s.contains("table"),(d||s)&&(d&&s&&t(d,s)?(o.tableSurroundingRange=c,c.setStartAt(d,CKEDITOR.POSITION_AFTER_END),c.setEndAt(s,CKEDITOR.POSITION_BEFORE_START),c=l.clone(),c.setEndAt(d,CKEDITOR.POSITION_AFTER_END),r=l.clone(),r.setStartAt(s,CKEDITOR.POSITION_BEFORE_START),r=e(c).concat(e(r))):d?s||(o.tableSurroundingRange=c,c.setStartAt(d,CKEDITOR.POSITION_AFTER_END),l.setEndAt(d,CKEDITOR.POSITION_AFTER_END)):(o.tableSurroundingRange=c,c.setEndAt(s,CKEDITOR.POSITION_BEFORE_START),l.setStartAt(s,CKEDITOR.POSITION_AFTER_START)),o.tableContentsRanges=r?r:e(l))},deleteRanges:function(e){for(var t;t=e.tableContentsRanges.pop();)t.extractContents(),h(t.startContainer)&&t.startContainer.appendBogus();e.tableSurroundingRange&&e.tableSurroundingRange.extractContents()},purge:function(e){if(e.purgeTableBookmark){var t=e.doc,n=e.range.clone(),t=t.createElement("p");t.insertBefore(e.purgeTableBookmark.startNode),n.moveToBookmark(e.purgeTableBookmark),n.deleteContents(),e.range.moveToPosition(t,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(e){return!(e.range.startPath().contains(CKEDITOR.dtd.$listItem)&&e.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(e){e.startContainer.getDtd()["#"]||e.moveToClosestEditablePosition(null,!0)},autoParagraph:function(e,t){var n,i=t.startPath();r(e,i.block,i.blockLimit)&&(n=s(e))&&(n=t.document.createElement(n),n.appendBogus(),t.insertNode(n),t.moveToPosition(n,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function e(){var e,t=this._.fakeSelection;t&&(e=this.getSelection(1),e&&e.isHidden()||(t.reset(),t=0)),(t||(t=e||this.getSelection(1),t&&t.getType()!=CKEDITOR.SELECTION_NONE))&&(this.fire("selectionCheck",t),e=this.elementPath(),e.compare(this._.selectionPreviousPath)||(CKEDITOR.env.webkit&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=e,this.fire("selectionChange",{selection:t,path:e})))}function t(){h=!0,u||(n.call(this),u=CKEDITOR.tools.setTimeout(n,200,this))}function n(){u=null,h&&(CKEDITOR.tools.setTimeout(e,0,this),h=!1)}function i(e){return!(!f(e)&&(e.type!=CKEDITOR.NODE_ELEMENT||e.is(CKEDITOR.dtd.$empty)))}function o(e){function t(t,n){return!(!t||t.type==CKEDITOR.NODE_TEXT)&&e.clone()["moveToElementEdit"+(n?"End":"Start")](t)}if(!(e.root instanceof CKEDITOR.editable))return!1;var n=e.startContainer,o=e.getPreviousNode(i,null,n),a=e.getNextNode(i,null,n);return!(!t(o)&&!t(a,1)&&(o||a||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()&&n.getBogus()))}function a(e){r(e,!1);var t=e.getDocument().createText(T);return e.setCustomData("cke-fillingChar",t),t}function r(e,t){var n=e&&e.removeCustomData("cke-fillingChar");if(n){if(!1!==t){var i=e.getDocument().getSelection().getNative(),o=i&&"None"!=i.type&&i.getRangeAt(0),a=T.length;if(n.getLength()>a&&o&&o.intersectsNode(n.$)){var r=[{node:i.anchorNode,offset:i.anchorOffset},{node:i.focusNode,offset:i.focusOffset}];i.anchorNode==n.$&&i.anchorOffset>a&&(r[0].offset-=a),i.focusNode==n.$&&i.focusOffset>a&&(r[1].offset-=a)}}n.setText(s(n.getText(),1)),r&&(n=e.getDocument().$,i=n.getSelection(),n=n.createRange(),n.setStart(r[0].node,r[0].offset),n.collapse(!0),i.removeAllRanges(),i.addRange(n),i.extend(r[1].node,r[1].offset))}}function s(e,t){return t?e.replace(C,function(e,t){return t?"\xa0":""}):e.replace(T,"")}function l(e,t){var n=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'">'+(t||"&nbsp;")+"</div>",e.document);e.fire("lockSnapshot"),e.editable().append(n);var i=e.getSelection(1),o=e.createRange(),a=i.root.on("selectionchange",function(e){e.cancel()},null,null,0);o.setStartAt(n,CKEDITOR.POSITION_AFTER_START),o.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),i.selectRanges([o]),a.removeListener(),e.fire("unlockSnapshot"),e._.hiddenSelectionContainer=n}function c(e){var t={37:1,39:1,8:1,46:1};return function(n){var i=n.data.getKeystroke();if(t[i]){var o=e.getSelection().getRanges(),a=o[0];1==o.length&&a.collapsed&&(i=a[38>i?"getPreviousEditableNode":"getNextEditableNode"]())&&i.type==CKEDITOR.NODE_ELEMENT&&"false"==i.getAttribute("contenteditable")&&(e.getSelection().fake(i),n.data.preventDefault(),n.cancel())}}}function d(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.getCommonAncestor().isReadOnly()&&e.splice(t,1),!n.collapsed){if(n.startContainer.isReadOnly())for(var i,o=n.startContainer;o&&!((i=o.type==CKEDITOR.NODE_ELEMENT)&&o.is("body")||!o.isReadOnly());)i&&"false"==o.getAttribute("contentEditable")&&n.setStartAfter(o),o=o.getParent();o=n.startContainer,i=n.endContainer;var a=n.startOffset,r=n.endOffset,s=n.clone();o&&o.type==CKEDITOR.NODE_TEXT&&(a>=o.getLength()?s.setStartAfter(o):s.setStartBefore(o)),i&&i.type==CKEDITOR.NODE_TEXT&&(r?s.setEndAfter(i):s.setEndBefore(i)),o=new CKEDITOR.dom.walker(s),o.evaluator=function(i){if(i.type==CKEDITOR.NODE_ELEMENT&&i.isReadOnly()){var o=n.clone();return n.setEndBefore(i),n.collapsed&&e.splice(t--,1),i.getPosition(s.endContainer)&CKEDITOR.POSITION_CONTAINS||(o.setStartAfter(i),o.collapsed||e.splice(t+1,0,o)),!0}return!1},o.next()}}return e}var u,h,f=CKEDITOR.dom.walker.invisible(1),m=function(){function e(e){return function(t){var n=t.editor.createRange();return n.moveToClosestEditablePosition(t.selected,e)&&t.editor.getSelection().selectRanges([n]),!1}}function t(e){return function(t){var n,i=t.editor,o=i.createRange();return(n=o.moveToClosestEditablePosition(t.selected,e))||(n=o.moveToClosestEditablePosition(t.selected,!e)),n&&i.getSelection().selectRanges([o]),i.fire("saveSnapshot"),t.selected.remove(),n||(o.moveToElementEditablePosition(i.editable()),i.getSelection().selectRanges([o])),i.fire("saveSnapshot"),!1}}var n=e(),i=e(1);return{37:n,38:n,39:i,40:i,8:t(),46:t(1)}}();CKEDITOR.on("instanceCreated",function(n){function i(){var e=o.getSelection();e&&e.removeAllRanges()}var o=n.editor;o.on("contentDom",function(){function n(){s=new CKEDITOR.dom.selection(o.getSelection()),s.lock()}function i(){d.removeListener("mouseup",i),f.removeListener("mouseup",i);var e=CKEDITOR.document.$.selection,t=e.createRange();"None"!=e.type&&t.parentElement().ownerDocument==l.$&&t.select()}var a,s,l=o.document,d=CKEDITOR.document,u=o.editable(),h=l.getBody(),f=l.getDocumentElement(),m=u.isInline();if(CKEDITOR.env.gecko&&u.attachListener(u,"focus",function(e){e.removeListener(),0!==a&&(e=o.getSelection().getNative())&&e.isCollapsed&&e.anchorNode==u.$&&(e=o.createRange(),e.moveToElementEditStart(u),e.select())},null,null,-2),u.attachListener(u,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){a&&CKEDITOR.env.webkit&&(a=o._.previousActive&&o._.previousActive.equals(l.getActive())),o.unlockSelection(a),a=0},null,null,-1),u.attachListener(u,"mousedown",function(){a=0}),(CKEDITOR.env.ie||m)&&(g?u.attachListener(u,"beforedeactivate",n,null,null,-1):u.attachListener(o,"selectionCheck",n,null,null,-1),u.attachListener(u,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){o.lockSelection(s),a=1},null,null,-1),u.attachListener(u,"mousedown",function(){a=0})),CKEDITOR.env.ie&&!m){var E;u.attachListener(u,"mousedown",function(e){2==e.data.$.button&&((e=o.document.getSelection())&&e.getType()!=CKEDITOR.SELECTION_NONE||(E=o.window.getScrollPosition()))}),u.attachListener(u,"mouseup",function(e){2==e.data.$.button&&E&&(o.document.$.documentElement.scrollLeft=E.x,o.document.$.documentElement.scrollTop=E.y),E=null}),"BackCompat"!=l.$.compatMode&&((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&f.on("mousedown",function(e){function t(e){if(e=e.data.$,i){var t=h.$.createTextRange();try{t.moveToPoint(e.clientX,e.clientY)}catch(e){}i.setEndPoint(0>o.compareEndPoints("StartToStart",t)?"EndToEnd":"StartToStart",t),i.select()}}function n(){f.removeListener("mousemove",t),d.removeListener("mouseup",n),f.removeListener("mouseup",n),i.select()}if(e=e.data,e.getTarget().is("html")&&e.$.y<f.$.clientHeight&&e.$.x<f.$.clientWidth){var i=h.$.createTextRange();try{i.moveToPoint(e.$.clientX,e.$.clientY)}catch(e){}var o=i.duplicate();f.on("mousemove",t),d.on("mouseup",n),f.on("mouseup",n)}}),7<CKEDITOR.env.version&&11>CKEDITOR.env.version&&f.on("mousedown",function(e){e.data.getTarget().is("html")&&(d.on("mouseup",i),f.on("mouseup",i))}))}if(u.attachListener(u,"selectionchange",e,o),u.attachListener(u,"keyup",t,o),u.attachListener(u,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){o.forceNextSelectionCheck(),o.selectionChange(1)}),m&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var p;u.attachListener(u,"mousedown",function(){p=1}),u.attachListener(l.getDocumentElement(),"mouseup",function(){p&&t.call(o),p=0})}else u.attachListener(CKEDITOR.env.ie?u:l.getDocumentElement(),"mouseup",t,o);CKEDITOR.env.webkit&&u.attachListener(l,"keydown",function(e){switch(e.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:r(u)}},null,null,-1),u.attachListener(u,"keydown",c(o),null,null,-1)}),o.on("setData",function(){o.unlockSelection(),CKEDITOR.env.webkit&&i()}),o.on("contentDomUnload",function(){o.unlockSelection()}),CKEDITOR.env.ie9Compat&&o.on("beforeDestroy",i,null,null,9),o.on("dataReady",function(){delete o._.fakeSelection,delete o._.hiddenSelectionContainer,o.selectionChange(1)}),o.on("loadSnapshot",function(){var e=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),t=o.editable().getLast(e);
t&&t.hasAttribute("data-cke-hidden-sel")&&(t.remove(),CKEDITOR.env.gecko&&(e=o.editable().getFirst(e))&&e.is("br")&&e.getAttribute("_moz_editor_bogus_node")&&e.remove())},null,null,100),o.on("key",function(e){if("wysiwyg"==o.mode){var t=o.getSelection();if(t.isFake){var n=m[e.data.keyCode];if(n)return n({editor:o,selected:t.getSelectedElement(),selection:t,keyEvent:e})}}})}),CKEDITOR.env.webkit&&CKEDITOR.on("instanceReady",function(e){var t=e.editor;t.on("selectionChange",function(){var e=t.editable(),n=e.getCustomData("cke-fillingChar");n&&(n.getCustomData("ready")?r(e):n.setCustomData("ready",1))},null,null,-1),t.on("beforeSetMode",function(){r(t.editable())},null,null,-1),t.on("getSnapshot",function(e){e.data&&(e.data=s(e.data))},t,null,20),t.on("toDataFormat",function(e){e.data.dataValue=s(e.data.dataValue)},null,null,0)}),CKEDITOR.editor.prototype.selectionChange=function(n){(n?e:t).call(this)},CKEDITOR.editor.prototype.getSelection=function(e){return!this._.savedSelection&&!this._.fakeSelection||e?(e=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(e):null:this._.savedSelection||this._.fakeSelection},CKEDITOR.editor.prototype.lockSelection=function(e){return e=e||this.getSelection(1),e.getType()!=CKEDITOR.SELECTION_NONE&&(!e.isLocked&&e.lock(),this._.savedSelection=e,!0)},CKEDITOR.editor.prototype.unlockSelection=function(e){var t=this._.savedSelection;return!!t&&(t.unlock(e),delete this._.savedSelection,!0)},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 e=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);return e.selectRanges([this]),e},CKEDITOR.SELECTION_NONE=1,CKEDITOR.SELECTION_TEXT=2,CKEDITOR.SELECTION_ELEMENT=3;var g="function"!=typeof window.getSelection,E=1;CKEDITOR.dom.selection=function(e){if(e instanceof CKEDITOR.dom.selection){var t=e;e=e.root}var n=e instanceof CKEDITOR.dom.element;if(this.rev=t?t.rev:E++,this.document=e instanceof CKEDITOR.dom.document?e:e.getDocument(),this.root=n?e:this.document.getBody(),this.isLocked=0,this._={cache:{}},t)return CKEDITOR.tools.extend(this._.cache,t._.cache),this.isFake=t.isFake,this.isLocked=t.isLocked,this;e=this.getNative();var i,o;if(e)if(e.getRangeAt)i=(o=e.rangeCount&&e.getRangeAt(0))&&new CKEDITOR.dom.node(o.commonAncestorContainer);else{try{o=e.createRange()}catch(e){}i=o&&CKEDITOR.dom.element.get(o.item&&o.item(0)||o.parentElement())}return(!i||i.type!=CKEDITOR.NODE_ELEMENT&&i.type!=CKEDITOR.NODE_TEXT||!this.root.equals(i)&&!this.root.contains(i))&&(this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList),this};var p={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},T=CKEDITOR.tools.repeat("\u200b",7),C=new RegExp(T+"( )?","g");CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:s,_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:T}),CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=g?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:g?function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_NONE;try{var n=this.getNative(),i=n.type;"Text"==i&&(t=CKEDITOR.SELECTION_TEXT),"Control"==i&&(t=CKEDITOR.SELECTION_ELEMENT),n.createRange().parentElement()&&(t=CKEDITOR.SELECTION_TEXT)}catch(e){}return e.type=t}:function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_TEXT,n=this.getNative();if(n&&n.rangeCount){if(1==n.rangeCount){var n=n.getRangeAt(0),i=n.startContainer;i==n.endContainer&&1==i.nodeType&&1==n.endOffset-n.startOffset&&p[i.childNodes[n.startOffset].nodeName.toLowerCase()]&&(t=CKEDITOR.SELECTION_ELEMENT)}}else t=CKEDITOR.SELECTION_NONE;return e.type=t},getRanges:function(){var e=g?function(){function e(e){return new CKEDITOR.dom.node(e).getIndex()}var t=function(t,n){t=t.duplicate(),t.collapse(n);var i=t.parentElement();if(!i.hasChildNodes())return{container:i,offset:0};for(var o,a,r,s,l=i.children,c=t.duplicate(),d=0,u=l.length-1,h=-1;d<=u;)if(h=Math.floor((d+u)/2),o=l[h],c.moveToElementText(o),r=c.compareEndPoints("StartToStart",t),0<r)u=h-1;else{if(!(0>r))return{container:i,offset:e(o)};d=h+1}if(-1==h||h==l.length-1&&0>r){if(c.moveToElementText(i),c.setEndPoint("StartToStart",t),c=c.text.replace(/(\r\n|\r)/g,"\n").length,l=i.childNodes,!c)return o=l[l.length-1],o.nodeType!=CKEDITOR.NODE_TEXT?{container:i,offset:l.length}:{container:o,offset:o.nodeValue.length};for(i=l.length;0<c&&0<i;)a=l[--i],a.nodeType==CKEDITOR.NODE_TEXT&&(s=a,c-=a.nodeValue.length);return{container:s,offset:-c}}if(c.collapse(0<r),c.setEndPoint(0<r?"StartToStart":"EndToStart",t),c=c.text.replace(/(\r\n|\r)/g,"\n").length,!c)return{container:i,offset:e(o)+(0<r?0:1)};for(;0<c;)try{a=o[0<r?"previousSibling":"nextSibling"],a.nodeType==CKEDITOR.NODE_TEXT&&(c-=a.nodeValue.length,s=a),o=a}catch(t){return{container:i,offset:e(o)}}return{container:s,offset:0<r?-c:s.nodeValue.length+c}};return function(){var e=this.getNative(),n=e&&e.createRange(),i=this.getType();if(!e)return[];if(i==CKEDITOR.SELECTION_TEXT)return e=new CKEDITOR.dom.range(this.root),i=t(n,!0),e.setStart(new CKEDITOR.dom.node(i.container),i.offset),i=t(n),e.setEnd(new CKEDITOR.dom.node(i.container),i.offset),e.endContainer.getPosition(e.startContainer)&CKEDITOR.POSITION_PRECEDING&&e.endOffset<=e.startContainer.getIndex()&&e.collapse(),[e];if(i==CKEDITOR.SELECTION_ELEMENT){for(var i=[],o=0;o<n.length;o++){for(var a=n.item(o),r=a.parentNode,s=0,e=new CKEDITOR.dom.range(this.root);s<r.childNodes.length&&r.childNodes[s]!=a;s++);e.setStart(new CKEDITOR.dom.node(r),s),e.setEnd(new CKEDITOR.dom.node(r),s+1),i.push(e)}return i}return[]}}():function(){var e,t=[],n=this.getNative();if(!n)return t;for(var i=0;i<n.rangeCount;i++){var o=n.getRangeAt(i);e=new CKEDITOR.dom.range(this.root),e.setStart(new CKEDITOR.dom.node(o.startContainer),o.startOffset),e.setEnd(new CKEDITOR.dom.node(o.endContainer),o.endOffset),t.push(e)}return t};return function(t){var n=this._.cache,i=n.ranges;return i||(n.ranges=i=new CKEDITOR.dom.rangeList(e.call(this))),t?d(new CKEDITOR.dom.rangeList(i.slice())):i}}(),getStartElement:function(){var e=this._.cache;if(void 0!==e.startElement)return e.startElement;var t;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var n=this.getRanges()[0];if(n){if(n.collapsed)t=n.startContainer,t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent());else{for(n.optimize();t=n.startContainer,n.startOffset==(t.getChildCount?t.getChildCount():t.getLength())&&!t.isBlockBoundary();)n.setStartAfter(t);if(t=n.startContainer,t.type!=CKEDITOR.NODE_ELEMENT)return t.getParent();if((t=t.getChild(n.startOffset))&&t.type==CKEDITOR.NODE_ELEMENT)for(n=t.getFirst();n&&n.type==CKEDITOR.NODE_ELEMENT;)t=n,n=n.getFirst();else t=n.startContainer}t=t.$}}return e.startElement=t?new CKEDITOR.dom.element(t):null},getSelectedElement:function(){var e=this._.cache;if(void 0!==e.selectedElement)return e.selectedElement;var t=this,n=CKEDITOR.tools.tryThese(function(){return t.getNative().createRange().item(0)},function(){for(var e,n,i=t.getRanges()[0].clone(),o=2;o&&!((e=i.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&p[e.getName()]&&(n=e));o--)i.shrink(CKEDITOR.SHRINK_ELEMENT);return n&&n.$});return e.selectedElement=n?new CKEDITOR.dom.element(n):null},getSelectedText:function(){var e=this._.cache;if(void 0!==e.selectedText)return e.selectedText;var t=this.getNative(),t=g?"Control"==t.type?"":t.createRange().text:t.toString();return e.selectedText=t},lock:function(){this.getRanges(),this.getStartElement(),this.getSelectedElement(),this.getSelectedText(),this._.cache.nativeSel=null,this.isLocked=1},unlock:function(e){if(this.isLocked){if(e)var t=this.getSelectedElement(),n=!t&&this.getRanges(),i=this.isFake;this.isLocked=0,this.reset(),e&&(e=t||n[0]&&n[0].getCommonAncestor())&&e.getAscendant("body",1)&&(i?this.fake(t):t?this.selectElement(t):this.selectRanges(n))}},reset:function(){this._.cache={},this.isFake=0;var e=this.root.editor;if(e&&e._.fakeSelection)if(this.rev==e._.fakeSelection.rev){delete e._.fakeSelection;var t=e._.hiddenSelectionContainer;if(t){var n=e.checkDirty();e.fire("lockSnapshot"),t.remove(),e.fire("unlockSnapshot"),!n&&e.resetDirty()}delete e._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=E++},selectElement:function(e){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(e),t.setEndAfter(e),this.selectRanges([t])},selectRanges:function(e){var t=this.root.editor,t=t&&t._.hiddenSelectionContainer;if(this.reset(),t)for(var n,t=this.root,i=0;i<e.length;++i)n=e[i],n.endContainer.equals(t)&&(n.endOffset=Math.min(n.endOffset,t.getChildCount()));if(e.length)if(this.isLocked){var s=CKEDITOR.document.getActive();this.unlock(),this.selectRanges(e),this.lock(),s&&!s.equals(this.root)&&s.focus()}else{var l,c,d;if(1==e.length&&!(d=e[0]).collapsed&&(l=d.getEnclosedNode())&&l.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(c=d.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&(l=c),"false"==l.getAttribute("contenteditable"))||(l=void 0),l)this.fake(l);else{if(g){d=CKEDITOR.dom.walker.whitespaces(!0),c=/\ufeff|\u00a0/,t={table:1,tbody:1,tr:1},1<e.length&&(l=e[e.length-1],e[0].setEnd(l.endContainer,l.endOffset)),l=e[0],e=l.collapsed;var u,h,f;if((n=l.getEnclosedNode())&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in p&&(!n.is("a")||!n.getText()))try{return f=n.$.createControlRange(),f.addElement(n.$),void f.select()}catch(e){}(l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in t||l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in t)&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),e=l.collapsed),f=l.createBookmark(),t=f.startNode,e||(s=f.endNode),f=l.document.$.body.createTextRange(),f.moveToElementText(t.$),f.moveStart("character",1),s?(c=l.document.$.body.createTextRange(),c.moveToElementText(s.$),f.setEndPoint("EndToEnd",c),f.moveEnd("character",-1)):(u=t.getNext(d),h=t.hasAscendant("pre"),u=!(u&&u.getText&&u.getText().match(c))&&(h||!t.hasPrevious()||t.getPrevious().is&&t.getPrevious().is("br")),h=l.document.createElement("span"),h.setHtml("&#65279;"),h.insertBefore(t),u&&l.document.createText("\ufeff").insertBefore(t)),l.setStartBefore(t),t.remove(),e?(u?(f.moveStart("character",-1),f.select(),l.document.$.selection.clear()):f.select(),l.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START),h.remove()):(l.setEndBefore(s),s.remove(),f.select())}else{if(s=this.getNative(),!s)return;for(this.removeAllRanges(),f=0;f<e.length;f++)if(f<e.length-1&&(u=e[f],h=e[f+1],c=u.clone(),c.setStart(u.endContainer,u.endOffset),c.setEnd(h.startContainer,h.startOffset),!c.collapsed&&(c.shrink(CKEDITOR.NODE_ELEMENT,!0),l=c.getCommonAncestor(),c=c.getEnclosedNode(),l.isReadOnly()||c&&c.isReadOnly())))h.setStart(u.startContainer,u.startOffset),e.splice(f--,1);else{l=e[f],h=this.document.$.createRange(),l.collapsed&&CKEDITOR.env.webkit&&o(l)&&(c=a(this.root),l.insertNode(c),(u=c.getNext())&&!c.getPrevious()&&u.type==CKEDITOR.NODE_ELEMENT&&"br"==u.getName()?(r(this.root),l.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START)):l.moveToPosition(c,CKEDITOR.POSITION_AFTER_END)),h.setStart(l.startContainer.$,l.startOffset);try{h.setEnd(l.endContainer.$,l.endOffset)}catch(e){if(!(0<=e.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")))throw e;l.collapse(1),h.setEnd(l.endContainer.$,l.endOffset)}s.addRange(h)}}this.reset(),this.root.fire("selectionchange")}}},fake:function(e,t){var n=this.root.editor;void 0===t&&e.hasAttribute("aria-label")&&(t=e.getAttribute("aria-label")),this.reset(),l(n,t);var i=this._.cache,o=new CKEDITOR.dom.range(this.root);o.setStartBefore(e),o.setEndAfter(e),i.ranges=new CKEDITOR.dom.rangeList(o),i.selectedElement=i.startElement=e,i.type=CKEDITOR.SELECTION_ELEMENT,i.selectedText=i.nativeSel=null,this.isFake=1,this.rev=E++,n._.fakeSelection=this,this.root.fire("selectionchange")},isHidden:function(){var e=this.getCommonAncestor();return e&&e.type==CKEDITOR.NODE_TEXT&&(e=e.getParent()),!(!e||!e.data("cke-hidden-sel"))},createBookmarks:function(e){return e=this.getRanges().createBookmarks(e),this.isFake&&(e.isFake=1),e},createBookmarks2:function(e){return e=this.getRanges().createBookmarks2(e),this.isFake&&(e.isFake=1),e},selectBookmarks:function(e){for(var t,n=[],i=0;i<e.length;i++){var o=new CKEDITOR.dom.range(this.root);o.moveToBookmark(e[i]),n.push(o)}return e.isFake&&(t=n[0].getEnclosedNode(),t&&t.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),e.isFake=0)),e.isFake?this.fake(t):this.selectRanges(n),this},getCommonAncestor:function(){var e=this.getRanges();return e.length?e[0].startContainer.getCommonAncestor(e[e.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var e=this.getNative();try{e&&e[g?"empty":"removeAllRanges"]()}catch(e){}this.reset()}}}}(),CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function e(e,t){for(var n,i;(e=e.getParent())&&!e.equals(t);)if(e.getAttribute("data-nostyle"))n=e;else if(!i){var o=e.getAttribute("contentEditable");"false"==o?n=e:"true"==o&&(i=1)}return n}function t(e,t,n,i){return(e.getPosition(t)|i)==i&&(!n.childRule||n.childRule(e))}function n(i){var a=i.document;if(i.collapsed)a=p(this,a),i.insertNode(a),i.moveToPosition(a,CKEDITOR.POSITION_BEFORE_END);else{var r,s=this.element,l=this._.definition,c=l.ignoreReadonly,d=c||l.includeReadonly;null==d&&(d=i.root.getCustomData("cke_includeReadonly"));var u=CKEDITOR.dtd[s];u||(r=!0,u=CKEDITOR.dtd.span),i.enlarge(CKEDITOR.ENLARGE_INLINE,1),i.trim();var h,f=i.createBookmark(),g=f.startNode,E=f.endNode,T=g;if(!c){var C=i.getCommonAncestor(),c=e(g,C),C=e(E,C);c&&(T=c.getNextSourceNode(!0)),C&&(E=C)}for(T.getPosition(E)==CKEDITOR.POSITION_FOLLOWING&&(T=0);T;){if(c=!1,T.equals(E))T=null,c=!0;else{var I=T.type==CKEDITOR.NODE_ELEMENT?T.getName():null,C=I&&"false"==T.getAttribute("contentEditable"),O=I&&T.getAttribute("data-nostyle");if(I&&T.data("cke-bookmark")){T=T.getNextSourceNode(!0);continue}if(C&&d&&CKEDITOR.dtd.$block[I])for(var D=T,R=o(D),v=void 0,b=R.length,K=0,D=b&&new CKEDITOR.dom.range(D.getDocument());K<b;++K){var v=R[K],y=CKEDITOR.filter.instances[v.data("cke-filter")];(y?y.check(this):1)&&(D.selectNodeContents(v),n.call(this,D))}if(R=I?!u[I]||O?0:C&&!d?0:t(T,E,l,N):1){if(v=T.getParent(),R=l,b=s,K=r,!v||!(v.getDtd()||CKEDITOR.dtd.span)[b]&&!K||R.parentRule&&!R.parentRule(v))c=!0;else if(h||I&&CKEDITOR.dtd.$removeEmpty[I]&&(T.getPosition(E)|N)!=N||(h=i.clone(),h.setStartBefore(T)),I=T.type,I==CKEDITOR.NODE_TEXT||C||I==CKEDITOR.NODE_ELEMENT&&!T.getChildCount()){for(var k,I=T;(c=!I.getNext(_))&&(k=I.getParent(),u[k.getName()])&&t(k,g,l,S);)I=k;h.setEndAfter(I)}}else c=!0;T=T.getNextSourceNode(O||C)}if(c&&h&&!h.collapsed){for(var w,x,A,c=p(this,a),C=c.hasAttributes(),O=h.getCommonAncestor(),I={},R={},v={},b={};c&&O;){if(O.getName()==s){for(w in l.attributes)!b[w]&&(A=O.getAttribute(x))&&(c.getAttribute(w)==A?R[w]=1:b[w]=1);for(x in l.styles)!v[x]&&(A=O.getStyle(x))&&(c.getStyle(x)==A?I[x]=1:v[x]=1)}O=O.getParent()}for(w in R)c.removeAttribute(w);for(x in I)c.removeStyle(x);C&&!c.hasAttributes()&&(c=null),c?(h.extractContents().appendTo(c),h.insertNode(c),m.call(this,c),c.mergeSiblings(),CKEDITOR.env.ie||c.$.normalize()):(c=new CKEDITOR.dom.element("span"),h.extractContents().appendTo(c),h.insertNode(c),m.call(this,c),c.remove(!0)),h=null}}i.moveToBookmark(f),i.shrink(CKEDITOR.SHRINK_TEXT),i.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function i(e){function t(){for(var e=new CKEDITOR.dom.elementPath(i.getParent()),t=new CKEDITOR.dom.elementPath(c.getParent()),n=null,o=null,a=0;a<e.elements.length;a++){var r=e.elements[a];if(r==e.block||r==e.blockLimit)break;d.checkElementRemovable(r,!0)&&(n=r)}for(a=0;a<t.elements.length&&(r=t.elements[a],r!=t.block&&r!=t.blockLimit);a++)d.checkElementRemovable(r,!0)&&(o=r);o&&c.breakParent(o),n&&i.breakParent(n)}e.enlarge(CKEDITOR.ENLARGE_INLINE,1);var n=e.createBookmark(),i=n.startNode;if(e.collapsed){for(var o,a,r=new CKEDITOR.dom.elementPath(i.getParent(),e.root),s=0;s<r.elements.length&&(a=r.elements[s])&&a!=r.block&&a!=r.blockLimit;s++)if(this.checkElementRemovable(a)){var l;e.collapsed&&(e.checkBoundaryOfElement(a,CKEDITOR.END)||(l=e.checkBoundaryOfElement(a,CKEDITOR.START)))?(o=a,o.match=l?"start":"end"):(a.mergeSiblings(),a.is(this.element)?f.call(this,a):g(a,I(this)[a.getName()]))}if(o){for(a=i,s=0;l=r.elements[s],!l.equals(o);s++)l.match||(l=l.clone(),l.append(a),a=l);a["start"==o.match?"insertBefore":"insertAfter"](o)}}else{var c=n.endNode,d=this;for(t(),r=i;!r.equals(c);)o=r.getNextSourceNode(),r.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(r)&&(r.getName()==this.element?f.call(this,r):g(r,I(this)[r.getName()]),o.type==CKEDITOR.NODE_ELEMENT&&o.contains(i)&&(t(),o=i.getNext())),r=o}e.moveToBookmark(n),e.shrink(CKEDITOR.NODE_ELEMENT,!0)}function o(e){var t=[];return e.forEach(function(e){if("true"==e.getAttribute("contenteditable"))return t.push(e),!1},CKEDITOR.NODE_ELEMENT,!0),t}function a(e){var t=e.getEnclosedNode()||e.getCommonAncestor(!1,!0);(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1))&&!e.isReadOnly()&&T(e,this)}function r(e){var t=e.getCommonAncestor(!0,!0);if(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1)){var t=this._.definition,n=t.attributes;if(n)for(var i in n)e.removeAttribute(i,n[i]);if(t.styles)for(var o in t.styles)t.styles.hasOwnProperty(o)&&e.removeStyle(o)}}function s(e){var t=e.createBookmark(!0),n=e.createIterator();n.enforceRealBlocks=!0,this._.enterMode&&(n.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var i,o,a=e.document;i=n.getNextParagraph();)!i.isReadOnly()&&(n.activeFilter?n.activeFilter.check(this):1)&&(o=p(this,a,i),c(i,o));e.moveToBookmark(t)}function l(e){var t=e.createBookmark(1),n=e.createIterator();n.enforceRealBlocks=!0,n.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var i,o;i=n.getNextParagraph();)this.checkElementRemovable(i)&&(i.is("pre")?((o=this._.enterMode==CKEDITOR.ENTER_BR?null:e.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&i.copyAttributes(o),c(i,o)):f.call(this,i));e.moveToBookmark(t)}function c(e,t){var n=!t;n&&(t=e.getDocument().createElement("div"),e.copyAttributes(t));var i=t&&t.is("pre"),o=e.is("pre"),a=!i&&o;if(i&&!o){if(o=t,(a=e.getBogus())&&a.remove(),a=e.getHtml(),a=u(a,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,""),a=a.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1"),a=a.replace(/([ \t\n\r]+|&nbsp;)/g," "),a=a.replace(/<br\b[^>]*>/gi,"\n"),CKEDITOR.env.ie){var r=e.getDocument().createElement("div");r.append(o),o.$.outerHTML="<pre>"+a+"</pre>",o.copyAttributes(r.getFirst()),o=r.getFirst().remove()}else o.setHtml(a);t=o}else a?t=h(n?[e.getHtml()]:d(e),t):e.moveChildren(t);if(t.replace(e),i){var s,n=t;(s=n.getPrevious(k))&&s.type==CKEDITOR.NODE_ELEMENT&&s.is("pre")&&(i=u(s.getHtml(),/\n$/,"")+"\n\n"+u(n.getHtml(),/^\n/,""),CKEDITOR.env.ie?n.$.outerHTML="<pre>"+i+"</pre>":n.setHtml(i),s.remove())}else n&&E(t)}function d(e){var t=[];return u(e.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(e,t,n){return t+"</pre>"+n+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(e,n){t.push(n)}),t}function u(e,t,n){var i="",o="";return e=e.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(e,t,n){return t&&(i=t),n&&(o=n),""}),i+e.replace(t,n)+o}function h(e,t){var n;1<e.length&&(n=new CKEDITOR.dom.documentFragment(t.getDocument()));for(var i=0;i<e.length;i++){var o=e[i],o=o.replace(/(\r\n|\r)/g,"\n"),o=u(o,/^[ \t]*\n/,""),o=u(o,/\n$/,""),o=u(o,/^[ \t]+|[ \t]+$/g,function(e,t){return 1==e.length?"&nbsp;":t?" "+CKEDITOR.tools.repeat("&nbsp;",e.length-1):CKEDITOR.tools.repeat("&nbsp;",e.length-1)+" "}),o=o.replace(/\n/g,"<br>"),o=o.replace(/[ \t]{2,}/g,function(e){return CKEDITOR.tools.repeat("&nbsp;",e.length-1)+" "});if(n){var a=t.clone();a.setHtml(o),n.append(a)}else t.setHtml(o)}return n||t}function f(e,t){var n,i=this._.definition,o=i.attributes,i=i.styles,a=I(this)[e.getName()],r=CKEDITOR.tools.isEmpty(o)&&CKEDITOR.tools.isEmpty(i);for(n in o)("class"!=n&&!this._.definition.fullMatch||e.getAttribute(n)==O(n,o[n]))&&(t&&"data-"==n.slice(0,5)||(r=e.hasAttribute(n),e.removeAttribute(n)));for(var s in i)this._.definition.fullMatch&&e.getStyle(s)!=O(s,i[s],!0)||(r=r||!!e.getStyle(s),e.removeStyle(s));g(e,a,v[e.getName()]),r&&(this._.definition.alwaysRemoveElement?E(e,1):!CKEDITOR.dtd.$block[e.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!e.hasAttributes()?E(e):e.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function m(e){for(var t,n=I(this),i=e.getElementsByTag(this.element),o=i.count();0<=--o;)t=i.getItem(o),t.isReadOnly()||f.call(this,t,!0);for(var a in n)if(a!=this.element)for(i=e.getElementsByTag(a),o=i.count()-1;0<=o;o--)t=i.getItem(o),t.isReadOnly()||g(t,n[a])}function g(e,t,n){if(t=t&&t.attributes)for(var i=0;i<t.length;i++){var o,a=t[i][0];if(o=e.getAttribute(a)){var r=t[i][1];(null===r||r.test&&r.test(o)||"string"==typeof r&&o==r)&&e.removeAttribute(a)}}n||E(e)}function E(e,t){if(!e.hasAttributes()||t)if(CKEDITOR.dtd.$block[e.getName()]){var n=e.getPrevious(k),i=e.getNext(k);!n||n.type!=CKEDITOR.NODE_TEXT&&n.isBlockBoundary({br:1})||e.append("br",1),!i||i.type!=CKEDITOR.NODE_TEXT&&i.isBlockBoundary({br:1})||e.append("br"),e.remove(!0)}else n=e.getFirst(),i=e.getLast(),e.remove(!0),n&&(n.type==CKEDITOR.NODE_ELEMENT&&n.mergeSiblings(),i&&!n.equals(i)&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings())}function p(e,t,n){var i;return i=e.element,"*"==i&&(i="span"),i=new CKEDITOR.dom.element(i,t),n&&n.copyAttributes(i),i=T(i,e),t.getCustomData("doc_processing_style")&&i.hasAttribute("id")?i.removeAttribute("id"):t.setCustomData("doc_processing_style",1),i}function T(e,t){var n=t._.definition,i=n.attributes,n=CKEDITOR.style.getStyleText(n);if(i)for(var o in i)e.setAttribute(o,i[o]);return n&&e.setAttribute("style",n),e}function C(e,t){for(var n in e)e[n]=e[n].replace(y,function(e,n){return t[n]})}function I(e){if(e._.overrides)return e._.overrides;var t=e._.overrides={},n=e._.definition.overrides;if(n){CKEDITOR.tools.isArray(n)||(n=[n]);for(var i=0;i<n.length;i++){var o,a,r=n[i];if("string"==typeof r?o=r.toLowerCase():(o=r.element?r.element.toLowerCase():e.element,a=r.attributes),r=t[o]||(t[o]={}),a){var s,r=r.attributes=r.attributes||[];for(s in a)r.push([s.toLowerCase(),a[s]])}}}return t}function O(e,t,n){var i=new CKEDITOR.dom.element("span");return i[n?"setStyle":"setAttribute"](e,t),i[n?"getStyle":"getAttribute"](e)}function D(e,t){function n(e,t){return"font-family"==t.toLowerCase()?e.replace(/["']/g,""):e}"string"==typeof e&&(e=CKEDITOR.tools.parseCssText(e)),"string"==typeof t&&(t=CKEDITOR.tools.parseCssText(t,!0));for(var i in e)if(!(i in t)||n(t[i],i)!=n(e[i],i)&&"inherit"!=e[i]&&"inherit"!=t[i])return!1;return!0}function R(e,t,n){var i=e.document,o=e.getRanges();t=t?this.removeFromRange:this.applyToRange;for(var a,r=o.createIterator();a=r.getNextRange();)t.call(this,a,n);e.selectRanges(o),i.removeCustomData("doc_processing_style")}var v={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},b={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},K=/\s*(?:;\s*|$)/,y=/#\((.+?)\)/g,_=CKEDITOR.dom.walker.bookmark(0,1),k=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(e,t){if("string"==typeof e.type)return new CKEDITOR.style.customHandlers[e.type](e);var n=e.attributes;n&&n.style&&(e.styles=CKEDITOR.tools.extend({},e.styles,CKEDITOR.tools.parseCssText(n.style)),delete n.style),t&&(e=CKEDITOR.tools.clone(e),C(e.attributes,t),C(e.styles,t)),n=this.element=e.element?"string"==typeof e.element?e.element.toLowerCase():e.element:"*",this.type=e.type||(v[n]?CKEDITOR.STYLE_BLOCK:b[n]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE),"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT),this._={definition:e}},CKEDITOR.style.prototype={apply:function(e){if(e instanceof CKEDITOR.dom.document)return R.call(this,e.getSelection());if(this.checkApplicable(e.elementPath(),e)){var t=this._.enterMode;t||(this._.enterMode=e.activeEnterMode),R.call(this,e.getSelection(),0,e),this._.enterMode=t}},remove:function(e){if(e instanceof CKEDITOR.dom.document)return R.call(this,e.getSelection(),1);if(this.checkApplicable(e.elementPath(),e)){var t=this._.enterMode;t||(this._.enterMode=e.activeEnterMode),R.call(this,e.getSelection(),1,e),this._.enterMode=t}},applyToRange:function(e){return this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?n:this.type==CKEDITOR.STYLE_BLOCK?s:this.type==CKEDITOR.STYLE_OBJECT?a:null,this.applyToRange(e)},removeFromRange:function(e){return this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?i:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?r:null,this.removeFromRange(e)},applyToObject:function(e){T(e,this)},checkActive:function(e,t){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(e.block||e.blockLimit,!0,t);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var n,i=e.elements,o=0;o<i.length;o++)if(n=i[o],this.type!=CKEDITOR.STYLE_INLINE||n!=e.block&&n!=e.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var a=n.getName();if(!("string"==typeof this.element?a==this.element:a in this.element))continue}if(this.checkElementRemovable(n,!0,t))return!0}}return!1},checkApplicable:function(e,t,n){if(t&&t instanceof CKEDITOR.filter&&(n=t),n&&!n.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!e.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!e.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(e,t){var n=this._.definition;if(!e||!n.ignoreReadonly&&e.isReadOnly())return!1;var i=e.getName();if("string"==typeof this.element?i==this.element:i in this.element){if(!t&&!e.hasAttributes())return!0;if(i=n._AC)n=i;else{var i={},o=0,a=n.attributes;if(a)for(var r in a)o++,i[r]=a[r];(r=CKEDITOR.style.getStyleText(n))&&(i.style||o++,i.style=r),i._length=o,n=n._AC=i}if(!n._length)return!0;for(var s in n)if("_length"!=s)if(i=e.getAttribute(s)||"","style"==s?D(n[s],i):n[s]==i){if(!t)return!0}else if(t)return!1;if(t)return!0}return!1},checkElementRemovable:function(e,t,n){if(this.checkElementMatch(e,t,n))return!0;if(t=I(this)[e.getName()]){var i;if(!(t=t.attributes))return!0;for(n=0;n<t.length;n++)if(i=t[n][0],i=e.getAttribute(i)){var o=t[n][1];if(null===o)return!0;if("string"==typeof o){if(i==o)return!0}else if(o.test(i))return!0}}return!1},buildPreview:function(e){var t=this._.definition,n=[],i=t.element;"bdo"==i&&(i="span");var n=["<",i],o=t.attributes;if(o)for(var a in o)n.push(" ",a,'="',o[a],'"');return(o=CKEDITOR.style.getStyleText(t))&&n.push(' style="',o,'"'),n.push(">",e||t.name,"</",i,">"),n.join("")},getDefinition:function(){return this._.definition}},CKEDITOR.style.getStyleText=function(e){var t=e._ST;if(t)return t;var t=e.styles,n=e.attributes&&e.attributes.style||"",i="";n.length&&(n=n.replace(K,";"));for(var o in t){var a=t[o],r=(o+":"+a).replace(K,";");"inherit"==a?i+=r:n+=r}return n.length&&(n=CKEDITOR.tools.normalizeCssText(n,!0)),e._ST=n+i},CKEDITOR.style.customHandlers={},CKEDITOR.style.addCustomHandler=function(e){var t=function(e){this._={definition:e},this.setup&&this.setup(e)};return t.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},e,!0),this.customHandlers[e.type]=t};var N=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,S=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(e,t){this.requiredContent=this.allowedContent=this.style=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus(),this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,t,n){CKEDITOR.stylesSet.addExternal(e,t,""),CKEDITOR.stylesSet.load(e,n)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(e,t){var n=this._.styleStateChangeCallbacks;n||(n=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(e){for(var t=0;t<n.length;t++){var i=n[t],o=i.style.checkActive(e.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;i.fn.call(this,o)}})),n.push({style:e,fn:t})},applyStyle:function(e){e.apply(this)},removeStyle:function(e){e.remove(this)},getStylesSet:function(e){if(this._.stylesDefinitions)e(this._.stylesDefinitions);else{var t=this,n=t.config.stylesCombo_stylesSet||t.config.stylesSet;if(!1===n)e(null);else if(n instanceof Array)t._.stylesDefinitions=n,e(n);else{n||(n="default");var n=n.split(":"),i=n[0];CKEDITOR.stylesSet.addExternal(i,n[1]?n.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),""),CKEDITOR.stylesSet.load(i,function(n){t._.stylesDefinitions=n[i],e(t._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createComment(e)),CKEDITOR.dom.domObject.call(this,e)},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 e,t={},n={};for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(t[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(n[e]=1);CKEDITOR.dom.elementPath=function(e,i){var o,a=null,r=null,s=[],l=e;i=i||e.getDocument().getBody();do if(l.type==CKEDITOR.NODE_ELEMENT){if(s.push(l),!this.lastElement&&(this.lastElement=l,l.is(CKEDITOR.dtd.$object)||"false"==l.getAttribute("contenteditable")))continue;if(l.equals(i))break;if(!r&&(o=l.getName(),"true"==l.getAttribute("contenteditable")?r=l:!a&&n[o]&&(a=l),t[o])){if(o=!a&&"div"==o){e:{o=l.getChildren();for(var c=0,d=o.count();c<d;c++){var u=o.getItem(c);if(u.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[u.getName()]){o=!0;break e}}o=!1}o=!o}o?a=l:r=l}}while(l=l.getParent());r||(r=i),this.block=a,this.blockLimit=r,this.root=i,this.elements=s}}(),CKEDITOR.dom.elementPath.prototype={compare:function(e){var t=this.elements;if(e=e&&e.elements,!e||t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0},contains:function(e,t,n){var i;"string"==typeof e&&(i=function(t){return t.getName()==e}),e instanceof CKEDITOR.dom.element?i=function(t){return t.equals(e)}:CKEDITOR.tools.isArray(e)?i=function(t){return-1<CKEDITOR.tools.indexOf(e,t.getName())}:"function"==typeof e?i=e:"object"==typeof e&&(i=function(t){return t.getName()in e});var o=this.elements,a=o.length;for(t&&a--,n&&(o=Array.prototype.slice.call(o,0),o.reverse()),t=0;t<a;t++)if(i(o[t]))return o[t];return null},isContextFor:function(e){var t;return!(e in CKEDITOR.dtd.$block)||(t=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!t.getDtd()[e])},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createTextNode(e)),this.$=e},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(e){this.$.nodeValue=e},split:function(e){var t=this.$.parentNode,n=t.childNodes.length,i=this.getLength(),o=this.getDocument(),a=new CKEDITOR.dom.text(this.$.splitText(e),o);return t.childNodes.length==n&&(e>=i?(a=o.createText(""),a.insertAfter(this)):(e=o.createText(""),e.insertAfter(a),e.remove())),a},substring:function(e,t){return"number"!=typeof t?this.$.nodeValue.substr(e):this.$.nodeValue.substring(e,t);
}}),function(){function e(e,t,n){var i=e.serializable,o=t[n?"endContainer":"startContainer"],a=n?"endOffset":"startOffset",r=i?t.document.getById(e.startNode):e.startNode;return e=i?t.document.getById(e.endNode):e.endNode,o.equals(r.getPrevious())?(t.startOffset=t.startOffset-o.getLength()-e.getPrevious().getLength(),o=e.getNext()):o.equals(e.getPrevious())&&(t.startOffset-=o.getLength(),o=e.getNext()),o.equals(r.getParent())&&t[a]++,o.equals(e.getParent())&&t[a]++,t[n?"endContainer":"startContainer"]=o,t}CKEDITOR.dom.rangeList=function(e){return e instanceof CKEDITOR.dom.rangeList?e:(e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[],CKEDITOR.tools.extend(e,t))};var t={createIterator:function(){var e,t=this,n=CKEDITOR.dom.walker.bookmark(),i=[];return{getNextRange:function(o){e=void 0===e?0:e+1;var a=t[e];if(a&&1<t.length){if(!e)for(var r=t.length-1;0<=r;r--)i.unshift(t[r].createBookmark(!0));if(o)for(var s=0;t[e+s+1];){var l=a.document;for(o=0,r=l.getById(i[s].endNode),l=l.getById(i[s+1].startNode);;){if(r=r.getNextSourceNode(!1),l.equals(r))o=1;else if(n(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary())continue;break}if(!o)break;s++}for(a.moveToBookmark(i.shift());s--;)r=t[++e],r.moveToBookmark(i.shift()),a.setEnd(r.endContainer,r.endOffset)}return a}}},createBookmarks:function(t){for(var n,i=[],o=0;o<this.length;o++){i.push(n=this[o].createBookmark(t,!0));for(var a=o+1;a<this.length;a++)this[a]=e(n,this[a]),this[a]=e(n,this[a],!0)}return i},createBookmarks2:function(e){for(var t=[],n=0;n<this.length;n++)t.push(this[n].createBookmark2(e));return t},moveToBookmarks:function(e){for(var t=0;t<this.length;t++)this[t].moveToBookmark(e[t])}}}(),function(){function e(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function t(t){var n=CKEDITOR.skin["ua_"+t],i=CKEDITOR.env;if(n)for(var o,n=n.split(",").sort(function(e,t){return e>t?-1:1}),a=0;a<n.length;a++)if(o=n[a],i.ie&&(o.replace(/^ie/,"")==i.version||i.quirks&&"iequirks"==o)&&(o="ie"),i[o]){t+="_"+n[a];break}return CKEDITOR.getUrl(e()+t+".css")}function n(e,n){a[e]||(CKEDITOR.document.appendStyleSheet(t(e)),a[e]=1),n&&n()}function i(e){var t=e.getById(r);return t||(t=e.getHead().append("style"),t.setAttribute("id",r),t.setAttribute("type","text/css")),t}function o(e,t,n){var i,o,a;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),o=0;o<t.length;o++)t[o]=t[o].split("{");for(var r=0;r<e.length;r++)if(CKEDITOR.env.webkit)for(o=0;o<t.length;o++){for(a=t[o][1],i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);e[r].$.sheet.addRule(t[o][0],a)}else{for(a=t,i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?e[r].$.styleSheet.cssText+=a:e[r].$.innerHTML+=a}}var a={};CKEDITOR.skin={path:e,loadPart:function(t,i){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e()+"skin.js"),function(){n(t,i)}):n(t,i)},getPath:function(e){return CKEDITOR.getUrl(t(e))},icons:{},addIcon:function(e,t,n,i){e=e.toLowerCase(),this.icons[e]||(this.icons[e]={path:t,offset:n||0,bgsize:i||"16px"})},getIconStyle:function(e,t,n,i,o){var a;return e&&(e=e.toLowerCase(),t&&(a=this.icons[e+"-rtl"]),a||(a=this.icons[e])),e=n||a&&a.path||"",i=i||a&&a.offset,o=o||a&&a.bgsize||"16px",e&&(e=e.replace(/'/g,"\\'")),e&&"background-image:url('"+CKEDITOR.getUrl(e)+"');background-position:0 "+i+"px;background-size:"+o+";"}},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(e){var t=i(CKEDITOR.document);return(this.setUiColor=function(e){this.uiColor=e;var n=CKEDITOR.skin.chameleon,i="",a="";"function"==typeof n&&(i=n(this,"editor"),a=n(this,"panel")),e=[[l,e]],o([t],i,e),o(s,a,e)}).call(this,e)}});var r="cke_ui_color",s=[],l=/\$color/g;CKEDITOR.on("instanceLoaded",function(e){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var t=e.editor;e=function(e){if(e=(e.data[0]||e.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(),!e.getById("cke_ui_color")){e=i(e),s.push(e);var n=t.getUiColor();n&&o([e],CKEDITOR.skin.chameleon(t,"panel"),[[l,n]])}},t.on("panelShow",e),t.on("menuShow",e),t.config.uiColor&&t.setUiColor(t.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var e=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);e.appendTo(CKEDITOR.document.getHead());try{var t=e.getComputedStyle("border-top-color"),n=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!t||t!=n)}catch(e){CKEDITOR.env.hc=!1}e.remove()}if(CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc"),CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"),CKEDITOR.status="loaded",CKEDITOR.fireOnce("loaded"),e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,t=0;t<e.length;t++)CKEDITOR.editor.prototype.constructor.apply(e[t][0],e[t][1]),CKEDITOR.add(e[t][0])}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",CKEDITOR.skin.chameleon=function(){var e=function(){return function(e,t){for(var n=e.match(/[^#]./g),i=0;3>i;i++){var o,a=i;o=parseInt(n[i],16),o=("0"+(0>t?0|o*(1+t):0|o+(255-o)*t).toString(16)).slice(-2),n[a]=o}return"#"+n.join("")}}(),t=function(){var e=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");return function(t,n){return e.output({from:t,to:n})}}(),n={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};return function(i,o){var a=i.uiColor,a={id:"."+i.id,defaultBorder:e(a,-.1),defaultGradient:t(e(a,.9),a),lightGradient:t(e(a,1),e(a,.7)),mediumGradient:t(e(a,.8),e(a,.5)),ckeButtonOn:t(e(a,.6),e(a,.7)),ckeResizer:e(a,-.4),ckeToolbarSeparator:e(a,.5),ckeColorauto:e(a,.8),dialogBody:e(a,.7),dialogTabSelected:t("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:e(a,-.6),elementsPathBg:a,menubuttonIcon:e(a,.5),menubuttonIconHover:e(a,.3)};return n[o].output(a).replace(/\[/g,"{").replace(/\]/g,"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var e=function(e){this._||(this._={}),this._["default"]=this._.initValue=e["default"]||"",this._.required=e.required||!1;for(var t=[this._],n=1;n<arguments.length;n++)t.push(arguments[n]);return t.push(!0),CKEDITOR.tools.extend.apply(CKEDITOR.tools,t),this._},t={build:function(e,t,n){return new CKEDITOR.ui.dialog.textInput(e,t,n)}},n={build:function(e,t,n){return new CKEDITOR.ui.dialog[t.type](e,t,n)}},i={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(e){this.setValue(this.getInitValue(),e)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},o=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(e,t){this._.domOnChangeRegistered||(e.on("load",function(){this.getInputElement().on("change",function(){e.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0),this.on("change",t)}},!0),a=/^on([A-Z]\w+)/,r=function(e){for(var t in e)(a.test(t)||"title"==t||"type"==t)&&delete e[t];return e},s=function(e){e=e.data.getKeystroke(),e==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):e==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(t,n,i,o){if(!(4>arguments.length)){var a=e.call(this,n);a.labelId=CKEDITOR.tools.getNextId()+"_label",this._.children=[];var r={role:n.role||"presentation"};n.includeLabel&&(r["aria-labelledby"]=a.labelId),CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"div",null,r,function(){var e=[],i=n.required?" cke_required":"";return"horizontal"!=n.labelLayout?e.push('<label class="cke_dialog_ui_labeled_label'+i+'" ',' id="'+a.labelId+'"',a.inputId?' for="'+a.inputId+'"':"",(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",n.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',n.controlStyle?' style="'+n.controlStyle+'"':"",' role="presentation">',o.call(this,t,n),"</div>"):(i={type:"hbox",widths:n.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+i+'" id="'+a.labelId+'" for="'+a.inputId+'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(n.label)+"</label>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(n.controlStyle?' style="'+n.controlStyle+'"':"")+">"+o.call(this,t,n)+"</span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(t,i,e)),e.join("")})}},textInput:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",a={"class":"cke_dialog_ui_input_"+n.type,id:o,type:n.type};n.validate&&(this.validate=n.validate),n.maxLength&&(a.maxlength=n.maxLength),n.size&&(a.size=n.size),n.inputStyle&&(a.style=n.inputStyle);var r=this,l=!1;t.on("load",function(){r.getInputElement().on("keydown",function(e){13==e.data.getKeystroke()&&(l=!0)}),r.getInputElement().on("keyup",function(e){13==e.data.getKeystroke()&&l&&(t.getButton("ok")&&setTimeout(function(){t.getButton("ok").click()},0),l=!1),r.bidi&&s.call(r,e)},null,null,1e3)}),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){var e=['<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'];n.width&&e.push('style="width:'+n.width+'" '),e.push("><input "),a["aria-labelledby"]=this._.labelId,this._.required&&(a["aria-required"]=this._.required);for(var t in a)e.push(t+'="'+a[t]+'" ');return e.push(" /></div>"),e.join("")})}},textarea:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this,a=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",r={};n.validate&&(this.validate=n.validate),r.rows=n.rows||5,r.cols=n.cols||20,r["class"]="cke_dialog_ui_input_textarea "+(n["class"]||""),"undefined"!=typeof n.inputStyle&&(r.style=n.inputStyle),n.dir&&(r.dir=n.dir),o.bidi&&t.on("load",function(){o.getInputElement().on("keyup",s)},o),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){r["aria-labelledby"]=this._.labelId,this._.required&&(r["aria-required"]=this._.required);var e,t=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',a,'" '];for(e in r)t.push(e+'="'+CKEDITOR.tools.htmlEncode(r[e])+'" ');return t.push(">",CKEDITOR.tools.htmlEncode(o._["default"]),"</textarea></div>"),t.join("")})}},checkbox:function(t,n,i){if(!(3>arguments.length)){var o=e.call(this,n,{"default":!!n["default"]});n.validate&&(this.validate=n.validate),CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"span",null,null,function(){var e=CKEDITOR.tools.extend({},n,{id:n.id?n.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),i=[],a=CKEDITOR.tools.getNextId()+"_label",s={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":a};return r(e),n["default"]&&(s.checked="checked"),"undefined"!=typeof e.inputStyle&&(e.style=e.inputStyle),o.checkbox=new CKEDITOR.ui.dialog.uiElement(t,e,i,"input",null,s),i.push(' <label id="',a,'" for="',s.id,'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(n.label),"</label>"),i.join("")})}},radio:function(t,n,i){if(!(3>arguments.length)){e.call(this,n),this._["default"]||(this._["default"]=this._.initValue=n.items[0][1]),n.validate&&(this.validate=n.validate);var o=[],a=this;n.role="radiogroup",n.includeLabel=!0,CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){for(var e=[],i=[],s=(n.id?n.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<n.items.length;l++){var c=n.items[l],d=void 0!==c[2]?c[2]:c[0],u=void 0!==c[1]?c[1]:c[0],h=CKEDITOR.tools.getNextId()+"_radio_input",f=h+"_label",h=CKEDITOR.tools.extend({},n,{id:h,title:null,type:null},!0),d=CKEDITOR.tools.extend({},h,{title:d},!0),m={type:"radio","class":"cke_dialog_ui_radio_input",name:s,value:u,"aria-labelledby":f},g=[];a._["default"]==u&&(m.checked="checked"),r(h),r(d),"undefined"!=typeof h.inputStyle&&(h.style=h.inputStyle),h.keyboardFocusable=!0,o.push(new CKEDITOR.ui.dialog.uiElement(t,h,g,"input",null,m)),g.push(" "),new CKEDITOR.ui.dialog.uiElement(t,d,g,"label",null,{id:f,"for":m.id},c[0]),e.push(g.join(""))}return new CKEDITOR.ui.dialog.hbox(t,o,e,i),i.join("")}),this._.children=o}},button:function(t,n,i){if(arguments.length){"function"==typeof n&&(n=n(t.getParentEditor())),e.call(this,n,{disabled:n.disabled||!1}),CKEDITOR.event.implementOn(this);var o=this;t.on("load",function(){var e=this.getElement();!function(){e.on("click",function(e){o.click(),e.data.preventDefault()}),e.on("keydown",function(e){e.data.getKeystroke()in{32:1}&&(o.click(),e.data.preventDefault())})}(),e.unselectable()},this);var a=CKEDITOR.tools.extend({},n);delete a.style;var r=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,t,a,i,"a",null,{style:n.style,href:"javascript:void(0)",title:n.label,hidefocus:"true","class":n["class"],role:"button","aria-labelledby":r},'<span id="'+r+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(n.label)+"</span>")}},select:function(t,n,i){if(!(3>arguments.length)){var o=e.call(this,n);n.validate&&(this.validate=n.validate),o.inputId=CKEDITOR.tools.getNextId()+"_select",CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){var e=CKEDITOR.tools.extend({},n,{id:n.id?n.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),i=[],a=[],s={id:o.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};i.push('<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'),n.width&&i.push('style="width:'+n.width+'" '),i.push(">"),void 0!==n.size&&(s.size=n.size),void 0!==n.multiple&&(s.multiple=n.multiple),r(e);for(var l,c=0;c<n.items.length&&(l=n.items[c]);c++)a.push('<option value="',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"&quot;"),'" /> ',CKEDITOR.tools.htmlEncode(l[0]));return"undefined"!=typeof e.inputStyle&&(e.style=e.inputStyle),o.select=new CKEDITOR.ui.dialog.uiElement(t,e,i,"select",null,s,a.join("")),i.push("</div>"),i.join("")})}},file:function(t,n,i){if(!(3>arguments.length)){void 0===n["default"]&&(n["default"]="");var o=CKEDITOR.tools.extend(e.call(this,n),{definition:n,buttons:[]});n.validate&&(this.validate=n.validate),t.on("load",function(){CKEDITOR.document.getById(o.frameId).getParent().addClass("cke_dialog_ui_input_file")}),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,function(){o.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var e=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',o.frameId,'" title="',n.label,'" src="javascript:void('];return e.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0"),e.push(')"></iframe>'),e.join("")})}},fileButton:function(t,n,i){var o=this;if(!(3>arguments.length)){e.call(this,n),n.validate&&(this.validate=n.validate);var a=CKEDITOR.tools.extend({},n),r=a.onClick;a.className=(a.className?a.className+" ":"")+"cke_dialog_ui_button",a.onClick=function(e){var i=n["for"];r&&!1===r.call(this,e)||(t.getContentElement(i[0],i[1]).submit(),this.disable())},t.on("load",function(){t.getContentElement(n["for"][0],n["for"][1])._.buttons.push(o)}),CKEDITOR.ui.dialog.button.call(this,t,a,i)}},html:function(){var e=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,n=/\/$/;return function(i,o,a){if(!(3>arguments.length)){var r=[],s=o.html;"<"!=s.charAt(0)&&(s="<span>"+s+"</span>");var l=o.focus;if(l){var c=this.focus;this.focus=function(){("function"==typeof l?l:c).call(this),this.fire("focus")},o.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,i,o,r,"span",null,null,""),r=r.join("").match(e),s=s.match(t)||["","",""],n.test(s[1])&&(s[1]=s[1].slice(0,-1),s[2]="/"+s[2]),a.push([s[1]," ",r[1]||"",s[2]].join(""))}}}(),fieldset:function(e,t,n,i,o){var a=o.label;this._={children:t},CKEDITOR.ui.dialog.uiElement.call(this,e,o,i,"fieldset",null,null,function(){var e=[];a&&e.push("<legend"+(o.labelStyle?' style="'+o.labelStyle+'"':"")+">"+a+"</legend>");for(var t=0;t<n.length;t++)e.push(n[t]);return e.join("")})}},!0),CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement,CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(e){var t=CKEDITOR.document.getById(this._.labelId);return 1>t.getChildCount()?new CKEDITOR.dom.text(e,CKEDITOR.document).appendTo(t):t.getChild(0).$.nodeValue=e,this},getLabel:function(){var e=CKEDITOR.document.getById(this._.labelId);return!e||1>e.getChildCount()?"":e.getChild(0).getText()},eventProcessors:o},!0),CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled&&this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var e=this.getElement();e&&e.removeClass("cke_disabled")},disable:function(){this._.disabled=!0,this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(e,t){this.on("click",function(){t.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var e=this.selectParentTab();setTimeout(function(){var t=e.getInputElement();t&&t.$.focus()},0)},select:function(){var e=this.selectParentTab();setTimeout(function(){var t=e.getInputElement();t&&(t.$.focus(),t.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(e){if(this.bidi){var t=e&&e.charAt(0);(t="\u202a"==t?"ltr":"\u202b"==t?"rtl":null)&&(e=e.slice(1)),this.setDirectionMarker(t)}return e||(e=""),CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var e=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&e){var t=this.getDirectionMarker();t&&(e=("ltr"==t?"\u202a":"\u202b")+e)}return e},setDirectionMarker:function(e){var t=this.getInputElement();e?t.setAttributes({dir:e,"data-cke-dir-marker":e}):this.getDirectionMarker()&&t.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput,CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(e,t,n){var i=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),o=this.getInputElement().$;return i.$.text=e,i.$.value=void 0===t||null===t?e:t,void 0===n||null===n?CKEDITOR.env.ie?o.add(i.$):o.add(i.$,null):o.add(i.$,n),this},remove:function(e){return this.getInputElement().$.remove(e),this},clear:function(){for(var e=this.getInputElement().$;0<e.length;)e.remove(0);return this},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(e,t){this.getInputElement().$.checked=e,!t&&this.fire("change",{value:e})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(e,t){return!CKEDITOR.env.ie||8<CKEDITOR.env.version?o.onChange.apply(this,arguments):(e.on("load",function(){var e=this._.checkbox.getElement();e.on("propertychange",function(t){t=t.data.$,"checked"==t.propertyName&&this.fire("change",{value:e.$.checked})},this)},this),this.on("change",t),null)}},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(e,t){for(var n,i=this._.children,o=0;o<i.length&&(n=i[o]);o++)n.getElement().$.checked=n.getValue()==e;!t&&this.fire("change",{value:e})},getValue:function(){for(var e=this._.children,t=0;t<e.length;t++)if(e[t].getElement().$.checked)return e[t].getValue();return null},accessKeyUp:function(){var e,t=this._.children;for(e=0;e<t.length;e++)if(t[e].getElement().$.checked)return void t[e].getElement().focus();t[0].getElement().focus()},eventProcessors:{onChange:function(e,t){return!CKEDITOR.env.ie||8<CKEDITOR.env.version?o.onChange.apply(this,arguments):(e.on("load",function(){for(var e=this._.children,t=this,n=0;n<e.length;n++)e[n].getElement().on("propertychange",function(e){e=e.data.$,"checked"==e.propertyName&&this.$.checked&&t.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",t),null)}}},i,!0),CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,i,{getInputElement:function(){var e=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<e.$.forms.length?new CKEDITOR.dom.element(e.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){e.on("formLoaded",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},reset:function(){function e(){n.$.open();var e="";i.size&&(e=i.size-(CKEDITOR.env.ie?7:0));var c=t.frameId+"_input";for(n.$.write(['<html dir="'+s+'" lang="'+l+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+s+'" lang="'+l+'" action="',CKEDITOR.tools.htmlEncode(i.action),'"><label id="',t.labelId,'" for="',c,'" style="display:none">',CKEDITOR.tools.htmlEncode(i.label),'</label><input style="width:100%" id="',c,'" aria-labelledby="',t.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(i.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(0<e?e:""),'" /></form></body></html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+a+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+r+")}","</script>"].join("")),n.$.close(),e=0;e<o.length;e++)o[e].enable()}var t=this._,n=CKEDITOR.document.getById(t.frameId).getFrameDocument(),i=t.definition,o=t.buttons,a=this.formLoadedNumber,r=this.formUnloadNumber,s=t.dialog._.editor.lang.dir,l=t.dialog._.editor.langCode;a||(a=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),r=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(a),CKEDITOR.tools.removeFunction(r)})),CKEDITOR.env.gecko?setTimeout(e,500):e()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(e,t){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0),this.on("change",t)}},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button,CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype),CKEDITOR.dialog.addUIElement("text",t),CKEDITOR.dialog.addUIElement("password",t),CKEDITOR.dialog.addUIElement("textarea",n),CKEDITOR.dialog.addUIElement("checkbox",n),CKEDITOR.dialog.addUIElement("radio",n),CKEDITOR.dialog.addUIElement("button",n),CKEDITOR.dialog.addUIElement("select",n),CKEDITOR.dialog.addUIElement("file",n),CKEDITOR.dialog.addUIElement("fileButton",n),CKEDITOR.dialog.addUIElement("html",n),CKEDITOR.dialog.addUIElement("fieldset",{build:function(e,t,n){for(var i,o=t.children,a=[],r=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];a.push(l),r.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,r,a,n,t)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function e(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+e,n=t-1;n>t-e;n--)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function t(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=t+1;n<t+e;n++)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function n(e,t){for(var n=e.$.getElementsByTagName("input"),i=0,o=n.length;i<o;i++){var a=new CKEDITOR.dom.element(n[i]);"text"==a.getAttribute("type").toLowerCase()&&(t?(a.setAttribute("value",a.getCustomData("fake_value")||""),a.removeCustomData("fake_value")):(a.setCustomData("fake_value",a.getAttribute("value")),a.setAttribute("value","")))}}function i(e,t){var n=this.getInputElement();n&&(e?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid",!0)),e||(this.select?this.select():this.focus()),t&&alert(t),this.fire("validated",{valid:e,msg:t})}function o(){var e=this.getInputElement();e&&e.removeAttribute("aria-invalid")}function a(e){var t=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",g).output({id:CKEDITOR.tools.getNextNumber(),editorId:e.id,langDir:e.lang.dir,langCode:e.langCode,editorDialogClass:"cke_editor_"+e.name.replace(/\./g,"\\.")+"_dialog",closeTitle:e.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),n=t.getChild([0,0,0,0,0]),i=n.getChild(0),o=n.getChild(1);return e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(n),!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(e="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+e+'" tabIndex="-1"></iframe>').appendTo(n.getParent())),i.unselectable(),o.unselectable(),{element:t,parts:{dialog:t.getChild(0),title:i,close:o,tabs:n.getChild(2),contents:n.getChild([3,0,0,0]),footer:n.getChild([3,0,1,0])}}}function r(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),t.on("focus",function(){this.fire("mouseover")}),t.on("blur",function(){this.fire("mouseout")})}function s(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",function(){n.removeListener("resize",t)})}function l(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function c(e){function t(t){var n=e.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),c=t.data.$.screenX,d=t.data.$.screenY,u=c-i.x,h=d-i.y;i={x:c,y:d},o.x+=u,o.y+=h,e.move(o.x+s[3]<r?-s[3]:o.x-s[1]>l.width-n.width-r?l.width-n.width+("rtl"==a.lang.dir?0:s[1]):o.x,o.y+s[0]<r?-s[0]:o.y-s[2]>l.height-n.height-r?l.height-n.height+s[2]:o.y,1),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.env.ie6Compat){var e=D.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var i=null,o=null,a=e.getParentEditor(),r=a.config.dialog_magnetDistance,s=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof r&&(r=20),e.parts.title.on("mousedown",function(a){if(i={x:a.data.$.screenX,y:a.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o=e.getPosition(),CKEDITOR.env.ie6Compat){var r=D.getChild(0).getFrameDocument();r.on("mousemove",t),r.on("mouseup",n)}a.data.preventDefault()},e)}function d(e){function t(t){var n="rtl"==u.lang.dir,d=c.width,h=c.height,f=d+(t.data.$.screenX-l.x)*(n?-1:1)*(e._.moved?1:2),m=h+(t.data.$.screenY-l.y)*(e._.moved?1:2),g=e._.element.getFirst(),g=n&&g.getComputedStyle("right"),E=e.getPosition();E.y+m>s.height&&(m=s.height-E.y),(n?g:E.x)+f>s.width&&(f=s.width-(n?g:E.x)),o!=CKEDITOR.DIALOG_RESIZE_WIDTH&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(d=Math.max(i.minWidth||0,f-a)),o!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(h=Math.max(i.minHeight||0,m-r)),e.resize(d,h),e._.moved||e.layout(),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.document.removeListener("mousemove",t),d&&(d.remove(),d=null),CKEDITOR.env.ie6Compat){var e=D.getChild(0).getFrameDocument();e.removeListener("mouseup",n),e.removeListener("mousemove",t)}}var i=e.definition,o=i.resizable;if(o!=CKEDITOR.DIALOG_RESIZE_NONE){var a,r,s,l,c,d,u=e.getParentEditor(),h=CKEDITOR.tools.addFunction(function(i){c=e.getSize();var o=e.parts.contents;o.$.getElementsByTagName("iframe").length&&(d=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>'),o.append(d)),r=c.height-e.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),a=c.width-e.parts.contents.getSize("width",1),l={x:i.screenX,y:i.screenY},s=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),CKEDITOR.env.ie6Compat&&(o=D.getChild(0).getFrameDocument(),o.on("mousemove",t),o.on("mouseup",n)),i.preventDefault&&i.preventDefault()});e.on("load",function(){var t="";o==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":o==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(t=" cke_resizer_vertical"),t=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+t+" cke_resizer_"+u.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(u.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+h+', event )">'+("ltr"==u.lang.dir?"\u25e2":"\u25e3")+"</div>"),
e.parts.footer.append(t,1)}),u.on("destroy",function(){CKEDITOR.tools.removeFunction(h)})}}function u(e){e.data.preventDefault(1)}function h(e){var t=CKEDITOR.document.getWindow(),n=e.config,i=n.dialog_backgroundCoverColor||"white",o=n.dialog_backgroundCoverOpacity,a=n.baseFloatZIndex,n=CKEDITOR.tools.genKey(i,o,a),r=R[n];r?r.show():(a=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",a,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+i,'" class="cke_dialog_background_cover">'],CKEDITOR.env.ie6Compat&&(i="<html><body style=\\'background-color:"+i+";\\'></body></html>",a.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'),a.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+i+"' );document.close();")+"})())"),a.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')),a.push("</div>"),r=CKEDITOR.dom.element.createFromHtml(a.join("")),r.setOpacity(void 0!==o?o:.5),r.on("keydown",u),r.on("keypress",u),r.on("keyup",u),r.appendTo(CKEDITOR.document.getBody()),R[n]=r),e.focusManager.add(r),D=r,e=function(){var e=t.getViewPaneSize();r.setStyles({width:e.width+"px",height:e.height+"px"})};var s=function(){var e=t.getScrollPosition(),n=CKEDITOR.dialog._.currentTop;if(r.setStyles({left:e.x+"px",top:e.y+"px"}),n)do e=n.getPosition(),n.move(e.x,e.y);while(n=n._.parentDialog)};if(O=e,t.on("resize",e),e(),CKEDITOR.env.mac&&CKEDITOR.env.webkit||r.focus(),CKEDITOR.env.ie6Compat){var l=function(){s(),arguments.callee.prevScrollHandler.apply(this,arguments)};t.$.setTimeout(function(){l.prevScrollHandler=window.onscroll||function(){},window.onscroll=l},0),s()}}function f(e){D&&(e.focusManager.remove(D),e=CKEDITOR.document.getWindow(),D.hide(),e.removeListener("resize",O),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),O=null)}var m=CKEDITOR.tools.cssLength,g='<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';CKEDITOR.dialog=function(n,r){function s(){var e=R._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});for(var t=e.length,n=0;n<t;n++)e[n].focusIndex=n}function l(e){var t=R._.focusList;if(e=e||0,!(1>t.length)){var n=R._.currentFocusIndex;R._.tabBarMode&&0>e&&(n=0);try{t[n].getInputElement().$.blur()}catch(e){}var i=n,o=1<R._.pageCount;do{if(i+=e,o&&!R._.tabBarMode&&(i==t.length||-1==i))return R._.tabBarMode=!0,R._.tabs[R._.currentTabId][0].focus(),void(R._.currentFocusIndex=-1);if(i=(i+t.length)%t.length,i==n)break}while(e&&!t[i].isFocusable());t[i].focus(),"text"==t[i].type&&t[i].select()}}function u(i){if(R==CKEDITOR.dialog._.currentTop){var o=i.data.getKeystroke(),a="rtl"==n.lang.dir,r=[37,38,39,40];if(f=m=0,9==o||o==CKEDITOR.SHIFT+9)l(o==CKEDITOR.SHIFT+9?-1:1),f=1;else if(o==CKEDITOR.ALT+121&&!R._.tabBarMode&&1<R.getPageCount())R._.tabBarMode=!0,R._.tabs[R._.currentTabId][0].focus(),R._.currentFocusIndex=-1,f=1;else if(-1!=CKEDITOR.tools.indexOf(r,o)&&R._.tabBarMode)o=-1!=CKEDITOR.tools.indexOf([a?39:37,38],o)?e.call(R):t.call(R),R.selectPage(o),R._.tabs[o][0].focus(),f=1;else if(13!=o&&32!=o||!R._.tabBarMode)if(13==o)o=i.data.getTarget(),o.is("a","button","select","textarea")||o.is("input")&&"button"==o.$.type||((o=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(o.click,0,o),f=1),m=1;else{if(27!=o)return;(o=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(o.click,0,o):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),m=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),f=1;h(i)}}function h(e){f?e.data.preventDefault(1):m&&e.data.stopPropagation()}var f,m,g=CKEDITOR.dialog._.dialogDefinitions[r],p=CKEDITOR.tools.clone(E),T=n.config.dialog_buttonsOrder||"OS",C=n.lang.dir,O={};if(("OS"==T&&CKEDITOR.env.mac||"rtl"==T&&"ltr"==C||"ltr"==T&&"rtl"==C)&&p.buttons.reverse(),g=CKEDITOR.tools.extend(g(n),p),g=CKEDITOR.tools.clone(g),g=new I(this,g),p=a(n),this._={editor:n,element:p.element,name:r,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=p.parts,CKEDITOR.tools.setTimeout(function(){n.fire("ariaWidget",this.parts.contents)},0,this),p={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"},p["rtl"==C?"right":"left"]=0,this.parts.dialog.setStyles(p),CKEDITOR.event.call(this),this.definition=g=CKEDITOR.fire("dialogDefinition",{name:r,definition:g},n).definition,!("removeDialogTabs"in n._)&&n.config.removeDialogTabs){for(p=n.config.removeDialogTabs.split(";"),C=0;C<p.length;C++)if(T=p[C].split(":"),2==T.length){var D=T[0];O[D]||(O[D]=[]),O[D].push(T[1])}n._.removeDialogTabs=O}if(n._.removeDialogTabs&&(O=n._.removeDialogTabs[r]))for(C=0;C<O.length;C++)g.removeContents(O[C]);g.onLoad&&this.on("load",g.onLoad),g.onShow&&this.on("show",g.onShow),g.onHide&&this.on("hide",g.onHide),g.onOk&&this.on("ok",function(e){n.fire("saveSnapshot"),setTimeout(function(){n.fire("saveSnapshot")},0),!1===g.onOk.call(this,e)&&(e.data.hide=!1)}),this.state=CKEDITOR.DIALOG_STATE_IDLE,g.onCancel&&this.on("cancel",function(e){!1===g.onCancel.call(this,e)&&(e.data.hide=!1)});var R=this,v=function(e){var t,n=R._.contents,i=!1;for(t in n)for(var o in n[t])if(i=e.call(this,n[t][o]))return};this.on("ok",function(e){v(function(t){if(t.validate){var n=t.validate(this),o="string"==typeof n||!1===n;return o&&(e.data.hide=!1,e.stop()),i.call(t,!o,"string"==typeof n?n:void 0),o}})},this,null,0),this.on("cancel",function(e){v(function(t){if(t.isChanged())return n.config.dialog_noConfirmCancel||confirm(n.lang.common.confirmCancel)||(e.data.hide=!1),!0})},this,null,0),this.parts.close.on("click",function(e){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),e.data.preventDefault()},this),this.changeFocus=l;var b=this._.element;for(n.focusManager.add(b,1),this.on("show",function(){b.on("keydown",u,this),CKEDITOR.env.gecko&&b.on("keypress",h,this)}),this.on("hide",function(){b.removeListener("keydown",u),CKEDITOR.env.gecko&&b.removeListener("keypress",h),v(function(e){o.apply(e)})}),this.on("iframeAdded",function(e){new CKEDITOR.dom.document(e.data.iframe.$.contentWindow.document).on("keydown",u,this,null,0)}),this.on("show",function(){s();var e=1<R._.pageCount;n.config.dialog_startupFocusTab&&e?(R._.tabBarMode=!0,R._.tabs[R._.currentTabId][0].focus(),R._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=e?-1:this._.focusList.length-1,g.onFocus?(e=g.onFocus.call(this))&&e.focus():l(1))},this,null,4294967295),CKEDITOR.env.ie6Compat&&this.on("load",function(){var e=this.getElement(),t=e.getFirst();t.remove(),t.appendTo(e)},this),c(this),d(this),new CKEDITOR.dom.text(g.title,CKEDITOR.document).appendTo(this.parts.title),C=0;C<g.contents.length;C++)(O=g.contents[C])&&this.addPage(O);for(this.parts.tabs.on("click",function(e){var t=e.data.getTarget();t.hasClass("cke_dialog_tab")&&(t=t.$.id,this.selectPage(t.substring(4,t.lastIndexOf("_"))),this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1)),e.data.preventDefault())},this),C=[],O=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:g.buttons},C).getChild(),this.parts.footer.setHtml(C.join("")),C=0;C<O.length;C++)this._.buttons[O[C].id]=O[C]},CKEDITOR.dialog.prototype={destroy:function(){this.hide(),this._.element.remove()},resize:function(){return function(e,t){this._.contentSize&&this._.contentSize.width==e&&this._.contentSize.height==t||(CKEDITOR.dialog.fire("resize",{dialog:this,width:e,height:t},this._.editor),this.fire("resize",{width:e,height:t},this._.editor),this.parts.contents.setStyles({width:e+"px",height:t+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:e,height:t})}}(),getSize:function(){var e=this._.element.getFirst();return{width:e.$.offsetWidth||0,height:e.$.offsetHeight||0}},move:function(e,t,n){var i=this._.element.getFirst(),o="rtl"==this._.editor.lang.dir,a="fixed"==i.getComputedStyle("position");CKEDITOR.env.ie&&i.setStyle("zoom","100%"),a&&this._.position&&this._.position.x==e&&this._.position.y==t||(this._.position={x:e,y:t},a||(a=CKEDITOR.document.getWindow().getScrollPosition(),e+=a.x,t+=a.y),o&&(a=this.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize().width-a.width-e),t={top:(0<t?t:0)+"px"},t[o?"right":"left"]=(0<e?e:0)+"px",i.setStyles(t),n&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var e=this._.element,t=this.definition;e.getParent()&&e.getParent().equals(CKEDITOR.document.getBody())?e.setStyle("display","block"):e.appendTo(CKEDITOR.document.getBody()),this.resize(this._.contentSize&&this._.contentSize.width||t.width||t.minWidth,this._.contentSize&&this._.contentSize.height||t.height||t.minHeight),this.reset(),this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,h(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this),e.on("keydown",b),e.on("keyup",K),this._.hasFocus=!1;for(var n in t.contents)if(t.contents[n]){var e=t.contents[n],i=this._.tabs[e.id],o=e.requiredContent,a=0;if(i){for(var r in this._.contents[e.id]){var l=this._.contents[e.id][r];"hbox"!=l.type&&"vbox"!=l.type&&l.getInputElement()&&(l.requiredContent&&!this._.editor.activeFilter.check(l.requiredContent)?l.disable():(l.enable(),a++))}!a||o&&!this._.editor.activeFilter.check(o)?i[0].addClass("cke_dialog_tab_disabled"):i[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout(),s(this),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),CKEDITOR.ui.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this._.parentDialog||this._.editor.focusManager.lock(),this.foreach(function(e){e.setInitValue&&e.setInitValue()})},100,this)},layout:function(){var e=this.parts.dialog,t=this.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),i=(n.width-t.width)/2,o=(n.height-t.height)/2;CKEDITOR.env.ie6Compat||(t.height+(0<o?o:0)>n.height||t.width+(0<i?i:0)>n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:o)},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:function(){var e=function(e){e.reset&&e.reset(1)};return function(){return this.foreach(e),this}}(),setupContent:function(){var e=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,e)})},commitContent:function(){var e=arguments;this.foreach(function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur(),t.commit&&t.commit.apply(t,e)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e=this._.element;for(e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),_(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else f(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",b),e.removeListener("keyup",K);var n=this._.editor;n.focus(),setTimeout(function(){n.focusManager.unlock(),CKEDITOR.env.iOS&&n.window.focus()},0)}delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()}),this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(e){if(!e.requiredContent||this._.editor.filter.check(e.requiredContent)){for(var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),o=this._.contents[e.id]={},a=i.getChild(),r=0;i=a.shift();)i.notAllowed||"hbox"==i.type||"vbox"==i.type||r++,o[i.id]=i,"function"==typeof i.getChild&&a.push.apply(a,i.getChild());r||(e.hidden=!0),t=CKEDITOR.dom.element.createFromHtml(t.join("")),t.setAttribute("role","tabpanel"),i=CKEDITOR.env,o="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",n,e.hidden?' style="display:none"':"",' id="',o,'"',i.gecko&&!i.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',e.label,"</a>"].join("")),t.setAttribute("aria-labelledby",o),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),!e.hidden&&this._.pageCount++,this._.lastTab=n,this.updateStyle(),t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(y(this,this,"CTRL+"+e.accessKey,N,k),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var i=this._.tabs[t][0],o=this._.tabs[t][1];t!=e&&(i.removeClass("cke_dialog_tab_selected"),o.hide()),o.setAttribute("aria-hidden",t!=e)}var a=this._.tabs[e];a[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(a[1]),a[1].show(),setTimeout(function(){n(a[1],1)},0)):a[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var n=this._.tabs[t]&&this._.tabs[t][0];n&&1!=this._.pageCount&&n.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),n.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if("undefined"==typeof t)t=this._.focusList.length,this._.focusList.push(new r(this,e,t));else{this._.focusList.splice(t,0,new r(this,e,t));for(var n=t+1;n<this._.focusList.length;n++)this._.focusList[n].focusIndex++}},setState:function(e){if(this.state!=e){if(this.state=e,e==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var t=this.getParentEditor().lang.dir,n={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==t?"right":"left"}};n.styles["margin-"+("rtl"==t?"left":"right")]="8px",this.parts.spinner=CKEDITOR.document.createElement("div",n),this.parts.spinner.setHtml("&#8987;"),this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show(),this.getButton("ok").disable()}else e==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",e)}}},CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(e,t){this._.dialogDefinitions[e]&&"function"!=typeof t||(this._.dialogDefinitions[e]=t)},exists:function(e){return!!this._.dialogDefinitions[e]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(e,t,n){return e=e.config.removeDialogTabs,!(e&&e.match(new RegExp("(?:^|;)"+t+":"+n+"(?:$|;)","i")))},okButton:function(){var e=function(e,t){return t=t||{},CKEDITOR.tools.extend({id:"ok",type:"button",label:e.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(e){e=e.data.dialog,!1!==e.fire("ok",{hide:!0}).hide&&e.hide()}},t,!0)};return e.type="button",e.override=function(t){return CKEDITOR.tools.extend(function(n){return e(n,t)},{type:"button"},!0)},e}(),cancelButton:function(){var e=function(e,t){return t=t||{},CKEDITOR.tools.extend({id:"cancel",type:"button",label:e.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(e){e=e.data.dialog,!1!==e.fire("cancel",{hide:!0}).hide&&e.hide()}},t,!0)};return e.type="button",e.override=function(t){return CKEDITOR.tools.extend(function(n){return e(n,t)},{type:"button"},!0)},e}(),addUIElement:function(e,t){this._.uiElementBuilders[e]=t}}),CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null},CKEDITOR.event.implementOn(CKEDITOR.dialog),CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var E={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},p=function(e,t,n){for(var i,o=0;i=e[o];o++)if(i.id==t||n&&i[n]&&(i=p(i[n],t,n)))return i;return null},T=function(e,t,n,i,o){if(n){for(var a,r=0;a=e[r];r++){if(a.id==n)return e.splice(r,0,t),t;if(i&&a[i]&&(a=T(a[i],t,n,i,!0)))return a}if(o)return null}return e.push(t),t},C=function(e,t,n){for(var i,o=0;i=e[o];o++){if(i.id==t)return e.splice(o,1);if(n&&i[n]&&(i=C(i[n],t,n)))return i}return null},I=function(e,t){this.dialog=e;for(var n,i=t.contents,o=0;n=i[o];o++)i[o]=n&&new l(e,n);CKEDITOR.tools.extend(this,t)};I.prototype={getContents:function(e){return p(this.contents,e)},getButton:function(e){return p(this.buttons,e)},addContents:function(e,t){return T(this.contents,e,t)},addButton:function(e,t){return T(this.buttons,e,t)},removeContents:function(e){C(this.contents,e)},removeButton:function(e){C(this.buttons,e)}},l.prototype={get:function(e){return p(this.elements,e,"children")},add:function(e,t){return T(this.elements,e,t,"children")},remove:function(e){C(this.elements,e,"children")}};var O,D,R={},v={},b=function(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=v[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&(t=t[t.length-1],t.keydown&&t.keydown.call(t.uiElement,t.dialog,t.key),e.data.preventDefault())},K=function(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=v[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&(t=t[t.length-1],t.keyup&&(t.keyup.call(t.uiElement,t.dialog,t.key),e.data.preventDefault()))},y=function(e,t,n,i,o){(v[n]||(v[n]=[])).push({uiElement:e,dialog:t,key:n,keyup:o||e.accessKeyUp,keydown:i||e.accessKeyDown})},_=function(e){for(var t in v){for(var n=v[t],i=n.length-1;0<=i;i--)n[i].dialog!=e&&n[i].uiElement!=e||n.splice(i,1);0===n.length&&delete v[t]}},k=function(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])},N=function(){};!function(){CKEDITOR.ui.dialog={uiElement:function(e,t,n,i,o,a,r){if(!(4>arguments.length)){var s=(i.call?i(t):i)||"div",l=["<",s," "],c=(o&&o.call?o(t):o)||{},d=(a&&a.call?a(t):a)||{},u=(r&&r.call?r.call(this,e,t):r)||"",h=this.domId=d.id||CKEDITOR.tools.getNextId()+"_uiElement";t.requiredContent&&!e.getParentEditor().filter.check(t.requiredContent)&&(c.display="none",this.notAllowed=!0),d.id=h;var f={};t.type&&(f["cke_dialog_ui_"+t.type]=1),t.className&&(f[t.className]=1),t.disabled&&(f.cke_disabled=1);for(var m=d["class"]&&d["class"].split?d["class"].split(" "):[],h=0;h<m.length;h++)m[h]&&(f[m[h]]=1);m=[];for(h in f)m.push(h);d["class"]=m.join(" "),t.title&&(d.title=t.title),f=(t.style||"").split(";"),t.align&&(m=t.align,c["margin-left"]="left"==m?0:"auto",c["margin-right"]="right"==m?0:"auto");for(h in c)f.push(h+":"+c[h]);for(t.hidden&&f.push("display:none"),h=f.length-1;0<=h;h--)""===f[h]&&f.splice(h,1);0<f.length&&(d.style=(d.style?d.style+"; ":"")+f.join("; "));for(h in d)l.push(h+'="'+CKEDITOR.tools.htmlEncode(d[h])+'" ');l.push(">",u,"</",s,">"),n.push(l.join("")),(this._||(this._={})).dialog=e,"boolean"==typeof t.isChanged&&(this.isChanged=function(){return t.isChanged}),"function"==typeof t.isChanged&&(this.isChanged=t.isChanged),"function"==typeof t.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(e){return function(n){e.call(this,t.setValue.call(this,n))}})),"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(e){return function(){return t.getValue.call(this,e.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(t),this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&y(this,e,"CTRL+"+t.accessKey);var g=this;e.on("load",function(){var t=g.getInputElement();if(t){var n=g.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";t.on("focus",function(){e._.tabBarMode=!1,e._.hasFocus=!0,g.fire("focus"),n&&this.addClass(n)}),t.on("blur",function(){g.fire("blur"),n&&this.removeClass(n)})}}),CKEDITOR.tools.extend(this,t),this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=e._.focusList.push(this)-1,this.on("focus",function(){e._.currentFocusIndex=g.focusIndex}))}},hbox:function(e,t,n,i,o){if(!(4>arguments.length)){this._||(this._={});var a,r=this._.children=t,s=o&&o.widths||null,l=o&&o.height||null,c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},i,"table",{},c,function(){var e=['<tbody><tr class="cke_dialog_ui_hbox">'];for(a=0;a<n.length;a++){var t="cke_dialog_ui_hbox_child",i=[];0===a&&(t="cke_dialog_ui_hbox_first"),a==n.length-1&&(t="cke_dialog_ui_hbox_last"),e.push('<td class="',t,'" role="presentation" '),s?s[a]&&i.push("width:"+m(s[a])):i.push("width:"+Math.floor(100/n.length)+"%"),l&&i.push("height:"+m(l)),o&&void 0!==o.padding&&i.push("padding:"+m(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r[a].align&&i.push("text-align:"+r[a].align),0<i.length&&e.push('style="'+i.join("; ")+'" '),e.push(">",n[a],"</td>")}return e.push("</tr></tbody>"),e.join("")})}},vbox:function(e,t,n,i,o){if(!(3>arguments.length)){this._||(this._={});var a=this._.children=t,r=o&&o.width||null,s=o&&o.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"vbox"},i,"div",null,{role:"presentation"},function(){var t=['<table role="presentation" cellspacing="0" border="0" '];t.push('style="'),o&&o.expand&&t.push("height:100%;"),t.push("width:"+m(r||"100%"),";"),CKEDITOR.env.webkit&&t.push("float:none;"),t.push('"'),t.push('align="',CKEDITOR.tools.htmlEncode(o&&o.align||("ltr"==e.getParentEditor().lang.dir?"left":"right")),'" '),t.push("><tbody>");for(var i=0;i<n.length;i++){var l=[];t.push('<tr><td role="presentation" '),r&&l.push("width:"+m(r||"100%")),s?l.push("height:"+m(s[i])):o&&o.expand&&l.push("height:"+Math.floor(100/n.length)+"%"),o&&void 0!==o.padding&&l.push("padding:"+m(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&a[i].align&&l.push("text-align:"+a[i].align),0<l.length&&t.push('style="',l.join("; "),'" '),t.push(' class="cke_dialog_ui_vbox_child">',n[i],"</td></tr>")}return t.push("</tbody></table>"),t.join("")})}}}}(),CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e?(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){t.on("load",function(){e.getInputElement().on(n,i,e)})};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!(!this.isEnabled()||!this.isVisible())}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return 1>arguments.length?this._.children.concat():(e.splice||(e=[e]),2>e.length?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var e={build:function(e,t,n){for(var i,o=t.children,a=[],r=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];a.push(l),r.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,r,a,n,t)}};CKEDITOR.dialog.addUIElement("hbox",e),CKEDITOR.dialog.addUIElement("vbox",e)}(),CKEDITOR.dialogCommand=function(e,t){this.dialogName=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.dialogCommand.prototype={exec:function(e){e.openDialog(this.dialogName)},canUndo:!1,editorFocus:1},function(){var e=/^([a]|[^a])+$/,t=/^\d*$/,n=/^\d*(?:\.\d+)?$/,i=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,o=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,a=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1,CKEDITOR.VALIDATE_AND=2,CKEDITOR.dialog.validate={functions:function(){var e=arguments;return function(){var t,n,i=this&&this.getValue?this.getValue():e[0],o=CKEDITOR.VALIDATE_AND,a=[];for(n=0;n<e.length&&"function"==typeof e[n];n++)a.push(e[n]);n<e.length&&"string"==typeof e[n]&&(t=e[n],n++),n<e.length&&"number"==typeof e[n]&&(o=e[n]);var r=o==CKEDITOR.VALIDATE_AND;for(n=0;n<a.length;n++)r=o==CKEDITOR.VALIDATE_AND?r&&a[n](i):r||a[n](i);return!!r||t}},regex:function(e,t){return function(n){return n=this&&this.getValue?this.getValue():n,!!e.test(n)||t}},notEmpty:function(t){return this.regex(e,t)},integer:function(e){return this.regex(t,e)},number:function(e){return this.regex(n,e)},cssLength:function(e){return this.functions(function(e){return o.test(CKEDITOR.tools.trim(e))},e)},htmlLength:function(e){return this.functions(function(e){return i.test(CKEDITOR.tools.trim(e))},e)},inlineStyle:function(e){return this.functions(function(e){return a.test(CKEDITOR.tools.trim(e))},e)},equals:function(e,t){return this.functions(function(t){return t==e},t)},notEqual:function(e,t){return this.functions(function(t){return t!=e},t)}},CKEDITOR.on("instanceDestroyed",function(e){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var t;t=CKEDITOR.dialog._.currentTop;)t.hide();for(var n in R)R[n].remove();R={}}e=e.editor._.storedDialogs;for(var i in e)e[i].destroy()})}(),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(e,t){var n=null,i=CKEDITOR.dialog._.dialogDefinitions[e];if(null===CKEDITOR.dialog._.currentTop&&h(this),"function"==typeof i)n=this._.storedDialogs||(this._.storedDialogs={}),n=n[e]||(n[e]=new CKEDITOR.dialog(this,e)),t&&t.call(n,n),n.show();else{if("failed"==i)throw f(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+e+'" failed when loading definition.');"string"==typeof i&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(i),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[e]&&(CKEDITOR.dialog._.dialogDefinitions[e]="failed"),this.openDialog(e,t)},this,0,1)}return CKEDITOR.skin.loadPart("dialog"),n}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(e){e.on("doubleclick",function(t){t.data.dialog&&e.openDialog(t.data.dialog)},null,null,999)}}),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(e){var t=e.addCommand("about",new CKEDITOR.dialogCommand("about"));t.modes={wysiwyg:1,source:1},t.canUndo=!1,t.readOnly=1,e.ui.addButton&&e.ui.addButton("About",{label:e.lang.about.title,command:"about",toolbar:"about"}),CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(e){var t=this;e.addCommand("a11yHelp",{exec:function(){var n=e.langCode,n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),function(){e.lang.a11yhelp=t.langEntries[n],e.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1}),e.setKeystroke(CKEDITOR.ALT+48,"a11yHelp"),CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js"),e.on("ariaEditorHelpLabel",function(t){t.data.label=e.lang.common.editorHelp})}})}(),function(){function e(e){var t=this.att;e=e&&e.hasAttribute(t)&&e.getAttribute(t)||"",void 0!==e&&this.setValue(e)}function t(){for(var e,t=0;t<arguments.length;t++)if(arguments[t]instanceof CKEDITOR.dom.element){e=arguments[t];break}if(e){var t=this.att,n=this.getValue();n?e.setAttribute(t,n):e.removeAttribute(t,n)}}var n={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(e){e||(e=n);var t=[];e.id&&t.push("id"),e.dir&&t.push("dir");var i="";return t.length&&(i+="["+t.join(",")+"]"),e.classes&&(i+="(*)"),e.styles&&(i+="{*}"),i},createAdvancedTab:function(i,o,a){o||(o=n);var r=i.lang.common,s={id:"advanced",label:r.advancedTab,title:r.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},l=[];return(o.id||o.dir)&&(o.id&&l.push({id:"advId",att:"id",type:"text",requiredContent:a?a+"[id]":null,label:r.id,setup:e,commit:t}),o.dir&&l.push({id:"advLangDir",att:"dir",type:"select",requiredContent:a?a+"[dir]":null,label:r.langDir,"default":"",style:"width:100%",items:[[r.notSet,""],[r.langDirLTR,"ltr"],[r.langDirRTL,"rtl"]],setup:e,commit:t}),s.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(l)})),(o.styles||o.classes)&&(l=[],
o.styles&&l.push({id:"advStyles",att:"style",type:"text",requiredContent:a?a+"{cke-xyz}":null,label:r.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(r.invalidInlineStyle),onChange:function(){},getStyle:function(e,t){var n=this.getValue().match(new RegExp("(?:^|;)\\s*"+e+"\\s*:\\s*([^;]*)","i"));return n?n[1]:t},updateStyle:function(e,t){var n=this.getValue(),o=i.document.createElement("span");o.setAttribute("style",n),o.setStyle(e,t),n=CKEDITOR.tools.normalizeCssText(o.getAttribute("style")),this.setValue(n,1)},setup:e,commit:t}),o.classes&&l.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:a?a+"(cke-xyz)":null,label:r.cssClasses,"default":"",setup:e,commit:t}]}),s.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(l)})),s}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(e){var t=0,n=function(n,o,a,r){if(r){r=new CKEDITOR.style(r);var s=i[a];s.unshift(r),e.attachStyleStateChange(r,function(t){!e.readOnly&&e.getCommand(a).setState(t)}),e.addCommand(a,new CKEDITOR.styleCommand(r,{contentForms:s})),e.ui.addButton&&e.ui.addButton(n,{label:o,command:a,toolbar:"basicstyles,"+(t+=10)})}},i={bold:["strong","b",["span",function(e){return e=e.styles["font-weight"],"bold"==e||700<=+e}]],italic:["em","i",["span",function(e){return"italic"==e.styles["font-style"]}]],underline:["u",["span",function(e){return"underline"==e.styles["text-decoration"]}]],strike:["s","strike",["span",function(e){return"line-through"==e.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},o=e.config,a=e.lang.basicstyles;n("Bold",a.bold,"bold",o.coreStyles_bold),n("Italic",a.italic,"italic",o.coreStyles_italic),n("Underline",a.underline,"underline",o.coreStyles_underline),n("Strike",a.strike,"strike",o.coreStyles_strike),n("Subscript",a.subscript,"subscript",o.coreStyles_subscript),n("Superscript",a.superscript,"superscript",o.coreStyles_superscript),e.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){function e(e,t,n,i){if(!e.isReadOnly()&&!e.equals(n.editable())){CKEDITOR.dom.element.setMarker(i,e,"bidi_processed",1),i=e;for(var o=n.editable();(i=i.getParent())&&!i.equals(o);)if(i.getCustomData("bidi_processed"))return e.removeStyle("direction"),void e.removeAttribute("dir");i="useComputedState"in n.config?n.config.useComputedState:1,(i?e.getComputedStyle("direction"):e.getStyle("direction")||e.hasAttribute("dir"))!=t&&(e.removeStyle("direction"),i?(e.removeAttribute("dir"),t!=e.getComputedStyle("direction")&&e.setAttribute("dir",t)):e.setAttribute("dir",t),n.forceNextSelectionCheck())}}function t(e,t,n){var i=e.getCommonAncestor(!1,!0);if(e=e.clone(),e.enlarge(n==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),e.checkBoundaryOfElement(i,CKEDITOR.START)&&e.checkBoundaryOfElement(i,CKEDITOR.END)){for(var o;i&&i.type==CKEDITOR.NODE_ELEMENT&&(o=i.getParent())&&1==o.getChildCount()&&!(i.getName()in t);)i=o;return i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in t&&i}}function n(n){return{context:"p",allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(e,t){var n,i=e.config.useComputedState,i=void 0===i||i;if(!i){n=t.lastElement;for(var o=e.editable();n&&!(n.getName()in r||n.equals(o));){var a=n.getParent();if(!a)break;n=a}}n=n||t.block||t.blockLimit,n.equals(e.editable())&&(o=e.getSelection().getRanges()[0].getEnclosedNode())&&o.type==CKEDITOR.NODE_ELEMENT&&(n=o),n&&(i=i?n.getComputedStyle("direction"):n.getStyle("direction")||n.getAttribute("dir"),e.getCommand("bidirtl").setState("rtl"==i?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.getCommand("bidiltr").setState("ltr"==i?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)),i=(t.block||t.blockLimit||e.editable()).getDirection(1),i!=(e._.selDir||e.lang.dir)&&(e._.selDir=i,e.fire("contentDirChanged",i))},exec:function(i){var r=i.getSelection(),s=i.config.enterMode,l=r.getRanges();if(l&&l.length){for(var c,d={},u=r.createBookmarks(),l=l.createIterator(),h=0;c=l.getNextRange(1);){var f=c.getEnclosedNode();f&&(!f||f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in a)||(f=t(c,o,s)),f&&e(f,n,i,d);var m=new CKEDITOR.dom.walker(c),g=u[h].startNode,E=u[h++].endNode;m.evaluator=function(e){var t,n=s==CKEDITOR.ENTER_P?"p":"div";return(t=!!e&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in o)&&((n=e.is(n))&&(n=!!(n=e.getParent())&&n.type==CKEDITOR.NODE_ELEMENT),t=!(n&&e.getParent().is("blockquote"))),!!(t&&e.getPosition(g)&CKEDITOR.POSITION_FOLLOWING&&(e.getPosition(E)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;f=m.next();)e(f,n,i,d);for(c=c.createIterator(),c.enlargeBr=s!=CKEDITOR.ENTER_BR;f=c.getNextParagraph(s==CKEDITOR.ENTER_P?"p":"div");)e(f,n,i,d)}CKEDITOR.dom.element.clearAllMarkers(d),i.forceNextSelectionCheck(),r.selectBookmarks(u),i.focus()}}}}function i(e){var t=e==s.setAttribute,n=e==s.removeAttribute,i=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(o,a){if(!this.isReadOnly()){var r;if(r=o==(t||n?"dir":"direction")||"style"==o&&(n||i.test(a))){e:{r=this;for(var s=r.getDocument().getBody().getParent();r;){if(r.equals(s)){r=!1;break e}r=r.getParent()}r=!0}r=!r}if(r&&(r=this.getDirection(1),s=e.apply(this,arguments),r!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),s}return e.apply(this,arguments)}}var o={table:1,ul:1,ol:1,blockquote:1,div:1},a={},r={};CKEDITOR.tools.extend(a,o,{tr:1,p:1,div:1,li:1}),CKEDITOR.tools.extend(r,a,{td:1}),CKEDITOR.plugins.add("bidi",{init:function(e){function t(t,n,i,o,a){e.addCommand(i,new CKEDITOR.command(e,o)),e.ui.addButton&&e.ui.addButton(t,{label:n,command:i,toolbar:"bidi,"+a})}if(!e.blockless){var i=e.lang.bidi;t("BidiLtr",i.ltr,"bidiltr",n("ltr"),10),t("BidiRtl",i.rtl,"bidirtl",n("rtl"),20),e.on("contentDom",function(){e.document.on("dirChanged",function(t){e.fire("dirChanged",{node:t.data,dir:t.data.getDirection(1)})})}),e.on("contentDirChanged",function(t){t=(e.lang.dir!=t.data?"add":"remove")+"Class";var n=e.ui.space(e.config.toolbarLocation);n&&n[t]("cke_mixed_dir_content")})}}});for(var s=CKEDITOR.dom.element.prototype,l=["setStyle","removeStyle","setAttribute","removeAttribute"],c=0;c<l.length;c++)s[l[c]]=CKEDITOR.tools.override(s[l[c]],i)}(),function(){var e={exec:function(e){var t=e.getCommand("blockquote").state,n=e.getSelection(),i=n&&n.getRanges()[0];if(i){var o=n.createBookmarks();if(CKEDITOR.env.ie){var a,r=o[0].startNode,s=o[0].endNode;if(r&&"blockquote"==r.getParent().getName())for(a=r;a=a.getNext();)if(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()){r.move(a,!0);break}if(s&&"blockquote"==s.getParent().getName())for(a=s;a=a.getPrevious();)if(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()){s.move(a);break}}var l=i.createIterator();if(l.enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(r=[];t=l.getNextParagraph();)r.push(t);for(1>r.length&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),s=o.shift(),i.insertNode(t),t.append(new CKEDITOR.dom.text("\ufeff",e.document)),i.moveToBookmark(s),i.selectNodeContents(t),i.collapse(!0),s=i.createBookmark(),r.push(t),o.unshift(s)),a=r[0].getParent(),i=[],s=0;s<r.length;s++)t=r[s],a=a.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[a.getName()];)a=a.getParent();for(s=null;0<r.length;){for(t=r.shift();!t.getParent().equals(a);)t=t.getParent();t.equals(s)||i.push(t),s=t}for(;0<i.length;)if(t=i.shift(),"blockquote"==t.getName()){for(s=new CKEDITOR.dom.documentFragment(e.document);t.getFirst();)s.append(t.getFirst().remove()),r.push(s.getLast());s.replace(t)}else r.push(t);for(i=e.document.createElement("blockquote"),i.insertBefore(r[0]);0<r.length;)t=r.shift(),i.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(s=[],a={};t=l.getNextParagraph();){for(r=i=null;t.getParent();){if("blockquote"==t.getParent().getName()){i=t.getParent(),r=t;break}t=t.getParent()}i&&r&&!r.getCustomData("blockquote_moveout")&&(s.push(r),CKEDITOR.dom.element.setMarker(a,r,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(a),t=[],r=[],a={};0<s.length;)l=s.shift(),i=l.getParent(),l.getPrevious()?l.getNext()?(l.breakParent(l.getParent()),r.push(l.getNext())):l.remove().insertAfter(i):l.remove().insertBefore(i),i.getCustomData("blockquote_processed")||(r.push(i),CKEDITOR.dom.element.setMarker(a,i,"blockquote_processed",!0)),t.push(l);for(CKEDITOR.dom.element.clearAllMarkers(a),s=r.length-1;0<=s;s--){i=r[s];e:{a=i;for(var l=0,c=a.getChildCount(),d=void 0;l<c&&(d=a.getChild(l));l++)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){a=!1;break e}a=!0}a&&i.remove()}if(e.config.enterMode==CKEDITOR.ENTER_BR)for(i=!0;t.length;)if(l=t.shift(),"div"==l.getName()){for(s=new CKEDITOR.dom.documentFragment(e.document),!i||!l.getPrevious()||l.getPrevious().type==CKEDITOR.NODE_ELEMENT&&l.getPrevious().isBlockBoundary()||s.append(e.document.createElement("br")),i=l.getNext()&&!(l.getNext().type==CKEDITOR.NODE_ELEMENT&&l.getNext().isBlockBoundary());l.getFirst();)l.getFirst().remove().appendTo(s);i&&s.append(e.document.createElement("br")),s.replace(l),i=!1}}n.selectBookmarks(o),e.focus()}},refresh:function(e,t){this.setState(e.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(t){t.blockless||(t.addCommand("blockquote",e),t.ui.addButton&&t.ui.addButton("Blockquote",{label:t.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),function(){function e(e,t,n){return t.type||(t.type="auto"),!(n&&!1===e.fire("beforePaste",t)||!t.dataValue&&t.dataTransfer.isEmpty())&&(t.dataValue||(t.dataValue=""),CKEDITOR.env.gecko&&"drop"==t.method&&e.toolbox&&e.once("afterPaste",function(){e.toolbox.focus()}),e.fire("paste",t))}function t(t){function n(){var e=t.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var n=function(e){t.readOnly&&"cut"==e.name||g.initPasteDataTransfer(e,t),e.data.preventDefault()};e.on("copy",n),e.on("cut",n),e.on("cut",function(){t.readOnly||t.extractSelectedHtml()},null,null,999)}e.on(g.mainPasteEvent,function(e){"beforepaste"==g.mainPasteEvent&&E||h(e)}),"beforepaste"==g.mainPasteEvent&&(e.on("paste",function(e){p||(a(),e.data.preventDefault(),h(e),s("paste")||t.openDialog("paste"))}),e.on("contextmenu",r,null,null,0),e.on("beforepaste",function(e){!e.data||e.data.$.ctrlKey||e.data.$.shiftKey||r()},null,null,0)),e.on("beforecut",function(){!E&&l(t)});var i;e.attachListener(CKEDITOR.env.ie?e:t.document.getDocumentElement(),"mouseup",function(){i=setTimeout(function(){f()},0)}),t.on("destroy",function(){clearTimeout(i)}),e.on("keyup",f)}function i(e){return{type:e,canUndo:"cut"==e,startDisabled:!0,exec:function(){"cut"==this.type&&l();var e,n=this.type;if(CKEDITOR.env.ie)e=s(n);else try{e=t.document.$.execCommand(n,!1,null)}catch(t){e=!1}return e||t.showNotification(t.lang.clipboard[this.type+"Error"]),e}}}function o(){return{canUndo:!1,async:!0,exec:function(t,n){var i=this,o=function(n,o){n&&e(t,n,!!o),t.fire("afterCommandExec",{name:"paste",command:i,returnValue:!!n})};"string"==typeof n?o({dataValue:n,method:"paste",dataTransfer:g.initPasteDataTransfer()},1):t.getClipboardData(o)}}}function a(){p=1,setTimeout(function(){p=0},100)}function r(){E=1,setTimeout(function(){E=0},10)}function s(e){var n=t.document,i=n.getBody(),o=!1,a=function(){o=!0};return i.on(e,a),7<CKEDITOR.env.version?n.$.execCommand(e):n.$.selection.createRange().execCommand(e),i.removeListener(e,a),o}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var e,n,i,o=t.getSelection();o.getType()==CKEDITOR.SELECTION_ELEMENT&&(e=o.getSelectedElement())&&(n=o.getRanges()[0],i=t.document.createText(""),i.insertBefore(e),n.setStartBefore(i),n.setEndAfter(e),o.selectRanges([n]),setTimeout(function(){e.getParent()&&(i.remove(),o.selectElement(e))},0))}}function c(e,n){var i,o=t.document,a=t.editable(),r=function(e){e.cancel()};if(!o.getById("cke_pastebin")){var s=t.getSelection(),l=s.createBookmarks();CKEDITOR.env.ie&&s.root.fire("selectionchange");var c=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!a.is("body")||CKEDITOR.env.ie?"div":"body",o);c.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var d=0,o=o.getWindow();CKEDITOR.env.webkit?(a.append(c),c.addClass("cke_editable"),a.is("body")||(d="static"!=a.getComputedStyle("position")?a:CKEDITOR.dom.element.get(a.$.offsetParent),d=d.getDocumentPosition().y)):a.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(c),c.setStyles({position:"absolute",top:o.getScrollPosition().y-d+10+"px",width:"1px",height:Math.max(1,o.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}),CKEDITOR.env.safari&&c.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text")),(d=c.getParent().isReadOnly())?(c.setOpacity(0),c.setAttribute("contenteditable",!0)):c.setStyle("ltr"==t.config.contentsLangDirection?"left":"right","-10000px"),t.on("selectionChange",r,null,null,0),(CKEDITOR.env.webkit||CKEDITOR.env.gecko)&&(i=a.once("blur",r,null,null,-100)),d&&c.focus(),d=new CKEDITOR.dom.range(c),d.selectNodeContents(c);var u=d.select();CKEDITOR.env.ie&&(i=a.once("blur",function(){t.lockSelection(u)}));var h=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=h),i&&i.removeListener(),CKEDITOR.env.ie&&a.focus(),s.selectBookmarks(l),c.remove();var e;CKEDITOR.env.webkit&&(e=c.getFirst())&&e.is&&e.hasClass("Apple-style-span")&&(c=e),t.removeListener("selectionChange",r),n(c.getHtml())},0)}}function d(){if("paste"==g.mainPasteEvent)return t.fire("beforePaste",{type:"auto",method:"paste"}),!1;t.focus(),a();var e=t.focusManager;return e.lock(),t.editable().fire(g.mainPasteEvent)&&!s("paste")?(e.unlock(),!1):(e.unlock(),!0)}function u(e){if("wysiwyg"==t.mode)switch(e.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:e=t.editable(),a(),"paste"==g.mainPasteEvent&&e.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:t.fire("saveSnapshot"),setTimeout(function(){t.fire("saveSnapshot")},50)}}function h(n){var i={type:"auto",method:"paste",dataTransfer:g.initPasteDataTransfer(n)};i.dataTransfer.cacheData();var o=!1!==t.fire("beforePaste",i);o&&g.canClipboardApiBeTrusted(i.dataTransfer,t)?(n.data.preventDefault(),setTimeout(function(){e(t,i)},0)):c(n,function(n){i.dataValue=n.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/gi,""),o&&e(t,i)})}function f(){if("wysiwyg"==t.mode){var e=m("paste");t.getCommand("cut").setState(m("cut")),t.getCommand("copy").setState(m("copy")),t.getCommand("paste").setState(e),t.fire("pasteState",e)}}function m(e){if(T&&e in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==e)return CKEDITOR.TRISTATE_OFF;e=t.getSelection();var n=e.getRanges();return e.getType()==CKEDITOR.SELECTION_NONE||1==n.length&&n[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var g=CKEDITOR.plugins.clipboard,E=0,p=0,T=0;!function(){t.on("key",u),t.on("contentDom",n),t.on("selectionChange",function(e){T=e.data.selection.getRanges()[0].checkReadOnly(),f()}),t.contextMenu&&t.contextMenu.addListener(function(e,t){return T=t.getRanges()[0].checkReadOnly(),{cut:m("cut"),copy:m("copy"),paste:m("paste")}})}(),function(){function e(e,n,i,o,a){var r=t.lang.clipboard[n];t.addCommand(n,i),t.ui.addButton&&t.ui.addButton(e,{label:r,command:n,toolbar:"clipboard,"+o}),t.addMenuItems&&t.addMenuItem(n,{label:r,command:n,group:"clipboard",order:a})}e("Cut","cut",i("cut"),10,1),e("Copy","copy",i("copy"),20,4),e("Paste","paste",o(),30,8)}(),t.getClipboardData=function(e,n){function i(e){e.removeListener(),e.cancel(),n(e.data)}function o(e){e.removeListener(),e.cancel(),l=!0,n({type:s,dataValue:e.data.dataValue,dataTransfer:e.data.dataTransfer,method:"paste"})}function a(){this.customTitle=e&&e.title}var r=!1,s="auto",l=!1;n||(n=e,e=null),t.on("paste",i,null,null,0),t.on("beforePaste",function(e){e.removeListener(),r=!0,s=e.data.type},null,null,1e3),!1===d()&&(t.removeListener("paste",i),r&&t.fire("pasteDialog",a)?(t.on("pasteDialogCommit",o),t.on("dialogHide",function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",o),setTimeout(function(){l||n(null)},10)})):n(null))}}function n(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!e.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko)return"html";if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}return"htmlifiedtext"}function i(e,t){function n(e){return CKEDITOR.tools.repeat("</p><p>",~~(e/2))+(1==e%2?"<br>":"")}return t=t.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>"),t=t.replace(/<\/?[A-Z]+>/g,function(e){return e.toLowerCase()}),t.match(/^[^<]$/)?t:(CKEDITOR.env.webkit&&-1<t.indexOf("<div>")&&(t=t.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>"),t.match(/<div>(<br>|)<\/div>/)&&(t="<p>"+t.replace(/(<div>(<br>|)<\/div>)+/g,function(e){return n(e.split("</div><div>").length+1)})+"</p>"),t=t.replace(/<\/div><div>/g,"<br>"),t=t.replace(/<\/?div>/g,"")),CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^<br><br>$/,"<br>")),-1<t.indexOf("<br><br>")&&(t="<p>"+t.replace(/(<br>){2,}/g,function(e){return n(e.length/4)})+"</p>")),r(e,t))}function o(){function e(){var e,t={};for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=e&&(t[e]=1);return t}var t={};return{get:function(n){return"plain-text"==n?t.plainText||(t.plainText=new CKEDITOR.filter("br")):"semantic-content"==n?((n=t.semanticContent)||(n=new CKEDITOR.filter,n.allow({$1:{elements:e(),attributes:!0,styles:!1,classes:!1}}),n=t.semanticContent=n),n):n?new CKEDITOR.filter(n):null}}}function a(e,t,n){t=CKEDITOR.htmlParser.fragment.fromHtml(t);var i=new CKEDITOR.htmlParser.basicWriter;return n.applyTo(t,!0,!1,e.activeEnterMode),t.writeHtml(i),i.getHtml()}function r(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p><p>)+/g,function(e){return CKEDITOR.tools.repeat("<br>",e.length/7*2)}).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}function s(e){e.data.preventDefault(),e.data.$.dataTransfer.dropEffect="none"}function l(t){var n=CKEDITOR.plugins.clipboard;t.on("contentDom",function(){function i(n,i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),o.sourceEditor.fire("saveSnapshot"),o.sourceEditor.editable().extractHtmlFromRange(n),o.sourceEditor.getSelection().selectRanges([n]),o.sourceEditor.fire("saveSnapshot")}function o(i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),n.resetDragDataTransfer()}function a(e,n,i){var o={$:e.data.$,target:e.data.getTarget()};n&&(o.dragRange=n),i&&(o.dropRange=i),!1===t.fire(e.name,o)&&e.data.preventDefault()}function r(e){return e.type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),e.getChildCount()}var s=t.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(t),c=t.ui.space("top"),d=t.ui.space("bottom");n.preventDefaultDropOnElement(c),n.preventDefaultDropOnElement(d),s.attachListener(l,"dragstart",a),s.attachListener(t,"dragstart",n.resetDragDataTransfer,n,null,1),s.attachListener(t,"dragstart",function(e){n.initDragDataTransfer(e,t)},null,null,2),s.attachListener(t,"dragstart",function(){var e=n.dragRange=t.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(n.dragStartContainerChildCount=e?r(e.startContainer):null,n.dragEndContainerChildCount=e?r(e.endContainer):null)},null,null,100),s.attachListener(l,"dragend",a),s.attachListener(t,"dragend",n.initDragDataTransfer,n,null,1),s.attachListener(t,"dragend",n.resetDragDataTransfer,n,null,100),s.attachListener(l,"dragover",function(e){var t=e.data.getTarget();t&&t.is&&t.is("html")?e.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&e.data.$.dataTransfer.types.contains("Files")&&e.data.preventDefault()}),s.attachListener(l,"drop",function(e){if(!e.data.$.defaultPrevented){e.data.preventDefault();var i=e.data.getTarget();if(!i.isReadOnly()||i.type==CKEDITOR.NODE_ELEMENT&&i.is("html")){var i=n.getRangeAtDropPosition(e,t),o=n.dragRange;i&&a(e,o,i)}}},null,null,9999),s.attachListener(t,"drop",n.initDragDataTransfer,n,null,1),s.attachListener(t,"drop",function(e){if(e=e.data){var a=e.dropRange,r=e.dragRange,s=e.dataTransfer;s.getTransferType(t)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){n.internalDrop(r,a,s,t)},0):s.getTransferType(t)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?i(r,a,s):o(a,s)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(e){var r,s=o();e.config.forcePasteAsPlainText?r="plain-text":e.config.pasteFilter?r=e.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in e.config||(r="semantic-content"),e.pasteFilter=s.get(r),t(e),l(e),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),e.on("paste",function(t){if(t.data.dataTransfer||(t.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer),!t.data.dataValue){var n=t.data.dataTransfer,i=n.getData("text/html");i?(t.data.dataValue=i,t.data.type="html"):(i=n.getData("text/plain"))&&(t.data.dataValue=e.editable().transformPlainTextToHtml(i),t.data.type="text")}},null,null,1),e.on("paste",function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;if(-1<t.indexOf("Apple-")&&(t=t.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=e.data.type&&(t=t.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(e,t){return t.replace(/\t/g,"&nbsp;&nbsp; &nbsp;")})),-1<t.indexOf('<br class="Apple-interchange-newline">')&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/<br class="Apple-interchange-newline">/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){var i,o,a=new CKEDITOR.dom.element("div");for(a.setHtml(t);1==a.getChildCount()&&(i=a.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)a=o=i;o&&(t=o.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?t=t.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(t,i){return i.toLowerCase()in n?(e.data.preSniffing="html","<"+i):t}):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)><div><br><\/div>$/,function(t,i){return i in n?(e.data.endsWithEOL=1,"</"+i+">"):t}):CKEDITOR.env.gecko&&(t=t.replace(/(\s)<br>$/,"$1")),e.data.dataValue=t},null,null,3),e.on("paste",function(t){t=t.data;var o,r=t.type,l=t.dataValue,c=e.config.clipboard_defaultContentType||"html",d=t.dataTransfer.getTransferType(e);o="html"==r||"html"==t.preSniffing?"html":n(l),"htmlifiedtext"==o&&(l=i(e.config,l)),"text"==r&&"html"==o?l=a(e,l,s.get("plain-text")):d==CKEDITOR.DATA_TRANSFER_EXTERNAL&&e.pasteFilter&&!t.dontFilter&&(l=a(e,l,e.pasteFilter)),t.startsWithEOL&&(l='<br data-cke-eol="1">'+l),t.endsWithEOL&&(l+='<br data-cke-eol="1">'),"auto"==r&&(r="html"==o||"html"==c?"html":"text"),t.type=r,t.dataValue=l,delete t.preSniffing,delete t.startsWithEOL,delete t.endsWithEOL},null,null,6),e.on("paste",function(t){t=t.data,t.dataValue&&(e.insertHtml(t.dataValue,t.type,t.range),setTimeout(function(){e.fire("afterPaste")},0))},null,null,1e3),e.on("pasteDialog",function(t){setTimeout(function(){e.openDialog("paste",t.data)},0)})}}),CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",canClipboardApiBeTrusted:function(e,t){return!!(e.getTransferType(t)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!e.isEmpty()||CKEDITOR.env.gecko&&(e.getData("text/html")||e.getFilesCount()))},getDropTarget:function(e){var t=e.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||t.isInline()?t:e.document},fixSplitNodesAfterDrop:function(e,t,n,i){function o(e,n,i){var o=e;if(o.type==CKEDITOR.NODE_TEXT&&(o=e.getParent()),o.equals(n)&&i!=n.getChildCount())return e=t.startContainer.getChild(t.startOffset-1),n=t.startContainer.getChild(t.startOffset),e&&e.type==CKEDITOR.NODE_TEXT&&n&&n.type==CKEDITOR.NODE_TEXT&&(i=e.getLength(),e.setText(e.getText()+n.getText()),n.remove(),t.setStart(e,i),t.collapse(!0)),!0}var a=t.startContainer;"number"==typeof i&&"number"==typeof n&&a.type==CKEDITOR.NODE_ELEMENT&&(o(e.startContainer,a,n)||o(e.endContainer,a,i))},isDropRangeAffectedByDragRange:function(e,t){var n=t.startContainer,i=t.endOffset;return!!(e.endContainer.equals(n)&&e.endOffset<=i||e.startContainer.getParent().equals(n)&&e.startContainer.getIndex()<i||e.endContainer.getParent().equals(n)&&e.endContainer.getIndex()<i)},internalDrop:function(t,n,i,o){var a,r,s=CKEDITOR.plugins.clipboard,l=o.editable();o.fire("saveSnapshot"),o.fire("lockSnapshot",{dontUpdate:1}),CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(t,n,s.dragStartContainerChildCount,s.dragEndContainerChildCount),(r=this.isDropRangeAffectedByDragRange(t,n))||(a=t.createBookmark(!1)),s=n.clone().createBookmark(!1),r&&(a=t.createBookmark(!1)),t=a.startNode,n=a.endNode,r=s.startNode,n&&t.getPosition(r)&CKEDITOR.POSITION_PRECEDING&&n.getPosition(r)&CKEDITOR.POSITION_FOLLOWING&&r.insertBefore(t),t=o.createRange(),t.moveToBookmark(a),l.extractHtmlFromRange(t,1),n=o.createRange(),n.moveToBookmark(s),e(o,{dataTransfer:i,method:"drop",range:n},1),o.fire("unlockSnapshot")},getRangeAtDropPosition:function(e,t){var n=e.data.$,i=n.clientX,o=n.clientY,a=t.getSelection(!0).getRanges()[0],r=t.createRange();if(e.data.testRange)return e.data.testRange;if(document.caretRangeFromPoint)n=t.document.$.caretRangeFromPoint(i,o),r.setStart(CKEDITOR.dom.node(n.startContainer),n.startOffset),r.collapse(!0);else if(n.rangeParent)r.setStart(CKEDITOR.dom.node(n.rangeParent),n.rangeOffset),r.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&a&&t.editable().hasFocus)return a;if(!document.body.createTextRange)return null;t.focus(),n=t.document.getBody().$.createTextRange();try{for(var s=!1,l=0;20>l&&!s;l++){if(!s)try{n.moveToPoint(i,o-l),s=!0}catch(e){}if(!s)try{n.moveToPoint(i,o+l),s=!0}catch(e){}}if(s){var c="cke-temp-"+(new Date).getTime();n.pasteHTML('<span id="'+c+'">\u200b</span>');var d=t.document.getById(c);r.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START),d.remove()}else{var u,h=t.document.$.elementFromPoint(i,o),f=new CKEDITOR.dom.element(h);if(f.equals(t.editable())||"html"==f.getName())return a&&a.startContainer&&!a.startContainer.equals(t.editable())?a:null;u=f.getClientRect(),i<u.left?r.setStartAt(f,CKEDITOR.POSITION_AFTER_START):r.setStartAt(f,CKEDITOR.POSITION_BEFORE_END),r.collapse(!0)}}catch(e){return null}}return r},initDragDataTransfer:function(e,t){var n=e.data.$?e.data.$.dataTransfer:null,i=new this.dataTransfer(n,t);n?this.dragData&&i.id==this.dragData.id?i=this.dragData:this.dragData=i:this.dragData?i=this.dragData:this.dragData=i,e.data.dataTransfer=i},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(e,t){if(this.isCustomCopyCutSupported&&e&&e.data&&e.data.$){var n=new this.dataTransfer(e.data.$.clipboardData,t);return this.copyCutData&&n.id==this.copyCutData.id?(n=this.copyCutData,n.$=e.data.$.clipboardData):this.copyCutData=n,n}return new this.dataTransfer(null,t)},preventDefaultDropOnElement:function(e){e&&e.on("dragover",s)}};var c=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(e,t){if(e&&(this.$=e),this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(e){return e=e.toLowerCase(),"text"==e||"text/plain"==e?"Text":"url"==e?"URL":e}},this.id=this.getData(c),this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId()),"Text"!=c)try{this.$.setData(c,this.id)}catch(e){}t&&(this.sourceEditor=t,this.setData("text/html",t.getSelectedHtml(1)),"Text"==c||this.getData("text/plain")||this.setData("text/plain",t.getSelection().getSelectedText()))},CKEDITOR.DATA_TRANSFER_INTERNAL=1,CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2,CKEDITOR.DATA_TRANSFER_EXTERNAL=3,CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(e){e=this._.normalizeType(e);var t=this._.data[e];if(void 0===t||null===t||""===t)try{t=this.$.getData(e)}catch(e){}return void 0!==t&&null!==t&&""!==t||(t=""),"text/html"==e?(t=t.replace(this._.metaRegExp,""),(e=this._.bodyRegExp.exec(t))&&e.length&&(t=e[1],t=t.replace(this._.fragmentRegExp,""))):"Text"==e&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==t.substring(0,7)&&(t=""),t},setData:function(e,t){if(e=this._.normalizeType(e),this._.data[e]=t,CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==e||"Text"==e){"Text"==c&&"Text"==e&&(this.id=t);try{this.$.setData(e,t)}catch(e){}}},getTransferType:function(e){return this.sourceEditor?this.sourceEditor==e?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function e(e){e=i._.normalizeType(e);var t=i.getData(e);t&&(i._.data[e]=t)}if(this.$){var t,n,i=this;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(t=0;t<this.$.types.length;t++)e(this.$.types[t])}else e("Text"),e("URL");if(n=this._getImageFromClipboard(),this.$&&this.$.files||n){for(this._.files=[],t=0;t<this.$.files.length;t++)this._.files.push(this.$.files[t]);0===this._.files.length&&n&&this._.files.push(n)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(e){return this._.files.length?this._.files[e]:this.$&&this.$.files&&this.$.files.length?this.$.files[e]:0===e?this._getImageFromClipboard():void 0},isEmpty:function(){var e,t={};if(this.getFilesCount())return!1;for(e in this._.data)t[e]=1;if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var n=0;n<this.$.types.length;n++)t[this.$.types[n]]=1}else t.Text=1,t.URL=1;"Text"!=c&&(t[c]=0);for(e in t)if(t[e]&&""!==this.getData(e))return!1;return!0},_getImageFromClipboard:function(){var e;if(this.$&&this.$.items&&this.$.items[0])try{if((e=this.$.items[0].getAsFile())&&e.type)return e}catch(e){}}}}(),function(){var e='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}" aria-disabled="{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var e=e+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"'),e=e+'>&nbsp;</span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span>{arrowHtml}</a>',t=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"&#9660;":"")+"</span>"),n=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(t){t.execCommand(e.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(e,i){function o(){var t=e.mode;t&&(t=this.modes[t]?void 0!==m[t]?m[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,t=e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t,
this.setState(t),this.refresh&&this.refresh())}var a,r=CKEDITOR.env,s=this._.id=CKEDITOR.tools.getNextId(),l="",c=this.command;this._.editor=e;var d={id:s,button:this,editor:e,focus:function(){CKEDITOR.document.getById(s).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},u=CKEDITOR.tools.addFunction(function(e){if(d.onkey)return e=new CKEDITOR.dom.event(e),!1!==d.onkey(d,e.getKeystroke())}),h=CKEDITOR.tools.addFunction(function(e){var t;return d.onfocus&&(t=!1!==d.onfocus(d,new CKEDITOR.dom.event(e))),t}),f=0;if(d.clickFn=a=CKEDITOR.tools.addFunction(function(){f&&(e.unlockSelection(1),f=0),d.execute(),r.iOS&&e.focus()}),this.modes){var m={};e.on("beforeModeUnload",function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[e.mode]=this._.state)},this),e.on("activeFilterChange",o,this),e.on("mode",o,this),!this.readOnly&&e.on("readOnly",o,this)}else c&&(c=e.getCommand(c))&&(c.on("state",function(){this.setState(c.state)},this),l+=c.state==CKEDITOR.TRISTATE_ON?"on":c.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");this.directional&&e.on("contentDirChanged",function(t){var n=CKEDITOR.document.getById(this._.id),i=n.getFirst();t=t.data,t!=e.lang.dir?n.addClass("cke_"+t):n.removeClass("cke_ltr").removeClass("cke_rtl"),i.setAttribute("style",CKEDITOR.skin.getIconStyle(E,"rtl"==t,this.icon,this.iconOffset))},this),c||(l+="off");var g=this.name||this.command,E=g;return this.icon&&!/\./.test(this.icon)&&(E=this.icon,this.icon=null),l={id:s,name:g,iconName:E,label:this.label,cls:this.className||"",state:l,ariaDisabled:"disabled"==l?"true":"false",title:this.title,titleJs:r.gecko&&!r.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:u,focusFn:h,clickFn:a,style:CKEDITOR.skin.getIconStyle(E,"rtl"==e.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},n.output(l,i),this.onRender&&this.onRender(),d},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return!!t&&(t.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0)},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;var t=this;return this.allowedContent||this.requiredContent||!this.command||(t=e.getCommand(this.command)||t),this._.feature=t}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function e(e){var t=this._;t.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(e),t.on?t.panel.hide():t.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){var n=t.panel||{};delete t.panel,this.base(t),this.document=n.parent&&n.parent.getDocument()||CKEDITOR.document,n.block={attributes:n.attributes},this.hasArrow=n.toolbarRelated=!0,this.click=e,this._={panelDefinition:n}},statics:{handler:{create:function(e){return new CKEDITOR.ui.panelButton(e)}}},proto:{createPanel:function(e){var t=this._;if(!t.panel){var n=this._.panelDefinition,i=this._.panelDefinition.block,o=n.parent||CKEDITOR.document.getBody(),a=this._.panel=new CKEDITOR.ui.floatPanel(e,o,n),n=a.addBlock(t.id,i),r=this;a.onShow=function(){r.className&&this.element.addClass(r.className+"_panel"),r.setState(CKEDITOR.TRISTATE_ON),t.on=1,r.editorFocus&&e.focus(),r.onOpen&&r.onOpen()},a.onHide=function(n){r.className&&this.element.getFirst().removeClass(r.className+"_panel"),r.setState(r.modes&&r.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),t.on=0,!n&&r.onClose&&r.onClose()},a.onEscape=function(){a.hide(1),r.document.getById(t.id).focus()},this.onBlock&&this.onBlock(a,n),n.onHide=function(){t.on=0,r.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}),CKEDITOR.UI_PANEL="panel",CKEDITOR.ui.panel=function(e,t){t&&CKEDITOR.tools.extend(this,t),CKEDITOR.tools.extend(this,{className:"",css:[]}),this.id=CKEDITOR.tools.getNextId(),this.document=e,this.isFramed=this.forceIFrame||this.css.length,this._={blocks:{}}},CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var e=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),t=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'),n=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');CKEDITOR.ui.panel.prototype={render:function(i,o){this.getHolderElement=function(){var e=this._.holder;if(!e){if(this.isFramed){var e=this.document.getById(this.id+"_frame"),t=e.getParent(),e=e.getFrameDocument();CKEDITOR.env.iOS&&t.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),t=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),e.write(n.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+t+");"},a))),e.getWindow().$.CKEDITOR=CKEDITOR,e.on("keydown",function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(t)?e.data.preventDefault():(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t)&&e.data.preventDefault()},this),e=e.getBody(),e.unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(t)}else e=this.document.getById(this.id);this._.holder=e}return e};var a={editorId:i.id,id:this.id,langCode:i.langCode,dir:i.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":i.config.baseFloatZIndex+1};if(this.isFramed){var r=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";a.frame=t.output({id:this.id+"_frame",src:r})}return r=e.output(a),o&&o.push(r),r},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=e,CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,t){var n=this.keys[e];switch(n){case"next":for(var i,o=this._.focusIndex,n=this.element.getElementsByTag("a");i=n.getItem(++o);)if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=o,i.focus();break}return!i&&!t&&(this._.focusIndex=-1,this.onKeyDown(e,1));case"prev":for(o=this._.focusIndex,n=this.element.getElementsByTag("a");0<o&&(i=n.getItem(--o));){if(i.getAttribute("_cke_focus")&&i.$.offsetWidth){this._.focusIndex=o,i.focus();break}i=null}return!i&&!t&&(this._.focusIndex=n.count(),this.onKeyDown(e,1));case"click":case"mouseup":return o=this._.focusIndex,(i=0<=o&&this.element.getElementsByTag("a").getItem(o))&&(i.$[n]?i.$[n]():i.$["on"+n]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function e(e,n,i,o,a){a=CKEDITOR.tools.genKey(n.getUniqueId(),i.getUniqueId(),e.lang.dir,e.uiColor||"",o.css||"",a||"");var r=t[a];return r||(r=t[a]=new CKEDITOR.ui.panel(n,o),r.element=i.append(CKEDITOR.dom.element.createFromHtml(r.render(e),n)),r.element.setStyles({display:"none",position:"absolute"})),r}var t={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(t,n,i,o){function a(){c.hide()}i.forceIFrame=1,i.toolbarRelated&&t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(n=CKEDITOR.document.getById("cke_"+t.name));var r=n.getDocument();o=e(t,r,n,i,o||0);var s=o.element,l=s.getFirst(),c=this;s.disableContextMenu(),this.element=s,this._={editor:t,panel:o,parentElement:n,definition:i,document:r,iframe:l,children:[],dir:t.lang.dir,showBlockParams:null},t.on("mode",a),t.on("resize",a),r.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(e,t){return this._.panel.addBlock(e,t)},addListBlock:function(e,t){return this._.panel.addListBlock(e,t)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(e,t,n,i,o,a){var r=this._.panel,s=r.showBlock(e);this._.showBlockParams=[].slice.call(arguments),this.allowBlur(!1);var l=this._.editor.editable();this._.returnFocus=l.hasFocus?l:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement),this._.hideTimeout=0;var c=this.element,l=this._.iframe,l=CKEDITOR.env.ie&&!CKEDITOR.env.edge?l:new CKEDITOR.dom.window(l.$.contentWindow),d=c.getDocument(),u=this._.parentElement.getPositionedAncestor(),h=t.getDocumentPosition(d),d=u?u.getDocumentPosition(d):{x:0,y:0},f="rtl"==this._.dir,m=h.x+(i||0)-d.x,g=h.y+(o||0)-d.y;!f||1!=n&&4!=n?f||2!=n&&3!=n||(m+=t.$.offsetWidth-1):m+=t.$.offsetWidth,3!=n&&4!=n||(g+=t.$.offsetHeight-1),this._.panel._.offsetParentId=t.getId(),c.setStyles({top:g+"px",left:0,display:""}),c.setOpacity(0),c.getFirst().removeStyle("width"),this._.editor.focusManager.add(l),this._.blurSet||(CKEDITOR.event.useCapture=!0,l.on("blur",function(e){function t(){delete this._.returnFocus,this.hide()}this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(t,0,this)):t.call(this))},this),l.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(l.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),l.on("touchend",function(){this._.hideTimeout=0,this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1),r.onEscape=CKEDITOR.tools.bind(function(e){if(this.onEscape&&!1===this.onEscape(e))return!1},this),CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.tools.bind(function(){var e=c;if(e.removeStyle("width"),s.autoSize){var t=s.element.getDocument(),t=(CKEDITOR.env.webkit||CKEDITOR.env.edge?s.element:t.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<t&&(t+=(e.$.offsetWidth||0)-(e.$.clientWidth||0)+3),e.setStyle("width",t+10+"px"),t=s.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<t&&(t+=(e.$.offsetHeight||0)-(e.$.clientHeight||0)+3),e.setStyle("height",t+"px"),r._.currentBlock.element.setStyle("display","none").removeStyle("display")}else e.removeStyle("height");f&&(m-=c.$.offsetWidth),c.setStyle("left",m+"px");var t=r.element.getWindow(),e=c.$.getBoundingClientRect(),t=t.getViewPaneSize(),n=e.width||e.right-e.left,i=e.height||e.bottom-e.top,o=f?e.right:t.width-e.left,l=f?t.width-e.right:e.left;f?o<n&&(m=l>n?m+n:t.width>n?m-e.left:m-e.right+t.width):o<n&&(m=l>n?m-n:t.width>n?m-e.right+t.width:m-e.left),n=e.top,t.height-e.top<i&&(g=n>i?g-i:t.height>i?g-e.bottom+t.height:g-e.top),CKEDITOR.env.ie&&(t=e=new CKEDITOR.dom.element(c.$.offsetParent),"html"==t.getName()&&(t=t.getDocument().getBody()),"rtl"==t.getComputedStyle("direction")&&(m=CKEDITOR.env.ie8Compat?m-2*c.getDocument().getDocumentElement().$.scrollLeft:m-(e.$.scrollWidth-e.$.clientWidth)));var d,e=c.getFirst();(d=e.getCustomData("activePanel"))&&d.onHide&&d.onHide.call(this,1),e.setCustomData("activePanel",this),c.setStyles({top:g+"px",left:m+"px"}),c.setOpacity(1),a&&a()},this);r.isLoaded?e():r.onLoad=e,CKEDITOR.tools.setTimeout(function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),s.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),this.allowBlur(!0),this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.showBlockParams=null,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!==e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,a){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,a),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",function(){var e,n=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in t){var i=t[e];n?i.destroy():i.element.hide()}n&&(t={})})}(),CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(e){function t(t,i,r,s){var l=new CKEDITOR.style(o["colorButton_"+i+"Style"]),c=CKEDITOR.tools.getNextId()+"_colorBox";e.ui.add(t,CKEDITOR.UI_PANELBUTTON,{label:r,title:r,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+s,allowedContent:l,requiredContent:l,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":a.panelTitle}},onBlock:function(t,o){o.autoSize=!0,o.element.addClass("cke_colorblock"),o.element.setHtml(n(t,i,c)),o.element.getDocument().getBody().setStyle("overflow","hidden"),CKEDITOR.ui.fire("ready",this);var a=o.keys,r="rtl"==e.lang.dir;a[r?37:39]="next",a[40]="next",a[9]="next",a[r?39:37]="prev",a[38]="prev",a[CKEDITOR.SHIFT+9]="prev",a[32]="click"},refresh:function(){e.activeFilter.check(l)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var t,n=e.getSelection(),n=n&&n.getStartElement(),n=e.elementPath(n);if(n){n=n.block||n.blockLimit||e.document.getBody();do t=n&&n.getComputedStyle("back"==i?"background-color":"color")||"transparent";while("back"==i&&"transparent"==t&&n&&(n=n.getParent()));return t&&"transparent"!=t||(t="#ffffff"),!1!==o.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(c).setStyle("background-color",t),t}}})}function n(t,n,r){var s=[],l=o.colorButton_colors.split(","),c=e.plugins.colordialog&&!1!==o.colorButton_enableMore,d=l.length+(c?2:1),u=CKEDITOR.tools.addFunction(function(n,a){function r(e){this.removeListener("ok",r),this.removeListener("cancel",r),"ok"==e.name&&s(this.getContentElement("picker","selectedColor").getValue(),a)}var s=arguments.callee;if("?"==n)e.openDialog("colordialog",function(){this.on("ok",r),this.on("cancel",r)});else{if(e.focus(),t.hide(),e.fire("saveSnapshot"),e.removeStyle(new CKEDITOR.style(o["colorButton_"+a+"Style"],{color:"inherit"})),n){var l=o["colorButton_"+a+"Style"];l.childRule="back"==a?function(e){return i(e)}:function(e){return!(e.is("a")||e.getElementsByTag("a").count())||i(e)},e.applyStyle(new CKEDITOR.style(l,{color:n}))}e.fire("saveSnapshot")}});for(!1!==o.colorButton_enableAutomatic&&s.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',a.auto,'" onclick="CKEDITOR.tools.callFunction(',u,",null,'",n,"');return false;\" href=\"javascript:void('",a.auto,'\')" role="option" aria-posinset="1" aria-setsize="',d,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',r,'"></span></td><td colspan=7 align=center>',a.auto,"</td></tr></table></a>"),s.push('<table role="presentation" cellspacing=0 cellpadding=0 width="100%">'),r=0;r<l.length;r++){0===r%8&&s.push("</tr><tr>");var h=l[r].split("/"),f=h[0],m=h[1]||f;h[1]||(f="#"+f.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3")),h=e.lang.colorbutton.colors[m]||m,s.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',h,'" onclick="CKEDITOR.tools.callFunction(',u,",'",f,"','",n,"'); return false;\" href=\"javascript:void('",h,'\')" role="option" aria-posinset="',r+2,'" aria-setsize="',d,'"><span class="cke_colorbox" style="background-color:#',m,'"></span></a></td>')}return c&&s.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',a.more,'" onclick="CKEDITOR.tools.callFunction(',u,",'?','",n,"');return false;\" href=\"javascript:void('",a.more,"')\"",' role="option" aria-posinset="',d,'" aria-setsize="',d,'">',a.more,"</a></td>"),s.push("</tr></table>"),s.join("")}function i(e){return"false"==e.getAttribute("contentEditable")||e.getAttribute("data-nostyle")}var o=e.config,a=e.lang.colorbutton;CKEDITOR.env.hc||(t("TextColor","fore",a.textColorTitle,10),t("BGColor","back",a.bgColorTitle,20))}}),CKEDITOR.config.colorButton_colors="000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.colordialog={requires:"dialog",init:function(e){var t=new CKEDITOR.dialogCommand("colordialog");t.editorFocus=!1,e.addCommand("colordialog",t),CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js"),e.getColorFromDialog=function(t,n){var i=function(e){this.removeListener("ok",i),this.removeListener("cancel",i),e="ok"==e.name?this.getValueOf("picker","selectedColor"):null,t.call(n,e)},o=function(e){e.on("ok",i),e.on("cancel",i)};e.execCommand("colordialog"),e._.storedDialogs&&e._.storedDialogs.colordialog?o(e._.storedDialogs.colordialog):CKEDITOR.on("dialogDefinition",function(e){if("colordialog"==e.data.name){var t=e.data.definition;e.removeListener(),t.onLoad=CKEDITOR.tools.override(t.onLoad,function(e){return function(){o(this),t.onLoad=e,"function"==typeof e&&e.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(e){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js")),e.addCommand("templates",new CKEDITOR.dialogCommand("templates")),e.ui.addButton&&e.ui.addButton("Templates",{label:e.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var e={},t={};CKEDITOR.addTemplates=function(t,n){e[t]=n},CKEDITOR.getTemplates=function(t){return e[t]},CKEDITOR.loadTemplates=function(e,n){for(var i=[],o=0,a=e.length;o<a;o++)t[e[o]]||(i.push(e[o]),t[e[o]]=1);i.length?CKEDITOR.scriptLoader.load(i,n):setTimeout(n,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;o<t.length;o++)n[t[o]]=o+1;e.addMenuGroup=function(e,t){n[e]=t||100},e.addMenuItem=function(e,t){n[t.group]&&(i[e]=new CKEDITOR.menuItem(this,e,t))},e.addMenuItems=function(e){for(var t in e)this.addMenuItem(t,e[t])},e.getMenuItem=function(e){return i[e]},e.removeMenuItem=function(e){delete i[e]}}}),function(){function e(e){e.sort(function(e,t){return e.group<t.group?-1:e.group>t.group?1:e.order<t.order?-1:e.order>t.order?1:0})}var t='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="{role}" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" {ariaChecked}';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(t+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(t+=' onblur="this.style.cssText = this.style.cssText;"');var t=t+(' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'),n=CKEDITOR.addTemplate("menuItem",t+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{arrowHtml}</span></a></span>'),i=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o<i.length;o++){var a=i[o](t,e,n);if(a)for(var r in a){var s=this.editor.getMenuItem(r);!s||s.command&&!this.editor.getCommand(s.command).state||(s.state=a[r],this.add(s))}}},onClick:function(e){this.hide(),e.onClick?e.onClick():e.command&&this.editor.execCommand(e.command)},onEscape:function(e){var t=this.parent;return t?t._.panel.hideChild(1):27==e&&this.hide(1),!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(e){var t=this._.subMenu,n=this.items[e];if(n=n.getItems&&n.getItems()){t?t.removeAll():(t=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),t.parent=this,t._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var i in n){var o=this.editor.getMenuItem(i);o&&(o.state=n[i],t.add(o))}var a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(e));setTimeout(function(){t.show(a,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(e){e.order||(e.order=this.items.length),this.items.push(e)},removeAll:function(){this.items=[]},show:function(t,n,i,o){if(this.parent||(this._.onShow(),this.items.length)){n=n||("rtl"==this.editor.lang.dir?2:1);var a=this.items,r=this.editor,s=this._.panel,l=this._.element;if(!s){s=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level),s.onEscape=CKEDITOR.tools.bind(function(e){if(!1===this._.onEscape(e))return!1},this),s.onShow=function(){s._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")},s.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this),l=s.addBlock(this.id,this._.panelDefinition.block),l.autoSize=!0;var c=l.keys;c[40]="next",c[9]="next",c[38]="prev",c[CKEDITOR.SHIFT+9]="prev",c["rtl"==r.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click",c[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(c[13]="mouseup"),l=this._.element=l.element,c=l.getDocument(),c.getBody().setStyle("overflow","hidden"),c.getElementsByTag("html").getItem(0).setStyle("overflow","hidden"),this._.itemOverFn=CKEDITOR.tools.addFunction(function(e){clearTimeout(this._.showSubTimeout),this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,r.config.menu_subMenuDelay||400,this,[e])},this),this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this),this._.itemClickFn=CKEDITOR.tools.addFunction(function(e){var t=this.items[e];t.state==CKEDITOR.TRISTATE_DISABLED?this.hide(1):t.getItems?this._.showSubMenu(e):this._.onClick(t)},this)}e(a);for(var c=r.elementPath(),c=['<div class="cke_menu'+(c&&c.direction()!=r.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],d=a.length,u=d&&a[0].group,h=0;h<d;h++){var f=a[h];u!=f.group&&(c.push('<div class="cke_menuseparator" role="separator"></div>'),u=f.group),f.render(this,h,c)}c.push("</div>"),l.setHtml(c.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(s,this.id,t,n,i,o):s.showBlock(this.id,t,n,i,o),r.fire("menuShow",[s])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,t,o){var a=e.id+String(t),r="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,s="",l=r==CKEDITOR.TRISTATE_ON?"on":r==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(s=' aria-checked="'+(r==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var c=this.getItems,d="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",u=this.name;this.icon&&!/\./.test(this.icon)&&(u=this.icon),e={id:a,name:this.name,iconName:u,label:this.label,cls:this.className||"",state:l,hasPopup:c?"true":"false",disabled:r==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(u,"rtl"==this.editor.lang.dir,u==this.icon?null:this.icon,this.iconOffset),arrowHtml:c?i.output({label:d}):"",role:this.role?this.role:"menuitem",ariaChecked:s},n.output(e,o)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,t){if(e.on("contextmenu",function(e){e=e.data;var i=CKEDITOR.env.webkit?n:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;if(!t||!i){if(e.preventDefault(),CKEDITOR.env.mac&&CKEDITOR.env.webkit){var i=this.editor,o=new CKEDITOR.dom.elementPath(e.getTarget(),i.editable()).contains(function(e){return e.hasAttribute("contenteditable")},!0);o&&"false"==o.getAttribute("contenteditable")&&i.getSelection().fake(o)}var o=e.getTarget().getDocument(),a=e.getTarget().getDocument().getDocumentElement(),i=!o.equals(CKEDITOR.document),o=o.getWindow().getScrollPosition(),r=i?e.$.clientX:e.$.pageX||o.x+e.$.clientX,s=i?e.$.clientY:e.$.pageY||o.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(a,null,r,s)},CKEDITOR.env.ie?200:0,this)}},this),CKEDITOR.env.webkit){var n,i=function(){n=0};e.on("keydown",function(e){n=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey}),e.on("keyup",i),e.on("contextmenu",i)}},open:function(e,t,n,i){this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i)}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)}),e.addCommand("contextMenu",{exec:function(){e.contextMenu.open(e.document.getBody())}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(e){if(!e.blockless){var t=e.lang.div,n="div(*)";CKEDITOR.dialog.isTabEnabled(e,"editdiv","advanced")&&(n+=";div[dir,id,lang,title]{*}"),e.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:n,requiredContent:"div",contextSensitive:!0,refresh:function(e,t){this.setState("div"in(e.config.div_wrapTable?t.root:t.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})),e.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"})),e.addCommand("removediv",{requiredContent:"div",exec:function(e){function t(t){(t=CKEDITOR.plugins.div.getSurroundDiv(e,t))&&!t.data("cke-div-added")&&(r.push(t),t.data("cke-div-added"))}for(var n,i=e.getSelection(),o=i&&i.getRanges(),a=i.createBookmarks(),r=[],s=0;s<o.length;s++)n=o[s],n.collapsed?t(i.getStartElement()):(n=new CKEDITOR.dom.walker(n),n.evaluator=t,n.lastForward());for(s=0;s<r.length;s++)r[s].remove(!0);i.selectBookmarks(a)}}),e.ui.addButton&&e.ui.addButton("CreateDiv",{label:t.toolbar,command:"creatediv",toolbar:"blocks,50"}),e.addMenuItems&&(e.addMenuItems({editdiv:{label:t.edit,command:"editdiv",group:"div",order:1},removediv:{label:t.remove,command:"removediv",group:"div",order:5}}),e.contextMenu&&e.contextMenu.addListener(function(t){return!t||t.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(e)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:null})),CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js"),CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}}),CKEDITOR.plugins.div={getSurroundDiv:function(e,t){var n=e.elementPath(t);return e.elementPath(n.blockLimit).contains(function(e){return e.is("div")&&!e.isReadOnly()},1)}}}(),CKEDITOR.plugins.add("resize",{init:function(e){function t(t){var n=s.width,o=s.height,l=n+(t.data.$.screenX-r.x)*("rtl"==a?-1:1);t=o+(t.data.$.screenY-r.y),c&&(n=Math.max(i.resize_minWidth,Math.min(l,i.resize_maxWidth))),d&&(o=Math.max(i.resize_minHeight,Math.min(t,i.resize_maxHeight))),e.resize(c?n:null,o)}function n(){CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),e.document&&(e.document.removeListener("mousemove",t),e.document.removeListener("mouseup",n))}var i=e.config,o=e.ui.spaceId("resizer"),a=e.element?e.element.getDirection(1):"ltr";if(!i.resize_dir&&(i.resize_dir="vertical"),void 0===i.resize_maxWidth&&(i.resize_maxWidth=3e3),void 0===i.resize_maxHeight&&(i.resize_maxHeight=3e3),void 0===i.resize_minWidth&&(i.resize_minWidth=750),void 0===i.resize_minHeight&&(i.resize_minHeight=250),!1!==i.resize_enabled){var r,s,l=null,c=("both"==i.resize_dir||"horizontal"==i.resize_dir)&&i.resize_minWidth!=i.resize_maxWidth,d=("both"==i.resize_dir||"vertical"==i.resize_dir)&&i.resize_minHeight!=i.resize_maxHeight,u=CKEDITOR.tools.addFunction(function(o){l||(l=e.getResizable()),s={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0},r={x:o.screenX,y:o.screenY},i.resize_minWidth>s.width&&(i.resize_minWidth=s.width),i.resize_minHeight>s.height&&(i.resize_minHeight=s.height),
CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),e.document&&(e.document.on("mousemove",t),e.document.on("mouseup",n)),o.preventDefault&&o.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(u)}),e.on("uiSpace",function(t){if("bottom"==t.data.space){var n="";c&&!d&&(n=" cke_resizer_horizontal"),!c&&d&&(n=" cke_resizer_vertical");var i='<span id="'+o+'" class="cke_resizer'+n+" cke_resizer_"+a+'" title="'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+u+', event)">'+("ltr"==a?"\u25e2":"\u25e3")+"</span>";"ltr"==a&&"ltr"==n?t.data.html+=i:t.data.html=i+t.data.html}},e,null,100),e.on("maximize",function(t){e.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});!function(){function e(e){function n(){for(var n=i(),a=CKEDITOR.tools.clone(e.config.toolbarGroups)||t(e),r=0;r<a.length;r++){var s=a[r];if("/"!=s){"string"==typeof s&&(s=a[r]={name:s});var l,c=s.groups;if(c)for(var d=0;d<c.length;d++)l=c[d],(l=n[l])&&o(s,l);(l=n[s.name])&&o(s,l)}}return a}function i(){var t,n,i,o={};for(t in e.ui.items)n=e.ui.items[t],i=n.toolbar||"others",i=i.split(","),n=i[0],i=parseInt(i[1]||-1,10),o[n]||(o[n]=[]),o[n].push({name:t,order:i});for(n in o)o[n]=o[n].sort(function(e,t){return e.order==t.order?0:0>t.order?-1:0>e.order?1:e.order<t.order?-1:1});return o}function o(t,n){if(n.length){t.items?t.items.push(e.ui.create("-")):t.items=[];for(var i;i=n.shift();)i="string"==typeof i?i:i.name,r&&-1!=CKEDITOR.tools.indexOf(r,i)||(i=e.ui.create(i))&&e.addFeature(i)&&t.items.push(i)}}function a(e){var t,n,i,a=[];for(t=0;t<e.length;++t)n=e[t],i={},"/"==n?a.push(n):CKEDITOR.tools.isArray(n)?(o(i,CKEDITOR.tools.clone(n)),a.push(i)):n.items&&(o(i,CKEDITOR.tools.clone(n.items)),i.name=n.name,a.push(i));return a}var r=e.config.removeButtons,r=r&&r.split(","),s=e.config.toolbar;return"string"==typeof s&&(s=e.config["toolbar_"+s]),e.toolbar=s?a(s):n()}function t(e){return e._.toolbarGroups||(e._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var n=function(){this.toolbars=[],this.focusCommandExecuted=!1};n.prototype.focus=function(){for(var e,t=0;e=this.toolbars[t++];)for(var n,i=0;n=e.items[i++];)if(n.focus)return void n.focus()};var i={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(e){e.toolbox&&(e.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){e.toolbox.focus()},100):e.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(t){var o,a=function(e,n){var i,r="rtl"==t.lang.dir,s=t.config.toolbarGroupCycling,l=r?37:39,r=r?39:37,s=void 0===s||s;switch(n){case 9:case CKEDITOR.SHIFT+9:for(;!i||!i.items.length;)if(i=9==n?(i?i.next:e.toolbar.next)||t.toolbox.toolbars[0]:(i?i.previous:e.toolbar.previous)||t.toolbox.toolbars[t.toolbox.toolbars.length-1],i.items.length)for(e=i.items[o?i.items.length-1:0];e&&!e.focus;)(e=o?e.previous:e.next)||(i=0);return e&&e.focus(),!1;case l:i=e;do i=i.next,!i&&s&&(i=e.toolbar.items[0]);while(i&&!i.focus);return i?i.focus():a(e,9),!1;case 40:return e.button&&e.button.hasArrow?(t.once("panelShow",function(e){e.data._.panel._.currentBlock.onKeyDown(40)}),e.execute()):a(e,40==n?l:r),!1;case r:case 38:i=e;do i=i.previous,!i&&s&&(i=e.toolbar.items[e.toolbar.items.length-1]);while(i&&!i.focus);return i?i.focus():(o=1,a(e,CKEDITOR.SHIFT+9),o=0),!1;case 27:return t.focus(),!1;case 13:case 32:return e.execute(),!1}return!0};t.on("uiSpace",function(i){if(i.data.space==t.config.toolbarLocation){i.removeListener(),t.toolbox=new n;var o,r,s=CKEDITOR.tools.getNextId(),l=['<span id="',s,'" class="cke_voice_label">',t.lang.toolbar.toolbars,"</span>",'<span id="'+t.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',s,'" onmousedown="return false;">'],s=!1!==t.config.toolbarStartupExpanded;t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&l.push('<span class="cke_toolbox_main"'+(s?">":' style="display:none">'));for(var c=t.toolbox.toolbars,d=e(t),u=0;u<d.length;u++){var h,f,m,g=0,E=d[u];if(E)if(o&&(l.push("</span>"),r=o=0),"/"===E)l.push('<span class="cke_toolbar_break"></span>');else{m=E.items||E;for(var p=0;p<m.length;p++){var T,C=m[p];if(C){var I=function(e){e=e.render(t,l),O=g.items.push(e)-1,0<O&&(e.previous=g.items[O-1],e.previous.next=e),e.toolbar=g,e.onkey=a,e.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}};if(C.type==CKEDITOR.UI_SEPARATOR)r=o&&C;else{if(T=!1!==C.canGroup,!g){h=CKEDITOR.tools.getNextId(),g={id:h,items:[]},f=E.name&&(t.lang.toolbar.toolbarGroups[E.name]||E.name),l.push('<span id="',h,'" class="cke_toolbar"',f?' aria-labelledby="'+h+'_label"':"",' role="toolbar">'),f&&l.push('<span id="',h,'_label" class="cke_voice_label">',f,"</span>"),l.push('<span class="cke_toolbar_start"></span>');var O=c.push(g)-1;0<O&&(g.previous=c[O-1],g.previous.next=g)}T?o||(l.push('<span class="cke_toolgroup" role="presentation">'),o=1):o&&(l.push("</span>"),o=0),r&&(I(r),r=0),I(C)}}}o&&(l.push("</span>"),r=o=0),g&&l.push('<span class="cke_toolbar_end"></span></span>')}}if(t.config.toolbarCanCollapse&&l.push("</span>"),t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var D=CKEDITOR.tools.addFunction(function(){t.execCommand("toolbarCollapse")});t.on("destroy",function(){CKEDITOR.tools.removeFunction(D)}),t.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),a=parseInt(i.$.style.height,10),r=o.$.offsetHeight,s=t.hasClass("cke_toolbox_collapser_min");s?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(s?"\u25b2":"\u25c0"),i.setStyle("height",a-(o.$.offsetHeight-r)+"px"),e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:i.$.offsetHeight,outerWidth:e.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}}),t.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),l.push('<a title="'+(s?t.lang.toolbar.toolbarCollapse:t.lang.toolbar.toolbarExpand)+'" id="'+t.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser'),s||l.push(" cke_toolbox_collapser_min"),l.push('" onclick="CKEDITOR.tools.callFunction('+D+')">','<span class="cke_arrow">&#9650;</span>',"</a>")}l.push("</span>"),i.data.html+=l.join("")}}),t.on("destroy",function(){if(this.toolbox){var e,t,n,i,o=0;for(e=this.toolbox.toolbars;o<e.length;o++)for(n=e[o].items,t=0;t<n.length;t++)i=n[t],i.clickFn&&CKEDITOR.tools.removeFunction(i.clickFn),i.keyDownFn&&CKEDITOR.tools.removeFunction(i.keyDownFn)}}),t.on("uiReady",function(){var e=t.ui.space("toolbox");e&&t.focusManager.add(e,1)}),t.addCommand("toolbarFocus",i),t.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus"),t.ui.add("-",CKEDITOR.UI_SEPARATOR,{}),t.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(e,t){return t.push('<span class="cke_toolbar_separator" role="separator"></span>'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,n,i){var o=t(this.editor),a=0===n,r={name:e};if(i){if(i=CKEDITOR.tools.search(o,function(e){return e.name==i}))return!i.groups&&(i.groups=[]),n&&(n=CKEDITOR.tools.indexOf(i.groups,n),0<=n)?void i.groups.splice(n+1,0,e):void(a?i.groups.splice(0,0,e):i.groups.push(e));n=null}n&&(n=CKEDITOR.tools.indexOf(o,function(e){return e.name==n})),a?o.splice(0,0,e):"number"==typeof n?o.splice(n+1,0,r):o.push(e)}}();CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){function e(e,n){function o(t){if(t=l.list[t],t.equals(e.editable())||"true"==t.getAttribute("contenteditable")){var n=e.createRange();n.selectNodeContents(t),n.select()}else e.getSelection().selectElement(t);e.focus()}function a(){r&&r.setHtml('<span class="cke_path_empty">&nbsp;</span>'),delete l.list}var r,s=e.ui.spaceId("path"),l=e._.elementsPath,c=l.idBase;n.html+='<span id="'+s+'_label" class="cke_voice_label">'+e.lang.elementspath.eleLabel+'</span><span id="'+s+'" class="cke_path" role="group" aria-labelledby="'+s+'_label"><span class="cke_path_empty">&nbsp;</span></span>',e.on("uiReady",function(){var t=e.ui.space("path");t&&e.focusManager.add(t,1)}),l.onClick=o;var d=CKEDITOR.tools.addFunction(o),u=CKEDITOR.tools.addFunction(function(t,n){var i,a=l.idBase;switch(n=new CKEDITOR.dom.event(n),i="rtl"==e.lang.dir,n.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(a+(t+1)))||(i=CKEDITOR.document.getById(a+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(a+(t-1)))||(i=CKEDITOR.document.getById(a+(l.list.length-1))),i.focus(),!1;case 27:return e.focus(),!1;case 13:case 32:return o(t),!1}return!0});e.on("selectionChange",function(){for(var t,n=[],o=l.list=[],a=[],h=l.filters,f=!0,m=e.elementPath().elements,g=m.length;g--;){var E=m[g],p=0;t=E.data("cke-display-name")?E.data("cke-display-name"):E.data("cke-real-element-type")?E.data("cke-real-element-type"):E.getName(),(f=E.hasAttribute("contenteditable")?"true"==E.getAttribute("contenteditable"):f)||E.hasAttribute("contenteditable")||(p=1);for(var T=0;T<h.length;T++){var C=h[T](E,t);if(!1===C){p=1;break}t=C||t}p||(o.unshift(E),a.unshift(t))}for(o=o.length,h=0;h<o;h++)t=a[h],f=e.lang.elementspath.eleTitle.replace(/%1/,t),t=i.output({id:c+h,label:f,text:t,jsTitle:"javascript:void('"+t+"')",index:h,keyDownFn:u,clickFn:d}),n.unshift(t);r||(r=CKEDITOR.document.getById(s)),a=r,a.setHtml(n.join("")+'<span class="cke_path_empty">&nbsp;</span>'),e.fire("elementsPathUpdate",{space:a})}),e.on("readOnly",a),e.on("contentDomUnload",a),e.addCommand("elementsPathFocus",t.toolbarFocus),e.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var t={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},n="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(n+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var i=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+n+' hidefocus="true"  onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');CKEDITOR.plugins.add("elementspath",{init:function(t){t._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},t.on("uiSpace",function(n){"bottom"==n.data.space&&e(t,n.data)})}})}(),function(){function e(e,t,n){n=e.config.forceEnterMode||n,"wysiwyg"==e.mode&&(t||(t=e.activeEnterMode),e.elementPath().isContextFor("p")||(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?r(e,t,null,n):s(e,t,null,n),e.fire("saveSnapshot"))}function t(e){e=e.getSelection().getRanges(!0);for(var t=e.length-1;0<t;t--)e[t].deleteContents();return e[0]}function n(e){var t=e.startContainer.getAscendant(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&"true"==e.getAttribute("contenteditable")},!0);return e.root.equals(t)?e:(t=new CKEDITOR.dom.range(t),t.moveToRange(e),t)}CKEDITOR.plugins.add("enterkey",{init:function(t){t.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){e(t)}}),t.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){e(t,t.activeShiftEnterMode,1)}}),t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var i=CKEDITOR.dom.walker.whitespaces(),o=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,a,s,c){if(s=s||t(e)){s=n(s);var d,u=s.document,h=s.checkStartOfBlock(),f=s.checkEndOfBlock(),m=e.elementPath(s.startContainer),g=m.block,E=a==CKEDITOR.ENTER_DIV?"div":"p";if(h&&f){if(g&&(g.is("li")||g.getParent().is("li"))){g.is("li")||(g=g.getParent()),s=g.getParent(),d=s.getParent(),c=!g.hasPrevious();var p=!g.hasNext(),E=e.getSelection(),T=E.createBookmarks(),h=g.getDirection(1),f=g.getAttribute("class"),C=g.getAttribute("style"),I=d.getDirection(1)!=h;if(e=e.enterMode!=CKEDITOR.ENTER_BR||I||C||f,d.is("li"))c||p?(c&&p&&s.remove(),g[p?"insertAfter":"insertBefore"](d)):g.breakParent(d);else{if(e)m.block.is("li")?(d=u.createElement(a==CKEDITOR.ENTER_P?"p":"div"),I&&d.setAttribute("dir",h),C&&d.setAttribute("style",C),f&&d.setAttribute("class",f),g.moveChildren(d)):d=m.block,c||p?d[c?"insertBefore":"insertAfter"](s):(g.breakParent(s),d.insertAfter(s));else if(g.appendBogus(!0),c||p)for(;u=g[c?"getFirst":"getLast"]();)u[c?"insertBefore":"insertAfter"](s);else for(g.breakParent(s);u=g.getLast();)u.insertAfter(s);g.remove()}return void E.selectBookmarks(T)}if(g&&g.getParent().is("blockquote"))return g.breakParent(g.getParent()),g.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||g.getPrevious().remove(),g.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||g.getNext().remove(),s.moveToElementEditStart(g),void s.select()}else if(g&&g.is("pre")&&!f)return void r(e,a,s,c);if(h=s.splitBlock(E)){if(a=h.previousBlock,g=h.nextBlock,m=h.wasStartOfBlock,e=h.wasEndOfBlock,g?(T=g.getParent(),T.is("li")&&(g.breakParent(T),g.move(g.getNext(),1))):a&&(T=a.getParent())&&T.is("li")&&(a.breakParent(T),T=a.getNext(),s.moveToElementEditStart(T),a.move(a.getPrevious())),m||e){if(a?(a.is("li")||!l.test(a.getName())&&!a.is("pre"))&&(d=a.clone()):g&&(d=g.clone()),d?c&&!d.is("li")&&d.renameNode(E):T&&T.is("li")?d=T:(d=u.createElement(E),a&&(p=a.getDirection())&&d.setAttribute("dir",p)),u=h.elementPath)for(c=0,E=u.elements.length;c<E&&(T=u.elements[c],!T.equals(u.block)&&!T.equals(u.blockLimit));c++)CKEDITOR.dtd.$removeEmpty[T.getName()]&&(T=T.clone(),d.moveChildren(T),d.append(T));d.appendBogus(),d.getParent()||s.insertNode(d),d.is("li")&&d.removeAttribute("value"),!CKEDITOR.env.ie||!m||e&&a.getChildCount()||(s.moveToElementEditStart(e?a:d),s.select()),s.moveToElementEditStart(m&&!e?g:d)}else g.is("li")&&(d=s.clone(),d.selectNodeContents(g),d=new CKEDITOR.dom.walker(d),d.evaluator=function(e){return!(o(e)||i(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(T=d.next())&&T.type==CKEDITOR.NODE_ELEMENT&&T.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?u.createElement("br"):u.createText("\xa0")).insertBefore(T)),g&&s.moveToElementEditStart(g);s.select(),s.scrollIntoView()}}},enterBr:function(e,n,i,o){if(i=i||t(e)){var a=i.document,r=i.checkEndOfBlock(),c=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement()),d=c.block,u=d&&c.block.getName();o||"li"!=u?(!o&&r&&l.test(u)?(r=d.getDirection())?(a=a.createElement("div"),a.setAttribute("dir",r),a.insertAfter(d),i.setStart(a,0)):(a.createElement("br").insertAfter(d),CKEDITOR.env.gecko&&a.createText("").insertAfter(d),i.setStartAt(d.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(e="pre"==u&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?a.createText("\r"):a.createElement("br"),i.deleteContents(),i.insertNode(e),CKEDITOR.env.needsBrFiller?(a.createText("\ufeff").insertAfter(e),r&&(d||c.blockLimit).appendBogus(),e.getNext().$.nodeValue="",i.setStartAt(e.getNext(),CKEDITOR.POSITION_AFTER_START)):i.setStartAt(e,CKEDITOR.POSITION_AFTER_END)),i.collapse(!0),i.select(),i.scrollIntoView()):s(e,n,i,o)}}};var a=CKEDITOR.plugins.enterkey,r=a.enterBr,s=a.enterBlock,l=/^h[1-6]$/}(),function(){function e(e,t){var n={},i=[],o={nbsp:"\xa0",shy:"\xad",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'};if(e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(e,a){var r=t?"&"+a+";":o[a];return n[r]=t?o[a]:"&"+a+";",i.push(r),""}),!t&&e){e=e.split(",");var a,r=document.createElement("div");for(r.innerHTML="&"+e.join(";&")+";",a=r.innerHTML,r=null,r=0;r<a.length;r++){var s=a.charAt(r);n[s]="&"+e[r]+";",i.push(s)}}return n.regex=i.join(t?"|":""),n}CKEDITOR.plugins.add("entities",{afterInit:function(t){function n(e){return l[e]}function i(e){return"force"!=o.entities_processNumerical&&r[e]?r[e]:"&#"+e.charCodeAt(0)+";"}var o=t.config;if(t=(t=t.dataProcessor)&&t.htmlFilter){var a=[];!1!==o.basicEntities&&a.push("nbsp,gt,lt,amp"),o.entities&&(a.length&&a.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),o.entities_latin&&a.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),o.entities_greek&&a.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),o.entities_additional&&a.push(o.entities_additional));var r=e(a.join(",")),s=r.regex?"["+r.regex+"]":"a^";delete r.regex,o.entities&&o.entities_processNumerical&&(s="[^ -~]|"+s);var s=new RegExp(s,"g"),l=e("nbsp,gt,lt,amp,shy",!0),c=new RegExp(l.regex,"g");t.addRules({text:function(e){return e.replace(c,n).replace(s,i)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(e,t,n,i){t=t||"80%",n=n||"70%","string"==typeof t&&1<t.length&&"%"==t.substr(t.length-1,1)&&(t=parseInt(window.screen.width*parseInt(t,10)/100,10)),"string"==typeof n&&1<n.length&&"%"==n.substr(n.length-1,1)&&(n=parseInt(window.screen.height*parseInt(n,10)/100,10)),640>t&&(t=640),420>n&&(n=420);var o=parseInt((window.screen.height-n)/2,10),a=parseInt((window.screen.width-t)/2,10);i=(i||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+n+",top="+o+",left="+a;var r=window.open("",null,i,!0);if(!r)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(r.moveTo(a,o),r.resizeTo(t,n)),r.focus(),r.location.href=e}catch(t){window.open(e,null,i,!0)}return!0}}),function(){function e(e,t){var n=[];if(!t)return e;for(var i in t)n.push(i+"="+encodeURIComponent(t[i]));return e+(-1!=e.indexOf("?")?"&":"?")+n.join("&")}function t(e){return e+="",e.charAt(0).toUpperCase()+e.substr(1)}function n(){var n=this.getDialog(),i=n.getParentEditor();i._.filebrowserSe=this;var o=i.config["filebrowser"+t(n.getName())+"WindowWidth"]||i.config.filebrowserWindowWidth||"80%",n=i.config["filebrowser"+t(n.getName())+"WindowHeight"]||i.config.filebrowserWindowHeight||"70%",a=this.filebrowser.params||{};a.CKEditor=i.name,a.CKEditorFuncNum=i._.filebrowserFn,a.langCode||(a.langCode=i.langCode),a=e(this.filebrowser.url,a),i.popup(a,o,n,i.config.filebrowserWindowFeatures||i.config.fileBrowserWindowFeatures)}function i(){var e=this.getDialog();return e.getParentEditor()._.filebrowserSe=this,!(!e.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value||!e.getContentElement(this["for"][0],this["for"][1]).getAction())}function o(t,n,i){var o=i.params||{};o.CKEditor=t.name,o.CKEditorFuncNum=t._.filebrowserFn,o.langCode||(o.langCode=t.langCode),n.action=e(i.url,o),n.filebrowser=i}function a(e,r,s,l){if(l&&l.length)for(var c,d=l.length;d--;)if(c=l[d],"hbox"!=c.type&&"vbox"!=c.type&&"fieldset"!=c.type||a(e,r,s,c.children),c.filebrowser)if("string"==typeof c.filebrowser&&(c.filebrowser={action:"fileButton"==c.type?"QuickUpload":"Browse",target:c.filebrowser}),"Browse"==c.filebrowser.action){var u=c.filebrowser.url;void 0===u&&(u=e.config["filebrowser"+t(r)+"BrowseUrl"],void 0===u&&(u=e.config.filebrowserBrowseUrl)),u&&(c.onClick=n,c.filebrowser.url=u,c.hidden=!1)}else if("QuickUpload"==c.filebrowser.action&&c["for"]&&(u=c.filebrowser.url,void 0===u&&(u=e.config["filebrowser"+t(r)+"UploadUrl"],void 0===u&&(u=e.config.filebrowserUploadUrl)),u)){var h=c.onClick;c.onClick=function(e){var t=e.sender;return(!h||!1!==h.call(t,e))&&(!!i.call(t,e)&&(e=t.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement(),(t=new CKEDITOR.dom.element(e.$.form))&&((e=t.$.elements.ckCsrfToken)?e=new CKEDITOR.dom.element(e):(e=new CKEDITOR.dom.element("input"),e.setAttributes({name:"ckCsrfToken",type:"hidden"}),t.append(e)),e.setAttribute("value",CKEDITOR.tools.getCsrfToken())),!0))},c.filebrowser.url=u,c.hidden=!1,o(e,s.getContents(c["for"][0]).get(c["for"][1]),c.filebrowser)}}function r(e,t,n){if(-1!==n.indexOf(";")){n=n.split(";");for(var i=0;i<n.length;i++)if(r(e,t,n[i]))return!0;return!1}return(e=e.getContents(t).get(n).filebrowser)&&e.url}function s(e,t){var n=this._.filebrowserSe.getDialog(),i=this._.filebrowserSe["for"],o=this._.filebrowserSe.filebrowser.onSelect;i&&n.getContentElement(i[0],i[1]).reset(),"function"==typeof t&&!1===t.call(this._.filebrowserSe)||o&&!1===o.call(this._.filebrowserSe,e,t)||("string"==typeof t&&t&&alert(t),e&&(i=this._.filebrowserSe,n=i.getDialog(),i=i.filebrowser.target||null)&&(i=i.split(":"),(o=n.getContentElement(i[0],i[1]))&&(o.setValue(e),n.selectPage(i[0]))))}CKEDITOR.plugins.add("filebrowser",{requires:"popup",init:function(e){e._.filebrowserFn=CKEDITOR.tools.addFunction(s,e),e.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}}),CKEDITOR.on("dialogDefinition",function(e){if(e.editor.plugins.filebrowser)for(var t,n=e.data.definition,i=0;i<n.contents.length;++i)(t=n.contents[i])&&(a(e.editor,e.data.name,n,t.elements),t.hidden&&t.filebrowser&&(t.hidden=!r(n,t.id,t.filebrowser)))})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(e){var t=e.addCommand("find",new CKEDITOR.dialogCommand("find"));t.canUndo=!1,t.readOnly=1,e.addCommand("replace",new CKEDITOR.dialogCommand("replace")).canUndo=!1,e.ui.addButton&&(e.ui.addButton("Find",{label:e.lang.find.find,command:"find",toolbar:"find,10"}),e.ui.addButton("Replace",{label:e.lang.find.replace,command:"replace",toolbar:"find,20"})),CKEDITOR.dialog.add("find",this.path+"dialogs/find.js"),CKEDITOR.dialog.add("replace",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},function(){function e(e,t){var n=i.exec(e),o=i.exec(t);if(n){if(!n[2]&&"px"==o[2])return o[1];if("px"==n[2]&&!o[2])return o[1]+"px"}return t}var t=CKEDITOR.htmlParser.cssStyle,n=CKEDITOR.tools.cssLength,i=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,o={elements:{$:function(n){var i=n.attributes;if((i=(i=(i=i&&i["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(i)))&&i.children[0])&&n.attributes["data-cke-resizable"]){var o=new t(n).rules;n=i.attributes;var a=o.width,o=o.height;a&&(n.width=e(n.width,a)),o&&(n.height=e(n.height,o))}return i}}};CKEDITOR.plugins.add("fakeobjects",{init:function(e){e.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(e){(e=(e=e.dataProcessor)&&e.htmlFilter)&&e.addRules(o,{applyToAll:!0})}}),CKEDITOR.editor.prototype.createFakeElement=function(e,i,o,a){var r=this.lang.fakeobjects,r=r[o]||r.unknown;return i={"class":i,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:r,title:r,align:e.getAttribute("align")||""},CKEDITOR.env.hc||(i.src=CKEDITOR.tools.transparentImageData),o&&(i["data-cke-real-element-type"]=o),a&&(i["data-cke-resizable"]=a,o=new t,a=e.getAttribute("width"),e=e.getAttribute("height"),a&&(o.rules.width=n(a)),e&&(o.rules.height=n(e)),o.populate(i)),this.document.createElement("img",{attributes:i})},CKEDITOR.editor.prototype.createFakeParserElement=function(e,i,o,a){var r,s=this.lang.fakeobjects,s=s[o]||s.unknown;return r=new CKEDITOR.htmlParser.basicWriter,e.writeHtml(r),r=r.getHtml(),i={"class":i,"data-cke-realelement":encodeURIComponent(r),"data-cke-real-node-type":e.type,alt:s,title:s,align:e.attributes.align||""},CKEDITOR.env.hc||(i.src=CKEDITOR.tools.transparentImageData),o&&(i["data-cke-real-element-type"]=o),a&&(i["data-cke-resizable"]=a,a=e.attributes,e=new t,o=a.width,a=a.height,void 0!==o&&(e.rules.width=n(o)),void 0!==a&&(e.rules.height=n(a)),e.populate(i)),new CKEDITOR.htmlParser.element("img",i)},CKEDITOR.editor.prototype.restoreRealElement=function(t){if(t.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var n=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")),this.document);if(t.data("cke-resizable")){var i=t.getStyle("width");t=t.getStyle("height"),i&&n.setAttribute("width",e(n.getAttribute("width"),i)),t&&n.setAttribute("height",e(n.getAttribute("height"),t))}return n}}(),function(){function e(e){return e=e.attributes,"application/x-shockwave-flash"==e.type||n.test(e.src||"")}function t(e,t){return e.createFakeParserElement(t,"cke_flash","flash",!0)}var n=/\.swf(?:$|\?)/i;CKEDITOR.plugins.add("flash",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_flash{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(e){var t="object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]";CKEDITOR.dialog.isTabEnabled(e,"flash","properties")&&(t+=";object[align]; embed[allowscriptaccess,quality,scale,wmode]"),CKEDITOR.dialog.isTabEnabled(e,"flash","advanced")&&(t+=";object[id]{*}; embed[bgcolor]{*}(*)"),e.addCommand("flash",new CKEDITOR.dialogCommand("flash",{allowedContent:t,requiredContent:"embed"})),e.ui.addButton&&e.ui.addButton("Flash",{label:e.lang.common.flash,command:"flash",toolbar:"insert,20"}),CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js"),e.addMenuItems&&e.addMenuItems({flash:{label:e.lang.flash.properties,command:"flash",group:"flash"}}),e.on("doubleclick",function(e){var t=e.data.element;t.is("img")&&"flash"==t.data("cke-real-element-type")&&(e.data.dialog="flash")}),e.contextMenu&&e.contextMenu.addListener(function(e){if(e&&e.is("img")&&!e.isReadOnly()&&"flash"==e.data("cke-real-element-type"))return{flash:CKEDITOR.TRISTATE_OFF}})},afterInit:function(n){var i=n.dataProcessor;(i=i&&i.dataFilter)&&i.addRules({elements:{"cke:object":function(i){var o=i.attributes;if(!(o.classid&&String(o.classid).toLowerCase()||e(i))){for(o=0;o<i.children.length;o++)if("cke:embed"==i.children[o].name){if(!e(i.children[o]))break;return t(n,i)}return null}return t(n,i)},"cke:embed":function(i){return e(i)?t(n,i):null}}},5)}})}(),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),function(){function e(e){var i=e.config,o=e.fire("uiSpace",{space:"top",html:""}).html,a=function(){function o(e,t,i){s.setStyle(t,n(i)),s.setStyle("position",e)}function r(e){var t=c.getDocumentPosition();switch(e){case"top":o("absolute","top",t.y-f-E);break;case"pin":o("fixed","top",T);break;case"bottom":o("absolute","top",t.y+(u.height||u.bottom-u.top)+E)}l=e}var l,c,d,u,h,f,m,g=i.floatSpaceDockedOffsetX||0,E=i.floatSpaceDockedOffsetY||0,p=i.floatSpacePinnedOffsetX||0,T=i.floatSpacePinnedOffsetY||0;return function(o){if(c=e.editable()){var T=o&&"focus"==o.name;T&&s.show(),e.fire("floatingSpaceLayout",{show:T}),s.removeStyle("left"),s.removeStyle("right"),d=s.getClientRect(),u=c.getClientRect(),h=t.getViewPaneSize(),f=d.height,m="pageXOffset"in t.$?t.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft,l?(r(f+E<=u.top?"top":f+E>h.height-u.bottom?"pin":"bottom"),o=h.width/2,o=i.floatSpacePreferRight?"right":0<u.left&&u.right<h.width&&u.width>d.width?"rtl"==i.contentsLangDirection?"right":"left":o-u.left>u.right-o?"left":"right",d.width>h.width?(o="left",T=0):(T="left"==o?0<u.left?u.left:0:u.right<h.width?h.width-u.right:0,T+d.width>h.width&&(o="left"==o?"right":"left",T=0)),s.setStyle(o,n(("pin"==l?p:g)+T+("pin"==l?0:"left"==o?m:-m)))):(l="pin",r("pin"),a(o))}}}();if(o){var r=new CKEDITOR.template('<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}"'+(e.title?' aria-labelledby="cke_{name}_arialbl"':" ")+">"+(e.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':" ")+'<div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'),s=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(r.output({content:o,id:e.id,langDir:e.lang.dir,langCode:e.langCode,name:e.name,style:"display:none;z-index:"+(i.baseFloatZIndex-1),topId:e.ui.spaceId("top"),voiceLabel:e.title}))),l=CKEDITOR.tools.eventsBuffer(500,a),c=CKEDITOR.tools.eventsBuffer(100,a);s.unselectable(),s.on("mousedown",function(e){e=e.data,e.getTarget().hasAscendant("a",1)||e.preventDefault()}),e.on("focus",function(n){a(n),e.on("change",l.input),t.on("scroll",c.input),t.on("resize",c.input)}),e.on("blur",function(){s.hide(),e.removeListener("change",l.input),t.removeListener("scroll",c.input),t.removeListener("resize",c.input)}),e.on("destroy",function(){t.removeListener("scroll",c.input),t.removeListener("resize",c.input),s.clearCustomData(),s.remove()}),e.focusManager.hasFocus&&s.show(),e.focusManager.add(s,1)}}var t=CKEDITOR.document.getWindow(),n=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(t){t.on("loaded",function(){e(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),t=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')"  {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),n=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>'),i=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){t=t||{};var n=t.attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),!n.role&&(n.role="listbox"),this.base.apply(this,arguments),this.element.setAttribute("role",n.role),n=this.keys,n[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){if(this._.started){var t=e.output({items:this._.pendingList.join("")});this._.pendingList=[],this._.pendingHtml.push(t),delete this._.started}},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction(function(e){var t=this.toggle(e);this.onClick&&this.onClick(e,t)},this)),this._.click}},proto:{add:function(e,n,o){var a=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=a;var r;r=CKEDITOR.tools.htmlEncodeAttr(e).replace(i,"\\'"),e={
id:a,val:r,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(o||e),text:n||e},this._.pendingList.push(t.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t=this._.items,n=this._.groups,i=this.element.getDocument();for(e in t)i.getById(t[e]).setStyle("display","");for(var o in n)t=i.getById(n[o]),e=t.getNext(),t.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll(),e=this._.items[e];var t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},unmark:function(e){var t=this.element.getDocument();e=this._.items[e];var n=t.getById(e);n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;var t,n=this.element.getElementsByTag("a"),i=-1;if(e){for(t=this.element.getDocument().getById(this._.items[e]).getFirst();e=n.getItem(++i);)if(e.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout(function(){t.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var e=e+(' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"&#9660;":CKEDITOR.env.air?"&nbsp;":"")+"</span></span></a></span>"),t=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(e,n){function i(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var t=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(t=CKEDITOR.TRISTATE_DISABLED),this.setState(t),this.setValue(""),t!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var o=CKEDITOR.env,a="cke_"+this.id,r=CKEDITOR.tools.addFunction(function(t){u&&(e.unlockSelection(1),u=0),l.execute(t)},this),s=this,l={id:a,combo:this,focus:function(){CKEDITOR.document.getById(a).getChild(1).focus()},execute:function(t){var n=s._;if(n.state!=CKEDITOR.TRISTATE_DISABLED)if(s.createPanel(e),n.on)n.panel.hide();else{s.commit();var i=s.getValue();i?n.list.mark(i):n.list.unmarkAll(),n.panel.showBlock(s.id,new CKEDITOR.dom.element(t),4)}},clickFn:r};e.on("activeFilterChange",i,this),e.on("mode",i,this),e.on("selectionChange",i,this),!this.readOnly&&e.on("readOnly",i,this);var c=CKEDITOR.tools.addFunction(function(t,n){t=new CKEDITOR.dom.event(t);var i=t.getKeystroke();switch(40==i&&e.once("panelShow",function(e){e.data._.panel._.currentBlock.onKeyDown(40)}),i){case 13:case 32:case 40:CKEDITOR.tools.callFunction(r,n);break;default:l.onkey(l,i)}t.preventDefault()}),d=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()}),u=0;return l.keyDownFn=c,o={id:a,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:o.gecko&&!o.hc?"":(this.title||"").replace("'",""),keydownFn:c,focusFn:d,clickFn:r},t.output(o,n),this.onRender&&this.onRender(),l},createPanel:function(e){if(!this._.panel){var t=this._.panelDefinition,n=this._.panelDefinition.block,i=t.parent||CKEDITOR.document.getBody(),o="cke_combopanel__"+this.name,a=new CKEDITOR.ui.floatPanel(e,i,t),r=a.addListBlock(this.id,n),s=this;a.onShow=function(){this.element.addClass(o),s.setState(CKEDITOR.TRISTATE_ON),s._.on=1,s.editorFocus&&!e.focusManager.hasFocus&&e.focus(),s.onOpen&&s.onOpen(),e.once("panelShow",function(){r.focus(!r.multiSelect&&s.getValue())})},a.onHide=function(t){this.element.removeClass(o),s.setState(s.modes&&s.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),s._.on=0,!t&&s.onClose&&s.onClose()},a.onEscape=function(){a.hide(1)},r.onClick=function(e,t){s.onClick&&s.onClick.call(s,e,t),a.hide()},this._.panel=a,this._.list=r,a.getBlock(this.id).onHide=function(){s._.on=0,s.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e;var n=this.document.getById("cke_"+this.id+"_text");n&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText("undefined"!=typeof t?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){if(this._.state!=e){var t=this.document.getById("cke_"+this.id);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this._.state=e}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),function(){function e(e,n,i,o,a,r,s,l){var c=e.config,d=new CKEDITOR.style(s),u=a.split(";");a=[];for(var h={},f=0;f<u.length;f++){var m=u[f];if(m){var m=m.split("/"),g={},E=u[f]=m[0];g[i]=a[f]=m[1]||E,h[E]=new CKEDITOR.style(s,g),h[E]._.definition.name=E}else u.splice(f--,1)}e.ui.addRichCombo(n,{label:o.label,title:o.panelTitle,toolbar:"styles,"+l,allowedContent:d,requiredContent:d,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(c.contentsCss),multiSelect:!1,attributes:{"aria-label":o.panelTitle}},init:function(){this.startGroup(o.panelTitle);for(var e=0;e<u.length;e++){var t=u[e];this.add(t,h[t].buildPreview(),t)}},onClick:function(n){e.focus(),e.fire("saveSnapshot");var i=this.getValue(),o=h[n];if(i&&n!=i){var a=h[i],r=e.getSelection().getRanges()[0];if(r.collapsed){var s=e.elementPath(),l=s.contains(function(e){return a.checkElementRemovable(e)});if(l){var c=r.checkBoundaryOfElement(l,CKEDITOR.START),d=r.checkBoundaryOfElement(l,CKEDITOR.END);if(c&&d){for(c=r.createBookmark();s=l.getFirst();)s.insertBefore(l);l.remove(),r.moveToBookmark(c)}else c?r.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START):d?r.moveToPosition(l,CKEDITOR.POSITION_AFTER_END):(r.splitElement(l),r.moveToPosition(l,CKEDITOR.POSITION_AFTER_END),t(r,s.elements.slice(),l));e.getSelection().selectRanges([r])}}else e.removeStyle(a)}e[i==n?"removeStyle":"applyStyle"](o),e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",function(t){var n=this.getValue();t=t.data.path.elements;for(var i,o=0;o<t.length;o++){i=t[o];for(var a in h)if(h[a].checkElementMatch(i,!0,e))return void(a!=n&&this.setValue(a))}this.setValue("",r)},this)},refresh:function(){e.activeFilter.check(d)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function t(e,n,i){var o=n.pop();if(o){if(i)return t(e,n,o.equals(i)?null:i);i=o.clone(),e.insertNode(i),e.moveToPosition(i,CKEDITOR.POSITION_AFTER_START),t(e,n)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(t){var n=t.config;e(t,"Font","family",t.lang.font,n.font_names,n.font_defaultLabel,n.font_style,30),e(t,"FontSize","size",t.lang.font.fontSize,n.fontSize_sizes,n.fontSize_defaultLabel,n.fontSize_style,40)}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n"),CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}")},init:function(e){var t=e.lang,n=0,i={email:1,password:1,search:1,tel:1,text:1,url:1},o={checkbox:"input[type,name,checked,required]",radio:"input[type,name,checked,required]",textfield:"input[type,name,value,size,maxlength,required]",textarea:"textarea[cols,rows,name,required]",select:"select[name,size,multiple,required]; option[value,selected]",button:"input[type,name,value]",form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},a={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},r=function(i,r,s){var l={allowedContent:o[r],requiredContent:a[r]};"form"==r&&(l.context="form"),e.addCommand(r,new CKEDITOR.dialogCommand(r,l)),e.ui.addButton&&e.ui.addButton(i,{label:t.common[i.charAt(0).toLowerCase()+i.slice(1)],command:r,toolbar:"forms,"+(n+=10)}),CKEDITOR.dialog.add(r,s)},s=this.path+"dialogs/";!e.blockless&&r("Form","form",s+"form.js"),r("Checkbox","checkbox",s+"checkbox.js"),r("Radio","radio",s+"radio.js"),r("TextField","textfield",s+"textfield.js"),r("Textarea","textarea",s+"textarea.js"),r("Select","select",s+"select.js"),r("Button","button",s+"button.js");var l=e.plugins.image;l&&!e.plugins.image2&&r("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js"),r("HiddenField","hiddenfield",s+"hiddenfield.js"),e.addMenuItems&&(r={checkbox:{label:t.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:t.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:t.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:t.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:t.forms.button.title,command:"button",group:"button"},select:{label:t.forms.select.title,command:"select",group:"select"},textarea:{label:t.forms.textarea.title,command:"textarea",group:"textarea"}},l&&(r.imagebutton={label:t.image.titleButton,command:"imagebutton",group:"imagebutton"}),!e.blockless&&(r.form={label:t.forms.form.menu,command:"form",group:"form"}),e.addMenuItems(r)),e.contextMenu&&(!e.blockless&&e.contextMenu.addListener(function(e,t,n){if((e=n.contains("form",1))&&!e.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),e.contextMenu.addListener(function(e){if(e&&!e.isReadOnly()){var t=e.getName();if("select"==t)return{select:CKEDITOR.TRISTATE_OFF};if("textarea"==t)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==t){var n=e.getAttribute("type")||"text";switch(n){case"button":case"submit":case"reset":return{button:CKEDITOR.TRISTATE_OFF};case"checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case"radio":return{radio:CKEDITOR.TRISTATE_OFF};case"image":return l?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(i[n])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==t&&"hiddenfield"==e.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}})),e.on("doubleclick",function(t){var n=t.data.element;if(!e.blockless&&n.is("form"))t.data.dialog="form";else if(n.is("select"))t.data.dialog="select";else if(n.is("textarea"))t.data.dialog="textarea";else if(n.is("img")&&"hiddenfield"==n.data("cke-real-element-type"))t.data.dialog="hiddenfield";else if(n.is("input")){switch(n=n.getAttribute("type")||"text"){case"button":case"submit":case"reset":t.data.dialog="button";break;case"checkbox":t.data.dialog="checkbox";break;case"radio":t.data.dialog="radio";break;case"image":t.data.dialog="imagebutton"}i[n]&&(t.data.dialog="textfield")}})},afterInit:function(e){var t=e.dataProcessor,n=t&&t.htmlFilter,t=t&&t.dataFilter;CKEDITOR.env.ie&&n&&n.addRules({elements:{input:function(e){e=e.attributes;var t=e.type;t||(e.type="text"),"checkbox"!=t&&"radio"!=t||"on"!=e.value||delete e.value}}},{applyToAll:!0}),t&&t.addRules({elements:{input:function(t){if("hidden"==t.attributes.type)return e.createFakeParserElement(t,"cke_hidden","hiddenfield")}}},{applyToAll:!0})}}),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(e){if(!e.blockless){for(var t=e.config,n=e.lang.format,i=t.format_tags.split(";"),o={},a=0,r=[],s=0;s<i.length;s++){var l=i[s],c=new CKEDITOR.style(t["format_"+l]);e.filter.customConfig&&!e.filter.check(c)||(a++,o[l]=c,o[l]._.enterMode=e.config.enterMode,r.push(c))}0!==a&&e.ui.addRichCombo("Format",{label:n.label,title:n.panelTitle,toolbar:"styles,20",allowedContent:r,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(t.contentsCss),multiSelect:!1,attributes:{"aria-label":n.panelTitle}},init:function(){this.startGroup(n.panelTitle);for(var e in o){var t=n["tag_"+e];this.add(e,o[e].buildPreview(t),t)}},onClick:function(t){e.focus(),e.fire("saveSnapshot"),t=o[t];var n=e.elementPath();e[t.checkActive(n,e)?"removeStyle":"applyStyle"](t),setTimeout(function(){e.fire("saveSnapshot")},0)},onRender:function(){e.on("selectionChange",function(t){var n=this.getValue();t=t.data.path,this.refresh();for(var i in o)if(o[i].checkActive(t,e))return void(i!=n&&this.setValue(i,e.lang.format["tag_"+i]));this.setValue("")},this)},onOpen:function(){this.showAll();for(var t in o)e.activeFilter.check(o[t])||this.hideItem(t)},refresh:function(){var t=e.elementPath();if(t){if(t.isContextFor("p"))for(var n in o)if(e.activeFilter.check(o[n]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},function(){var e={canUndo:!1,exec:function(e){var t=e.document.createElement("hr");e.insertElement(t)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(t){t.blockless||(t.addCommand("horizontalrule",e),t.ui.addButton&&t.ui.addButton("HorizontalRule",{label:t.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(e){var t=new CKEDITOR.htmlWriter;t.forceSimpleAmpersand=e.config.forceSimpleAmpersand,t.indentationChars=e.config.dataIndentationChars||"\t",e.dataProcessor.writer=t}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base(),this.indentationChars="\t",this.selfClosingEnd=" />",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1}),this.setRules("title",{indent:0,breakAfterOpen:0}),this.setRules("style",{indent:0,breakBeforeClose:1}),this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("\n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&amp;/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push("</",e,">"),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("<!--",e,"-->")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars),this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation),this._.indent=0},reset:function(){this._.output=[],this._.indent=0,this._.indentation="",this._.afterCloser=0,this._.inPre=0,this._.needsSpace=0},setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t}}}),function(){CKEDITOR.plugins.add("iframe",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(e){var t=e.lang.iframe,n="iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]";e.plugins.dialogadvtab&&(n+=";iframe"+e.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1})),CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js"),e.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:n,requiredContent:"iframe"})),e.ui.addButton&&e.ui.addButton("Iframe",{label:t.toolbar,command:"iframe",toolbar:"insert,80"}),e.on("doubleclick",function(e){var t=e.data.element;t.is("img")&&"iframe"==t.data("cke-real-element-type")&&(e.data.dialog="iframe")}),e.addMenuItems&&e.addMenuItems({iframe:{label:t.title,command:"iframe",group:"image"}}),e.contextMenu&&e.contextMenu.addListener(function(e){if(e&&e.is("img")&&"iframe"==e.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(e){var t=e.dataProcessor;(t=t&&t.dataFilter)&&t.addRules({elements:{iframe:function(t){return e.createFakeParserElement(t,"cke_iframe","iframe",!0)}}})}})}(),function(){function e(e){function n(e){var t=!1;s.attachListener(s,"keydown",function(){var n=o.getBody().getElementsByTag(e);if(!t){for(var i=0;i<n.count();i++)n.getItem(i).setCustomData("retain",!0);t=!0}},null,null,1),s.attachListener(s,"keyup",function(){var n=o.getElementsByTag(e);t&&(1!=n.count()||n.getItem(0).getCustomData("retain")||n.getItem(0).remove(1),t=!1)})}var i=this.editor,o=e.document,a=o.body,r=o.getElementById("cke_actscrpt");r&&r.parentNode.removeChild(r),(r=o.getElementById("cke_shimscrpt"))&&r.parentNode.removeChild(r),(r=o.getElementById("cke_basetagscrpt"))&&r.parentNode.removeChild(r),a.contentEditable=!0,CKEDITOR.env.ie&&(a.hideFocus=!0,a.disabled=!0,a.removeAttribute("disabled")),delete this._.isLoadingData,this.$=a,o=new CKEDITOR.dom.document(o),this.setup(),this.fixInitialSelection();var s=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&o.getDocumentElement().addClass(o.$.compatMode),CKEDITOR.env.ie&&!CKEDITOR.env.edge&&i.enterMode!=CKEDITOR.ENTER_P?n("p"):CKEDITOR.env.edge&&i.enterMode!=CKEDITOR.ENTER_DIV&&n("div"),(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)&&o.getDocumentElement().on("mousedown",function(e){e.data.getTarget().is("html")&&setTimeout(function(){i.editable().focus()})}),t(i);try{i.document.$.execCommand("2D-position",!1,!0)}catch(e){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==i.document.$.compatMode)&&this.attachListener(this,"keydown",function(e){var t=e.data.getKeystroke();if(33==t||34==t)if(CKEDITOR.env.ie)setTimeout(function(){i.getSelection().scrollIntoView()},0);else if(i.window.$.innerHeight>this.$.offsetHeight){var n=i.createRange();n[33==t?"moveToElementEditStart":"moveToElementEditEnd"](this),n.select(),e.data.preventDefault()}}),CKEDITOR.env.ie&&this.attachListener(o,"blur",function(){try{o.$.selection.empty()}catch(e){}}),CKEDITOR.env.iOS&&this.attachListener(o,"touchend",function(){e.focus()}),a=i.document.getElementsByTag("title").getItem(0),a.data("cke-title",a.getText()),CKEDITOR.env.ie&&(i.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready"),i.fire("contentDom"),this._.isPendingFocus&&(i.focus(),this._.isPendingFocus=!1),setTimeout(function(){i.fire("dataReady")},0)},0,this)}function t(e){function t(){var t;e.editable().attachListener(e,"selectionChange",function(){var i=e.getSelection().getSelectedElement();i&&(t&&(t.detachEvent("onresizestart",n),t=null),i.$.attachEvent("onresizestart",n),t=i.$)})}function n(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var i=e.document.$;i.execCommand("enableObjectResizing",!1,!e.config.disableObjectResizing),i.execCommand("enableInlineTableEditing",!1,!e.config.disableNativeTableHandles)}catch(e){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&e.config.disableObjectResizing&&t(e)}function n(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(e){e.config.fullPage&&e.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"}),e.addMode("wysiwyg",function(t){function n(n){n&&n.removeListener(),e.editable(new i(e,a.$.contentWindow.document.body)),e.setData(e.getData(1),t)}var o="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",o=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(o)+"}())":"",a=CKEDITOR.dom.element.createFromHtml('<iframe src="'+o+'" frameBorder="0"></iframe>');a.setStyles({width:"100%",height:"100%"}),a.addClass("cke_wysiwyg_frame").addClass("cke_reset"),o=e.ui.space("contents"),o.append(a);var r=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;r&&a.on("load",n);var s=e.title,l=e.fire("ariaEditorHelpLabel",{}).label;if(s&&(CKEDITOR.env.ie&&l&&(s+=", "+l),a.setAttribute("title",s)),l){var s=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('<span id="'+s+'" class="cke_voice_label">'+l+"</span>");o.append(c,1),a.setAttribute("aria-describedby",s)}e.on("beforeModeUnload",function(e){e.removeListener(),c&&c.remove()}),a.setAttributes({tabIndex:e.tabIndex,allowTransparency:"true"}),!r&&n(),e.fire("ariaWidget",a)})}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)};var i=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(t){CKEDITOR.tools.setTimeout(e,0,this,t)},this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(e,t){var i=this.editor;if(t)this.setHtml(e),this.fixInitialSelection(),i.fire("dataReady");else{this._.isLoadingData=!0,i._.dataStore={id:1};var o=i.config,a=o.fullPage,r=o.docType,s=CKEDITOR.tools.buildStyleHtml(n()).replace(/<style>/,'<style data-cke-temp="1">');a||(s+=CKEDITOR.tools.buildStyleHtml(i.config.contentsCss));var l=o.baseHref?'<base href="'+o.baseHref+'" data-cke-temp="1" />':"";a&&(e=e.replace(/<!DOCTYPE[^>]*>/i,function(e){return i.docType=r=e,""}).replace(/<\?xml\s[^\?]*\?>/i,function(e){return i.xmlDeclaration=e,""})),e=i.dataProcessor.toHtml(e),a?(/<body[\s|>]/.test(e)||(e="<body>"+e),/<html[\s|>]/.test(e)||(e="<html>"+e+"</html>"),/<head[\s|>]/.test(e)?/<title[\s|>]/.test(e)||(e=e.replace(/<head[^>]*>/,"$&<title></title>")):e=e.replace(/<html[^>]*>/,"$&<head><title></title></head>"),l&&(e=e.replace(/<head[^>]*?>/,"$&"+l)),e=e.replace(/<\/head\s*>/,s+"$&"),e=r+e):e=o.docType+'<html dir="'+o.contentsLangDirection+'" lang="'+(o.contentsLanguage||i.langCode)+'"><head><title>'+this._.docTitle+"</title>"+l+s+"</head><body"+(o.bodyId?' id="'+o.bodyId+'"':"")+(o.bodyClass?' class="'+o.bodyClass+'"':"")+">"+e+"</body></html>",CKEDITOR.env.gecko&&(e=e.replace(/<body/,'<body contenteditable="true" '),2e4>CKEDITOR.env.version&&(e=e.replace(/<body[^>]*>/,"$&<!-- cke-content-start -->"))),o='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"</script>",CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(o+='<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)</script>'),l&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(o+='<script id="cke_basetagscrpt">var baseTag = document.querySelector( "base" );baseTag.href = baseTag.href;</script>'),e=e.replace(/(?=\s*<\/(:?head)>)/,o),this.clearCustomData(),this.clearListeners(),i.fire("contentDomUnload");var c=this.getDocument();try{c.write(e)}catch(t){setTimeout(function(){c.write(e)},0)}}},getData:function(e){if(e)return this.getHtml();e=this.editor;var t=e.config,n=t.fullPage,i=n&&e.docType,o=n&&e.xmlDeclaration,a=this.getDocument(),n=n?a.getDocumentElement().getOuterHtml():a.getBody().getHtml();return CKEDITOR.env.gecko&&t.enterMode!=CKEDITOR.ENTER_BR&&(n=n.replace(/<br>(?=\s*(:?$|<\/body>))/,"")),n=e.dataProcessor.toDataFormat(n),o&&(n=o+"\n"+n),i&&(n=i+"\n"+n),n},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:i.baseProto.focus.call(this)},detach:function(){var e,t=this.editor,n=t.document;try{e=t.window.getFrame()}catch(e){}i.baseProto.detach.call(this),this.clearCustomData(),n.getDocumentElement().clearCustomData(),CKEDITOR.tools.removeFunction(this._.frameLoadedHandler),e&&e.getParent()?(e.clearCustomData(),(t=e.removeCustomData("onResize"))&&t.removeListener(),e.remove()):CKEDITOR.warn("editor-destroy-iframe")}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,function(){function e(e,t){if(t||(t=e.getSelection().getSelectedElement()),t&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly())return t}function t(e){var t=e.getStyle("float");return"inherit"!=t&&"none"!=t||(t=0),t||(t=e.getAttribute("align")),t}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){if(!t.plugins.image2){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var n="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(t,"image","advanced")&&(n="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)"),t.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:n,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]})),t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"}),t.on("doubleclick",function(e){var t=e.data.element;!t.is("img")||t.data("cke-realelement")||t.isReadOnly()||(e.data.dialog="image")}),t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}}),t.contextMenu&&t.contextMenu.addListener(function(n){if(e(t,n))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(n){function i(i){var o=n.getCommand("justify"+i);o&&("left"!=i&&"right"!=i||o.on("exec",function(o){var a,r=e(n);r&&(a=t(r),a==i?(r.removeStyle("float"),i==t(r)&&r.removeAttribute("align")):r.setStyle("float",i),o.cancel())}),o.on("refresh",function(o){var a=e(n);a&&(a=t(a),this.setState(a==i?CKEDITOR.TRISTATE_ON:"right"==i||"left"==i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),o.cancel())}))}n.plugins.image2||(i("left"),i("right"),i("center"),i("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function e(e,i){var o,a;i.on("refresh",function(e){var i,o=[t];for(i in e.data.states)o.push(e.data.states[i]);this.setState(CKEDITOR.tools.search(o,n)?n:t)},i,null,100),i.on("exec",function(t){o=e.getSelection(),a=o.createBookmarks(1),t.data||(t.data={}),t.data.done=!1},i,null,0),i.on("exec",function(){e.forceNextSelectionCheck(),o.selectBookmarks(a)},i,null,100)}var t=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(t){var n=CKEDITOR.plugins.indent.genericDefinition;e(t,t.addCommand("indent",new n(!0))),e(t,t.addCommand("outdent",new n)),t.ui.addButton&&(t.ui.addButton("Indent",{label:t.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),t.ui.addButton("Outdent",{label:t.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),t.on("dirChanged",function(e){var n=t.createRange(),i=e.data.node;n.setStartBefore(i),n.setEndAfter(i);for(var o,a=new CKEDITOR.dom.walker(n);o=a.next();)if(o.type==CKEDITOR.NODE_ELEMENT)if(!o.equals(i)&&o.getDirection())n.setStartAfter(o),
a=new CKEDITOR.dom.walker(n);else{var r=t.config.indentClasses;if(r)for(var s="ltr"==e.data.dir?["_rtl",""]:["","_rtl"],l=0;l<r.length;l++)o.hasClass(r[l]+s[0])&&(o.removeClass(r[l]+s[0]),o.addClass(r[l]+s[1]));r=o.getStyle("margin-right"),s=o.getStyle("margin-left"),r?o.setStyle("margin-left",r):o.removeStyle("margin-left"),s?o.setStyle("margin-right",s):o.removeStyle("margin-right")}})}}),CKEDITOR.plugins.indent={genericDefinition:function(e){this.isIndent=!!e,this.startDisabled=!this.isIndent},specificDefinition:function(e,t,n){this.name=t,this.editor=e,this.jobs={},this.enterBr=e.config.enterMode==CKEDITOR.ENTER_BR,this.isIndent=!!n,this.relatedGlobal=n?"indent":"outdent",this.indentKey=n?9:CKEDITOR.SHIFT+9,this.database={}},registerCommands:function(e,t){e.on("pluginsLoaded",function(){for(var e in t)(function(e,t){var n,i=e.getCommand(t.relatedGlobal);for(n in t.jobs)i.on("exec",function(i){i.data.done||(e.fire("lockSnapshot"),t.execJob(e,n)&&(i.data.done=!0),e.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(t.database))},this,null,n),i.on("refresh",function(i){i.data.states||(i.data.states={}),i.data.states[t.name+"@"+n]=t.refreshJob(e,n,i.data.path)},this,null,n);e.addFeature(t)})(this,t[e])})}},CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}},CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(e,n){var i=this.jobs[n];if(i.state!=t)return i.exec.call(this,e)},refreshJob:function(e,n,i){return n=this.jobs[n],e.activeFilter.checkFeature(this)?n.state=n.refresh.call(this,e,i):n.state=t,n.state},getContext:function(e){return e.contains(this.context)}}}(),function(){function e(e,n,i){if(!e.getCustomData("indent_processed")){var o=this.editor,a=this.isIndent;if(n){if(o=e.$.className.match(this.classNameRegex),i=0,o&&(o=o[1],i=CKEDITOR.tools.indexOf(n,o)+1),0>(i+=a?1:-1))return;i=Math.min(i,n.length),i=Math.max(i,0),e.$.className=CKEDITOR.tools.ltrim(e.$.className.replace(this.classNameRegex,"")),0<i&&e.addClass(n[i-1])}else{n=t(e,i),i=parseInt(e.getStyle(n),10);var r=o.config.indentOffset||40;if(isNaN(i)&&(i=0),i+=(a?1:-1)*r,0>i)return;i=Math.max(i,0),i=Math.ceil(i/r)*r,e.setStyle(n,i?i+(o.config.indentUnit||"px"):""),""===e.getAttribute("style")&&e.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,e,"indent_processed",1)}}function t(e,t){return"ltr"==(t||e.getComputedStyle("direction"))?"margin-left":"margin-right"}var n=CKEDITOR.dtd.$listItem,i=CKEDITOR.dtd.$list,o=CKEDITOR.TRISTATE_DISABLED,a=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(r){function s(){l.specificDefinition.apply(this,arguments),this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:c?null:"margin-left,margin-right",classes:c||null}},this.enterBr&&(this.allowedContent.div=!0),this.requiredContent=(this.enterBr?"div":"p")+(c?"("+c.join(",")+")":"{margin-left}"),this.jobs={20:{refresh:function(e,i){var r=i.block||i.blockLimit;if(!r.is(n))var s=r.getAscendant(n),r=s&&i.contains(s)||r;if(r.is(n)&&(r=r.getParent()),this.enterBr||this.getContext(i)){if(c){var s=c,r=r.$.className.match(this.classNameRegex),l=this.isIndent,s=r?!l||r[1]!=s.slice(-1):l;return s?a:o}return this.isIndent?a:r?CKEDITOR[0>=(parseInt(r.getStyle(t(r)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:o}return o},exec:function(t){var n,o=t.getSelection(),o=o&&o.getRanges()[0];if(n=t.elementPath().contains(i))e.call(this,n,c);else for(o=o.createIterator(),t=t.config.enterMode,o.enforceRealBlocks=!0,o.enlargeBr=t!=CKEDITOR.ENTER_BR;n=o.getNextParagraph(t==CKEDITOR.ENTER_P?"p":"div");)n.isReadOnly()||e.call(this,n,c);return!0}}}}var l=CKEDITOR.plugins.indent,c=r.config.indentClasses;l.registerCommands(r,{indentblock:new s(r,"indentblock",!0),outdentblock:new s(r,"outdentblock")}),CKEDITOR.tools.extend(s.prototype,l.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:c?new RegExp("(?:^|\\s+)("+c.join("|")+")(?=$|\\s)"):null})}})}(),function(){function e(e){function i(t){for(var i=o.startContainer,l=o.endContainer;i&&!i.getParent().equals(t);)i=i.getParent();for(;l&&!l.getParent().equals(t);)l=l.getParent();if(!i||!l)return!1;for(var c=i,i=[],d=!1;!d;)c.equals(l)&&(d=!0),i.push(c),c=c.getNext();if(1>i.length)return!1;for(c=t.getParents(!0),l=0;l<c.length;l++)if(c[l].getName&&s[c[l].getName()]){t=c[l];break}for(var c=a.isIndent?1:-1,l=i[0],i=i[i.length-1],d=CKEDITOR.plugins.list.listToArray(t,r),u=d[i.getCustomData("listarray_index")].indent,l=l.getCustomData("listarray_index");l<=i.getCustomData("listarray_index");l++)if(d[l].indent+=c,0<c){var h=d[l].parent;d[l].parent=new CKEDITOR.dom.element(h.getName(),h.getDocument())}for(l=i.getCustomData("listarray_index")+1;l<d.length&&d[l].indent>u;l++)d[l].indent+=c;if(i=CKEDITOR.plugins.list.arrayToList(d,r,null,e.config.enterMode,t.getDirection()),!a.isIndent){var f;if((f=t.getParent())&&f.is("li"))for(var m,c=i.listNode.getChildren(),g=[],l=c.count()-1;0<=l;l--)(m=c.getItem(l))&&m.is&&m.is("li")&&g.push(m)}if(i&&i.listNode.replace(t),g&&g.length)for(l=0;l<g.length;l++){for(m=t=g[l];(m=m.getNext())&&m.is&&m.getName()in s;)CKEDITOR.env.needsNbspFiller&&!t.getFirst(n)&&t.append(o.document.createText("\xa0")),t.append(m);t.insertAfter(f)}return i&&e.fire("contentDomInvalidated"),!0}for(var o,a=this,r=this.database,s=this.context,l=e.getSelection(),l=(l&&l.getRanges()).createIterator();o=l.getNextRange();){for(var c=o.getCommonAncestor();c&&(c.type!=CKEDITOR.NODE_ELEMENT||!s[c.getName()]);){if(e.editable().equals(c)){c=!1;break}c=c.getParent()}if(c||(c=o.startPath().contains(s))&&o.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),!c){var d=o.getEnclosedNode();d&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in s&&(o.setStartAt(d,CKEDITOR.POSITION_AFTER_START),o.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),c=d)}if(c&&o.startContainer.type==CKEDITOR.NODE_ELEMENT&&o.startContainer.getName()in s&&(d=new CKEDITOR.dom.walker(o),d.evaluator=t,o.startContainer=d.next()),c&&o.endContainer.type==CKEDITOR.NODE_ELEMENT&&o.endContainer.getName()in s&&(d=new CKEDITOR.dom.walker(o),d.evaluator=t,o.endContainer=d.previous()),c)return i(c)}return 0}function t(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")}function n(e){return i(e)&&o(e)}var i=CKEDITOR.dom.walker.whitespaces(!0),o=CKEDITOR.dom.walker.bookmark(!1,!0),a=CKEDITOR.TRISTATE_DISABLED,r=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(t){function n(t){i.specificDefinition.apply(this,arguments),this.requiredContent=["ul","ol"],t.on("key",function(e){if("wysiwyg"==t.mode&&e.data.keyCode==this.indentKey){var n=this.getContext(t.elementPath());!n||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,t.elementPath(),n)||(t.execCommand(this.relatedGlobal),e.cancel())}},this),this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(e,t){var n=this.getContext(t),i=CKEDITOR.plugins.indentList.firstItemInPath(this.context,t,n);return n&&this.isIndent&&!i?r:a}:function(e,t){return!this.getContext(t)||this.isIndent?a:r},exec:CKEDITOR.tools.bind(e,this)}}var i=CKEDITOR.plugins.indent;i.registerCommands(t,{indentlist:new n(t,"indentlist",!0),outdentlist:new n(t,"outdentlist")}),CKEDITOR.tools.extend(n.prototype,i.specificDefinition.prototype,{context:{ol:1,ul:1}})}}),CKEDITOR.plugins.indentList={},CKEDITOR.plugins.indentList.firstItemInPath=function(e,n,i){var o=n.contains(t);return i||(i=n.contains(e)),i&&o&&o.equals(i.getFirst(t))}}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(e){e.config.smiley_path=e.config.smiley_path||this.path+"images/",e.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"})),e.ui.addButton&&e.ui.addButton("Smiley",{label:e.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"}),CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}}),CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "),CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),function(){function e(e,t){t=void 0===t||t;var n;if(t)n=e.getComputedStyle("text-align");else{for(;(!e.hasAttribute||!e.hasAttribute("align")&&!e.getStyle("text-align"))&&(n=e.getParent(),n);)e=n;n=e.getStyle("text-align")||e.getAttribute("align")||""}return n&&(n=n.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,"")),!n&&t&&(n="rtl"==e.getComputedStyle("direction")?"right":"left"),n}function t(e,t,n){this.editor=e,this.name=t,this.value=n,this.context="p",t=e.config.justifyClasses;var i=e.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(t){switch(n){case"left":this.cssClassName=t[0];break;case"center":this.cssClassName=t[1];break;case"right":this.cssClassName=t[2];break;case"justify":this.cssClassName=t[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+t.join("|")+")(?=$|\\s)"),this.requiredContent=i+"("+this.cssClassName+")"}else this.requiredContent=i+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}},e.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function n(e){var t=e.editor,n=t.createRange();n.setStartBefore(e.data.node),n.setEndAfter(e.data.node);for(var i,o=new CKEDITOR.dom.walker(n);i=o.next();)if(i.type==CKEDITOR.NODE_ELEMENT)if(!i.equals(e.data.node)&&i.getDirection())n.setStartAfter(i),o=new CKEDITOR.dom.walker(n);else{var a=t.config.justifyClasses;a&&(i.hasClass(a[0])?(i.removeClass(a[0]),i.addClass(a[2])):i.hasClass(a[2])&&(i.removeClass(a[2]),i.addClass(a[0]))),a=i.getStyle("text-align"),"left"==a?i.setStyle("text-align","right"):"right"==a&&i.setStyle("text-align","left")}}t.prototype={exec:function(t){var n=t.getSelection(),i=t.config.enterMode;if(n){for(var o,a,r=n.createBookmarks(),s=n.getRanges(),l=this.cssClassName,c=t.config.useComputedState,c=void 0===c||c,d=s.length-1;0<=d;d--)for(o=s[d].createIterator(),o.enlargeBr=i!=CKEDITOR.ENTER_BR;a=o.getNextParagraph(i==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){a.removeAttribute("align"),a.removeStyle("text-align");var u=l&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),h=this.state==CKEDITOR.TRISTATE_OFF&&(!c||e(a,!0)!=this.value);l?h?a.addClass(l):u||a.removeAttribute("class"):h&&a.setStyle("text-align",this.value)}t.focus(),t.forceNextSelectionCheck(),n.selectBookmarks(r)}},refresh:function(t,n){var i=n.block||n.blockLimit;this.setState("body"!=i.getName()&&e(i,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}},CKEDITOR.plugins.add("justify",{init:function(e){if(!e.blockless){var i=new t(e,"justifyleft","left"),o=new t(e,"justifycenter","center"),a=new t(e,"justifyright","right"),r=new t(e,"justifyblock","justify");e.addCommand("justifyleft",i),e.addCommand("justifycenter",o),e.addCommand("justifyright",a),e.addCommand("justifyblock",r),e.ui.addButton&&(e.ui.addButton("JustifyLeft",{label:e.lang.justify.left,command:"justifyleft",toolbar:"align,10"}),e.ui.addButton("JustifyCenter",{label:e.lang.justify.center,command:"justifycenter",toolbar:"align,20"}),e.ui.addButton("JustifyRight",{label:e.lang.justify.right,command:"justifyright",toolbar:"align,30"}),e.ui.addButton("JustifyBlock",{label:e.lang.justify.block,command:"justifyblock",toolbar:"align,40"})),e.on("dirChanged",n)}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var e=function(e){var t=this._,n=t.menu;t.state!==CKEDITOR.TRISTATE_DISABLED&&(t.on&&n?n.hide():(t.previousState=t.state,n||(n=t.menu=new CKEDITOR.menu(e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.common.options}}}),n.onHide=CKEDITOR.tools.bind(function(){var n=this.command?e.getCommand(this.command).modes:this.modes;this.setState(!n||n[e.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED),t.on=0},this),this.onMenu&&n.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),t.on=1,setTimeout(function(){n.show(CKEDITOR.document.getById(t.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){delete t.panel,this.base(t),this.hasArrow=!0,this.click=e},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(e){var t,n,i,o,a=e.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],r=this,s=e.lang.language,l={};for(e.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(e,t){var n=l["language_"+t];n&&e[n.style.checkActive(e.elementPath(),e)?"removeStyle":"applyStyle"](n.style)},refresh:function(e){this.setState(r.getCurrentLangElement(e)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}}),o=0;o<a.length;o++)t=a[o].split(":"),n=t[0],i="language_"+n,l[i]={label:t[1],langId:n,group:"language",order:o,ltr:"rtl"!=(""+t[2]).toLowerCase(),onClick:function(){e.execCommand("language",this.langId)},role:"menuitemcheckbox"},l[i].style=new CKEDITOR.style({element:"span",attributes:{lang:n,dir:l[i].ltr?"ltr":"rtl"}});l.language_remove={label:s.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:l.length,onClick:function(){var t=r.getCurrentLangElement(e);t&&e.execCommand("language",t.getAttribute("lang"))}},e.addMenuGroup("language",1),e.addMenuGroup("language_remove"),e.addMenuItems(l),e.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:s.button,allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",toolbar:"bidi,30",command:"language",onMenu:function(){var t,n={},i=r.getCurrentLangElement(e);for(t in l)n[t]=CKEDITOR.TRISTATE_OFF;return n.language_remove=i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,i&&(n["language_"+i.getAttribute("lang")]=CKEDITOR.TRISTATE_ON),n}})},getCurrentLangElement:function(e){var t=e.elementPath();e=t&&t.elements;var n;if(t)for(var i=0;i<e.length;i++)t=e[i],!n&&"span"==t.getName()&&t.hasAttribute("dir")&&t.hasAttribute("lang")&&(n=t);return n}})}(),function(){function e(e){return e.replace(/'/g,"\\$&")}function t(e){for(var t,n=e.length,i=[],o=0;o<n;o++)t=e.charCodeAt(o),i.push(t);return"String.fromCharCode("+i.join(",")+")"}function n(t,n){var i,o,a=t.plugins.link,r=a.compiledProtectionFunction.params;o=[a.compiledProtectionFunction.name,"("];for(var s=0;s<r.length;s++)a=r[s].toLowerCase(),i=n[a],0<s&&o.push(","),o.push("'",i?e(encodeURIComponent(n[a])):"","'");return o.push(")"),o.join("")}function i(e){e=e.config.emailProtection||"";var t;return e&&"encode"!=e&&(t={},e.replace(/^([^(]+)\(([^)]+)\)$/,function(e,n,i){t.name=n,t.params=[],i.replace(/[^,\s]+/g,function(e){t.params.push(e)})})),t}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function e(e){return n.replace(/%1/g,"rtl"==e?"right":"left").replace(/%2/g,"cke_contents_"+e)}var t="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",n=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+t+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(e("ltr")+e("rtl"))},init:function(e){var t="a[!href]";CKEDITOR.dialog.isTabEnabled(e,"link","advanced")&&(t=t.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)")),CKEDITOR.dialog.isTabEnabled(e,"link","target")&&(t=t.replace("]",",target,onclick]")),e.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:t,requiredContent:"a[href]"})),e.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"})),e.addCommand("unlink",new CKEDITOR.unlinkCommand),e.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand),e.setKeystroke(CKEDITOR.CTRL+76,"link"),e.ui.addButton&&(e.ui.addButton("Link",{label:e.lang.link.toolbar,command:"link",toolbar:"links,10"}),e.ui.addButton("Unlink",{label:e.lang.link.unlink,command:"unlink",toolbar:"links,20"}),e.ui.addButton("Anchor",{label:e.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"})),CKEDITOR.dialog.add("link",this.path+"dialogs/link.js"),CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js"),e.on("doubleclick",function(t){var n=CKEDITOR.plugins.link.getSelectedLink(e)||t.data.element;n.isReadOnly()||(n.is("a")?(t.data.dialog=!n.getAttribute("name")||n.getAttribute("href")&&n.getChildCount()?"link":"anchor",t.data.link=n):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,n)&&(t.data.dialog="anchor"))},null,null,0),e.on("doubleclick",function(t){t.data.dialog in{link:1,anchor:1}&&t.data.link&&e.getSelection().selectElement(t.data.link)},null,null,20),e.addMenuItems&&e.addMenuItems({anchor:{label:e.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:e.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:e.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:e.lang.link.unlink,command:"unlink",group:"link",order:5}}),e.contextMenu&&e.contextMenu.addListener(function(t){if(!t||t.isReadOnly())return null;if(t=CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t),!t&&!(t=CKEDITOR.plugins.link.getSelectedLink(e)))return null;var n={};return t.getAttribute("href")&&t.getChildCount()&&(n={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),t&&t.hasAttribute("name")&&(n.anchor=n.removeAnchor=CKEDITOR.TRISTATE_OFF),n}),this.compiledProtectionFunction=i(e)},afterInit:function(e){e.dataProcessor.dataFilter.addRules({elements:{a:function(t){return t.attributes.name?t.children.length?null:e.createFakeParserElement(t,"cke_anchor","anchor"):null}}});var t=e._.elementsPath&&e._.elementsPath.filters;t&&t.push(function(t,n){if("a"==n&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t)||t.getAttribute("name")&&(!t.getAttribute("href")||!t.getChildCount())))return"anchor"})}});var o=/^javascript:/,a=/^mailto:([^?]+)(?:\?(.+))?$/,r=/subject=([^;?:@&=$,\/]*)/i,s=/body=([^;?:@&=$,\/]*)/i,l=/^#(.*)$/,c=/^((?:http|https|ftp|news):\/\/)?(.*)$/,d=/^(_(?:self|top|parent|blank))$/,u=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,h=/^javascript:([^(]+)\(([^)]+)\)$/,f=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,m=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,g={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(e){var t=e.getSelection(),n=t.getSelectedElement();return n&&n.is("a")?n:(t=t.getRanges()[0])?(t.shrink(CKEDITOR.SHRINK_TEXT),e.elementPath(t.getCommonAncestor()).contains("a",1)):null},getEditorAnchors:function(e){for(var t,n=e.editable(),i=n.isInline()&&!e.plugins.divarea?e.document:n,n=i.getElementsByTag("a"),i=i.getElementsByTag("img"),o=[],a=0;t=n.getItem(a++);)(t.data("cke-saved-name")||t.hasAttribute("name"))&&o.push({name:t.data("cke-saved-name")||t.getAttribute("name"),id:t.getAttribute("id")});for(a=0;t=i.getItem(a++);)(t=this.tryRestoreFakeAnchor(e,t))&&o.push({name:t.getAttribute("name"),id:t.getAttribute("id")});return o},fakeAnchor:!0,tryRestoreFakeAnchor:function(e,t){if(t&&t.data("cke-real-element-type")&&"anchor"==t.data("cke-real-element-type")){var n=e.restoreRealElement(t);if(n.data("cke-saved-name"))return n}},parseLinkAttributes:function(e,t){var n,i=t&&(t.data("cke-saved-href")||t.getAttribute("href"))||"",E=e.plugins.link.compiledProtectionFunction,p=e.config.emailProtection,T={};if(i.match(o)&&("encode"==p?i=i.replace(u,function(e,t,n){return n=n||"","mailto:"+String.fromCharCode.apply(String,t.split(","))+n.replace(/\\'/g,"'")}):p&&i.replace(h,function(e,t,n){if(t==E.name){T.type="email",e=T.email={},t=/(^')|('$)/g,n=n.match(/[^,\s]+/g);for(var i,o,a=n.length,r=0;r<a;r++)i=decodeURIComponent,o=n[r].replace(t,"").replace(/\\'/g,"'"),o=i(o),i=E.params[r].toLowerCase(),e[i]=o;e.address=[e.name,e.domain].join("@")}})),!T.type)if(p=i.match(l))T.type="anchor",T.anchor={},T.anchor.name=T.anchor.id=p[1];else if(p=i.match(a)){n=i.match(r),i=i.match(s),T.type="email";var C=T.email={};C.address=p[1],n&&(C.subject=decodeURIComponent(n[1])),i&&(C.body=decodeURIComponent(i[1]))}else i&&(n=i.match(c))&&(T.type="url",T.url={},T.url.protocol=n[1],T.url.url=n[2]);if(t){if(i=t.getAttribute("target"))T.target={type:i.match(d)?i:"frame",name:i};else if(i=(i=t.data("cke-pa-onclick")||t.getAttribute("onclick"))&&i.match(f))for(T.target={type:"popup",name:i[1]};p=m.exec(i[2]);)"yes"!=p[2]&&"1"!=p[2]||p[1]in{height:1,width:1,top:1,left:1}?isFinite(p[2])&&(T.target[p[1]]=p[2]):T.target[p[1]]=!0;var I,i={};for(I in g)(p=t.getAttribute(I))&&(i[g[I]]=p);(I=t.data("cke-saved-name")||i.advName)&&(i.advName=I),CKEDITOR.tools.isEmpty(i)||(T.advanced=i)}return T},getLinkAttributes:function(i,o){var a=i.config.emailProtection||"",r={};switch(o.type){case"url":var a=o.url&&void 0!==o.url.protocol?o.url.protocol:"http://",s=o.url&&CKEDITOR.tools.trim(o.url.url)||"";r["data-cke-saved-href"]=0===s.indexOf("/")?s:a+s;break;case"anchor":a=o.anchor&&o.anchor.id,r["data-cke-saved-href"]="#"+(o.anchor&&o.anchor.name||a||"");break;case"email":var l=o.email,s=l.address;switch(a){case"":case"encode":var c=encodeURIComponent(l.subject||""),d=encodeURIComponent(l.body||""),l=[];c&&l.push("subject="+c),d&&l.push("body="+d),l=l.length?"?"+l.join("&"):"","encode"==a?(a=["javascript:void(location.href='mailto:'+",t(s)],l&&a.push("+'",e(l),"'"),a.push(")")):a=["mailto:",s,l];break;default:a=s.split("@",2),l.name=a[0],l.domain=a[1],a=["javascript:",n(i,l)]}r["data-cke-saved-href"]=a.join("")}if(o.target)if("popup"==o.target.type){for(var a=["window.open(this.href, '",o.target.name||"","', '"],u="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),s=u.length,c=function(e){o.target[e]&&u.push(e+"="+o.target[e])},l=0;l<s;l++)u[l]+=o.target[u[l]]?"=yes":"=no";c("width"),c("left"),c("height"),c("top"),a.push(u.join(","),"'); return false;"),r["data-cke-pa-onclick"]=a.join("")}else"notSet"!=o.target.type&&o.target.name&&(r.target=o.target.name);if(o.advanced){for(var h in g)(a=o.advanced[g[h]])&&(r[h]=a);r.name&&(r["data-cke-saved-name"]=r.name)}r["data-cke-saved-href"]&&(r.href=r["data-cke-saved-href"]),h={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1},o.advanced&&CKEDITOR.tools.extend(h,g);for(var f in r)delete h[f];return{set:r,removed:CKEDITOR.tools.objectKeys(h)}}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(e){var t=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});e.removeStyle(t)},refresh:function(e,t){var n=t.lastElement&&t.lastElement.getAscendant("a",!0);n&&"a"==n.getName()&&n.getAttribute("href")&&n.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]"},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(e){var t,n=e.getSelection(),i=n.createBookmarks();n&&(t=n.getSelectedElement())&&(t.getChildCount()?t.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t))?t.remove(1):(t=CKEDITOR.plugins.link.getSelectedLink(e))&&(t.hasAttribute("href")?(t.removeAttributes({name:1,"data-cke-saved-name":1}),t.removeClass("cke_anchor")):t.remove(1)),n.selectBookmarks(i)},requiredContent:"a[name]"},CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0})}(),function(){function e(e,t,n){function i(n){!(l=d[n?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(c=t.root[n?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||c.is&&c.isBlockBoundary({br:1})||e.document.createElement("br")[n?"insertBefore":"insertAfter"](l)}for(var o=CKEDITOR.plugins.list.listToArray(t.root,n),a=[],r=0;r<t.contents.length;r++){var s=t.contents[r];(s=s.getAscendant("li",!0))&&!s.getCustomData("list_item_processed")&&(a.push(s),CKEDITOR.dom.element.setMarker(n,s,"list_item_processed",!0))}for(s=null,r=0;r<a.length;r++)s=a[r].getCustomData("listarray_index"),o[s].indent=-1;for(r=s+1;r<o.length;r++)if(o[r].indent>o[r-1].indent+1){for(a=o[r-1].indent+1-o[r].indent,s=o[r].indent;o[r]&&o[r].indent>=s;)o[r].indent+=a,r++;r--}var l,c,d=CKEDITOR.plugins.list.arrayToList(o,n,null,e.config.enterMode,t.root.getAttribute("dir")).listNode;i(!0),i(),d.replace(t.root),e.fire("contentDomInvalidated")}function t(e,t){this.name=e,this.context=this.type=t,this.allowedContent=t+" li",this.requiredContent=t}function n(e,t,n,i){for(var o,a;o=e[i?"getLast":"getFirst"](f);)(a=o.getDirection(1))!==t.getDirection(1)&&o.setAttribute("dir",a),o.remove(),n?o[i?"insertBefore":"insertAfter"](n):t.append(o,i)}function i(e){function t(t){var i=e[t?"getPrevious":"getNext"](d);i&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(e.getName())&&(n(e,i,null,!t),e.remove(),e=i)}t(),t(1)}function o(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function a(e,t,o){e.fire("saveSnapshot"),o.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var a=o.extractContents();t.trim(!1,!0);var s=t.createBookmark(),l=new CKEDITOR.dom.elementPath(t.startContainer),c=l.block,l=l.lastElement.getAscendant("li",1)||c,h=new CKEDITOR.dom.elementPath(o.startContainer),f=h.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$list);for(c?(c=c.getBogus())&&c.remove():h&&(c=h.getPrevious(d))&&u(c)&&c.remove(),(c=a.getLast())&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("br")&&c.remove(),(c=t.startContainer.getChild(t.startOffset))?a.insertBefore(c):t.startContainer.append(a),f&&(a=r(f))&&(l.contains(f)?(n(a,f.getParent(),f),a.remove()):l.append(a));o.checkStartOfBlock()&&o.checkEndOfBlock()&&(h=o.startPath(),a=h.block,a);)a.is("li")&&(l=a.getParent(),a.equals(l.getLast(d))&&a.equals(l.getFirst(d))&&(a=l)),o.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START),a.remove();o=o.clone(),a=e.editable(),o.setEndAt(a,CKEDITOR.POSITION_BEFORE_END),o=new CKEDITOR.dom.walker(o),o.evaluator=function(e){return d(e)&&!u(e)},(o=o.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$list&&i(o),t.moveToBookmark(s),t.select(),e.fire("saveSnapshot")}function r(e){return(e=e.getLast(d))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in s?e:null}var s={ol:1,ul:1},l=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),d=function(e){return!(l(e)||c(e))},u=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,i,o){if(!s[e.getName()])return[];i||(i=0),n||(n=[]);for(var a=0,r=e.getChildCount();a<r;a++){var l=e.getChild(a);if(l.type==CKEDITOR.NODE_ELEMENT&&l.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(l,t,n,i+1),"li"==l.$.nodeName.toLowerCase()){var c={parent:e,indent:i,element:l,contents:[]};o?c.grandparent=o:(c.grandparent=e.getParent(),c.grandparent&&"li"==c.grandparent.$.nodeName.toLowerCase()&&(c.grandparent=c.grandparent.getParent())),t&&CKEDITOR.dom.element.setMarker(t,l,"listarray_index",n.length),n.push(c);for(var d,u=0,h=l.getChildCount();u<h;u++)d=l.getChild(u),d.type==CKEDITOR.NODE_ELEMENT&&s[d.getName()]?CKEDITOR.plugins.list.listToArray(d,t,n,i+1,c.grandparent):c.contents.push(d)}}return n},arrayToList:function(e,t,n,i,o){if(n||(n=0),!e||e.length<n+1)return null;for(var a,r,l,u=e[n].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(u),f=null,m=n,g=Math.max(e[n].indent,0),E=null,p=i==CKEDITOR.ENTER_P?"p":"div";;){var T=e[m];if(a=T.grandparent,r=T.element.getDirection(1),T.indent==g){for(f&&e[m].parent.getName()==f.getName()||(f=e[m].parent.clone(!1,1),o&&f.setAttribute("dir",o),h.append(f)),E=f.append(T.element.clone(0,1)),r!=f.getDirection(1)&&E.setAttribute("dir",r),a=0;a<T.contents.length;a++)E.append(T.contents[a].clone(1,1));m++}else if(T.indent==Math.max(g,0)+1)T=e[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(e,null,m,i,T!=r?r:null),!E.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=u.$.documentMode&&E.append(u.createText("\xa0")),E.append(m.listNode),m=m.nextIndex;else{if(-1!=T.indent||n||!a)return null;s[a.getName()]?(E=T.element.clone(!1,!0),r!=a.getDirection(1)&&E.setAttribute("dir",r)):E=new CKEDITOR.dom.documentFragment(u);var C,I,f=a.getDirection(1)!=r,O=T.element,D=O.getAttribute("class"),R=O.getAttribute("style"),v=E.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i!=CKEDITOR.ENTER_BR||f||R||D),b=T.contents.length;for(a=0;a<b;a++)if(C=T.contents[a],c(C)&&1<b)v?I=C.clone(1,1):E.append(C.clone(1,1));else if(C.type==CKEDITOR.NODE_ELEMENT&&C.isBlockBoundary()){f&&!C.getDirection()&&C.setAttribute("dir",r),l=C;var K=O.getAttribute("style");K&&l.setAttribute("style",K.replace(/([^;])$/,"$1;")+(l.getAttribute("style")||"")),D&&C.addClass(D),l=null,I&&(E.append(I),I=null),E.append(C.clone(1,1))}else v?(l||(l=u.createElement(p),E.append(l),f&&l.setAttribute("dir",r)),R&&l.setAttribute("style",R),D&&l.setAttribute("class",D),I&&(l.append(I),I=null),l.append(C.clone(1,1))):E.append(C.clone(1,1));I&&((l||E).append(I),I=null),E.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=e.length-1&&(CKEDITOR.env.needsBrFiller&&(r=E.getLast())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br")&&r.remove(),(r=E.getLast(d))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(CKEDITOR.dtd.$block)||E.append(u.createElement("br"))),r=E.$.nodeName.toLowerCase(),"div"!=r&&"p"!=r||E.appendBogus(),h.append(E),f=null,m++}if(l=null,e.length<=m||Math.max(e[m].indent,0)<g)break}if(t)for(e=h.getFirst();e;){if(e.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(t,e),e.getName()in CKEDITOR.dtd.$listItem&&(n=e,u=o=i=void 0,i=n.getDirection()))){for(o=n.getParent();o&&!(u=o.getDirection());)o=o.getParent();i==u&&n.removeAttribute("dir")}e=e.getNextSourceNode()}return{listNode:h,nextIndex:m}}};var h=/^h[1-6]$/,f=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);t.prototype={exec:function(t){this.refresh(t,t.elementPath());var n=t.config,o=t.getSelection(),a=o&&o.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var r=t.editable();if(r.getFirst(d)){var l=1==a.length&&a[0];(n=l&&l.getEnclosedNode())&&n.is&&this.type==n.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else n.enterMode==CKEDITOR.ENTER_BR?r.appendBogus():a[0].fixBlock(1,n.enterMode==CKEDITOR.ENTER_P?"p":"div"),o.selectRanges(a)}for(var n=o.createBookmarks(!0),r=[],c={},a=a.createIterator(),u=0;(l=a.getNextRange())&&++u;){var f=l.getBoundaryNodes(),m=f.startNode,g=f.endNode;for(m.type==CKEDITOR.NODE_ELEMENT&&"td"==m.getName()&&l.setStartAt(f.startNode,CKEDITOR.POSITION_AFTER_START),g.type==CKEDITOR.NODE_ELEMENT&&"td"==g.getName()&&l.setEndAt(f.endNode,CKEDITOR.POSITION_BEFORE_END),l=l.createIterator(),l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;f=l.getNextParagraph();)if(!f.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(c,f,"list_block",1);for(var E,p=t.elementPath(f),m=p.elements,g=0,p=p.blockLimit,T=m.length-1;0<=T&&(E=m[T]);T--)if(s[E.getName()]&&p.contains(E)){p.removeCustomData("list_group_object_"+u),(m=E.getCustomData("list_group_object"))?m.contents.push(f):(m={root:E,contents:[f]},r.push(m),CKEDITOR.dom.element.setMarker(c,E,"list_group_object",m)),g=1;break}g||(g=p,g.getCustomData("list_group_object_"+u)?g.getCustomData("list_group_object_"+u).contents.push(f):(m={root:g,contents:[f]},CKEDITOR.dom.element.setMarker(c,g,"list_group_object_"+u,m),r.push(m)))}}for(E=[];0<r.length;)if(m=r.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(s[m.root.getName()]){for(a=t,u=m,m=c,l=E,g=CKEDITOR.plugins.list.listToArray(u.root,m),p=[],f=0;f<u.contents.length;f++)T=u.contents[f],(T=T.getAscendant("li",!0))&&!T.getCustomData("list_item_processed")&&(p.push(T),CKEDITOR.dom.element.setMarker(m,T,"list_item_processed",!0));for(var T=u.root.getDocument(),C=void 0,I=void 0,f=0;f<p.length;f++){var O=p[f].getCustomData("listarray_index"),C=g[O].parent;C.is(this.type)||(I=T.createElement(this.type),
C.copyAttributes(I,{start:1,type:1}),I.removeStyle("list-style-type"),g[O].parent=I)}for(m=CKEDITOR.plugins.list.arrayToList(g,m,null,a.config.enterMode),g=void 0,p=m.listNode.getChildCount(),f=0;f<p&&(g=m.listNode.getChild(f));f++)g.getName()==this.type&&l.push(g);m.listNode.replace(u.root),a.fire("contentDomInvalidated")}else{for(g=t,l=m,f=E,p=l.contents,a=l.root.getDocument(),u=[],1==p.length&&p[0].equals(l.root)&&(m=a.createElement("div"),p[0].moveChildren&&p[0].moveChildren(m),p[0].append(m),p[0]=m),l=l.contents[0].getParent(),T=0;T<p.length;T++)l=l.getCommonAncestor(p[T].getParent());for(C=g.config.useComputedState,g=m=void 0,C=void 0===C||C,T=0;T<p.length;T++)for(I=p[T];O=I.getParent();){if(O.equals(l)){u.push(I),!g&&I.getDirection()&&(g=1),I=I.getDirection(C),null!==m&&(m=m&&m!=I?null:I);break}I=O}if(!(1>u.length)){for(p=u[u.length-1].getNext(),T=a.createElement(this.type),f.push(T),C=f=void 0;u.length;)f=u.shift(),C=a.createElement("li"),I=f,I.is("pre")||h.test(I.getName())||"false"==I.getAttribute("contenteditable")?f.appendTo(C):(f.copyAttributes(C),m&&f.getDirection()&&(C.removeStyle("direction"),C.removeAttribute("dir")),f.moveChildren(C),f.remove()),C.appendTo(T);m&&g&&T.setAttribute("dir",m),p?T.insertBefore(p):T.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&s[m.root.getName()]&&e.call(this,t,m,c);for(T=0;T<E.length;T++)i(E[T]);CKEDITOR.dom.element.clearAllMarkers(c),o.selectBookmarks(n),t.focus()},refresh:function(e,t){var n=t.contains(s,1),i=t.blockLimit||t.root;n&&i.contains(n)?this.setState(n.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(e){e.blockless||(e.addCommand("numberedlist",new t("numberedlist","ol")),e.addCommand("bulletedlist",new t("bulletedlist","ul")),e.ui.addButton&&(e.ui.addButton("NumberedList",{label:e.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),e.ui.addButton("BulletedList",{label:e.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),e.on("key",function(t){var n,i=t.data.domEvent.getKey();if("wysiwyg"==e.mode&&i in{8:1,46:1}){var l=e.getSelection().getRanges()[0],c=l&&l.startPath();if(l&&l.collapsed){var h=8==i,f=e.editable(),m=new CKEDITOR.dom.walker(l.clone());if(m.evaluator=function(e){return d(e)&&!u(e)},m.guard=function(e,t){return!(t&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))},i=l.clone(),h){var g;if((g=c.contains(s))&&l.checkBoundaryOfElement(g,CKEDITOR.START)&&(g=g.getParent())&&g.is("li")&&(g=r(g))?(n=g,g=g.getPrevious(d),i.moveToPosition(g&&u(g)?g:n,CKEDITOR.POSITION_BEFORE_START)):(m.range.setStartAt(f,CKEDITOR.POSITION_AFTER_START),m.range.setEnd(l.startContainer,l.startOffset),(g=m.previous())&&g.type==CKEDITOR.NODE_ELEMENT&&(g.getName()in s||g.is("li"))&&(g.is("li")||(m.range.selectNodeContents(g),m.reset(),m.evaluator=o,g=m.previous()),n=g,i.moveToElementEditEnd(n),i.moveToPosition(i.endPath().block,CKEDITOR.POSITION_BEFORE_END))),n)a(e,i,l),t.cancel();else{var E=c.contains(s);E&&l.checkBoundaryOfElement(E,CKEDITOR.START)&&(n=E.getFirst(d),l.checkBoundaryOfElement(n,CKEDITOR.START)&&(g=E.getPrevious(d),r(n)?g&&(l.moveToElementEditEnd(g),l.select()):e.execCommand("outdent"),t.cancel()))}}else if(n=c.contains("li")){if(m.range.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),h=(f=n.getLast(d))&&o(f)?f:n,c=0,(g=m.next())&&g.type==CKEDITOR.NODE_ELEMENT&&g.getName()in s&&g.equals(f)?(c=1,g=m.next()):l.checkBoundaryOfElement(h,CKEDITOR.END)&&(c=2),c&&g){if(l=l.clone(),l.moveToElementEditStart(g),1==c&&(i.optimize(),!i.startContainer.equals(n))){for(n=i.startContainer;n.is(CKEDITOR.dtd.$inline);)E=n,n=n.getParent();E&&i.moveToPosition(E,CKEDITOR.POSITION_AFTER_END)}2==c&&(i.moveToPosition(i.endPath().block,CKEDITOR.POSITION_BEFORE_END),l.endPath().block&&l.moveToPosition(l.endPath().block,CKEDITOR.POSITION_AFTER_START)),a(e,i,l),t.cancel()}}else m.range.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),(g=m.next())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(s)&&(g=g.getFirst(d),c.block&&l.checkStartOfBlock()&&l.checkEndOfBlock()?(c.block.remove(),l.moveToElementEditStart(g),l.select()):r(g)?(l.moveToElementEditStart(g),l.select()):(l=l.clone(),l.moveToElementEditStart(g),a(e,i,l)),t.cancel());setTimeout(function(){e.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(e){if(!e.blockless){var t;t=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]"}),t=e.addCommand("numberedListStyle",t),e.addFeature(t),CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js"),t=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}"}),t=e.addCommand("bulletedListStyle",t),e.addFeature(t),CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js"),e.addMenuGroup("list",108),e.addMenuItems({numberedlist:{label:e.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:e.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}}),e.contextMenu.addListener(function(e){if(!e||e.isReadOnly())return null;for(;e;){var t=e.getName();if("ol"==t)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==t)return{bulletedlist:CKEDITOR.TRISTATE_OFF};e=e.getParent()}return null})}}},CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),function(){function e(e,t,n){return u(t)&&u(n)&&n.equals(t.getNext(function(e){return!(G(e)||X(e)||h(e))}))}function t(e){this.upper=e[0],this.lower=e[1],this.set.apply(this,e.slice(2))}function n(e){var t=e.element;if(t&&u(t)&&(t=t.getAscendant(e.triggers,!0))&&e.editable.contains(t)){var n=r(t);if("true"==n.getAttribute("contenteditable"))return t;if(n.is(e.triggers))return n}return null}function i(e,t,n){return I(e,t),I(e,n),e=t.size.bottom,n=n.size.top,e&&n?0|(e+n)/2:e||n}function o(e,t,n){return t=t[n?"getPrevious":"getNext"](function(t){return t&&t.type==CKEDITOR.NODE_TEXT&&!G(t)||u(t)&&!h(t)&&!d(e,t)})}function a(e,t,n){return e>t&&e<n}function r(e,t){if(e.data("cke-editable"))return null;for(t||(e=e.getParent());e&&!e.data("cke-editable");){if(e.hasAttribute("contenteditable"))return e;e=e.getParent()}return null}function s(e){var t=e.doc,n=K('<span contenteditable="false" style="'+j+"position:absolute;border-top:1px dashed "+e.boxColor+'"></span>',t),i=CKEDITOR.getUrl(this.path+"images/"+(y.hidpi?"hidpi/":"")+"icon"+(e.rtl?"-rtl":"")+".png");for(v(n,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(e.editable,!0),this},lineChildren:[v(K('<span title="'+e.editor.lang.magicline.title+'" contenteditable="false">&#8629;</span>',t),{base:j+"height:17px;width:17px;"+(e.rtl?"left":"right")+":17px;background:url("+i+") center no-repeat "+e.boxColor+";cursor:pointer;"+(y.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(y.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),v(K(V,t),{base:U+"left:0px;border-left-color:"+e.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),v(K(V,t),{base:U+"right:0px;border-right-color:"+e.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){return this.wrap.getParent()&&this.wrap.remove(),this},mouseNear:function(){I(e,this);var t=e.holdDistance,n=this.size;return!!(n&&a(e.mouse.y,n.top-t,n.bottom+t)&&a(e.mouse.x,n.left-t,n.right+t))},place:function(){var t=e.view,n=e.editable,i=e.trigger,o=i.upper,r=i.lower,s=o||r,l=s.getParent(),c={};this.trigger=i,o&&I(e,o,!0),r&&I(e,r,!0),I(e,l,!0),e.inInlineMode&&O(e,!0),l.equals(n)?(c.left=t.scroll.x,c.right=-t.scroll.x,c.width=""):(c.left=s.size.left-s.size.margin.left+t.scroll.x-(e.inInlineMode?t.editable.left+t.editable.border.left:0),c.width=s.size.outerWidth+s.size.margin.left+s.size.margin.right+t.scroll.x,c.right=""),o&&r?c.top=o.size.margin.bottom===r.size.margin.top?0|o.size.bottom+o.size.margin.bottom/2:o.size.margin.bottom<r.size.margin.top?o.size.bottom+o.size.margin.bottom:o.size.bottom+o.size.margin.bottom-r.size.margin.top:o?r||(c.top=o.size.bottom+o.size.margin.bottom):c.top=r.size.top-r.size.margin.top,i.is(L)||a(c.top,t.scroll.y-15,t.scroll.y+5)?(c.top=e.inInlineMode?0:t.scroll.y,this.look(L)):i.is(B)||a(c.top,t.pane.bottom-5,t.pane.bottom+15)?(c.top=e.inInlineMode?t.editable.height+t.editable.padding.top+t.editable.padding.bottom:t.pane.bottom-1,this.look(B)):(e.inInlineMode&&(c.top-=t.editable.top+t.editable.border.top),this.look(P)),e.inInlineMode&&(c.top--,c.top+=t.editable.scroll.top,c.left+=t.editable.scroll.left);for(var d in c)c[d]=CKEDITOR.tools.cssLength(c[d]);this.setStyles(c)},look:function(e){if(this.oldLook!=e){for(var t,n=this.lineChildren.length;n--;)(t=this.lineChildren[n]).setAttribute("style",t.base+t.looks[0|e/2]);this.oldLook=e}},wrap:new b("span",e.doc)}),t=n.lineChildren.length;t--;)n.lineChildren[t].appendTo(n);n.look(P),n.appendTo(n.wrap),n.unselectable(),n.lineChildren[0].on("mouseup",function(t){n.detach(),l(e,function(t){var n=e.line.trigger;t[n.is(S)?"insertBefore":"insertAfter"](n.is(S)?n.lower:n.upper)},!0),e.editor.focus(),y.ie||e.enterMode==CKEDITOR.ENTER_BR||e.hotNode.scrollIntoView(),t.data.preventDefault(!0)}),n.on("mousedown",function(e){e.data.preventDefault(!0)}),e.line=n}function l(e,t,n){var i,o=new CKEDITOR.dom.range(e.doc),a=e.editor;y.ie&&e.enterMode==CKEDITOR.ENTER_BR?i=e.doc.createText(F):(i=(i=r(e.element,!0))&&i.data("cke-enter-mode")||e.enterMode,i=new b(N[i],e.doc),i.is("br")||e.doc.createText(F).appendTo(i)),n&&a.fire("saveSnapshot"),t(i),o.moveToPosition(i,CKEDITOR.POSITION_AFTER_START),a.getSelection().selectRanges([o]),e.hotNode=i,n&&a.fire("saveSnapshot")}function c(e,t){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function i(n){var i=y.ie&&9>y.version?" ":F,o=e.hotNode&&e.hotNode.getText()==i&&e.element.equals(e.hotNode)&&e.lastCmdDirection===!!t;l(e,function(i){o&&e.hotNode&&e.hotNode.remove(),i[t?"insertAfter":"insertBefore"](n),i.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!t}),e.lastCmdDirection=!!t}),y.ie||e.enterMode==CKEDITOR.ENTER_BR||e.hotNode.scrollIntoView(),e.line.detach()}return function(a){a=a.getSelection().getStartElement();var s;if(a=a.getAscendant(q,1),!g(e,a)&&a&&!a.equals(e.editable)&&!a.contains(e.editable)){(s=r(a))&&"false"==s.getAttribute("contenteditable")&&(a=s),e.element=a,s=o(e,a,!t);var l;u(s)&&s.is(e.triggers)&&s.is(H)&&(!o(e,s,!t)||(l=o(e,s,!t))&&u(l)&&l.is(e.triggers))?i(s):(l=n(e,a),u(l)&&(o(e,l,!t)?(a=o(e,l,!t))&&u(a)&&a.is(e.triggers)&&i(l):i(l)))}}}()}}function d(e,t){if(!t||t.type!=CKEDITOR.NODE_ELEMENT||!t.$)return!1;var n=e.line;return n.wrap.equals(t)||n.wrap.contains(t)}function u(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.$}function h(e){if(!u(e))return!1;var t;return(t=f(e))||(u(e)?(t={left:1,right:1,center:1},t=!(!t[e.getComputedStyle("float")]&&!t[e.getAttribute("align")])):t=!1),t}function f(e){return!!{absolute:1,fixed:1}[e.getComputedStyle("position")]}function m(e,t){return u(t)?t.is(e.triggers):null}function g(e,t){if(!t)return!1;for(var n=t.getParents(1),i=n.length;i--;)for(var o=e.tabuList.length;o--;)if(n[i].hasAttribute(e.tabuList[o]))return!0;return!1}function E(e,t,n){return!!(t=t[n?"getLast":"getFirst"](function(t){return e.isRelevant(t)&&!t.is(M)}))&&(I(e,t),n?t.size.top>e.mouse.y:t.size.bottom<e.mouse.y)}function p(e){var n=e.editable,i=e.mouse,o=e.view,r=e.triggerOffset;O(e);var s=i.y>(e.inInlineMode?o.editable.top+o.editable.height/2:Math.min(o.editable.height,o.pane.height)/2),n=n[s?"getLast":"getFirst"](function(e){return!(G(e)||X(e))});return n?(d(e,n)&&(n=e.line.wrap[s?"getPrevious":"getNext"](function(e){return!(G(e)||X(e))})),u(n)&&!h(n)&&m(e,n)?(I(e,n),!s&&0<=n.size.top&&a(i.y,0,n.size.top+r)?(e=e.inInlineMode||0===o.scroll.y?L:P,new t([null,n,S,A,e])):s&&n.size.bottom<=o.pane.height&&a(i.y,n.size.bottom-r,o.pane.height)?(e=e.inInlineMode||a(n.size.bottom,o.pane.height-r,o.pane.height)?B:P,new t([n,null,w,A,e])):null):null):null}function T(e){var i=e.mouse,r=e.view,s=e.triggerOffset,l=n(e);if(!l)return null;I(e,l);var c,d,s=Math.min(s,0|l.size.outerHeight/2),f=[];if(a(i.y,l.size.top-1,l.size.top+s))d=!1;else{if(!a(i.y,l.size.bottom-s,l.size.bottom+1))return null;d=!0}if(h(l)||E(e,l,d)||l.getParent().is($))return null;var g=o(e,l,!d);if(g){if(g&&g.type==CKEDITOR.NODE_TEXT)return null;if(u(g)){if(h(g)||!m(e,g)||g.getParent().is($))return null;f=[g,l][d?"reverse":"concat"]().concat([x,A])}}else l.equals(e.editable[d?"getLast":"getFirst"](e.isRelevant))?(O(e),d&&a(i.y,l.size.bottom-s,r.pane.height)&&a(l.size.bottom,r.pane.height-s,r.pane.height)?c=B:a(i.y,0,l.size.top+s)&&(c=L)):c=P,f=[null,l][d?"reverse":"concat"]().concat([d?w:S,A,c,l.equals(e.editable[d?"getLast":"getFirst"](e.isRelevant))?d?B:L:P]);return 0 in f?new t(f):null}function C(e,t,n,i){for(var o=t.getDocumentPosition(),a={},r={},s={},l={},c=Z.length;c--;)a[Z[c]]=parseInt(t.getComputedStyle.call(t,"border-"+Z[c]+"-width"),10)||0,s[Z[c]]=parseInt(t.getComputedStyle.call(t,"padding-"+Z[c]),10)||0,r[Z[c]]=parseInt(t.getComputedStyle.call(t,"margin-"+Z[c]),10)||0;return n&&!i||D(e,i),l.top=o.y-(n?0:e.view.scroll.y),l.left=o.x-(n?0:e.view.scroll.x),l.outerWidth=t.$.offsetWidth,l.outerHeight=t.$.offsetHeight,l.height=l.outerHeight-(s.top+s.bottom+a.top+a.bottom),l.width=l.outerWidth-(s.left+s.right+a.left+a.right),l.bottom=l.top+l.outerHeight,l.right=l.left+l.outerWidth,e.inInlineMode&&(l.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),v({border:a,padding:s,margin:r,ignoreScroll:n},l,!0)}function I(e,t,n){if(!u(t))return t.size=null;if(t.size){if(t.size.ignoreScroll==n&&t.size.date>new Date-z)return null}else t.size={};return v(t.size,C(e,t,n),{date:+new Date},!0)}function O(e,t){e.view.editable=C(e,e.editable,t,!0)}function D(e,t){e.view||(e.view={});var n=e.view;if(!(!t&&n&&n.date>new Date-z)){var i=e.win,n=i.getScrollPosition(),i=i.getViewPaneSize();v(e.view,{scroll:{x:n.x,y:n.y,width:e.doc.$.documentElement.scrollWidth-i.width,height:e.doc.$.documentElement.scrollHeight-i.height},pane:{width:i.width,height:i.height,bottom:i.height+n.y},date:+new Date},!0)}}function R(e,n,i,o){for(var a=o,r=o,s=0,l=!1,c=!1,d=e.view.pane.height,u=e.mouse;u.y+s<d&&0<u.y-s&&(l||(l=n(a,o)),c||(c=n(r,o)),!l&&0<u.y-s&&(a=i(e,{x:u.x,y:u.y-s})),!c&&u.y+s<d&&(r=i(e,{x:u.x,y:u.y+s})),!l||!c);)s+=2;return new t([a,r,null,null])}CKEDITOR.plugins.add("magicline",{init:function(e){var i,a,r,m=e.config,E=m.magicline_triggerOffset||30,I={editor:e,enterMode:m.enterMode,triggerOffset:E,holdDistance:0|E*(m.magicline_holdDistance||.5),boxColor:m.magicline_color||"#ff0000",rtl:"rtl"==m.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(m.magicline_tabuList||[]),triggers:m.magicline_everywhere?q:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}};I.isRelevant=function(e){return u(e)&&!d(I,e)&&!h(e)},e.on("contentDom",function(){var u=e.editable(),h=e.document,E=e.window;v(I,{editable:u,inInlineMode:u.isInline(),doc:h,win:E,hotNode:null},!0),I.boundary=I.inInlineMode?I.editable:I.doc.getDocumentElement(),u.is(k.$inline)||(I.inInlineMode&&!f(u)&&u.setStyles({position:"relative",top:null,left:null}),s.call(this,I),D(I),u.attachListener(e,"beforeUndoImage",function(){I.line.detach()}),u.attachListener(e,"beforeGetData",function(){I.line.wrap.getParent()&&(I.line.detach(),e.once("getData",function(){I.line.attach()},null,null,1e3))},null,null,0),u.attachListener(I.inInlineMode?h:h.getWindow().getFrame(),"mouseout",function(t){if("wysiwyg"==e.mode)if(I.inInlineMode){var n=t.data.$.clientX;t=t.data.$.clientY,D(I),O(I,!0);var i=I.view.editable,o=I.view.scroll;n>i.left-o.x&&n<i.right-o.x&&t>i.top-o.y&&t<i.bottom-o.y||(clearTimeout(r),r=null,I.line.detach())}else clearTimeout(r),r=null,I.line.detach()}),u.attachListener(u,"keyup",function(){I.hiddenMode=0}),u.attachListener(u,"keydown",function(t){if("wysiwyg"==e.mode)switch(t.data.getKeystroke()){case 2228240:case 16:I.hiddenMode=1,I.line.detach()}}),u.attachListener(I.inInlineMode?u:h,"mousemove",function(t){if(a=!0,"wysiwyg"==e.mode&&!e.readOnly&&!r){var n={x:t.data.$.clientX,y:t.data.$.clientY};r=setTimeout(function(){I.mouse=n,r=I.trigger=null,D(I),a&&!I.hiddenMode&&e.focusManager.hasFocus&&!I.line.mouseNear()&&(I.element=W(I,!0))&&((I.trigger=p(I)||T(I)||Y(I))&&!g(I,I.trigger.upper||I.trigger.lower)?I.line.attach().place():(I.trigger=null,I.line.detach()),a=!1)},30)}}),u.attachListener(E,"scroll",function(){"wysiwyg"==e.mode&&(I.line.detach(),y.webkit&&(I.hiddenMode=1,clearTimeout(i),i=setTimeout(function(){I.mouseDown||(I.hiddenMode=0)},50)))}),u.attachListener(_?h:E,"mousedown",function(){"wysiwyg"==e.mode&&(I.line.detach(),I.hiddenMode=1,I.mouseDown=1)}),u.attachListener(_?h:E,"mouseup",function(){I.hiddenMode=0,I.mouseDown=0}),e.addCommand("accessPreviousSpace",c(I)),e.addCommand("accessNextSpace",c(I,!0)),e.setKeystroke([[m.magicline_keystrokePrevious,"accessPreviousSpace"],[m.magicline_keystrokeNext,"accessNextSpace"]]),e.on("loadSnapshot",function(){var t,n,i,o;for(o in{p:1,br:1,div:1})for(t=e.document.getElementsByTag(o),i=t.count();i--;)if((n=t.getItem(i)).data("cke-magicline-hot"))return I.hotNode=n,void(I.lastCmdDirection="true"===n.data("cke-magicline-dir"))}),this.backdoor={accessFocusSpace:l,boxTrigger:t,isLine:d,getAscendantTrigger:n,getNonEmptyNeighbour:o,getSize:C,that:I,triggerEdge:T,triggerEditable:p,triggerExpand:Y})},this)}});var v=CKEDITOR.tools.extend,b=CKEDITOR.dom.element,K=b.createFromHtml,y=CKEDITOR.env,_=CKEDITOR.env.ie&&9>CKEDITOR.env.version,k=CKEDITOR.dtd,N={},S=128,w=64,x=32,A=16,L=4,B=2,P=1,F="\xa0",$=k.$listItem,M=k.$tableContent,H=v({},k.$nonEditable,k.$empty),q=k.$block,z=100,j="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",U=j+"border-color:transparent;display:block;border-style:solid;",V="<span>"+F+"</span>";N[CKEDITOR.ENTER_BR]="br",N[CKEDITOR.ENTER_P]="p",N[CKEDITOR.ENTER_DIV]="div",t.prototype={set:function(e,t,n){return this.properties=e+t+(n||P),this},is:function(e){return(this.properties&e)==e}};var W=function(){function e(e,t){var n=e.$.elementFromPoint(t.x,t.y);return n&&n.nodeType?new CKEDITOR.dom.element(n):null}return function(t,n,i){if(!t.mouse)return null;var o=t.doc,a=t.line.wrap;i=i||t.mouse;var r=e(o,i);return n&&d(t,r)&&(a.hide(),r=e(o,i),a.show()),!r||r.type!=CKEDITOR.NODE_ELEMENT||!r.$||y.ie&&9>y.version&&!t.boundary.equals(r)&&!t.boundary.contains(r)?null:r}}(),G=CKEDITOR.dom.walker.whitespaces(),X=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),Y=function(){function t(t){var o,r,s,l=t.element;if(!u(l)||l.contains(t.editable)||l.isReadOnly())return null;if(s=R(t,function(e,t){return!t.equals(e)},function(e,t){return W(e,!0,t)},l),o=s.upper,r=s.lower,e(t,o,r))return s.set(x,8);if(o&&l.contains(o))for(;!o.getParent().equals(l);)o=o.getParent();else o=l.getFirst(function(e){return n(t,e)});if(r&&l.contains(r))for(;!r.getParent().equals(l);)r=r.getParent();else r=l.getLast(function(e){return n(t,e)});if(!o||!r)return null;if(I(t,o),I(t,r),!a(t.mouse.y,o.size.top,r.size.bottom))return null;for(var c,d,h,f,l=Number.MAX_VALUE;r&&!r.equals(o)&&(d=o.getNext(t.isRelevant));)c=Math.abs(i(t,o,d)-t.mouse.y),c<l&&(l=c,h=o,f=d),o=d,I(t,o);return h&&f&&a(t.mouse.y,h.size.top,f.size.bottom)?(s.upper=h,s.lower=f,s.set(x,8)):null}function n(e,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||X(t)||h(t)||d(e,t)||t.type==CKEDITOR.NODE_ELEMENT&&t.$&&t.is("br"))}return function(n){var i,o=t(n);if(i=o){i=o.upper;var a=o.lower;i=!(!i||!a||h(a)||h(i)||a.equals(i)||i.equals(a)||a.contains(i)||i.contains(a))&&!!(m(n,i)&&m(n,a)&&e(n,i,a))}return i?o:null}}(),Z=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function e(e){if(!e||e.type!=CKEDITOR.NODE_ELEMENT||"form"!=e.getName())return[];for(var t=[],n=["style","className"],i=0;i<n.length;i++){var o=e.$.elements.namedItem(n[i]);o&&(o=new CKEDITOR.dom.element(o),t.push([o,o.nextSibling]),o.remove())}return t}function t(e,t){if(e&&e.type==CKEDITOR.NODE_ELEMENT&&"form"==e.getName()&&0<t.length)for(var n=t.length-1;0<=n;n--){var i=t[n][0],o=t[n][1];o?i.insertBefore(o):i.appendTo(e)}}function n(n,i){var o=e(n),a={},r=n.$;return i||(a["class"]=r.className||"",r.className=""),a.inline=r.style.cssText||"",i||(r.style.cssText="position: static; overflow: visible"),t(o),a}function i(n,i){var o=e(n),a=n.$;"class"in i&&(a.className=i["class"]),"inline"in i&&(a.style.cssText=i.inline),t(o)}function o(e){if(!e.editable().isInline()){var t,n=CKEDITOR.instances;for(t in n){var i=n[t];"wysiwyg"!=i.mode||i.readOnly||(i=i.document.getBody(),i.setAttribute("contentEditable",!1),i.setAttribute("contentEditable",!0))}e.editable().hasFocus&&(e.toolbox.focus(),e.focus())}}CKEDITOR.plugins.add("maximize",{init:function(e){function t(){var t=d.getViewPaneSize();e.resize(t.width,t.height,null,!0)}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var a,r,s,l=e.lang,c=CKEDITOR.document,d=c.getWindow(),u=CKEDITOR.TRISTATE_OFF;e.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var h=e.container.getFirst(function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")}),f=e.ui.space("contents");if("wysiwyg"==e.mode){var m=e.getSelection();a=m&&m.getRanges(),r=d.getScrollPosition()}else{var g=e.editable().$;a=!CKEDITOR.env.ie&&[g.selectionStart,g.selectionEnd],r=[g.scrollLeft,g.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){for(d.on("resize",t),s=d.getScrollPosition(),m=e.container;m=m.getParent();)m.setCustomData("maximize_saved_styles",n(m)),m.setStyle("z-index",e.config.baseFloatZIndex-5);f.setCustomData("maximize_saved_styles",n(f,!0)),h.setCustomData("maximize_saved_styles",n(h,!0)),f={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0},c.getDocumentElement().setStyles(f),!CKEDITOR.env.gecko&&c.getDocumentElement().setStyle("position","fixed"),CKEDITOR.env.gecko&&CKEDITOR.env.quirks||c.getBody().setStyles(f),CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(0,0)},0):d.$.scrollTo(0,0),h.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute"),h.$.offsetLeft,h.setStyles({"z-index":e.config.baseFloatZIndex-5,left:"0px",top:"0px"}),h.addClass("cke_maximized"),t(),f=h.getDocumentPosition(),h.setStyles({left:-1*f.x+"px",top:-1*f.y+"px"}),CKEDITOR.env.gecko&&o(e)}else if(this.state==CKEDITOR.TRISTATE_ON){d.removeListener("resize",t);for(var m=[f,h],E=0;E<m.length;E++)i(m[E],m[E].getCustomData("maximize_saved_styles")),m[E].removeCustomData("maximize_saved_styles");for(m=e.container;m=m.getParent();)i(m,m.getCustomData("maximize_saved_styles")),m.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(s.x,s.y)},0):d.$.scrollTo(s.x,s.y),h.removeClass("cke_maximized"),CKEDITOR.env.webkit&&(h.setStyle("display","inline"),setTimeout(function(){h.setStyle("display","block")},0)),e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:f.$.offsetHeight,outerWidth:e.container.$.offsetWidth})}this.toggleState(),(m=this.uiItems[0])&&(f=this.state==CKEDITOR.TRISTATE_OFF?l.maximize.maximize:l.maximize.minimize,m=CKEDITOR.document.getById(m._.id),m.getChild(1).setHtml(f),m.setAttribute("title",f),m.setAttribute("href",'javascript:void("'+f+'");')),"wysiwyg"==e.mode?a?(CKEDITOR.env.gecko&&o(e),e.getSelection().selectRanges(a),(g=e.getSelection().getStartElement())&&g.scrollIntoView(!0)):d.$.scrollTo(r.x,r.y):(a&&(g.selectionStart=a[0],g.selectionEnd=a[1]),g.scrollLeft=r[0],g.scrollTop=r[1]),a=r=null,u=this.state,e.fire("maximize",this.state)},canUndo:!1}),e.ui.addButton&&e.ui.addButton("Maximize",{label:l.maximize.maximize,command:"maximize",toolbar:"tools,10"}),e.on("mode",function(){var t=e.getCommand("maximize");t.setState(t.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:u)},null,null,100)}}})}(),CKEDITOR.plugins.add("newpage",{init:function(e){e.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(e){var t=this;e.setData(e.config.newpage_html||"",function(){e.focus(),setTimeout(function(){e.fire("afterCommandExec",{name:"newpage",command:t}),e.selectionChange()},200)})},async:!0}),e.ui.addButton&&e.ui.addButton("NewPage",{label:e.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}}),function(){function e(e){return{"aria-label":e,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:e}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var e=("background:url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g," !important;");CKEDITOR.addCss("div.cke_pagebreak{"+e+"}")},init:function(e){e.blockless||(e.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),e.ui.addButton&&e.ui.addButton("PageBreak",{label:e.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&e.on("contentDom",function(){e.document.on("click",function(t){t=t.data.getTarget(),t.is("div")&&t.hasClass("cke_pagebreak")&&e.getSelection().selectElement(t)})}))},afterInit:function(t){function n(n){CKEDITOR.tools.extend(n.attributes,e(t.lang.pagebreak.alt),!0),n.children.length=0}var i=t.dataProcessor,o=i&&i.dataFilter,i=i&&i.htmlFilter,a=/page-break-after\s*:\s*always/i,r=/display\s*:\s*none/i;i&&i.addRules({attributes:{"class":function(e,t){var n=e.replace("cke_pagebreak","");if(n!=e){var i=CKEDITOR.htmlParser.fragment.fromHtml('<span style="display: none;">&nbsp;</span>').children[0];t.children.length=0,t.add(i),i=t.attributes,delete i["aria-label"],delete i.contenteditable,delete i.title}return n}}},{applyToAll:!0,priority:5}),o&&o.addRules({elements:{div:function(e){if(e.attributes["data-cke-pagebreak"])n(e);else if(a.test(e.attributes.style)){var t=e.children[0];t&&"span"==t.name&&r.test(t.attributes.style)&&n(e)}}}})}}),CKEDITOR.plugins.pagebreakCmd={exec:function(t){var n=t.document.createElement("div",{attributes:e(t.lang.pagebreak.alt)});t.insertElement(n)},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(e){return(e=e.parent)&&"div"==e.name&&e.styles&&e.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"}}(),function(){var e={canUndo:!1,async:!0,exec:function(t){t.getClipboardData({title:t.lang.pastetext.title},function(n){n&&t.fire("paste",{type:"text",dataValue:n.dataValue,method:"paste",dataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()}),t.fire("afterCommandExec",{name:"pastetext",command:e,returnValue:!!n})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(t){t.addCommand("pastetext",e),t.ui.addButton&&t.ui.addButton("PasteText",{label:t.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),t.config.forcePasteAsPlainText&&t.on("beforePaste",function(e){"html"!=e.data.type&&(e.data.type="text")}),t.on("pasteState",function(e){t.getCommand("pastetext").setState(e.data)})}})}(),function(){function e(e,t,n){var i=CKEDITOR.cleanWord;return i?n():(e=CKEDITOR.getUrl(e.config.pasteFromWordCleanupFile||t+"filter/default.js"),CKEDITOR.scriptLoader.load(e,n,null,!0)),!i}function t(e){e.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(n){var i=0,o=this.path;n.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(e){var n=this;i=1,e.once("beforePaste",t),e.getClipboardData({title:e.lang.pastefromword.title},function(t){t&&e.fire("paste",{type:"html",dataValue:t.dataValue,method:"paste",dataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()}),e.fire("afterCommandExec",{name:"pastefromword",command:n,returnValue:!!t})})}}),n.ui.addButton&&n.ui.addButton("PasteFromWord",{label:n.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"}),n.on("pasteState",function(e){n.getCommand("pastefromword").setState(e.data)}),n.on("paste",function(t){var a=t.data,r=a.dataValue;if(r&&(i||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(r))){a.dontFilter=!0;var s=e(n,o,function(){s?n.fire("paste",a):(!n.config.pasteFromWordPromptCleanup||i||confirm(n.lang.pastefromword.confirmCleanup))&&(a.dataValue=CKEDITOR.cleanWord(r,n)),i=0});s&&t.cancel()}},null,null,3)}})}(),function(){var e,t={modes:{wysiwyg:1,source:1},canUndo:!1,readOnly:1,exec:function(t){var n,i=t.config,o=i.baseHref?'<base href="'+i.baseHref+'"/>':"";if(i.fullPage)n=t.getData().replace(/<head>/,"$&"+o).replace(/[^>]*(?=<\/title>)/,"$& &mdash; "+t.lang.preview.preview);else{var i="<body ",a=t.document&&t.document.getBody();a&&(a.getAttribute("id")&&(i+='id="'+a.getAttribute("id")+'" '),a.getAttribute("class")&&(i+='class="'+a.getAttribute("class")+'" ')),i+=">",n=t.config.docType+'<html dir="'+t.config.contentsLangDirection+'"><head>'+o+"<title>"+t.lang.preview.preview+"</title>"+CKEDITOR.tools.buildStyleHtml(t.config.contentsCss)+"</head>"+i+t.getData()+"</body></html>"}o=640,i=420,a=80;try{var r=window.screen,o=Math.round(.8*r.width),i=Math.round(.7*r.height),a=Math.round(.1*r.width)}catch(e){}if(!1===t.fire("contentPreview",t={dataValue:n}))return!1;var s,r="";return CKEDITOR.env.ie&&(window._cke_htmlToLoad=t.dataValue,s="javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad = null;})() )",r=""),CKEDITOR.env.gecko&&(window._cke_htmlToLoad=t.dataValue,r=CKEDITOR.getUrl(e+"preview.html")),r=window.open(r,null,"toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width="+o+",height="+i+",left="+a),CKEDITOR.env.ie&&r&&(r.location=s),CKEDITOR.env.ie||CKEDITOR.env.gecko||(s=r.document,s.open(),s.write(t.dataValue),s.close()),!0}};CKEDITOR.plugins.add("preview",{init:function(n){n.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(e=this.path,n.addCommand("preview",t),n.ui.addButton&&n.ui.addButton("Preview",{label:n.lang.preview.preview,command:"preview",toolbar:"document,40"}))}})}(),CKEDITOR.plugins.add("print",{init:function(e){e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(e.addCommand("print",CKEDITOR.plugins.print),e.ui.addButton&&e.ui.addButton("Print",{label:e.lang.print.toolbar,command:"print",toolbar:"document,50"}))}}),CKEDITOR.plugins.print={exec:function(e){CKEDITOR.env.gecko?e.window.$.print():e.document.$.execCommand("Print")},canUndo:!1,readOnly:1,modes:{wysiwyg:1}},CKEDITOR.plugins.add("removeformat",{init:function(e){e.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat),e.ui.addButton&&e.ui.addButton("RemoveFormat",{label:e.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(e){for(var t,n=e._.removeFormatRegex||(e._.removeFormatRegex=new RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),i=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),o=CKEDITOR.plugins.removeformat.filter,a=e.getSelection().getRanges(),r=a.createIterator(),s=function(e){return e.type==CKEDITOR.NODE_ELEMENT};t=r.getNextRange();){t.collapsed||t.enlarge(CKEDITOR.ENLARGE_ELEMENT);var l=t.createBookmark(),c=l.startNode,d=l.endNode,u=function(t){for(var i,a=e.elementPath(t),r=a.elements,s=1;(i=r[s])&&!i.equals(a.block)&&!i.equals(a.blockLimit);s++)n.test(i.getName())&&o(e,i)&&t.breakParent(i)};if(u(c),d)for(u(d),c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);c&&!c.equals(d);)if(c.isReadOnly()){if(c.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;c=c.getNext(s)}else u=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==c.getName()&&c.data("cke-realelement")||!o(e,c)||(n.test(c.getName())?c.remove(1):(c.removeAttributes(i),e.fire("removeFormatCleanup",c))),c=u;t.moveToBookmark(l)}e.forceNextSelectionCheck(),e.getSelection().selectRanges(a)}}},filter:function(e,t){for(var n=e._.removeFormatFilters||[],i=0;i<n.length;i++)if(!1===n[i](t))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(e){this._.removeFormatFilters||(this._.removeFormatFilters=[]),this._.removeFormatFilters.push(e);
},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",function(){var e={readOnly:1,exec:function(e){if(e.fire("save")&&(e=e.element.$.form))try{e.submit()}catch(t){e.submit.click&&e.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(t){t.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t.addCommand("save",e).modes={wysiwyg:!!t.element.$.form},t.ui.addButton&&t.ui.addButton("Save",{label:t.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})}(),function(){CKEDITOR.plugins.add("selectall",{init:function(e){e.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(e){var t=e.editable();if(t.is("textarea"))e=t.$,CKEDITOR.env.ie?e.createTextRange().execCommand("SelectAll"):(e.selectionStart=0,e.selectionEnd=e.value.length),e.focus();else{if(t.is("body"))e.document.$.execCommand("SelectAll",!1,null);else{var n=e.createRange();n.selectNodeContents(t),n.select()}e.forceNextSelectionCheck(),e.selectionChange()}},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SelectAll",{label:e.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){var e={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(e){this.toggleState(),this.refresh(e)},refresh:function(e){if(e.document){var t=this.state!=CKEDITOR.TRISTATE_ON||e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!e.focusManager.hasFocus?"removeClass":"attachClass";e.editable()[t]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var e,t,n,i,o,a,r="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),s=CKEDITOR.getUrl(this.path),l=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),c=l?":not([contenteditable=false]):not(.cke_show_blocks_off)":"";for(e=t=n=i="";o=r.pop();)a=r.length?",":"",e+=".cke_show_blocks "+o+c+a,n+=".cke_show_blocks.cke_contents_ltr "+o+c+a,i+=".cke_show_blocks.cke_contents_rtl "+o+c+a,t+=".cke_show_blocks "+o+c+"{background-image:url("+CKEDITOR.getUrl(s+"images/block_"+o+".png")+")}";CKEDITOR.addCss((e+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(t,n+"{background-position:top left;padding-left:8px}",i+"{background-position:top right;padding-right:8px}")),l||CKEDITOR.addCss(".cke_show_blocks [contenteditable=false],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable=false],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable=false],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},init:function(t){function n(){i.refresh(t)}if(!t.blockless){var i=t.addCommand("showblocks",e);i.canUndo=!1,t.config.startupOutlineBlocks&&i.setState(CKEDITOR.TRISTATE_ON),t.ui.addButton&&t.ui.addButton("ShowBlocks",{label:t.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"}),t.on("mode",function(){i.state!=CKEDITOR.TRISTATE_DISABLED&&i.refresh(t)}),t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(t.on("focus",n),t.on("blur",n)),t.on("contentDom",function(){i.state!=CKEDITOR.TRISTATE_DISABLED&&i.refresh(t)})}}})}(),function(){var e={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(e){this.toggleState(),this.refresh(e)},refresh:function(e){if(e.document){var t=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";e.editable()[t]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var e;e=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,;.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,;.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,;.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders "),CKEDITOR.addCss(e)},init:function(t){var n=t.addCommand("showborders",e);n.canUndo=!1,!1!==t.config.startupShowBorders&&n.setState(CKEDITOR.TRISTATE_ON),t.on("mode",function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)},null,null,100),t.on("contentDom",function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)}),t.on("removeFormatCleanup",function(e){e=e.data,t.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||0>=parseInt(e.getAttribute("border"),10))&&e.addClass("cke_show_border")})},afterInit:function(e){var t=e.dataProcessor;e=t&&t.dataFilter,t=t&&t.htmlFilter,e&&e.addRules({elements:{table:function(e){e=e.attributes;var t=e["class"],n=parseInt(e.border,10);n&&!(0>=n)||t&&-1!=t.indexOf("cke_show_border")||(e["class"]=(t||"")+" cke_show_border")}}}),t&&t.addRules({elements:{table:function(e){e=e.attributes;var t=e["class"];t&&(e["class"]=t.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),CKEDITOR.on("dialogDefinition",function(e){var t=e.data.name;"table"!=t&&"tableProperties"!=t||(e=e.data.definition,t=e.getContents("info").get("txtBorder"),t.commit=CKEDITOR.tools.override(t.commit,function(e){return function(t,n){e.apply(this,arguments);var i=parseInt(this.getValue(),10);n[!i||0>=i?"addClass":"removeClass"]("cke_show_border")}}),(e=(e=e.getContents("advanced"))&&e.get("advCSSClasses"))&&(e.setup=CKEDITOR.tools.override(e.setup,function(e){return function(){e.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}}),e.commit=CKEDITOR.tools.override(e.commit,function(e){return function(t,n){e.apply(this,arguments),parseInt(n.getAttribute("border"),10)||n.addClass("cke_show_border")}})))})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function n(){var e=o&&this.equals(CKEDITOR.document.getActive());this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show(),e&&this.focus()}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var i=CKEDITOR.plugins.sourcearea;t.addMode("source",function(i){var o=t.ui.space("contents").getDocument().createElement("textarea");o.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",t.config.sourceAreaTabSize||4))),o.setAttribute("dir","ltr"),o.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu"),t.ui.space("contents").append(o),o=t.editable(new e(t,o)),o.setData(t.getData(1)),CKEDITOR.env.ie&&(o.attachListener(t,"resize",n,o),o.attachListener(CKEDITOR.document.getWindow(),"resize",n,o),CKEDITOR.tools.setTimeout(n,0,o)),t.fire("ariaWidget",this),i()}),t.addCommand("source",i.commands.source),t.ui.addButton&&t.ui.addButton("Source",{label:t.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"}),t.on("mode",function(){t.getCommand("source").setState("source"==t.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var o=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.status="ready",this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){e.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"==e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"==e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(e){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"),e.addCommand("specialchar",{exec:function(){var n=e.langCode,n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),function(){CKEDITOR.tools.extend(e.lang.specialchar,t.langEntries[n]),e.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SpecialChar",{label:e.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! &quot; # $ % &amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ &euro; &lsquo; &rsquo; &ldquo; &rdquo; &ndash; &mdash; &iexcl; &cent; &pound; &curren; &yen; &brvbar; &sect; &uml; &copy; &ordf; &laquo; &not; &reg; &macr; &deg; &sup2; &sup3; &acute; &micro; &para; &middot; &cedil; &sup1; &ordm; &raquo; &frac14; &frac12; &frac34; &iquest; &Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; &AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; &Igrave; &Iacute; &Icirc; &Iuml; &ETH; &Ntilde; &Ograve; &Oacute; &Ocirc; &Otilde; &Ouml; &times; &Oslash; &Ugrave; &Uacute; &Ucirc; &Uuml; &Yacute; &THORN; &szlig; &agrave; &aacute; &acirc; &atilde; &auml; &aring; &aelig; &ccedil; &egrave; &eacute; &ecirc; &euml; &igrave; &iacute; &icirc; &iuml; &eth; &ntilde; &ograve; &oacute; &ocirc; &otilde; &ouml; &divide; &oslash; &ugrave; &uacute; &ucirc; &uuml; &yacute; &thorn; &yuml; &OElig; &oelig; &#372; &#374 &#373 &#375; &sbquo; &#8219; &bdquo; &hellip; &trade; &#9658; &bull; &rarr; &rArr; &hArr; &diams; &asymp;".split(" "),CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",init:function(e){var t=this,n=CKEDITOR.plugins.scayt;this.bindEvents(e),this.parseConfig(e),this.addRule(e),CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js")),this.addMenuItems(e);var i=e.lang.scayt,o=CKEDITOR.env;e.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:i.text_title,title:e.plugins.wsc?e.lang.wsc.title:i.text_title,modes:{wysiwyg:!(o.ie&&(8>o.version||o.quirks))},toolbar:"spellchecker,20",refresh:function(){var t=e.ui.instances.Scayt.getState();e.scayt&&(t=n.state.scayt[e.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.fire("scaytButtonState",t)},onRender:function(){var t=this;e.on("scaytButtonState",function(e){void 0!==typeof e.data&&t.setState(e.data)})},onMenu:function(){var t=e.scayt;return e.getMenuItem("scaytToggle").label=e.lang.scayt[t&&n.state.scayt[e.name]?"btn_disable":"btn_enable"],t={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:e.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED},e.config.scayt_uiTabs[0]||delete t.scaytOptions,e.config.scayt_uiTabs[1]||delete t.scaytLangs,e.config.scayt_uiTabs[2]||delete t.scaytDict,t}}),e.contextMenu&&e.addMenuItems&&(e.contextMenu.addListener(function(){var n,i,o=e.scayt;return o&&(i=o.getSelectionNode())&&(n=t.menuGenerator(e,i),o.showBanner("."+e.contextMenu._.definition.panel.className.split(" ").join(" ."))),n}),e.contextMenu._.onHide=CKEDITOR.tools.override(e.contextMenu._.onHide,function(t){return function(){var n=e.scayt;return n&&n.hideBanner(),t.apply(this)}}))},addMenuItems:function(e){var t=this,n=CKEDITOR.plugins.scayt;e.addMenuGroup("scaytButton");for(var i=e.config.scayt_contextMenuItemsOrder.split("|"),o=0;o<i.length;o++)i[o]="scayt_"+i[o];if((i=["grayt_description","grayt_suggest","grayt_control"].concat(i))&&i.length)for(o=0;o<i.length;o++)e.addMenuGroup(i[o],o-10);e.addCommand("scaytToggle",{exec:function(e){var t=e.scayt;n.state.scayt[e.name]=!n.state.scayt[e.name],!0===n.state.scayt[e.name]?t||n.createScayt(e):t&&n.destroy(e)}}),e.addCommand("scaytAbout",{exec:function(e){e.scayt.tabToOpen="about",e.lockSelection(),e.openDialog(t.dialogName)}}),e.addCommand("scaytOptions",{exec:function(e){e.scayt.tabToOpen="options",e.lockSelection(),e.openDialog(t.dialogName)}}),e.addCommand("scaytLangs",{exec:function(e){e.scayt.tabToOpen="langs",e.lockSelection(),e.openDialog(t.dialogName)}}),e.addCommand("scaytDict",{exec:function(e){e.scayt.tabToOpen="dictionaries",e.lockSelection(),e.openDialog(t.dialogName)}}),i={scaytToggle:{label:e.lang.scayt.btn_enable,group:"scaytButton",command:"scaytToggle"},scaytAbout:{label:e.lang.scayt.btn_about,group:"scaytButton",command:"scaytAbout"},scaytOptions:{label:e.lang.scayt.btn_options,group:"scaytButton",command:"scaytOptions"},scaytLangs:{label:e.lang.scayt.btn_langs,group:"scaytButton",command:"scaytLangs"},scaytDict:{label:e.lang.scayt.btn_dictionaries,group:"scaytButton",command:"scaytDict"}},e.plugins.wsc&&(i.WSC={label:e.lang.wsc.toolbar,group:"scaytButton",onClick:function(){var t=CKEDITOR.plugins.scayt,n=e.scayt,i=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.container.getText():e.document.getBody().getText();(i=i.replace(/\s/g,""))?(n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!0),e.lockSelection(),e.execCommand("checkspell")):alert("Nothing to check!")}}),e.addMenuItems(i)},bindEvents:function(e){var t=CKEDITOR.plugins.scayt,n=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE,i=function(){t.destroy(e)},o=function(){!t.state.scayt[e.name]||e.readOnly||e.scayt||t.createScayt(e)},a=function(){var t=e.editable();t.attachListener(t,"focus",function(t){CKEDITOR.plugins.scayt&&!e.scayt&&setTimeout(o,0),t=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[e.name]&&e.scayt;var i,a;if((n||t)&&e._.savedSelection){t=e._.savedSelection.getSelectedElement(),t=!t&&e._.savedSelection.getRanges();for(var r=0;r<t.length;r++)a=t[r],"string"==typeof a.startContainer.$.nodeValue&&(i=a.startContainer.getText().length,(i<a.startOffset||i<a.endOffset)&&e.unlockSelection(!1))}},this,null,-10)},r=function(){n?e.config.scayt_inlineModeImmediateMarkup?o():(e.on("blur",function(){setTimeout(i,0)}),e.on("focus",o),e.focusManager.hasFocus&&o()):o(),a();var t=e.editable();t.attachListener(t,"mousedown",function(t){t=t.data.getTarget();var n=e.widgets&&e.widgets.getByElement(t);n&&(n.wrapper=t.getAscendant(function(e){return e.hasAttribute("data-cke-widget-wrapper")},!0))},this,null,-10)};e.on("contentDom",r),e.on("beforeCommandExec",function(n){var i=e.scayt,o=null,a=!1,r=!0;n.data.name in t.options.disablingCommandExec&&"wysiwyg"==e.mode?i&&(t.destroy(e),e.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)):"bold"!==n.data.name&&"italic"!==n.data.name&&"underline"!==n.data.name&&"strike"!==n.data.name&&"subscript"!==n.data.name&&"superscript"!==n.data.name&&"enter"!==n.data.name&&"cut"!==n.data.name&&"language"!==n.data.name||!i||("cut"===n.data.name&&(r=!1,a=!0),"language"===n.data.name&&(o=(o=e.plugins.language.getCurrentLangElement(e))&&o.$,a=!0),e.fire("reloadMarkupScayt",{removeOptions:{removeInside:r,forceBookmark:a,selectionNode:o},timeout:0}))}),e.on("beforeSetMode",function(n){"source"==n.data&&((n=e.scayt)&&(t.destroy(e),e.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)),e.document&&e.document.getBody().removeAttribute("_jquid"))}),e.on("afterCommandExec",function(t){"wysiwyg"!=e.mode||"undo"!=t.data.name&&"redo"!=t.data.name||setTimeout(function(){var t=e.scayt,n=t&&t.getScaytLangList();n&&n.ltr&&n.rtl&&t.fire("startSpellCheck, startGrammarCheck")},250)}),e.on("readOnly",function(n){var i;n&&(i=e.scayt,!0===n.editor.readOnly?i&&i.fire("removeMarkupInDocument",{}):i?i.fire("startSpellCheck, startGrammarCheck"):"wysiwyg"==n.editor.mode&&!0===t.state.scayt[n.editor.name]&&(t.createScayt(e),n.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)))}),e.on("beforeDestroy",i),e.on("setData",function(){i(),(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE||e.plugins.divarea)&&r()},this,null,50),e.on("reloadMarkupScayt",function(t){var n=t.data&&t.data.removeOptions;setTimeout(function(){var t=e.scayt,i=t&&t.getScaytLangList();i&&i.ltr&&i.rtl&&(e.document.fire("keydown",new CKEDITOR.dom.event({keyCode:37})),t.removeMarkupInSelectionNode(n),t.fire("startSpellCheck, startGrammarCheck"))},t.data&&t.data.timeout||0)}),e.on("insertElement",function(){e.fire("reloadMarkupScayt",{removeOptions:{forceBookmark:!0}})},this,null,50),e.on("insertHtml",function(){e.fire("reloadMarkupScayt")},this,null,50),e.on("insertText",function(){e.fire("reloadMarkupScayt")},this,null,50),e.on("scaytDialogShown",function(t){t.data.selectPage(e.scayt.tabToOpen)})},parseConfig:function(e){var t=CKEDITOR.plugins.scayt;if(t.replaceOldOptionsNames(e.config),"boolean"!=typeof e.config.scayt_autoStartup&&(e.config.scayt_autoStartup=!1),t.state.scayt[e.name]=e.config.scayt_autoStartup,"boolean"!=typeof e.config.grayt_autoStartup&&(e.config.grayt_autoStartup=!1),"boolean"!=typeof e.config.scayt_inlineModeImmediateMarkup&&(e.config.scayt_inlineModeImmediateMarkup=!1),t.state.grayt[e.name]=e.config.grayt_autoStartup,e.config.scayt_contextCommands||(e.config.scayt_contextCommands="ignore|ignoreall|add"),e.config.scayt_contextMenuItemsOrder||(e.config.scayt_contextMenuItemsOrder="suggest|moresuggest|control"),e.config.scayt_sLang||(e.config.scayt_sLang="en_US"),(void 0===e.config.scayt_maxSuggestions||"number"!=typeof e.config.scayt_maxSuggestions||0>e.config.scayt_maxSuggestions)&&(e.config.scayt_maxSuggestions=5),(void 0===e.config.scayt_minWordLength||"number"!=typeof e.config.scayt_minWordLength||1>e.config.scayt_minWordLength)&&(e.config.scayt_minWordLength=4),void 0!==e.config.scayt_customDictionaryIds&&"string"==typeof e.config.scayt_customDictionaryIds||(e.config.scayt_customDictionaryIds=""),void 0!==e.config.scayt_userDictionaryName&&"string"==typeof e.config.scayt_userDictionaryName||(e.config.scayt_userDictionaryName=null),"string"==typeof e.config.scayt_uiTabs&&3===e.config.scayt_uiTabs.split(",").length){var n=[],i=[];e.config.scayt_uiTabs=e.config.scayt_uiTabs.split(","),CKEDITOR.tools.search(e.config.scayt_uiTabs,function(e){1===Number(e)||0===Number(e)?(i.push(!0),n.push(Number(e))):i.push(!1)}),null===CKEDITOR.tools.search(i,!1)?e.config.scayt_uiTabs=n:e.config.scayt_uiTabs=[1,1,1]}else e.config.scayt_uiTabs=[1,1,1];if("string"!=typeof e.config.scayt_serviceProtocol&&(e.config.scayt_serviceProtocol=null),"string"!=typeof e.config.scayt_serviceHost&&(e.config.scayt_serviceHost=null),"string"!=typeof e.config.scayt_servicePort&&(e.config.scayt_servicePort=null),"string"!=typeof e.config.scayt_servicePath&&(e.config.scayt_servicePath=null),e.config.scayt_moreSuggestions||(e.config.scayt_moreSuggestions="on"),"string"!=typeof e.config.scayt_customerId&&(e.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2"),"string"!=typeof e.config.scayt_srcUrl&&(t=document.location.protocol,t=-1!=t.search(/https?:/)?t:"http:",e.config.scayt_srcUrl=t+"//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js"),"boolean"!=typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0),"boolean"!=typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0),CKEDITOR.config.scayt_handleUndoRedo=!!CKEDITOR.plugins.undo&&CKEDITOR.config.scayt_handleUndoRedo,"boolean"!=typeof e.config.scayt_multiLanguageMode&&(e.config.scayt_multiLanguageMode=!1),"object"!=typeof e.config.scayt_multiLanguageStyles&&(e.config.scayt_multiLanguageStyles={}),e.config.scayt_ignoreAllCapsWords&&"boolean"!=typeof e.config.scayt_ignoreAllCapsWords&&(e.config.scayt_ignoreAllCapsWords=!1),e.config.scayt_ignoreDomainNames&&"boolean"!=typeof e.config.scayt_ignoreDomainNames&&(e.config.scayt_ignoreDomainNames=!1),e.config.scayt_ignoreWordsWithMixedCases&&"boolean"!=typeof e.config.scayt_ignoreWordsWithMixedCases&&(e.config.scayt_ignoreWordsWithMixedCases=!1),e.config.scayt_ignoreWordsWithNumbers&&"boolean"!=typeof e.config.scayt_ignoreWordsWithNumbers&&(e.config.scayt_ignoreWordsWithNumbers=!1),e.config.scayt_disableOptionsStorage){var t=CKEDITOR.tools.isArray(e.config.scayt_disableOptionsStorage)?e.config.scayt_disableOptionsStorage:"string"==typeof e.config.scayt_disableOptionsStorage?[e.config.scayt_disableOptionsStorage]:void 0,o="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),a=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],r=CKEDITOR.tools.search,s=CKEDITOR.tools.indexOf;e.config.scayt_disableOptionsStorage=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],l=!!r(e,"options");if(!r(o,i)||l&&r(a,function(e){if("lang"===e)return!1}))return;if(r(a,i)&&a.splice(s(a,i),1),"all"===i||l&&r(e,"lang"))return[];"options"===i&&(a=["lang"])}return t=t.concat(a)}(t)}},addRule:function(e){var t=CKEDITOR.plugins.scayt,n=e.dataProcessor,i=n&&n.htmlFilter,o=e._.elementsPath&&e._.elementsPath.filters,n=n&&n.dataFilter,a=e.addRemoveFormatFilter,r=function(n){if(e.scayt&&(n.hasAttribute(t.options.data_attribute_name)||n.hasAttribute(t.options.problem_grammar_data_attribute)))return!1},s=function(n){var i=!0;return e.scayt&&(n.hasAttribute(t.options.data_attribute_name)||n.hasAttribute(t.options.problem_grammar_data_attribute))&&(i=!1),i};o&&o.push(r),n&&n.addRules({elements:{span:function(e){var n=e.hasClass(t.options.misspelled_word_class)&&e.attributes[t.options.data_attribute_name],i=e.hasClass(t.options.problem_grammar_class)&&e.attributes[t.options.problem_grammar_data_attribute];return t&&(n||i)&&delete e.name,e}}}),i&&i.addRules({elements:{span:function(e){var n=e.hasClass(t.options.misspelled_word_class)&&e.attributes[t.options.data_attribute_name],i=e.hasClass(t.options.problem_grammar_class)&&e.attributes[t.options.problem_grammar_data_attribute];return t&&(n||i)&&delete e.name,e}}}),a&&a.call(e,s)},scaytMenuDefinition:function(e){var t=this;return e=e.scayt,{scayt:{scayt_ignore:{label:e.getLocal("btn_ignore"),group:"scayt_control",order:1,exec:function(e){e.scayt.ignoreWord()}},scayt_ignoreall:{label:e.getLocal("btn_ignoreAll"),group:"scayt_control",order:2,exec:function(e){e.scayt.ignoreAllWords()}},scayt_add:{label:e.getLocal("btn_addWord"),group:"scayt_control",order:3,exec:function(e){var t=e.scayt;setTimeout(function(){t.addWordToUserDictionary()},10)}},scayt_option:{label:e.getLocal("btn_options"),group:"scayt_control",order:4,exec:function(e){e.scayt.tabToOpen="options",e.lockSelection(),e.openDialog(t.dialogName)},verification:function(e){return 1==e.config.scayt_uiTabs[0]}},scayt_language:{label:e.getLocal("btn_langs"),group:"scayt_control",order:5,exec:function(e){e.scayt.tabToOpen="langs",e.lockSelection(),e.openDialog(t.dialogName)},verification:function(e){return 1==e.config.scayt_uiTabs[1]}},scayt_dictionary:{label:e.getLocal("btn_dictionaries"),group:"scayt_control",order:6,exec:function(e){e.scayt.tabToOpen="dictionaries",e.lockSelection(),e.openDialog(t.dialogName)},verification:function(e){return 1==e.config.scayt_uiTabs[2]}},scayt_about:{label:e.getLocal("btn_about"),group:"scayt_control",order:7,exec:function(e){e.scayt.tabToOpen="about",e.lockSelection(),e.openDialog(t.dialogName)}}},grayt:{grayt_problemdescription:{label:"Grammar problem description",group:"grayt_description",order:1,state:CKEDITOR.TRISTATE_DISABLED,exec:function(){}},grayt_ignore:{label:e.getLocal("btn_ignore"),group:"grayt_control",order:2,exec:function(e){e.scayt.ignorePhrase()}}}}},buildSuggestionMenuItems:function(e,t,n){var i={},o={},a=n?"word":"phrase",r=n?"startGrammarCheck":"startSpellCheck",s=e.scayt;if(0<t.length&&"no_any_suggestions"!==t[0])if(n)for(n=0;n<t.length;n++){var l="scayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[n].replace(" ","_");e.addCommand(l,this.createCommand(CKEDITOR.plugins.scayt.suggestions[n],a,r)),n<e.config.scayt_maxSuggestions?(e.addMenuItem(l,{label:t[n],command:l,group:"scayt_suggest",order:n+1}),i[l]=CKEDITOR.TRISTATE_OFF):(e.addMenuItem(l,{label:t[n],command:l,group:"scayt_moresuggest",order:n+1}),o[l]=CKEDITOR.TRISTATE_OFF,"on"===e.config.scayt_moreSuggestions&&(e.addMenuItem("scayt_moresuggest",{label:s.getLocal("btn_moreSuggestions"),group:"scayt_moresuggest",order:10,getItems:function(){return o}}),i.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(n=0;n<t.length;n++)l="grayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[n].replace(" ","_"),e.addCommand(l,this.createCommand(CKEDITOR.plugins.scayt.suggestions[n],a,r)),e.addMenuItem(l,{label:t[n],command:l,group:"grayt_suggest",order:n+1}),i[l]=CKEDITOR.TRISTATE_OFF;else i.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,e.addCommand("no_scayt_suggest",{exec:function(){}}),e.addMenuItem("no_scayt_suggest",{label:s.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0});return i},menuGenerator:function(e,t){var n,i,o=e.scayt,a=this.scaytMenuDefinition(e),r={},s=e.config.scayt_contextCommands.split("|"),l=t.getAttribute(o.getLangAttribute())||o.getLang();if(n=o.isScaytNode(t),i=o.isGraytNode(t),n?(a=a.scayt,r=t.getAttribute(o.getScaytNodeAttributeName()),o.fire("getSuggestionsList",{lang:l,word:r}),r=this.buildSuggestionMenuItems(e,CKEDITOR.plugins.scayt.suggestions,n)):i&&(a=a.grayt,r=t.getAttribute(o.getGraytNodeAttributeName()),i=o.getProblemDescriptionText(r,l),a.grayt_problemdescription&&i&&(a.grayt_problemdescription.label=i),o.fire("getGrammarSuggestionsList",{lang:l,phrase:r}),r=this.buildSuggestionMenuItems(e,CKEDITOR.plugins.scayt.suggestions,n)),n&&"off"==e.config.scayt_contextCommands)return r;for(var c in a)n&&-1==CKEDITOR.tools.indexOf(s,c.replace("scayt_",""))&&"all"!=e.config.scayt_contextCommands||(r[c]="undefined"!=typeof a[c].state?a[c].state:CKEDITOR.TRISTATE_OFF,"function"!=typeof a[c].verification||a[c].verification(e)||delete r[c],e.addCommand(c,{exec:a[c].exec}),e.addMenuItem(c,{label:e.lang.scayt[a[c].label]||a[c].label,command:c,group:a[c].group,order:a[c].order}));return r},createCommand:function(e,t,n){return{exec:function(i){i=i.scayt;var o={};o[t]=e,i.replaceSelectionNode(o),"startGrammarCheck"===n&&i.removeMarkupInSelectionNode({grammarOnly:!0}),i.fire(n)}}}}),CKEDITOR.plugins.scayt={state:{scayt:{},grayt:{}},suggestions:[],loadingHelper:{loadOrder:[]},isLoading:!1,options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:"data-scayt-word",misspelled_word_class:"scayt-misspell-word",problem_grammar_data_attribute:"data-grayt-phrase",problem_grammar_class:"gramm-problem"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},replaceOldOptionsNames:function(e){for(var t in e)t in this.backCompatibilityMap&&(e[this.backCompatibilityMap[t]]=e[t],delete e[t])},createScayt:function(e){var t=this,n=CKEDITOR.plugins.scayt;this.loadScaytLibrary(e,function(e){var i=e.window&&e.window.getFrame()||e.editable();i?(i={lang:e.config.scayt_sLang,container:i.$,customDictionary:e.config.scayt_customDictionaryIds,userDictionaryName:e.config.scayt_userDictionaryName,localization:e.langCode,customer_id:e.config.scayt_customerId,debug:e.config.scayt_debug,data_attribute_name:t.options.data_attribute_name,misspelled_word_class:t.options.misspelled_word_class,problem_grammar_data_attribute:t.options.problem_grammar_data_attribute,problem_grammar_class:t.options.problem_grammar_class,"options-to-restore":e.config.scayt_disableOptionsStorage,focused:e.editable().hasFocus,ignoreElementsRegex:e.config.scayt_elementsToIgnore,minWordLength:e.config.scayt_minWordLength,multiLanguageMode:e.config.scayt_multiLanguageMode,multiLanguageStyles:e.config.scayt_multiLanguageStyles,graytAutoStartup:n.state.grayt[e.name]},e.config.scayt_serviceProtocol&&(i.service_protocol=e.config.scayt_serviceProtocol),e.config.scayt_serviceHost&&(i.service_host=e.config.scayt_serviceHost),e.config.scayt_servicePort&&(i.service_port=e.config.scayt_servicePort),e.config.scayt_servicePath&&(i.service_path=e.config.scayt_servicePath),"boolean"==typeof e.config.scayt_ignoreAllCapsWords&&(i["ignore-all-caps-words"]=e.config.scayt_ignoreAllCapsWords),"boolean"==typeof e.config.scayt_ignoreDomainNames&&(i["ignore-domain-names"]=e.config.scayt_ignoreDomainNames),"boolean"==typeof e.config.scayt_ignoreWordsWithMixedCases&&(i["ignore-words-with-mixed-cases"]=e.config.scayt_ignoreWordsWithMixedCases),"boolean"==typeof e.config.scayt_ignoreWordsWithNumbers&&(i["ignore-words-with-numbers"]=e.config.scayt_ignoreWordsWithNumbers),i=new SCAYT.CKSCAYT(i,function(){},function(){}),i.subscribe("suggestionListSend",function(e){for(var t={},n=[],i=0;i<e.suggestionList.length;i++)t["word_"+e.suggestionList[i]]||(t["word_"+e.suggestionList[i]]=e.suggestionList[i],n.push(e.suggestionList[i]));CKEDITOR.plugins.scayt.suggestions=n}),i.subscribe("selectionIsChanged",function(){e.getSelection().isLocked&&e.lockSelection()}),i.subscribe("graytStateChanged",function(t){n.state.grayt[e.name]=t.state}),e.scayt=i,e.fire("scaytButtonState",e.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)):n.state.scayt[e.name]=!1})},destroy:function(e){e.scayt&&e.scayt.destroy(),delete e.scayt,e.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(e,t){var n,i,o=this;this.loadingHelper[e.name]||("undefined"==typeof window.SCAYT||"function"!=typeof window.SCAYT.CKSCAYT?(this.loadingHelper[e.name]=t,this.loadingHelper.loadOrder.push(e.name),n=new Date,n=n.getTime(),i=e.config.scayt_srcUrl,i+=0<=i.indexOf("?")?"":"?"+n,this.loadingHelper.ckscaytLoading||(CKEDITOR.scriptLoader.load(i,function(e){if(e){CKEDITOR.fireOnce("scaytReady");for(var t=0;t<o.loadingHelper.loadOrder.length;t++)e=o.loadingHelper.loadOrder[t],"function"==typeof o.loadingHelper[e]&&o.loadingHelper[e](CKEDITOR.instances[e]),delete o.loadingHelper[e];o.loadingHelper.loadOrder=[]}}),this.loadingHelper.ckscaytLoading=!0)):window.SCAYT&&"function"==typeof window.SCAYT.CKSCAYT&&(CKEDITOR.fireOnce("scaytReady"),e.scayt||"function"==typeof t&&t(e)))}},CKEDITOR.on("dialogDefinition",function(e){var t=e.data.name;e=e.data.definition.dialog,"scaytDialog"===t&&e.on("cancel",function(){return!1},this,null,-1),"checkspell"===t&&e.on("cancel",function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!1),e.unlockSelection()},this,null,-2),"link"===t&&e.on("ok",function(e){var t=e.sender&&e.sender.getParentEditor();t&&setTimeout(function(){t.fire("reloadMarkupScayt",{removeOptions:{removeInside:!0,forceBookmark:!0},timeout:0})},0)})}),CKEDITOR.on("scaytReady",function(){if(!0===CKEDITOR.config.scayt_handleCheckDirty){var e=CKEDITOR.editor.prototype;e.checkDirty=CKEDITOR.tools.override(e.checkDirty,function(e){return function(){var t=null,n=this.scayt;if(CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt){if(t="ready"==this.status)var i=n.removeMarkupFromString(this.getSnapshot()),n=n.removeMarkupFromString(this._.previousValue),t=t&&n!==i}else t=e.call(this);return t}}),e.resetDirty=CKEDITOR.tools.override(e.resetDirty,function(e){return function(){var t=this.scayt;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=t.removeMarkupFromString(this.getSnapshot()):e.call(this)}})}if(!0===CKEDITOR.config.scayt_handleUndoRedo){var e=CKEDITOR.plugins.undo.Image.prototype,t="function"==typeof e.equalsContent?"equalsContent":"equals";e[t]=CKEDITOR.tools.override(e[t],function(e){return function(t){var n=t.editor.scayt,i=this.contents,o=t.contents,a=null;return CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[t.editor.name]&&t.editor.scayt&&(this.contents=n.removeMarkupFromString(i)||"",t.contents=n.removeMarkupFromString(o)||""),a=e.apply(this,arguments),this.contents=i,t.contents=o,a}})}}),function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(e){var t=e.config,n=e.lang.stylescombo,i={},o=[],a=[];e.on("stylesSet",function(n){if(n=n.data.styles){for(var r,s,l,c=0,d=n.length;c<d;c++)r=n[c],e.blockless&&r.element in CKEDITOR.dtd.$block||(s=r.name,r=new CKEDITOR.style(r),e.filter.customConfig&&!e.filter.check(r))||(r._name=s,
r._.enterMode=t.enterMode,r._.type=l=r.assignedTo||r.type,r._.weight=c+1e3*(l==CKEDITOR.STYLE_OBJECT?1:l==CKEDITOR.STYLE_BLOCK?2:3),i[s]=r,o.push(r),a.push(r));o.sort(function(e,t){return e._.weight-t._.weight})}}),e.ui.addRichCombo("Styles",{label:n.label,title:n.panelTitle,toolbar:"styles,10",allowedContent:a,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(t.contentsCss),multiSelect:!0,attributes:{"aria-label":n.panelTitle}},init:function(){var e,t,i,a,r,s;for(r=0,s=o.length;r<s;r++)e=o[r],t=e._name,a=e._.type,a!=i&&(this.startGroup(n["panelTitle"+String(a)]),i=a),this.add(t,e.type==CKEDITOR.STYLE_OBJECT?t:e.buildPreview(),t);this.commit()},onClick:function(t){e.focus(),e.fire("saveSnapshot"),t=i[t];var n=e.elementPath();e[t.checkActive(n,e)?"removeStyle":"applyStyle"](t),e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",function(t){var n=this.getValue();t=t.data.path.elements;for(var o,a=0,r=t.length;a<r;a++){o=t[a];for(var s in i)if(i[s].checkElementRemovable(o,!0,e))return void(s!=n&&this.setValue(s))}this.setValue("")},this)},onOpen:function(){var t=e.getSelection().getSelectedElement(),t=e.elementPath(t),o=[0,0,0,0];this.showAll(),this.unmarkAll();for(var a in i){var r=i[a],s=r._.type;r.checkApplicable(t,e,e.activeFilter)?o[s]++:this.hideItem(a),r.checkActive(t,e)&&this.mark(a)}o[CKEDITOR.STYLE_BLOCK]||this.hideGroup(n["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]),o[CKEDITOR.STYLE_INLINE]||this.hideGroup(n["panelTitle"+String(CKEDITOR.STYLE_INLINE)]),o[CKEDITOR.STYLE_OBJECT]||this.hideGroup(n["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var t=e.elementPath();if(t){for(var n in i)if(i[n].checkApplicable(t,e,e.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){i={},o=[]}})}})}(),function(){function e(e){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(t){if(t.editable().hasFocus){var n,i=t.getSelection();if(n=new CKEDITOR.dom.elementPath(i.getCommonAncestor(),i.root).contains({td:1,th:1},1)){var i=t.createRange(),o=CKEDITOR.tools.tryThese(function(){var t=n.getParent().$.cells[n.$.cellIndex+(e?-1:1)];return t.parentNode.parentNode,t},function(){var t=n.getParent(),t=t.getAscendant("table").$.rows[t.$.rowIndex+(e?-1:1)];return t.cells[e?t.cells.length-1:0]});if(o||e){if(!o)return!0;o=new CKEDITOR.dom.element(o),i.moveToElementEditStart(o),i.checkStartOfBlock()&&i.checkEndOfBlock()||i.selectNodeContents(o)}else{for(var a=n.getAscendant("table").$,o=n.getParent().$.cells,a=new CKEDITOR.dom.element(a.insertRow(-1),t.document),r=0,s=o.length;r<s;r++)a.append(new CKEDITOR.dom.element(o[r],t.document).clone(!1,!1)).appendBogus();i.moveToElementEditStart(a)}return i.select(!0),!0}}return!1}}}var t={editorFocus:!1,modes:{wysiwyg:1,source:1}},n={exec:function(e){e.container.focusNext(!0,e.tabIndex)}},i={exec:function(e){e.container.focusPrevious(!0,e.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(o){for(var a=!1!==o.config.enableTabKeyTools,r=o.config.tabSpaces||0,s="";r--;)s+="\xa0";s&&o.on("key",function(e){9==e.data.keyCode&&(o.insertText(s),e.cancel())}),a&&o.on("key",function(e){(9==e.data.keyCode&&o.execCommand("selectNextCell")||e.data.keyCode==CKEDITOR.SHIFT+9&&o.execCommand("selectPreviousCell"))&&e.cancel()}),o.addCommand("blur",CKEDITOR.tools.extend(n,t)),o.addCommand("blurBack",CKEDITOR.tools.extend(i,t)),o.addCommand("selectNextCell",e()),o.addCommand("selectPreviousCell",e(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(e,t){var n,i,o,a,r,s,l=void 0===t?this.getTabIndex():t;if(0>=l)for(r=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);r;){if(r.isVisible()&&0===r.getTabIndex()){o=r;break}r=r.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(r=this.getDocument().getBody().getFirst();r=r.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&r.equals(this)){if(i=!0,e){if(!(r=r.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(r)&&(n=1);if(r.isVisible()&&!(0>(s=r.getTabIndex()))){if(n&&s==l){o=r;break}s>l&&(!o||!a||s<a)?(o=r,a=s):o||0!==s||(o=r,a=s)}}o&&o.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,t){for(var n,i,o,a,r=void 0===t?this.getTabIndex():t,s=0,l=this.getDocument().getBody().getLast();l=l.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&l.equals(this)){if(i=!0,e){if(!(l=l.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(l)&&(n=1);if(l.isVisible()&&!(0>(a=l.getTabIndex())))if(0>=r){if(n&&0===a){o=l;break}a>s&&(o=l,s=a)}else{if(n&&a==r){o=l;break}a<r&&(!o||a>s)&&(o=l,s=a)}}o&&o.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var n=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"]]})),e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",t())),e.addCommand("tableDelete",t({exec:function(e){var t=e.elementPath().contains("table",1);if(t){var n=t.getParent(),i=e.editable();1!=n.getChildCount()||n.is("td","th")||n.equals(i)||(t=n),e=e.createRange(),e.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),e.select()}}})),e.ui.addButton&&e.ui.addButton("Table",{label:n.toolbar,command:"table",toolbar:"insert,30"}),CKEDITOR.dialog.add("table",this.path+"dialogs/table.js"),CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js"),e.addMenuItems&&e.addMenuItems({table:{label:n.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:n.deleteTable,command:"tableDelete",group:"table",order:1}}),e.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")}),e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(e){function t(e){0<n.length||e.type!=CKEDITOR.NODE_ELEMENT||!h.test(e.getName())||e.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(i,e,"selected_cell",!0),n.push(e))}e=e.getRanges();for(var n=[],i={},o=0;o<e.length;o++){var a=e[o];if(a.collapsed)a=a.getCommonAncestor(),(a=a.getAscendant("td",!0)||a.getAscendant("th",!0))&&n.push(a);else{var r,a=new CKEDITOR.dom.walker(a);for(a.guard=t;r=a.next();)r.type==CKEDITOR.NODE_ELEMENT&&r.is(CKEDITOR.dtd.table)||(r=r.getAscendant("td",!0)||r.getAscendant("th",!0))&&!r.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(i,r,"selected_cell",!0),n.push(r))}}return CKEDITOR.dom.element.clearAllMarkers(i),n}function t(t,n){for(var i=e(t),o=i[0],a=o.getAscendant("table"),o=o.getDocument(),r=i[0].getParent(),s=r.$.rowIndex,i=i[i.length-1],l=i.getParent().$.rowIndex+i.$.rowSpan-1,i=new CKEDITOR.dom.element(a.$.rows[l]),s=n?s:l,r=n?r:i,i=CKEDITOR.tools.buildTableMap(a),a=i[s],s=n?i[s-1]:i[s+1],i=i[0].length,o=o.createElement("tr"),l=0;a[l]&&l<i;l++){var c;1<a[l].rowSpan&&s&&a[l]==s[l]?(c=a[l],c.rowSpan+=1):(c=new CKEDITOR.dom.element(a[l]).clone(),c.removeAttribute("rowSpan"),c.appendBogus(),o.append(c),c=c.$),l+=c.colSpan-1}n?o.insertBefore(r):o.insertAfter(r)}function n(t){if(t instanceof CKEDITOR.dom.selection){var i=e(t),o=i[0].getAscendant("table"),a=CKEDITOR.tools.buildTableMap(o);t=i[0].getParent().$.rowIndex;for(var i=i[i.length-1],r=i.getParent().$.rowIndex+i.$.rowSpan-1,i=[],s=t;s<=r;s++){for(var l=a[s],c=new CKEDITOR.dom.element(o.$.rows[s]),d=0;d<l.length;d++){var u=new CKEDITOR.dom.element(l[d]),h=u.getParent().$.rowIndex;1==u.$.rowSpan?u.remove():(--u.$.rowSpan,h==s&&(h=a[s+1],h[d-1]?u.insertAfter(new CKEDITOR.dom.element(h[d-1])):new CKEDITOR.dom.element(o.$.rows[s+1]).append(u,1))),d+=u.$.colSpan-1}i.push(c)}for(a=o.$.rows,o=new CKEDITOR.dom.element(a[r+1]||(0<t?a[t-1]:null)||o.$.parentNode),s=i.length;0<=s;s--)n(i[s]);return o}return t instanceof CKEDITOR.dom.element&&(o=t.getAscendant("table"),1==o.$.rows.length?o.remove():t.remove()),null}function i(e,t){for(var n=t?1/0:0,i=0;i<e.length;i++){var o;o=e[i];for(var a=t,r=o.getParent().$.cells,s=0,l=0;l<r.length;l++){var c=r[l],s=s+(a?1:c.colSpan);if(c==o.$)break}o=s-1,(t?o<n:o>n)&&(n=o)}return n}function o(t,n){for(var o=e(t),a=o[0].getAscendant("table"),r=i(o,1),o=i(o),r=n?r:o,s=CKEDITOR.tools.buildTableMap(a),a=[],o=[],l=s.length,c=0;c<l;c++)a.push(s[c][r]),o.push(n?s[c][r-1]:s[c][r+1]);for(c=0;c<l;c++)a[c]&&(1<a[c].colSpan&&o[c]==a[c]?(r=a[c],r.colSpan+=1):(r=new CKEDITOR.dom.element(a[c]).clone(),r.removeAttribute("colSpan"),r.appendBogus(),r[n?"insertBefore":"insertAfter"].call(r,new CKEDITOR.dom.element(a[c])),r=r.$),c+=r.rowSpan-1)}function a(e,t){var n=e.getStartElement();if(n=n.getAscendant("td",1)||n.getAscendant("th",1)){var i=n.clone();i.appendBogus(),t?i.insertBefore(n):i.insertAfter(n)}}function r(t){if(t instanceof CKEDITOR.dom.selection){t=e(t);var n,i=t[0]&&t[0].getAscendant("table");e:{var o=0;n=t.length-1;for(var a,l,c={};a=t[o++];)CKEDITOR.dom.element.setMarker(c,a,"delete_cell",!0);for(o=0;a=t[o++];)if((l=a.getPrevious())&&!l.getCustomData("delete_cell")||(l=a.getNext())&&!l.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(c),n=l;break e}CKEDITOR.dom.element.clearAllMarkers(c),l=t[0].getParent(),(l=l.getPrevious())?n=l.getLast():(l=t[n].getParent(),n=(l=l.getNext())?l.getChild(0):null)}for(l=t.length-1;0<=l;l--)r(t[l]);n?s(n,!0):i&&i.remove()}else t instanceof CKEDITOR.dom.element&&(i=t.getParent(),1==i.getChildCount()?i.remove():t.remove())}function s(e,t){var n=e.getDocument(),i=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(i.focus(),n.focus()),n=new CKEDITOR.dom.range(n),n["moveToElementEdit"+(t?"End":"Start")](e)||(n.selectNodeContents(e),n.collapse(!t)),n.select(!0)}function l(e,t,n){if(e=e[t],"undefined"==typeof n)return e;for(t=0;e&&t<e.length;t++){if(n.is&&e[t]==n.$)return t;if(t==n)return new CKEDITOR.dom.element(e[t])}return n.is?-1:null}function c(t,n,i){var o,a=e(t);if((n?1!=a.length:2>a.length)||(o=t.getCommonAncestor())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("table"))return!1;var r;t=a[0],o=t.getAscendant("table");var s=CKEDITOR.tools.buildTableMap(o),c=s.length,d=s[0].length,u=t.getParent().$.rowIndex,h=l(s,u,t);if(n){var f;try{var m=parseInt(t.getAttribute("rowspan"),10)||1;r=parseInt(t.getAttribute("colspan"),10)||1,f=s["up"==n?u-m:"down"==n?u+m:u]["left"==n?h-r:"right"==n?h+r:h]}catch(e){return!1}if(!f||t.$==f)return!1;a["up"==n||"left"==n?"unshift":"push"](new CKEDITOR.dom.element(f))}n=t.getDocument();var g=u,m=f=0,E=!i&&new CKEDITOR.dom.documentFragment(n),p=0;for(n=0;n<a.length;n++){r=a[n];var T=r.getParent(),C=r.getFirst(),I=r.$.colSpan,O=r.$.rowSpan,T=T.$.rowIndex,D=l(s,T,r),p=p+I*O,m=Math.max(m,D-h+I);f=Math.max(f,T-u+O),i||(I=r,(O=I.getBogus())&&O.remove(),I.trim(),r.getChildren().count()&&(T==g||!C||C.isBlockBoundary&&C.isBlockBoundary({br:1})||(g=E.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!g||g.is&&g.is("br")||E.append("br")),r.moveChildren(E)),n?r.remove():r.setHtml("")),g=T}if(i)return f*m==p;for(E.moveChildren(t),t.appendBogus(),m>=d?t.removeAttribute("rowSpan"):t.$.rowSpan=f,f>=c?t.removeAttribute("colSpan"):t.$.colSpan=m,i=new CKEDITOR.dom.nodeList(o.$.rows),a=i.count(),n=a-1;0<=n;n--)o=i.getItem(n),o.$.cells.length||(o.remove(),a++);return t}function d(t,n){var i=e(t);if(1<i.length)return!1;if(n)return!0;var o,i=i[0],a=i.getParent(),r=a.getAscendant("table"),s=CKEDITOR.tools.buildTableMap(r),c=a.$.rowIndex,d=l(s,c,i),u=i.$.rowSpan;if(1<u){o=Math.ceil(u/2);for(var h,u=Math.floor(u/2),a=c+o,r=new CKEDITOR.dom.element(r.$.rows[a]),s=l(s,a),a=i.clone(),c=0;c<s.length;c++){if(h=s[c],h.parentNode==r.$&&c>d){a.insertBefore(new CKEDITOR.dom.element(h));break}h=null}h||r.append(a)}else for(u=o=1,r=a.clone(),r.insertAfter(a),r.append(a=i.clone()),h=l(s,c),d=0;d<h.length;d++)h[d].rowSpan++;return a.appendBogus(),i.$.rowSpan=o,a.$.rowSpan=u,1==o&&i.removeAttribute("rowSpan"),1==u&&a.removeAttribute("rowSpan"),a}function u(t,n){var i=e(t);if(1<i.length)return!1;if(n)return!0;var i=i[0],o=i.getParent(),a=o.getAscendant("table"),a=CKEDITOR.tools.buildTableMap(a),r=l(a,o.$.rowIndex,i),s=i.$.colSpan;if(1<s)o=Math.ceil(s/2),s=Math.floor(s/2);else{for(var s=o=1,c=[],d=0;d<a.length;d++){var u=a[d];c.push(u[r]),1<u[r].rowSpan&&(d+=u[r].rowSpan-1)}for(a=0;a<c.length;a++)c[a].colSpan++}return a=i.clone(),a.insertAfter(i),a.appendBogus(),i.$.colSpan=o,a.$.colSpan=s,1==o&&i.removeAttribute("colSpan"),1==s&&a.removeAttribute("colSpan"),a}var h=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(i){function l(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function h(e,t){var n=i.addCommand(e,t);i.addFeature(n)}var f=i.lang.table;h("cellProperties",new CKEDITOR.dialogCommand("cellProperties",l({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table"}))),CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js"),h("rowDelete",l({requiredContent:"table",exec:function(e){e=e.getSelection(),s(n(e))}})),h("rowInsertBefore",l({requiredContent:"table",exec:function(e){e=e.getSelection(),t(e,!0)}})),h("rowInsertAfter",l({requiredContent:"table",exec:function(e){e=e.getSelection(),t(e)}})),h("columnDelete",l({requiredContent:"table",exec:function(t){t=t.getSelection(),t=e(t);var n=t[0],i=t[t.length-1];t=n.getAscendant("table");for(var o,a,r=CKEDITOR.tools.buildTableMap(t),l=[],c=0,d=r.length;c<d;c++)for(var u=0,h=r[c].length;u<h;u++)r[c][u]==n.$&&(o=u),r[c][u]==i.$&&(a=u);for(c=o;c<=a;c++)for(u=0;u<r.length;u++)i=r[u],n=new CKEDITOR.dom.element(t.$.rows[u]),i=new CKEDITOR.dom.element(i[c]),i.$&&(1==i.$.colSpan?i.remove():--i.$.colSpan,u+=i.$.rowSpan-1,n.$.cells.length||l.push(n));a=t.$.rows[0]&&t.$.rows[0].cells,o=new CKEDITOR.dom.element(a[o]||(o?a[o-1]:t.$.parentNode)),l.length==d&&t.remove(),o&&s(o,!0)}})),h("columnInsertBefore",l({requiredContent:"table",exec:function(e){e=e.getSelection(),o(e,!0)}})),h("columnInsertAfter",l({requiredContent:"table",exec:function(e){e=e.getSelection(),o(e)}})),h("cellDelete",l({requiredContent:"table",exec:function(e){e=e.getSelection(),r(e)}})),h("cellMerge",l({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(e){s(c(e.getSelection()),!0)}})),h("cellMergeRight",l({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){s(c(e.getSelection(),"right"),!0)}})),h("cellMergeDown",l({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){s(c(e.getSelection(),"down"),!0)}})),h("cellVerticalSplit",l({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){s(u(e.getSelection()))}})),h("cellHorizontalSplit",l({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){s(d(e.getSelection()))}})),h("cellInsertBefore",l({requiredContent:"table",exec:function(e){e=e.getSelection(),a(e,!0)}})),h("cellInsertAfter",l({requiredContent:"table",exec:function(e){e=e.getSelection(),a(e)}})),i.addMenuItems&&i.addMenuItems({tablecell:{label:f.cell.menu,group:"tablecell",order:1,getItems:function(){var t=i.getSelection(),n=e(t);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:c(t,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:c(t,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:c(t,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:u(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:d(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<n.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:f.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:f.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:f.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:f.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:f.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:f.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:f.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:f.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:f.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:f.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:f.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:f.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:f.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:f.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:f.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:f.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:f.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),i.contextMenu&&i.contextMenu.addListener(function(e,t,n){return(e=n.contains({td:1,th:1},1))&&!e.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:e},CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e){e=e.$.rows;for(var t=-1,n=[],i=0;i<e.length;i++){t++,!n[t]&&(n[t]=[]);for(var o=-1,a=0;a<e[i].cells.length;a++){var r=e[i].cells[a];for(o++;n[t][o];)o++;for(var s=isNaN(r.colSpan)?1:r.colSpan,r=isNaN(r.rowSpan)?1:r.rowSpan,l=0;l<r;l++){n[t+l]||(n[t+l]=[]);for(var c=0;c<s;c++)n[t+l][o+c]=e[i].cells[a]}o+=s-1}}return n},function(){var e=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],t={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(t){function i(e){r.enabled&&!1!==e.data.command.canUndo&&r.save()}function o(){r.enabled=!t.readOnly&&"wysiwyg"==t.mode,r.onChange()}var r=t.undoManager=new n(t),s=r.editingHandler=new a(r),l=t.addCommand("undo",{exec:function(){r.undo()&&(t.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),c=t.addCommand("redo",{exec:function(){r.redo()&&(t.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});t.setKeystroke([[e[0],"undo"],[e[1],"redo"],[e[2],"redo"]]),r.onChange=function(){l.setState(r.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),c.setState(r.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},t.on("beforeCommandExec",i),t.on("afterCommandExec",i),t.on("saveSnapshot",function(e){r.save(e.data&&e.data.contentOnly)}),t.on("contentDom",s.attachListeners,s),t.on("instanceReady",function(){t.fire("saveSnapshot")}),t.on("beforeModeUnload",function(){"wysiwyg"==t.mode&&r.save(!0)}),t.on("mode",o),t.on("readOnly",o),t.ui.addButton&&(t.ui.addButton("Undo",{label:t.lang.undo.undo,command:"undo",toolbar:"undo,10"}),t.ui.addButton("Redo",{label:t.lang.undo.redo,command:"redo",toolbar:"undo,20"})),t.resetUndo=function(){r.reset(),t.fire("saveSnapshot")},t.on("updateSnapshot",function(){r.currentImage&&r.update()}),t.on("lockSnapshot",function(e){e=e.data,r.lock(e&&e.dontUpdate,e&&e.forceUpdate)}),t.on("unlockSnapshot",r.unlock,r)}}),CKEDITOR.plugins.undo={};var n=CKEDITOR.plugins.undo.UndoManager=function(e){this.strokesRecorded=[0,0],this.locked=null,this.previousKeyGroup=-1,this.limit=e.config.undoStackSize||20,this.strokesLimit=25,this.editor=e,this.reset()};n.prototype={type:function(e,t){var i=n.getKeyGroup(e),o=this.strokesRecorded[i]+1;t=t||o>=this.strokesLimit,this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()),t?(o=0,this.editor.fire("saveSnapshot")):this.editor.fire("change"),this.strokesRecorded[i]=o,this.previousKeyGroup=i},keyGroupChanged:function(e){return n.getKeyGroup(e)!=this.previousKeyGroup},reset:function(){this.snapshots=[],this.index=-1,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.strokesRecorded=[0,0],this.typing=!1,this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,t,n){var o=this.editor;if(this.locked||"ready"!=o.status||"wysiwyg"!=o.mode)return!1;var a=o.editable();if(!a||"ready"!=a.status)return!1;if(a=this.snapshots,t||(t=new i(o)),!1===t.contents)return!1;if(this.currentImage)if(t.equalsContent(this.currentImage)){if(e||t.equalsSelection(this.currentImage))return!1}else!1!==n&&o.fire("change");return a.splice(this.index+1,a.length-this.index-1),a.length==this.limit&&a.shift(),this.index=a.push(t)-1,this.currentImage=t,!1!==n&&this.refreshState(),!0},restoreImage:function(e){var t,n=this.editor;e.bookmarks&&(n.focus(),t=n.getSelection()),this.locked={level:999},this.editor.loadSnapshot(e.contents),e.bookmarks?t.selectBookmarks(e.bookmarks):CKEDITOR.env.ie&&(t=this.editor.document.getBody().$.createTextRange(),t.collapse(!0),t.select()),this.locked=null,this.index=e.index,this.currentImage=this.snapshots[this.index],this.update(),this.refreshState(),n.fire("change")},getNextImage:function(e){var t,n=this.snapshots,i=this.currentImage;if(i)if(e){for(t=this.index-1;0<=t;t--)if(e=n[t],!i.equalsContent(e))return e.index=t,e}else for(t=this.index+1;t<n.length;t++)if(e=n[t],!i.equalsContent(e))return e.index=t,e;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var e=this.getNextImage(!0);if(e)return this.restoreImage(e),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var e=this.getNextImage(!1);if(e)return this.restoreImage(e),!0}return!1},update:function(e){if(!this.locked){e||(e=new i(this.editor));for(var t=this.index,n=this.snapshots;0<t&&this.currentImage.equalsContent(n[t-1]);)--t;n.splice(t,this.index-t+1,e),this.index=t,this.currentImage=e}},updateSelection:function(e){if(!this.snapshots.length)return!1;var t=this.snapshots,n=t[t.length-1];return!(!n.equalsContent(e)||n.equalsSelection(e))&&(this.currentImage=t[t.length-1]=e,!0)},lock:function(e,t){if(this.locked)this.locked.level++;else if(e)this.locked={level:1};else{var n=null;if(t)n=!0;else{var o=new i(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(o)&&(n=o)}this.locked={update:n,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var e=this.locked.update;if(this.locked=null,!0===e)this.update();else if(e){var t=new i(this.editor,!0);e.equalsContent(t)||this.update()}}}},n.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1},n.keyGroups={PRINTABLE:0,FUNCTIONAL:1},n.isNavigationKey=function(e){return!!n.navigationKeyCodes[e]},n.getKeyGroup=function(e){var i=n.keyGroups;return t[e]?i.FUNCTIONAL:i.PRINTABLE},n.getOppositeKeyGroup=function(e){var t=n.keyGroups;return e==t.FUNCTIONAL?t.PRINTABLE:t.FUNCTIONAL},n.ieFunctionalKeysBug=function(e){return CKEDITOR.env.ie&&n.getKeyGroup(e)==n.keyGroups.FUNCTIONAL};var i=CKEDITOR.plugins.undo.Image=function(e,t){this.editor=e,e.fire("beforeUndoImage");var n=e.getSnapshot();CKEDITOR.env.ie&&n&&(n=n.replace(/\s+data-cke-expando=".*?"/g,"")),this.contents=n,t||(this.bookmarks=(n=n&&e.getSelection())&&n.createBookmarks2(!0)),e.fire("afterUndoImage")},o=/\b(?:href|src|name)="[^"]*?"/gi;i.prototype={equalsContent:function(e){var t=this.contents;return e=e.contents,CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(t=t.replace(o,""),e=e.replace(o,"")),t==e},equalsSelection:function(e){var t=this.bookmarks;if(e=e.bookmarks,t||e){if(!t||!e||t.length!=e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],o=e[n];if(i.startOffset!=o.startOffset||i.endOffset!=o.endOffset||!CKEDITOR.tools.arrayCompare(i.start,o.start)||!CKEDITOR.tools.arrayCompare(i.end,o.end))return!1}}return!0}};var a=CKEDITOR.plugins.undo.NativeEditingHandler=function(e){this.undoManager=e,this.ignoreInputEvent=!1,this.keyEventsStack=new r,this.lastKeydownImage=null};a.prototype={onKeydown:function(t){var o=t.data.getKey();229!==o&&(-1<CKEDITOR.tools.indexOf(e,t.data.getKeystroke())?t.data.preventDefault():(this.keyEventsStack.cleanUp(t),t=this.undoManager,this.keyEventsStack.getLast(o)||this.keyEventsStack.push(o),this.lastKeydownImage=new i(t.editor),(n.isNavigationKey(o)||this.undoManager.keyGroupChanged(o))&&(t.strokesRecorded[0]||t.strokesRecorded[1])&&(t.save(!1,this.lastKeydownImage,!1),t.resetType())))},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var e=this.keyEventsStack.getLast();e||(e=this.keyEventsStack.push(0)),this.keyEventsStack.increment(e.keyCode),this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(e.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(e){var t=this.undoManager;e=e.data.getKey();var o=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(e),n.ieFunctionalKeysBug(e)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new i(t.editor,!0))||(0<o?t.type(e):n.isNavigationKey(e)&&this.onNavigationKey(!0))},onNavigationKey:function(e){var t=this.undoManager;!e&&t.save(!0,null,!1)||t.updateSelection(new i(t.editor)),t.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},attachListeners:function(){var e=this.undoManager.editor,t=e.editable(),i=this;t.attachListener(t,"keydown",function(e){i.onKeydown(e),n.ieFunctionalKeysBug(e.data.getKey())&&i.onInput()},null,null,999),t.attachListener(t,CKEDITOR.env.ie?"keypress":"input",i.onInput,i,null,999),t.attachListener(t,"keyup",i.onKeyup,i,null,999),t.attachListener(t,"paste",i.ignoreInputEventListener,i,null,999),t.attachListener(t,"drop",i.ignoreInputEventListener,i,null,999),t.attachListener(t.isInline()?t:e.document.getDocumentElement(),"click",function(){i.onNavigationKey()},null,null,999),t.attachListener(this.undoManager.editor,"blur",function(){i.keyEventsStack.remove(9)},null,null,999)}};var r=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};r.prototype={push:function(e){return e=this.stack.push({keyCode:e,inputs:0}),this.stack[e-1]},getLastIndex:function(e){if("number"!=typeof e)return this.stack.length-1;for(var t=this.stack.length;t--;)if(this.stack[t].keyCode==e)return t;return-1},getLast:function(e){return e=this.getLastIndex(e),-1!=e?this.stack[e]:null},increment:function(e){this.getLast(e).inputs++},remove:function(e){e=this.getLastIndex(e),-1!=e&&this.stack.splice(e,1)},resetInputs:function(e){if("number"==typeof e)this.getLast(e).inputs=0;else for(e=this.stack.length;e--;)this.stack[e].inputs=0},getTotalInputs:function(){for(var e=this.stack.length,t=0;e--;)t+=this.stack[e].inputs;return t},cleanUp:function(e){e=e.data.$,e.ctrlKey||e.metaKey||this.remove(17),e.shiftKey||this.remove(16),e.altKey||this.remove(18)}}}(),CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(e){e.config.wsc_onFinish="function"==typeof e.config.wsc_onFinish?e.config.wsc_onFinish:function(){},e.config.wsc_onClose="function"==typeof e.config.wsc_onClose?e.config.wsc_onClose:function(){}},parseConfig:function(e){e.config.wsc_customerId=e.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",e.config.wsc_customDictionaryIds=e.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"",e.config.wsc_userDictionaryName=e.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"",e.config.wsc_customLoaderScript=e.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript,CKEDITOR.config.wsc_cmd=e.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell",CKEDITOR.config.wsc_version="v4.3.0-master-d769233",CKEDITOR.config.wsc_removeGlobalVariable=!0},init:function(e){var t=CKEDITOR.env;this.parseConfig(e),this.parseApi(e),e.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!(CKEDITOR.env.opera||CKEDITOR.env.air||document.domain!=window.location.hostname||t.ie&&(8>t.version||t.quirks))},"undefined"==typeof e.plugins.scayt&&e.ui.addButton&&e.ui.addButton("SpellChecker",{label:e.lang.wsc.toolbar,click:function(e){var t=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.container.getText():e.document.getBody().getText();(t=t.replace(/\s/g,""))?e.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"}),CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}}),CKEDITOR.config.plugins="dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,div,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc",CKEDITOR.config.skin="moono",function(){var e=function(e,t){var n=CKEDITOR.getUrl("plugins/"+t);e=e.split(",");for(var i=0;i<e.length;i++)CKEDITOR.skin.icons[e[i]]={path:n,offset:-e[++i],bgsize:e[++i]}};CKEDITOR.env.hidpi?e("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,creatediv,480,,find-rtl,504,,find,528,,replace,552,,flash,576,,button,600,,checkbox,624,,form,648,,hiddenfield,672,,imagebutton,696,,radio,720,,select-rtl,744,,select,768,,textarea-rtl,792,,textarea,816,,textfield-rtl,840,,textfield,864,,horizontalrule,888,,iframe,912,,image,936,,indent-rtl,960,,indent,984,,outdent-rtl,1008,,outdent,1032,,smiley,1056,,justifyblock,1080,,justifycenter,1104,,justifyleft,1128,,justifyright,1152,,language,1176,,anchor-rtl,1200,,anchor,1224,,link,1248,,unlink,1272,,bulletedlist-rtl,1296,,bulletedlist,1320,,numberedlist-rtl,1344,,numberedlist,1368,,maximize,1392,,newpage-rtl,1416,,newpage,1440,,pagebreak-rtl,1464,,pagebreak,1488,,pastetext-rtl,1512,,pastetext,1536,,pastefromword-rtl,1560,,pastefromword,1584,,preview-rtl,1608,,preview,1632,,print,1656,,removeformat,1680,,save,1704,,selectall,1728,,showblocks-rtl,1752,,showblocks,1776,,source-rtl,1800,,source,1824,,specialchar,1848,,scayt,1872,,table,1896,,redo-rtl,1920,,redo,1944,,undo-rtl,1968,,undo,1992,,spellchecker,2016,","icons_hidpi.png"):e("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,creatediv,480,auto,find-rtl,504,auto,find,528,auto,replace,552,auto,flash,576,auto,button,600,auto,checkbox,624,auto,form,648,auto,hiddenfield,672,auto,imagebutton,696,auto,radio,720,auto,select-rtl,744,auto,select,768,auto,textarea-rtl,792,auto,textarea,816,auto,textfield-rtl,840,auto,textfield,864,auto,horizontalrule,888,auto,iframe,912,auto,image,936,auto,indent-rtl,960,auto,indent,984,auto,outdent-rtl,1008,auto,outdent,1032,auto,smiley,1056,auto,justifyblock,1080,auto,justifycenter,1104,auto,justifyleft,1128,auto,justifyright,1152,auto,language,1176,auto,anchor-rtl,1200,auto,anchor,1224,auto,link,1248,auto,unlink,1272,auto,bulletedlist-rtl,1296,auto,bulletedlist,1320,auto,numberedlist-rtl,1344,auto,numberedlist,1368,auto,maximize,1392,auto,newpage-rtl,1416,auto,newpage,1440,auto,pagebreak-rtl,1464,auto,pagebreak,1488,auto,pastetext-rtl,1512,auto,pastetext,1536,auto,pastefromword-rtl,1560,auto,pastefromword,1584,auto,preview-rtl,1608,auto,preview,1632,auto,print,1656,auto,removeformat,1680,auto,save,1704,auto,selectall,1728,auto,showblocks-rtl,1752,auto,showblocks,1776,auto,source-rtl,1800,auto,source,1824,auto,specialchar,1848,auto,scayt,1872,auto,table,1896,auto,redo-rtl,1920,auto,redo,1944,auto,undo-rtl,1968,auto,undo,1992,auto,spellchecker,2016,auto","icons.png");
}(),CKEDITOR.lang.languages={af:1,sq:1,ar:1,eu:1,bn:1,bs:1,bg:1,ca:1,"zh-cn":1,zh:1,hr:1,cs:1,da:1,nl:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,et:1,fo:1,fi:1,fr:1,"fr-ca":1,gl:1,ka:1,de:1,"de-ch":1,el:1,gu:1,he:1,hi:1,hu:1,is:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lv:1,lt:1,mk:1,ms:1,mn:1,no:1,nb:1,fa:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sr:1,"sr-latn":1,si:1,sk:1,sl:1,es:1,sv:1,tt:1,th:1,tr:1,ug:1,uk:1,vi:1,cy:1}}}();