web/assets/libs/ckeditor/4.6.7/ckeditor.js
(开头部分) 64KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
define("ckeditor/4.6.7/ckeditor",[],function(){!function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,t={timestamp:"F0UE",version:"4.4.7",revision:"3a35b3d",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+=(e.indexOf("?")>=0?"&":"?")+"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(n){}}function t(){for(var e;e=n.shift();)e()}var n=[];return function(t){function i(){try{document.documentElement.doScroll("left")}catch(t){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);var o=!1;try{o=!window.frameElement}catch(r){}document.documentElement.doScroll&&o&&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=CKEDITOR.event.prototype;for(var n in t)null==e[n]&&(e[n]=t[n])},CKEDITOR.event.prototype=function(){function e(e){var i=t(this);return i[e]||(i[e]=new n(e))}var t=function(e){var t=e.getPrivate&&e.getPrivate()||e._||(e._={});return t.events||(t.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,r){function a(e,r,a,l){var c={name:t,sender:this,editor:e,data:r,listenerData:o,stop:a,cancel:l,removeListener:s},d=n.call(i,c);return d===!1?!1:c.data}function s(){d.removeListener(t,n)}var l=e.call(this,t);if(l.getListenerIndex(n)<0){var c=l.listeners;i||(i=this),isNaN(r)&&(r=10);var d=this;a.fn=n,a.priority=r;for(var u=c.length-1;u>=0;u--)if(c[u].priority<=r)return c.splice(u+1,0,a),{removeListener:s};c.unshift(a)}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(r,a,s){var l=t(this)[r],c=e,d=i;if(e=i=0,l){var u=l.listeners;if(u.length){u=u.slice(0);for(var h,f=0;f<u.length;f++){if(l.errorProof)try{h=u[f].call(this,s,a,n,o)}catch(m){}else h=u[f].call(this,s,a,n,o);if(h===!1?i=1:"undefined"!=typeof h&&(a=h),e||i)break}}}var E=i?!1:"undefined"==typeof a?!0:a;return e=c,i=d,E}}(),fireOnce:function(e,n,i){var o=this.fire(e,n,i);return delete t(this)[e],o},removeListener:function(e,n){var i=t(this)[e];if(i){var o=i.getListenerIndex(n);o>=0&&i.listeners.splice(o,1)}},removeAllListeners:function(){var e=t(this);for(var n in e)delete e[n]},hasListeners:function(e){var n=t(this)[e];return n&&n.listeners.length>0}}}()),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={ie:e.indexOf("trident/")>-1,webkit:e.indexOf(" applewebkit/")>-1,air:e.indexOf(" adobeair/")>-1,mac:e.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode&&(!document.documentMode||document.documentMode<10),mobile:e.indexOf("mobile")>-1,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};t.gecko="Gecko"==navigator.product&&!t.webkit&&!t.ie,t.webkit&&(e.indexOf("chrome")>-1?t.chrome=!0:t.safari=!0);var n=0;if(t.ie&&(n=t.quirks||!document.documentMode?parseFloat(e.match(/msie (\d+)/)[1]):document.documentMode,t.ie9Compat=9==n,t.ie8Compat=8==n,t.ie7Compat=7==n,t.ie6Compat=7>n||t.quirks),t.gecko){var i=e.match(/rv:([\d\.]+)/);i&&(i=i[1].split("."),n=1e4*i[0]+100*(i[1]||0)+1*(i[2]||0))}return t.air&&(n=parseFloat(e.match(/ adobeair\/(\d+)/)[1])),t.webkit&&(n=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),t.version=n,t.isCompatible=t.iOS&&n>=534||!t.mobile&&(t.ie&&n>6||t.gecko&&n>=2e4||t.air&&n>=1||t.webkit&&n>=522||!1),t.hidpi=window.devicePixelRatio>=2,t.needsBrFiller=t.gecko||t.webkit||t.ie&&n>10,t.needsNbspFiller=t.ie&&11>n,t.cssClass="cke_browser_"+(t.ie?"ie":t.gecko?"gecko":t.webkit?"webkit":"unknown"),t.quirks&&(t.cssClass+=" cke_browser_quirks"),t.ie&&(t.cssClass+=" cke_browser_ie"+(t.quirks?"6 cke_browser_iequirks":t.version)),t.air&&(t.cssClass+=" cke_browser_air"),t.iOS&&(t.cssClass+=" cke_browser_ios"),t.hidpi&&(t.cssClass+=" cke_hidpi"),t}()),"unloaded"==CKEDITOR.status&&!function(){CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)return void(CKEDITOR.loadFullCore._load=1);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){var t=this._.pending||(this._.pending=[]);t.push(e)},function(){var e=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.domReady(e)}(),CKEDITOR.status="basic_loaded"}(),CKEDITOR.dom={},function(){var e=[],t=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",n=/&/g,i=/>/g,o=/</g,r=/"/g,a=/&/g,s=/>/g,l=/</g,c=/"/g;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},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)return e;if(e.nodeType||e.window===e)return e;t=new e.constructor;for(var i in e){var o=e[i];t[i]=CKEDITOR.tools.clone(o)}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;i>o;o++){var r=arguments[o];for(var a in r)(t===!0||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){if(i)return t+e+":"+n+";"+e+":"+n;var o={};return o[e]=n,o[t+e]=n,o},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])&&n.push(/@import|[{}]/.test(t)?"<style>"+t+"</style>":'<link type="text/css" rel=stylesheet href="'+t+'">');return n.join("")},htmlEncode:function(e){return String(e).replace(n,"&").replace(i,">").replace(o,"<")},htmlDecode:function(e){return e.replace(a,"&").replace(s,">").replace(l,"<")},htmlEncodeAttr:function(e){return e.replace(r,""").replace(o,"<").replace(i,">")},htmlDecodeAttr:function(e){return e.replace(c,'"').replace(l,"<").replace(s,">")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},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;i>n;n++)if(t(e[n]))return n}else{if(e.indexOf)return e.indexOf(t);for(n=0,i=e.length;i>n;n++)if(e[n]===t)return n}return-1},search:function(e,t){var n=CKEDITOR.tools.indexOf(e,t);return n>=0?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,r=e.statics;if(!t&&(t=function(){n&&this.base.apply(this,arguments)}),i){var a=t;t=function(){var e=this._||(this._={});for(var t in i){var n=i[t];e[t]="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),r&&this.extend(t,r,!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 new Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;n>t;t++){var i=arguments[t];try{e=i();break}catch(o){}}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(var o=[t,n,i],r=0;3>r;r++)o[r]=("0"+parseInt(o[r],10).toString(16)).slice(-2);return"#"+o.join("")})},parseCssText:function(e,t,n){var i={};if(n){var o=new CKEDITOR.dom.element("span");o.setAttribute("style",e),e=CKEDITOR.tools.convertRgbToHex(o.getAttribute("style")||"")}return e&&";"!=e?(e.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,n,o){t&&(n=n.toLowerCase(),"font-family"==n&&(o=o.toLowerCase().replace(/["']/g,"").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=[];for(var n in e)t.push(n);return t},convertArrayToObject:function(e,t){var n={};1==arguments.length&&(t=!0);for(var i=0,o=e.length;o>i;++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){function n(){o=(new Date).getTime(),i=!1,t()}var i,o=0;return{input:function(){if(!i){var t=(new Date).getTime()-o;e>t?i=setTimeout(n,e-t):n()}},reset:function(){i&&clearTimeout(i),i=o=0}}},enableHtml5Elements:function(e,t){for(var n,i="abbr,article,aside,audio,bdi,canvas,data,datalist,details,figcaption,figure,footer,header,hgroup,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;i>n;++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=="}}(),CKEDITOR.dtd=function(){"use strict";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={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},r={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},s={},l={"#":1},c={acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1},d={center:1,dir:1,noframes:1};e(n,o,l,c),e(i,r,n,d);var u={a:t(n,{a:1,button:1}),abbr:n,address:i,area:s,article:i,aside:i,audio:e({source:1,track:1},i),b:n,base:s,bdi:n,bdo:n,blockquote:i,body:i,br:s,button:t(n,{a:1,button:1}),canvas:n,caption:i,cite:n,code:n,col:s,colgroup:{col:1},command:s,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:s,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:s,html:e({head:1,body:1},i,a),i:n,iframe:l,img:s,input:s,ins:n,kbd:n,keygen:s,label:n,legend:n,li:i,link:s,main:i,map:i,mark:n,menu:e({li:1},i),meta:s,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:l,output:n,p:n,param:s,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:l,section:i,select:{optgroup:1,option:1},small:n,source:s,span:n,strong:n,style:l,sub:n,summary:n,sup:n,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:i,textarea:l,tfoot:{tr:1},th:i,thead:{tr:1},time:t(n,{time:1}),title:l,tr:{th:1,td:1},track:s,u:n,ul:{li:1},"var":n,video:e({source:1,track:1},i),wbr:s,acronym:n,applet:e({param:1},i),basefont:s,big:n,center:i,dialog:s,dir:{li:1},font:n,isindex:s,noframes:i,strike:n,tt:n};return e(u,{$block:e({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},r,d),$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},u.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}}),u}(),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().$,t=this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),n=this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.body.scrollTop);return{x:t,y:n}}},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");if(n||(n={},this.setCustomData("_cke_nativeListeners",n)),!n[t]){var i=n[t]=e(this,t);this.$.addEventListener?this.$.addEventListener(t,i,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+t,i)}return 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=this.getCustomData("_cke_nativeListeners");for(var t in e){var n=e[t];this.$.detachEvent?this.$.detachEvent("on"+t,n):this.$.removeEventListener&&this.$.removeEventListener(t,n,!1),delete e[t]}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(t){return!1}},e.setCustomData=function(e,n){var i=this.getUniqueId(),o=t[i]||(t[i]={});return o[e]=n,this},e.getCustomData=function(e){var n=this.$["data-cke-expando"],i=n&&t[n];return i&&e in i?i[e]:null},e.removeCustomData=function(e){var n,i,o=this.$["data-cke-expando"],r=o&&t[o];return r&&(n=r[e],i=e in r,delete r[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){if(e){var t=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";return new CKEDITOR.dom[t](e)}return 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){var n=this.$.cloneNode(e),i=function(n){if(n["data-cke-expando"]&&(n["data-cke-expando"]=!1),n.nodeType==CKEDITOR.NODE_ELEMENT&&(t||n.removeAttribute("id",!1),e))for(var o=n.childNodes,r=0;r<o.length;r++)i(o[r])};return i(n),new CKEDITOR.dom.node(n)},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,n){var i=n?e.nextSibling:e.previousSibling;return i&&i.nodeType==CKEDITOR.NODE_TEXT?i.nodeValue?i:t(i,n):null}var n,i=this.$,o=-1;if(!this.$.parentNode)return-1;if(e&&i.nodeType==CKEDITOR.NODE_TEXT&&!i.nodeValue){var r=t(i)||t(i,!0);if(!r)return-1}do(!e||i==this.$||i.nodeType!=CKEDITOR.NODE_TEXT||!n&&i.nodeValue)&&(o++,n=i.nodeType==CKEDITOR.NODE_TEXT);while(i=i.previousSibling);return o},getNextSourceNode:function(e,t,n){if(n&&!n.call){var i=n;n=function(e){return!e.equals(i)}}var o,r=!e&&this.getFirst&&this.getFirst();if(!r){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&n(this,!0)===!1)return null;r=this.getNext()}for(;!r&&(o=(o||this).getParent());){if(n&&n(o,!0)===!1)return null;r=o.getNext()}return r?n&&n(r)===!1?null:t&&t!=r.type?r.getNextSourceNode(!1,t,n):r:null},getPreviousSourceNode:function(e,t,n){if(n&&!n.call){var i=n;n=function(e){return!e.equals(i)}}var o,r=!e&&this.getLast&&this.getLast();if(!r){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&n(this,!0)===!1)return null;r=this.getPrevious()}for(;!r&&(o=(o||this).getParent());){if(n&&n(o,!0)===!1)return null;r=o.getPrevious()}return r?n&&n(r)===!1?null:t&&r.type!=t?r.getPreviousSourceNode(!1,t,n):r:null},getPrevious:function(e){var t,n=this.$;do n=n.previousSibling,t=n&&10!=n.nodeType&&new CKEDITOR.dom.node(n);while(t&&e&&!e(t));return t},getNext:function(e){var t,n=this.$;do n=n.nextSibling,t=n&&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 t.sourceIndex<0||n.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<n.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var i=this.getAddress(),o=e.getAddress(),r=Math.min(i.length,o.length),a=0;r-1>=a;a++)if(i[a]!=o[a]){if(r>a)return i[a]<o[a]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return i.length<o.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){var n="string"==typeof t.nodeName?t.nodeName.toLowerCase():"";return"string"==typeof e?n==e:n in e});for(;o;){if(n(i?new CKEDITOR.dom.node(o):o))return new CKEDITOR.dom.node(o);try{o=o.parentNode}catch(r){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(var i;i=t.firstChild;)n.insertBefore(t.removeChild(i),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,e&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e))},isReadOnly:function(){var e=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(e=this.getParent()),e&&"undefined"!=typeof e.$.isContentEditable)return!(e.$.isContentEditable||e.data("cke-editable"));for(;e&&!e.data("cke-editable");){if("false"==e.getAttribute("contentEditable"))return!0;if("true"==e.getAttribute("contentEditable"))break;e=e.getParent()}return!e}}),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.$;if("pageXOffset"in e)return{x:e.pageXOffset||0,y:e.pageYOffset||0};var t=e.document;return{x:t.documentElement.scrollLeft||t.body.scrollLeft||0,y:t.documentElement.scrollTop||t.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(t){return null}return new CKEDITOR.dom.element(e)},getById:function(e){var t=this.$.getElementById(e);return t?new CKEDITOR.dom.element(t):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 r=-1,a=0;a<n.childNodes.length;a++){var s=n.childNodes[a];if((t!==!0||3!=s.nodeType||!s.previousSibling||3!=s.previousSibling.nodeType)&&(r++,r==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&&document.documentMode<=8||!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){var t=this.$.querySelector(e);return t?new CKEDITOR.dom.element(t):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){if(0>e||e>=this.$.length)return null;var t=this.$[e];return t?new CKEDITOR.dom.node(t):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){var t="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e;return t&&(t.$?t:new CKEDITOR.dom.element(t))},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"),r=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,r[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=t.getCustomData("list_marker_names"),o=t.getCustomData("list_marker_id");
for(var r in i)t.removeCustomData(r);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[o])},function(){function e(e){var t=!0;return e.$.id||(e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||e.removeAttribute("id")}}function t(e,t){return"#"+e.$.id+" "+t.split(/,\s*/).join(", #"+e.$.id+" ")}function n(e){var t,n=["top","left","right","bottom"];"border"==e&&(t=["color","style","width"]);for(var i=[],o=0;o<n.length;o++)if(t)for(var r=0;r<t.length;r++)i.push([e,n[o],t[r]].join("-"));else i.push([e,n[o]].join("-"));return i}function i(e){for(var t=0,n=0,i=o[e].length;i>n;n++)t+=parseInt(this.getComputedStyle(o[e][n])||0,10)||0;return t}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(e){var t=this.$.className;if(t){var n=new RegExp("(?:^|\\s)"+e+"(?:\\s|$)","");n.test(t)||(t+=" "+e)}return this.$.className=t||e,this},removeClass:function(e){var t=this.getAttribute("class");if(t){var n=new RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","i");n.test(t)&&(t=t.replace(n,"").replace(/^\s+/,""),t?this.setAttribute("class",t):this.removeAttribute("class"))}return this},hasClass:function(e){var t=new RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","");return t.test(this.getAttribute("class"))},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?this.$.text+=e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(e){if(e||CKEDITOR.env.needsBrFiller){for(var t=this.getLast();t&&t.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(t.getText());)t=t.getPrevious();if(!t||!t.is||!t.is("br")){var n=this.getDocument().createElement("br");CKEDITOR.env.gecko&&n.setAttribute("type","_moz"),this.append(n)}}},breakParent:function(e){var t=new CKEDITOR.dom.range(this.getDocument());t.setStartAfter(this),t.setEndAfter(e);var n=t.extractContents();t.insertNode(this.remove()),n.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(e.$)}:function(e){return!!(16&this.$.compareDocumentPosition(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&&CKEDITOR.env.version<9?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(i){this.$.innerHTML="";var o=new CKEDITOR.dom.element("body",this.getDocument());o.$.innerHTML=e;for(var r=o.getChildren();r.count();)this.append(r.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(t){switch(t){case"class":t="className";break;case"http-equiv":t="httpEquiv";break;case"name":return this.$.name;case"tabindex":var n=e.call(this,t);return 0!==n&&0===this.$.tabIndex&&(n=null),n;case"checked":var i=this.$.attributes.getNamedItem(t),o=i.specified?i.nodeValue:this.$.checked;return o?"checked":null;case"hspace":case"value":return this.$[t];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return e.call(this,t)}:e}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var e=this.$.tabIndex;return 0!==e||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)||(e=-1),e}:CKEDITOR.env.webkit?function(){var e=this.$.tabIndex;return void 0===e&&(e=parseInt(this.getAttribute("tabindex"),10),isNaN(e)&&(e=-1)),e}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var e=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&document.documentMode<=8){var 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,n=t&&new CKEDITOR.dom.node(t);return n&&e&&!e(n)&&(n=n.getNext(e)),n},getLast:function(e){var t=this.$.lastChild,n=t&&new CKEDITOR.dom.node(t);return n&&e&&!e(n)&&(n=n.getPrevious(e)),n},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();if(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())return!1;if(e!==!1){var n=CKEDITOR.dtd[t]||CKEDITOR.dtd.span;return!(!n||!n["#"])}return!0},isIdentical:function(e){var t=this.clone(0,1),n=e.clone(0,1);if(t.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),n.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),n.$.style.cssText=CKEDITOR.tools.normalizeCssText(n.$.style.cssText),t.$.isEqualNode(n.$);if(t=t.getOuterHtml(),n=n.getOuterHtml(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var i=this.getParent();if(i.type==CKEDITOR.NODE_ELEMENT){var o=i.clone();o.setHtml(t),t=o.getHtml(),o.setHtml(n),n=o.getHtml()}}return t==n},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();n>t;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 t>0&&(t>2||!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 this.$.className.length>0;case"checked":return!!this.$.checked;case"value":var n=this.getAttribute("type");return"checkbox"==n||"radio"==n?"on"!=this.$.value:!!this.$.value}return t?t.specified:!1}return CKEDITOR.env.ie?CKEDITOR.env.version<8?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){(t===!1||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(i){}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(t){"class"==t?t="className":"tabindex"==t?t="tabIndex":"contenteditable"==t&&(t="contentEditable"),e.call(this,t)}:e}(),removeAttributes:function(e){if(CKEDITOR.tools.isArray(e))for(var t=0;t<e.length;t++)this.removeAttribute(e[t]);else for(var n in e)e.hasOwnProperty(n)&&this.removeAttribute(n)},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 for(var i=n(e),o=0;o<i.length;o++)this.removeStyle(i[o])},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&&CKEDITOR.env.version<9?(e=Math.round(100*e),this.setStyle("filter",e>=100?"":"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();i>n;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(),r=CKEDITOR.env.quirks;if(document.documentElement.getBoundingClientRect){var a=this.$.getBoundingClientRect(),s=i.$,l=s.documentElement,c=l.clientTop||o.$.clientTop||0,d=l.clientLeft||o.$.clientLeft||0,u=!0;if(CKEDITOR.env.ie){var h=i.getDocumentElement().contains(this),f=i.getBody().contains(this);u=r&&f||!r&&h}if(u){var m,E;if(CKEDITOR.env.webkit)m=o.$.scrollLeft||l.scrollLeft,E=o.$.scrollTop||l.scrollTop;else{var g=r?o.$:l;m=g.scrollLeft,E=g.scrollTop}t=a.left+m-d,n=a.top+E-c}}else for(var p,T=this,C=null;T&&"body"!=T.getName()&&"html"!=T.getName();){t+=T.$.offsetLeft-T.$.scrollLeft,n+=T.$.offsetTop-T.$.scrollTop,T.equals(this)||(t+=T.$.clientLeft||0,n+=T.$.clientTop||0);for(var v=C;v&&!v.equals(T);)t-=v.$.scrollLeft,n-=v.$.scrollTop,v=v.getParent();C=T,T=(p=T.$.offsetParent)?new CKEDITOR.dom.element(p):null}if(e){var I=this.getWindow(),O=e.getWindow();if(!I.equals(O)&&I.$.frameElement){var D=new CKEDITOR.dom.element(I.$.frameElement).getDocumentPosition(e);t+=D.x,n+=D.y}}return document.documentElement.getBoundingClientRect||CKEDITOR.env.gecko&&!r&&(t+=this.$.clientLeft?1:0,n+=this.$.clientTop?1:0),{x:t,y:n}},scrollIntoView:function(e){var t=this.getParent();if(t)do{var n=t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight;if(n&&!t.is("body")&&this.scrollIntoParent(t,e,1),t.is("html")){var i=t.getWindow();try{var o=i.$.frameElement;o&&(t=new CKEDITOR.dom.element(o))}catch(r){}}}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(s?"body":"html")){var i=e.$.getBoundingClientRect();n.x=i.left,n.y=i.top}var r=e.getWindow();if(!r.equals(t)){var a=o(CKEDITOR.dom.element.get(r.$.frameElement),t);n.x+=a.x,n.y+=a.y}return n}function r(e,t){return parseInt(e.getComputedStyle("margin-"+t)||0,10)||0}!e&&(e=this.getWindow());var a=e.getDocument(),s="BackCompat"==a.$.compatMode;e instanceof CKEDITOR.dom.window&&(e=s?a.getBody():a.getDocumentElement());var l,c,d=e.getWindow(),u=o(this,d),h=o(e,d),f=this.$.offsetHeight,m=this.$.offsetWidth,E=e.$.clientHeight,g=e.$.clientWidth;l={x:u.x-r(this,"left")-h.x||0,y:u.y-r(this,"top")-h.y||0},c={x:u.x+m+r(this,"right")-(h.x+g)||0,y:u.y+f+r(this,"bottom")-(h.y+E)||0},(l.y<0||c.y>0)&&i(0,t===!0?l.y:t===!1?c.y:l.y<0?l.y:c.y),n&&(l.x<0||c.x>0)&&i(l.x<0?l.x:c.x,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,r=n[i],a=r.nodeName.toLowerCase();a in t||("checked"==a&&(o=this.getAttribute(a))?e.setAttribute(a,o):(!CKEDITOR.env.ie||this.hasAttribute(a))&&(o=this.getAttribute(a),null===o&&(o=r.nodeValue),e.setAttribute(a,o)))}""!==this.$.style.cssText&&(e.$.style.cssText=this.$.style.cssText)},renameNode:function(e){if(this.getName()!=e){var t=this.getDocument(),n=new CKEDITOR.dom.element(e,t);this.copyAttributes(n),this.moveChildren(n),this.getParent()&&this.$.parentNode.replaceChild(n.$,this.$),n.$["data-cke-expando"]=this.$["data-cke-expando"],this.$=n.$,delete this.getName}},getChild:function(){function e(e,t){var n=e.childNodes;return t>=0&&t<n.length?n[t]:void 0}return function(t){var n=this.$;if(t.slice)for(;t.length>0&&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(){this.on("contextmenu",function(e){e.data.getTarget().hasClass("cke_enable_context_menu")||e.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):(t===!1?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(n){var i=e(this),o=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(t(this,n)));return i(),o},findOne:function(n){var i=e(this),o=this.$.querySelector(t(this,n));return i(),o?new CKEDITOR.dom.element(o):null},forEach:function(e,t,n){if(!(n||t&&this.type!=t))var i=e(this);if(i!==!1)for(var o,r=this.getChildren(),a=0;a<r.count();a++)o=r.getItem(a),o.type==CKEDITOR.NODE_ELEMENT?o.forEach(e,t):t&&o.type!=t||e(o)}});var o={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)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function 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,r=n.startContainer,a=n.endContainer,s=n.startOffset,l=n.endOffset,c=this.guard,d=this.type,u=e?"getPreviousSourceNode":"getNextSourceNode";if(!e&&!this._.guardLTR){var h=a.type==CKEDITOR.NODE_ELEMENT?a:a.getParent(),f=a.type==CKEDITOR.NODE_ELEMENT?a.getChild(l):a.getNext();this._.guardLTR=function(e,t){return!(t&&h.equals(e)||f&&e.equals(f)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}if(e&&!this._.guardRTL){var m=r.type==CKEDITOR.NODE_ELEMENT?r:r.getParent(),E=r.type==CKEDITOR.NODE_ELEMENT?s?r.getChild(s-1):null:r.getPrevious();this._.guardRTL=function(e,t){return!(t&&m.equals(e)||E&&e.equals(E)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}var g=e?this._.guardRTL:this._.guardLTR;for(o=c?function(e,t){return g(e,t)===!1?!1:c(e,t)}:g,this.current?i=this.current[u](!1,d,o):(e?(i=a,i.type==CKEDITOR.NODE_ELEMENT&&(i=l>0?i.getChild(l-1):o(i,!0)===!1?null:i.getPreviousSourceNode(!0,d,o))):(i=r,i.type==CKEDITOR.NODE_ELEMENT&&((i=i.getChild(s))||(i=o(r,!0)===!1?null:r.getNextSourceNode(!0,d,o)))),i&&o(i)===!1&&(i=null));i&&!this._.end;){if(this.current=i,this.evaluator&&this.evaluator(i)===!1){if(t&&this.evaluator)return!1}else if(!t)return i;i=i[u](!1,d,o)}return this.end(),this.current=null}function t(t){for(var n,i=null;n=e.call(this,t);)i=n;return i}function n(e){for(var t=0,n=e.getChildCount();n>t;++t)if(!h(e.getChild(t)))return!1;return!0}function i(e){var t,n={};for(t in e)CKEDITOR.dtd[t]["#"]&&(n[t]=1);return n}function o(e){if(h(e))return!1;if(e.type==CKEDITOR.NODE_TEXT)return!0;if(e.type==CKEDITOR.NODE_ELEMENT){if(e.is(CKEDITOR.dtd.$inline)||e.is("hr")||"false"==e.getAttribute("contenteditable"))return!0;if(!CKEDITOR.env.needsBrFiller&&e.is(f)&&n(e))return!0}return!1}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 e.call(this,0,1)!==!1},checkBackward:function(){return e.call(this,1,1)!==!1},lastForward:function(){return t.call(this)},lastBackward:function(){return t.call(this,1)},reset:function(){delete this.current,this._={}}}});var r={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},a={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(e){var t="none"==this.getComputedStyle("float")&&!(this.getComputedStyle("position")in a);return t&&r[this.getComputedStyle("display")]?!0:!!(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,r;return o=i&&i.type!=CKEDITOR.NODE_ELEMENT&&(r=i.getParent())&&n(r),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&&"\u200b"==t.getText()),!!(e^n)}},CKEDITOR.dom.walker.invisible=function(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.env.webkit?1:0;return function(i){var o;return t(i)?o=1:(i.type==CKEDITOR.NODE_TEXT&&(i=i.getParent()),o=i.$.offsetWidth<=n),!!(e^o)}},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!l(e)&&!c(e)}return function(n){var i=CKEDITOR.env.needsBrFiller?n.is&&n.is("br"):n.getText&&s.test(n.getText());if(i){var o=n.getParent(),r=n.getNext(t);i=o.isBlockBoundary()&&(!r||r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary())}return!!(e^i)}},CKEDITOR.dom.walker.temp=function(e){return function(t){t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent());var n=t&&t.hasAttribute("data-cke-temp");return!!(e^n)}};var s=/^[\t\r\n ]*(?: |\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),d=CKEDITOR.dom.walker.temp(),u=function(e){return c(e)||l(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){var n=l(t)||c(t)||d(t);return!!(e^n)}};var h=CKEDITOR.dom.walker.ignored(),f=i(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(e){return function(t){return!!(e^o(t))}},CKEDITOR.dom.element.prototype.getBogus=function(){var e=this;do e=e.getPreviousSourceNode();while(u(e));return e&&(CKEDITOR.env.needsBrFiller?e.is&&e.is("br"):e.getText&&s.test(e.getText()))?e:!1}}(),CKEDITOR.dom.range=function(e){this.startContainer=null,this.startOffset=null,this.endContainer=null,this.endOffset=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(){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)?!0:i(o)&&!e?(e=!0,!0):o.type==CKEDITOR.NODE_TEXT&&(o.hasAscendant("pre")||CKEDITOR.tools.trim(o.getText()).length)?!1:o.type!=CKEDITOR.NODE_ELEMENT||o.is(r)?!0:!1}}function t(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(1);return function(i){return n(i)||t(i)?!0:!e&&a(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$removeEmpty)}}function n(e){return function(){var t;return this[e?"getPreviousNode":"getNextNode"](function(e){return!t&&c(e)&&(t=e),l(e)&&!(a(e)&&e.equals(t))})}}var i=function(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset},o=function(e,t,n,i){e.optimizeBookmark();var o,r,a=e.startContainer,s=e.endContainer,l=e.startOffset,c=e.endOffset;s.type==CKEDITOR.NODE_TEXT?s=s.split(c):s.getChildCount()>0&&(c>=s.getChildCount()?(s=s.append(e.document.createText("")),r=!0):s=s.getChild(c)),a.type==CKEDITOR.NODE_TEXT?(a.split(l),a.equals(s)&&(s=a.getNext())):l?l>=a.getChildCount()?(a=a.append(e.document.createText("")),o=!0):a=a.getChild(l).getPrevious():(a=a.append(e.document.createText(""),1),o=!0);var d,u,h,f=a.getParents(),m=s.getParents();for(d=0;d<f.length&&(u=f[d],h=m[d],u.equals(h));d++);for(var E,g,p,T,C=n,v=d;v<f.length;v++){for(E=f[v],C&&!E.equals(a)&&(g=C.append(E.clone())),p=E.getNext();p&&!p.equals(m[v])&&!p.equals(s);)T=p.getNext(),2==t?C.append(p.clone(!0)):(p.remove(),1==t&&C.append(p)),p=T;C&&(C=g)}C=n;for(var I=d;I<m.length;I++){if(E=m[I],t>0&&!E.equals(s)&&(g=C.append(E.clone())),!f[I]||E.$.parentNode!=f[I].$.parentNode)for(p=E.getPrevious();p&&!p.equals(f[I])&&!p.equals(a);)T=p.getPrevious(),2==t?C.$.insertBefore(p.$.cloneNode(!0),C.$.firstChild):(p.remove(),1==t&&C.$.insertBefore(p.$,C.$.firstChild)),p=T;C&&(C=g)}if(2==t){var O=e.startContainer;O.type==CKEDITOR.NODE_TEXT&&(O.$.data+=O.$.nextSibling.data,O.$.parentNode.removeChild(O.$.nextSibling));var D=e.endContainer;D.type==CKEDITOR.NODE_TEXT&&D.$.nextSibling&&(D.$.data+=D.$.nextSibling.data,D.$.parentNode.removeChild(D.$.nextSibling))}else{if(u&&h&&(a.$.parentNode!=u.$.parentNode||s.$.parentNode!=h.$.parentNode)){var R=h.getIndex();if(o&&h.$.parentNode==a.$.parentNode&&R--,i&&u.type==CKEDITOR.NODE_ELEMENT){var b=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',e.document);b.insertAfter(u),u.mergeSiblings(!1),e.moveToBookmark({startNode:b})}else e.setStart(h.getParent(),R)}e.collapse(!0)}o&&a.remove(),r&&s.$.parentNode&&s.remove()},r={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},a=CKEDITOR.dom.walker.bogus(),s=/^[\t\r\n ]*(?: |\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(){var e=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||o(this,2,e),e},deleteContents:function(e){this.collapsed||o(this,0,null,e)},extractContents:function(e){var t=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||o(this,1,t,e),t},createBookmark:function(e){var t,n,i,o,r=this.collapsed;return t=this.document.createElement("span"),t.data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml(" "),e&&(i="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",i+(r?"C":"S"))),r||(n=t.clone(),n.setHtml(" "),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+(r?"C":"S"):t,endNode:e?i+"E":n,serializable:e,collapsed:r}},createBookmark2:function(){function e(e,t){return e.type!=CKEDITOR.NODE_ELEMENT||0===t||t==e.getChildCount()?0:e.getChild(t-1).type==CKEDITOR.NODE_TEXT&&e.getChild(t).type==CKEDITOR.NODE_TEXT}function t(e){for(var t=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)t+=e.getLength();return t}function n(n){var o=n.container,r=n.offset;if(e(o,r)&&(o=o.getChild(r-1),r=o.getLength()),o.type==CKEDITOR.NODE_ELEMENT&&r>1&&(r=o.getChild(r-1).getIndex(!0)+1),o.type==CKEDITOR.NODE_TEXT){var a=t(o);if(o.getText())r+=a;else{var s=o.getPrevious(i);a?(r=a,o=s?s.getNext():o.getParent().getFirst()):(o=o.getParent(),r=s?s.getIndex(!0)+1:0)}}n.container=o,n.offset=r}var i=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(e){var t=this.collapsed,i={container:this.startContainer,offset:this.startOffset},o={container:this.endContainer,offset:this.endOffset};return e&&(n(i),t||n(o)),{start:i.container.getAddress(e),end:t?null:o.container.getAddress(e),startOffset:i.offset,endOffset:o.offset,normalized:e,collapsed:t,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),o=e.endOffset;this.setStart(t,n),i?this.setEnd(i,o):this.collapse(!0)}else{var r=e.serializable,a=r?this.document.getById(e.startNode):e.startNode,s=r?this.document.getById(e.endNode):e.endNode;this.setStartBefore(a),a.remove(),s?(this.setEndBefore(s),s.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,i=this.startContainer,o=this.endContainer;return n=i.equals(o)?e&&i.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?i.getChild(this.startOffset):i:i.getCommonAncestor(o),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 r=n.split(i);i=n.getIndex()+1,n=n.getParent(),this.startContainer.equals(this.endContainer)?this.setEnd(r,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)}var a=this.endContainer,s=this.endOffset;t||o||!a||a.type!=CKEDITOR.NODE_TEXT||(s?s>=a.getLength()?(s=a.getIndex()+1,a=a.getParent()):(a.split(s),s=a.getIndex()+1,a=a.getParent()):(s=a.getIndex(),a=a.getParent()),this.setEnd(a,s))},enlarge:function(e,t){function n(e,t){var n=new CKEDITOR.dom.range(m);n.setStart(e,t),n.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);var i,r=new CKEDITOR.dom.walker(n);for(r.guard=function(e){return!(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())};i=r.next();){if(i.type!=CKEDITOR.NODE_TEXT)return!1;if(h=i!=e?i.getText():i.substring(t),o.test(h))return!1}return!0}function i(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")?null:e}var o=new RegExp(/[^\s\ufeff]/);switch(e){case CKEDITOR.ENLARGE_INLINE:var r=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)return;var a,s,l,c,d,u,h,f=this.getCommonAncestor(),m=this.root,E=!1,g=this.startContainer,p=this.startOffset;
for(g.type==CKEDITOR.NODE_TEXT?(p&&(g=!CKEDITOR.tools.trim(g.substring(0,p)).length&&g,E=!!g),g&&((c=g.getPrevious())||(l=g.getParent()))):(p&&(c=g.getChild(p-1)||g.getLast()),c||(l=g)),l=i(l);l||c;){if(l&&!c){if(!d&&l.equals(f)&&(d=!0),r?l.isBlockBoundary():!m.contains(l))break;E&&"inline"==l.getComputedStyle("display")||(E=!1,d?a=l:this.setStartBefore(l)),c=l.getPrevious()}for(;c;)if(u=!1,c.type!=CKEDITOR.NODE_COMMENT){if(c.type==CKEDITOR.NODE_TEXT)h=c.getText(),o.test(h)&&(c=null),u=/[\s\ufeff]$/.test(h);else{var T=CKEDITOR.env.webkit?1:0;if((c.$.offsetWidth>T||t&&c.is("br"))&&!c.data("cke-bookmark"))if(E&&CKEDITOR.dtd.$removeEmpty[c.getName()]){if(h=c.getText(),o.test(h))c=null;else for(var C,v=c.$.getElementsByTagName("*"),I=0;C=v[I++];)if(!CKEDITOR.dtd.$removeEmpty[C.nodeName.toLowerCase()]){c=null;break}c&&(u=!!h.length)}else c=null}if(u&&(E?d?a=l:l&&this.setStartBefore(l):E=!0),c){var O=c.getPrevious();if(!l&&!O){l=c,c=null;break}c=O}else l=null}else c=c.getPrevious();l&&(l=i(l.getParent()))}for(g=this.endContainer,p=this.endOffset,l=c=null,d=E=!1,g.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(g.substring(p)).length?E=!0:(E=!g.getLength(),p==g.getLength()?(c=g.getNext())||(l=g.getParent()):n(g,p)&&(l=g.getParent())):(c=g.getChild(p),c||(l=g));l||c;){if(l&&!c){if(!d&&l.equals(f)&&(d=!0),r?l.isBlockBoundary():!m.contains(l))break;E&&"inline"
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。