PageSourceSearch

https://coralridgeyachtclub.com/o/frontend-editor-ckeditor-web/cke…=js&languageId=en_US&b=7201&t=1789539332671

js coralridgeyachtclub.com collected 2026-10-04 19:13:45 UTC 593,334 bytes, 1,134 lines download raw bytes

vendor: 51,431 bytes, lines 1-101
1/*1773124236000*/
2(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,g={timestamp:"J4SC",version:"4.11.4",revision:"e1836357e",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var c=window.CKEDITOR_BASEPATH||"";if(!c)for(var e=document.getElementsByTagName("script"),b=0;b<e.length;b++){var d=e[b].src.match(a);if(d){c=d[1];break}}-1==c.indexOf(":/")&&"//"!=c.slice(0,
32)&&(c=0===c.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+c:location.href.match(/^[^\?]*\/(?:)/)[0]+c);if(!c)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return c}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return a},
4domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),e())}catch(d){}}function e(){for(var d;d=b.shift();)d()}var b=[];return function(d){function e(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(e,1);return}a()}b.push(d);"complete"===document.readyState&&setTimeout(a,1);if(1==b.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
5a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);d=!1;try{d=!window.frameElement}catch(l){}document.documentElement.doScroll&&d&&e()}}}()},b=window.CKEDITOR_GETURL;if(b){var e=g.getUrl;g.getUrl=function(a){return b.call(g,a)||e.call(g,a)}}return g}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var g=CKEDITOR.event.prototype,b;for(b in g)null==a[b]&&(a[b]=g[b])},
6CKEDITOR.event.prototype=function(){function a(a){var c=g(this);return c[a]||(c[a]=new b(a))}var g=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var c=0,b=this.listeners;c<b.length;c++)if(b[c].fn==a)return c;return-1}};return{define:function(b,c){var m=a.call(this,b);CKEDITOR.tools.extend(m,c,!0)},on:function(b,c,m,g,d){function k(f,n,d,a){f={name:b,sender:this,editor:f,
7data:n,listenerData:g,stop:d,cancel:a,removeListener:l};return!1===c.call(m,f)?!1:f.data}function l(){n.removeListener(b,c)}var f=a.call(this,b);if(0>f.getListenerIndex(c)){f=f.listeners;m||(m=this);isNaN(d)&&(d=10);var n=this;k.fn=c;k.priority=d;for(var w=f.length-1;0<=w;w--)if(f[w].priority<=d)return f.splice(w+1,0,k),{removeListener:l};f.unshift(k)}return{removeListener:l}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this,
8arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},b=0,h=function(){b=1};return function(d,k,l){var f=g(this)[d];d=a;var n=b;a=b=0;if(f){var w=f.listeners;if(w.length)for(var w=w.slice(0),v,t=0;t<w.length;t++){if(f.errorProof)try{v=w[t].call(this,l,k,c,h)}catch(p){}else v=w[t].call(this,l,k,c,h);!1===v?b=1:"undefined"!=typeof v&&(k=v);if(a||b)break}}k=
9b?!1:"undefined"==typeof k?!0:k;a=d;b=n;return k}}(),fireOnce:function(a,b,m){b=this.fire(a,b,m);delete g(this)[a];return b},removeListener:function(a,b){var m=g(this)[a];if(m){var h=m.getListenerIndex(b);0<=h&&m.listeners.splice(h,1)}},removeAllListeners:function(){var a=g(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=g(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
10function(a,g){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,g,this)},CKEDITOR.editor.prototype.fireOnce=function(a,g){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,g,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),g=a.match(/edge[ \/](\d+.?\d*)/),b=-1<a.indexOf("trident/"),b=!(!g&&!b),b={ie:b,edge:!!g,webkit:!b&&
11-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};b.gecko="Gecko"==navigator.product&&!b.webkit&&!b.ie;b.webkit&&(-1<a.indexOf("chrome")?b.chrome=
12!0:b.safari=!0);var e=0;b.ie&&(e=g?parseFloat(g[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,b.ie9Compat=9==e,b.ie8Compat=8==e,b.ie7Compat=7==e,b.ie6Compat=7>e||b.quirks);b.gecko&&(g=a.match(/rv:([\d\.]+)/))&&(g=g[1].split("."),e=1E4*g[0]+100*(g[1]||0)+1*(g[2]||0));b.air&&(e=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(e=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=e;b.isCompatible=!(b.ie&&7>e)&&!(b.gecko&&4E4>e)&&!(b.webkit&&
13534>e);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10<e;b.needsNbspFiller=b.ie&&11>e;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air");b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);
14CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,g=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status=
15"basic_ready",a&&a._load?a():g&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*g))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:g})},CKEDITOR.error=function(a,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
16{type:"error",errorCode:a,additionalData:g})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var g=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[g]("[CKEDITOR] Error code: "+b+".",a);else console[g]("[CKEDITOR] Error code: "+b+".");console[g]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+b)}},null,null,999),CKEDITOR.dom={},function(){function a(f,d,a){this._minInterval=
17f;this._context=a;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(d,a||{});var b=this;this.input=function(){function f(){b._lastOutput=(new Date).getTime();b._scheduledTimer=0;b._call()}if(!b._scheduledTimer||!1!==b._reschedule()){var n=(new Date).getTime()-b._lastOutput;n<b._minInterval?b._scheduledTimer=setTimeout(f,b._minInterval-n):f()}}}function g(f,d,b){a.call(this,f,d,b);this._args=[];var c=this;this.input=CKEDITOR.tools.override(this.input,function(f){return function(){c._args=
18Array.prototype.slice.call(arguments);f.call(this)}})}var b=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,m=/>/g,h=/</g,d=/"/g,k=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,l={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:"\u00a0",shy:"\u00ad"},f=function(f,d){return"#"==d[0]?String.fromCharCode(parseInt(d.slice(1),10)):l[d]};CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(f,d){if(!f&&!d)return!0;if(!f||!d||f.length!=d.length)return!1;
19for(var a=0;a<f.length;a++)if(f[a]!=d[a])return!1;return!0},getIndex:function(f,d){for(var a=0;a<f.length;++a)if(d(f[a]))return a;return-1},clone:function(f){var d;if(f&&f instanceof Array){d=[];for(var a=0;a<f.length;a++)d[a]=CKEDITOR.tools.clone(f[a]);return d}if(null===f||"object"!=typeof f||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp||f.nodeType||f.window===f)return f;d=new f.constructor;for(a in f)d[a]=CKEDITOR.tools.clone(f[a]);return d},
20capitalize:function(f,d){return f.charAt(0).toUpperCase()+(d?f.slice(1):f.slice(1).toLowerCase())},extend:function(f){var d=arguments.length,a,b;"boolean"==typeof(a=arguments[d-1])?d--:"boolean"==typeof(a=arguments[d-2])&&(b=arguments[d-1],d-=2);for(var c=1;c<d;c++){var e=arguments[c],k;for(k in e)if(!0===a||null==f[k])if(!b||k in b)f[k]=e[k]}return f},prototypedCopy:function(f){var d=function(){};d.prototype=f;return new d},copy:function(f){var d={},a;for(a in f)d[a]=f[a];return d},isArray:function(f){return"[object Array]"==
21Object.prototype.toString.call(f)},isEmpty:function(f){for(var d in f)if(f.hasOwnProperty(d))return!1;return!0},cssVendorPrefix:function(f,d,a){if(a)return e+f+":"+d+";"+f+":"+d;a={};a[f]=d;a[e+f]=d;return a},cssStyleToDomStyle:function(){var f=document.createElement("div").style,d="undefined"!=typeof f.cssFloat?"cssFloat":"undefined"!=typeof f.styleFloat?"styleFloat":"float";return function(f){return"float"==f?d:f.replace(/-./g,function(f){return f.substr(1).toUpperCase()})}}(),buildStyleHtml:function(f){f=
22[].concat(f);for(var d,a=[],b=0;b<f.length;b++)if(d=f[b])/@import|[{}]/.test(d)?a.push("\x3cstyle\x3e"+d+"\x3c/style\x3e"):a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+d+'"\x3e');return a.join("")},htmlEncode:function(f){return void 0===f||null===f?"":String(f).replace(c,"\x26amp;").replace(m,"\x26gt;").replace(h,"\x26lt;")},htmlDecode:function(d){return d.replace(k,f)},htmlEncodeAttr:function(f){return CKEDITOR.tools.htmlEncode(f).replace(d,"\x26quot;")},htmlDecodeAttr:function(f){return CKEDITOR.tools.htmlDecode(f)},
23transformPlainTextToHtml:function(f,d){var a=d==CKEDITOR.ENTER_BR,b=this.htmlEncode(f.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),c=d==CKEDITOR.ENTER_P?"p":"div";if(!a){var e=/\n{2}/g;if(e.test(b))var k="\x3c"+c+"\x3e",l="\x3c/"+c+"\x3e",b=k+b.replace(e,function(){return l+k})+l}b=b.replace(/\n/g,"\x3cbr\x3e");a||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+c+"\x3e)"),function(f){return CKEDITOR.tools.repeat(f,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,
24function(f,d){return d+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var f=0;return function(){return++f}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var f="e",d=0;8>d;d++)f+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return f},override:function(f,d){var a=d(f);a.prototype=f.prototype;return a},setTimeout:function(f,d,a,b,c){c||(c=window);a||(a=c);return c.setTimeout(function(){b?f.apply(a,[].concat(b)):f.apply(a)},
25d||0)},throttle:function(f,d,a){return new this.buffers.throttle(f,d,a)},trim:function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(f,"")}}(),ltrim:function(){var f=/^[ \t\n\r]+/g;return function(d){return d.replace(f,"")}}(),rtrim:function(){var f=/[ \t\n\r]+$/g;return function(d){return d.replace(f,"")}}(),indexOf:function(f,d){if("function"==typeof d)for(var a=0,b=f.length;a<b;a++){if(d(f[a]))return a}else{if(f.indexOf)return f.indexOf(d);a=0;for(b=f.length;a<
26b;a++)if(f[a]===d)return a}return-1},search:function(f,d){var a=CKEDITOR.tools.indexOf(f,d);return 0<=a?f[a]:null},bind:function(f,d){return function(){return f.apply(d,arguments)}},createClass:function(f){var d=f.$,a=f.base,b=f.privates||f._,c=f.proto;f=f.statics;!d&&(d=function(){a&&this.base.apply(this,arguments)});if(b)var e=d,d=function(){var f=this._||(this._={}),d;for(d in b){var a=b[d];f[d]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}e.apply(this,arguments)};a&&(d.prototype=this.prototypedCopy(a.prototype),
27d.prototype.constructor=d,d.base=a,d.baseProto=a.prototype,d.prototype.base=function(){this.base=a.prototype.base;a.apply(this,arguments);this.base=arguments.callee});c&&this.extend(d.prototype,c,!0);f&&this.extend(d,f,!0);return d},addFunction:function(f,d){return b.push(function(){return f.apply(d||this,arguments)})-1},removeFunction:function(f){b[f]=null},callFunction:function(f){var d=b[f];return d&&d.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var f=/^-?\d+\.?\d*px$/,
28d;return function(a){d=CKEDITOR.tools.trim(a+"")+"px";return f.test(d)?d:a||""}}(),convertToPx:function(){var f;return function(d){f||(f=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(f));if(!/%$/.test(d)){var a=0>parseFloat(d);a&&(d=d.replace("-",""));f.setStyle("width",d);d=f.$.clientWidth;return a?-d:d}return d}}(),repeat:function(f,d){return Array(d+
291).join(f)},tryThese:function(){for(var f,d=0,a=arguments.length;d<a;d++){var b=arguments[d];try{f=b();break}catch(c){}}return f},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(f){return function(){var d=arguments,a=this;window.setTimeout(function(){f.apply(a,d)},0)}},normalizeCssText:function(f,d){var a=[],b,c=CKEDITOR.tools.parseCssText(f,!0,d);for(b in c)a.push(b+":"+c[b]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(f){return f.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
30function(f,d,a,b){f=[d,a,b];for(d=0;3>d;d++)f[d]=("0"+parseInt(f[d],10).toString(16)).slice(-2);return"#"+f.join("")})},normalizeHex:function(f){return f.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(f,d,a,b){f=d.toLowerCase();3==f.length&&(f=f.split(""),f=[f[0],f[0],f[1],f[1],f[2],f[2]].join(""));return"#"+f+b})},parseCssText:function(f,d,a){var b={};a&&(f=(new CKEDITOR.dom.element("span")).setAttribute("style",f).getAttribute("style")||"");f&&(f=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(f)));
31if(!f||";"==f)return b;f.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(f,a,c){d&&(a=a.toLowerCase(),"font-family"==a&&(c=c.replace(/\s*,\s*/g,",")),c=CKEDITOR.tools.trim(c));b[a]=c});return b},writeCssText:function(f,d){var a,b=[];for(a in f)b.push(a+":"+f[a]);d&&b.sort();return b.join("; ")},objectCompare:function(f,d,a){var b;if(!f&&!d)return!0;if(!f||!d)return!1;for(b in f)if(f[b]!=d[b])return!1;if(!a)for(b in d)if(f[b]!=d[b])return!1;return!0},objectKeys:function(f){var d=
32[],a;for(a in f)d.push(a);return d},convertArrayToObject:function(f,d){var a={};1==arguments.length&&(d=!0);for(var b=0,c=f.length;b<c;++b)a[f[b]]=d;return a},fixDomain:function(){for(var f;;)try{f=window.parent.document.domain;break}catch(d){f=f?f.replace(/.+?(?:\.|$)/,""):document.domain;if(!f)break;document.domain=f}return!!f},eventsBuffer:function(f,d,a){return new this.buffers.event(f,d,a)},enableHtml5Elements:function(f,d){for(var a="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(" "),
33b=a.length,c;b--;)c=f.createElement(a[b]),d&&f.appendChild(c)},checkIfAnyArrayItemMatches:function(f,d){for(var a=0,b=f.length;a<b;++a)if(f[a].match(d))return!0;return!1},checkIfAnyObjectPropertyMatches:function(f,d){for(var a in f)if(a.match(d))return!0;return!1},keystrokeToString:function(f,d){var a=this.keystrokeToArray(f,d);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(f,d){var a=d&16711680,b=d&65535,c=CKEDITOR.env.mac,e=[],k=[];a&CKEDITOR.CTRL&&(e.push(c?
34"\u2318":f[17]),k.push(c?f[224]:f[17]));a&CKEDITOR.ALT&&(e.push(c?"\u2325":f[18]),k.push(f[18]));a&CKEDITOR.SHIFT&&(e.push(c?"\u21e7":f[16]),k.push(f[16]));b&&(f[b]?(e.push(f[b]),k.push(f[b])):(e.push(String.fromCharCode(b)),k.push(String.fromCharCode(b))));return{display:e,aria:k}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(f){f=f.toLowerCase();for(var d=document.cookie.split(";"),a,b,c=0;c<d.length;c++)if(a=
35d[c].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),b===f)return decodeURIComponent(1<a.length?a[1]:"");return null},setCookie:function(f,d){document.cookie=encodeURIComponent(f)+"\x3d"+encodeURIComponent(d)+";path\x3d/"},getCsrfToken:function(){var f=CKEDITOR.tools.getCookie("ckCsrfToken");if(!f||40!=f.length){var f=[],d="";if(window.crypto&&window.crypto.getRandomValues)f=new Uint8Array(40),window.crypto.getRandomValues(f);else for(var a=0;40>a;a++)f.push(Math.floor(256*
36Math.random()));for(a=0;a<f.length;a++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(f[a]%36),d=d+(.5<Math.random()?b.toUpperCase():b);f=d;CKEDITOR.tools.setCookie("ckCsrfToken",f)}return f},escapeCss:function(f){return f?window.CSS&&CSS.escape?CSS.escape(f):isNaN(parseInt(f.charAt(0),10))?f:"\\3"+f.charAt(0)+" "+f.substring(1,f.length):""},getMouseButton:function(f){return(f=f.data?f.data.$:f)?CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.ie6Compat)?4===f.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:
371===f.button?CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:f.button:!1},convertHexStringToBytes:function(f){var d=[],a=f.length/2,b;for(b=0;b<a;b++)d.push(parseInt(f.substr(2*b,2),16));return d},convertBytesToBase64:function(f){var d="",a=f.length,b;for(b=0;b<a;b+=3){var c=f.slice(b,b+3),e=c.length,k=[],l;if(3>e)for(l=e;3>l;l++)c[l]=0;k[0]=(c[0]&252)>>2;k[1]=(c[0]&3)<<4|c[1]>>4;k[2]=(c[1]&15)<<2|(c[2]&192)>>6;k[3]=c[2]&63;for(l=0;4>l;l++)d=l<=e?d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k[l]):
38d+"\x3d"}return d},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",
39darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",
40gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",
41lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",
42mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",
43sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),
44_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(f){var d={},a=this._findColor(f);a.length&&(d.color=a[0],CKEDITOR.tools.array.forEach(a,function(d){f=f.replace(d,"")}));if(f=CKEDITOR.tools.trim(f))d.unprocessed=f;return d},margin:function(f){function d(f){a.top=b[f[0]];a.right=
45b[f[1]];a.bottom=b[f[2]];a.left=b[f[3]]}var a={},b=f.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(b.length){case 1:d([0,0,0,0]);break;case 2:d([0,1,0,1]);break;case 3:d([0,1,2,1]);break;case 4:d([0,1,2,3])}return a},border:function(f){var d={},a=f.split(/\s+/g);f=CKEDITOR.tools.style.parse._findColor(f);f.length&&(d.color=f[0]);CKEDITOR.tools.array.forEach(a,function(f){d.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,f)?!d.width&&CKEDITOR.tools.style.parse._widthRegExp.test(f)&&
46(d.width=f):d.style=f});return d},_findColor:function(f){var d=[],a=CKEDITOR.tools.array,d=d.concat(f.match(this._rgbaRegExp)||[]),d=d.concat(f.match(this._hslaRegExp)||[]);return d=d.concat(a.filter(f.split(/\s+/),function(f){return f.match(/^#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:f.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(f,d,a){var b=[];this.forEach(f,function(c,e){d.call(a,c,e,f)&&b.push(c)});return b},forEach:function(f,d,a){var b=f.length,c;for(c=0;c<b;c++)d.call(a,
47f[c],c,f)},map:function(f,d,a){for(var b=[],c=0;c<f.length;c++)b.push(d.call(a,f[c],c,f));return b},reduce:function(f,d,a,b){for(var c=0;c<f.length;c++)a=d.call(b,a,f[c],c,f);return a},every:function(f,d,a){if(!f.length)return!0;d=this.filter(f,d,a);return f.length===d.length}},object:{findKey:function(f,d){if("object"!==typeof f)return null;for(var a in f)if(f[a]===d)return a;return null},merge:function(f,d){var a=CKEDITOR.tools,b=a.clone(f),c=a.clone(d);a.array.forEach(a.objectKeys(c),function(f){b[f]=
48"object"===typeof c[f]&&"object"===typeof b[f]?a.object.merge(b[f],c[f]):c[f]});return b}},getAbsoluteRectPosition:function(f,d){function a(f){if(f){var d=f.getClientRect();b.top+=d.top;b.left+=d.left;"x"in b&&"y"in b&&(b.x+=d.x,b.y+=d.y);a(f.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(d);a(f.getFrame());var c=CKEDITOR.document.getWindow().getScrollPosition();b.top+=c.y;b.left+=c.x;"x"in b&&"y"in b&&(b.y+=c.y,b.x+=c.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};a.prototype={reset:function(){this._lastOutput=
490;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);this._scheduledTimer=0}};g.prototype=CKEDITOR.tools.prototypedCopy(a.prototype);g.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};g.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=a;CKEDITOR.tools.buffers.throttle=g;CKEDITOR.tools.array.indexOf=
50CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=1;CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,g=function(d,f){for(var a=CKEDITOR.tools.clone(d),b=1;b<arguments.length;b++){f=arguments[b];for(var c in f)delete a[c]}return a},b={},e={},c={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,
51hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},h={},d={"#":1},k={center:1,dir:1,noframes:1};a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,
52u:1,"var":1,video:1,wbr:1},d,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(e,c,b,k);g={a:g(b,{a:1,button:1}),abbr:b,address:e,area:h,article:e,aside:e,audio:a({source:1,track:1},e),b:b,base:h,bdi:b,bdo:b,blockquote:e,body:e,br:h,button:g(b,{a:1,button:1}),canvas:b,caption:e,cite:b,code:b,col:h,colgroup:{col:1},command:h,datalist:a({option:1},b),dd:e,del:b,details:a({summary:1},e),dfn:b,div:e,dl:{dt:1,dd:1},dt:e,em:b,embed:h,fieldset:a({legend:1},e),figcaption:e,figure:a({figcaption:1},
53e),footer:e,form:e,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},m),header:e,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:h,html:a({head:1,body:1},e,m),i:b,iframe:d,img:h,input:h,ins:b,kbd:b,keygen:h,label:b,legend:b,li:e,link:h,main:e,map:e,mark:b,menu:a({li:1},e),meta:h,meter:g(b,{meter:1}),nav:e,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:d,output:b,p:b,param:h,pre:b,progress:g(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,
54script:d,section:e,select:{optgroup:1,option:1},small:b,source:h,span:b,strong:b,style:d,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:e,textarea:d,tfoot:{tr:1},th:e,thead:{tr:1},time:g(b,{time:1}),title:d,tr:{th:1,td:1},track:h,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},e),wbr:h,acronym:b,applet:a({param:1},e),basefont:h,big:b,center:e,dialog:h,dir:{li:1},font:b,isindex:h,noframes:e,strike:b,tt:b};a(g,{$block:a({audio:1,
55dd:1,dt:1,figcaption:1,li:1,video:1},c,k),$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,
56base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},g.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,
57b: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,
58li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return g}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},preventDefault:function(a){var g=this.$;g.preventDefault?g.preventDefault():g.returnValue=!1;a&&this.stopPropagation()},
59stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,
60CKEDITOR.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(a){a&&(this.$=a)},CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(e){"undefined"!=typeof CKEDITOR&&a.fire(b,new CKEDITOR.dom.event(e))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(g){var b=this.getCustomData("_cke_nativeListeners");
61b||(b={},this.setCustomData("_cke_nativeListeners",b));b[g]||(b=b[g]=a(this,g),this.$.addEventListener?this.$.addEventListener(g,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+g,b));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),e=b&&b[a];e&&(this.$.removeEventListener?this.$.removeEventListener(a,
62e,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,e),delete b[a])}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var e=a[b];this.$.detachEvent?this.$.detachEvent("on"+b,e):this.$.removeEventListener&&this.$.removeEventListener(b,e,!1);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var g={};CKEDITOR.on("reset",function(){g={}});a.equals=function(a){try{return a&&a.$===this.$}catch(e){return!1}};a.setCustomData=function(a,
63e){var c=this.getUniqueId();(g[c]||(g[c]={}))[a]=e;return this};a.getCustomData=function(a){var e=this.$["data-cke-expando"];return(e=e&&g[e])&&a in e?e[a]:null};a.removeCustomData=function(a){var e=this.$["data-cke-expando"],e=e&&g[e],c,m;e&&(c=e[a],m=a in e,delete e[a]);return m?c:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.$["data-cke-expando"];a&&delete g[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};
64CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=
653,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(a,g){a.append(this,g);return a},clone:function(a,g){function b(c){c["data-cke-expando"]&&(c["data-cke-expando"]=!1);if(c.nodeType==CKEDITOR.NODE_ELEMENT||c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(g||
66c.nodeType!=CKEDITOR.NODE_ELEMENT||c.removeAttribute("id",!1),a){c=c.childNodes;for(var e=0;e<c.length;e++)b(c[e])}}function e(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.getName();":"==c[0]&&b.renameNode(c.substring(1))}if(a)for(c=0;c<b.getChildCount();c++)e(b.getChild(c))}}var c=this.$.cloneNode(a);b(c);c=new CKEDITOR.dom.node(c);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==
67CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&e(c);return c},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var g=[],b=this.getDocument().$.documentElement,e=this.$;e&&e!=b;){var c=e.parentNode;
68c&&g.unshift(this.getIndex.call({$:e},a));e=c}return g},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function g(a,d){var c=d?a.nextSibling:a.previousSibling;return c&&c.nodeType==CKEDITOR.NODE_TEXT?b(c)?g(c,d):c:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var e=this.$,c=-1,m;if(!this.$.parentNode||a&&e.nodeType==CKEDITOR.NODE_TEXT&&b(e)&&!g(e)&&!g(e,!0))return-1;
69do a&&e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(m||b(e))||(c++,m=e.nodeType==CKEDITOR.NODE_TEXT);while(e=e.previousSibling);return c},getNextSourceNode:function(a,g,b){if(b&&!b.call){var e=b;b=function(a){return!a.equals(e)}}a=!a&&this.getFirst&&this.getFirst();var c;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(c=(c||this).getParent());){if(b&&!1===b(c,!0))return null;a=c.getNext()}return!a||b&&!1===b(a)?null:g&&g!=a.type?a.getNextSourceNode(!1,
70g,b):a},getPreviousSourceNode:function(a,g,b){if(b&&!b.call){var e=b;b=function(a){return!a.equals(e)}}a=!a&&this.getLast&&this.getLast();var c;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(c=(c||this).getParent());){if(b&&!1===b(c,!0))return null;a=c.getPrevious()}return!a||b&&!1===b(a)?null:g&&a.type!=g?a.getPreviousSourceNode(!1,g,b):a},getPrevious:function(a){var g=this.$,b;do b=(g=g.previousSibling)&&10!=g.nodeType&&new CKEDITOR.dom.node(g);
71while(b&&a&&!a(b));return b},getNext:function(a){var g=this.$,b;do b=(g=g.nextSibling)&&new CKEDITOR.dom.node(g);while(b&&a&&!a(b));return b},getParent:function(a){var g=this.$.parentNode;return g&&(g.nodeType==CKEDITOR.NODE_ELEMENT||a&&g.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(g):null},getParents:function(a){var g=this,b=[];do b[a?"push":"unshift"](g);while(g=g.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;
72var g=this.contains?this:this.getParent();do if(g.contains(a))return g;while(g=g.getParent());return null},getPosition:function(a){var g=this.$,b=a.$;if(g.compareDocumentPosition)return g.compareDocumentPosition(b);if(g==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(g.contains){if(g.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(g))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in
73g)return 0>g.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:g.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}g=this.getAddress();a=a.getAddress();for(var b=Math.min(g.length,a.length),e=0;e<b;e++)if(g[e]!=a[e])return g[e]<a[e]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return g.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,g){var b=
74this.$,e,c;g||(b=b.parentNode);"function"==typeof a?(c=!0,e=a):(c=!1,e=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof a?b==a:b in a});for(;b;){if(e(c?new CKEDITOR.dom.node(b):b))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(m){b=null}}return null},hasAscendant:function(a,g){var b=this.$;g||(b=b.parentNode);for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return!0;b=b.parentNode}return!1},move:function(a,g){a.append(this.remove(),g)},remove:function(a){var g=
75this.$,b=g.parentNode;if(b){if(a)for(;a=g.firstChild;)b.insertBefore(g.removeChild(a),g);b.removeChild(g)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var g=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(g)g.length<b&&(a.split(b-g.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&
76(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var g=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(g)g.length<b&&(a.split(g.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var g=this;this.type!=CKEDITOR.NODE_ELEMENT&&(g=this.getParent());CKEDITOR.env.edge&&g&&g.is("textarea","input")&&(a=!0);
77if(!a&&g&&"undefined"!=typeof g.$.isContentEditable)return!(g.$.isContentEditable||g.data("cke-editable"));for(;g;){if(g.data("cke-editable"))return!1;if(g.hasAttribute("contenteditable"))return"false"==g.getAttribute("contenteditable");g=g.getParent()}return!0}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=
78this.$.document,g="CSS1Compat"==a.compatMode;return{width:(g?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(g?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):
79null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var g=new CKEDITOR.dom.element("link");g.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(g)}},appendStyleText:function(a){if(this.$.createStyleSheet){var g=this.$.createStyleSheet("");
80g.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return g||b.$.sheet},createElement:function(a,g){var b=new CKEDITOR.dom.element(a,this);g&&(g.attributes&&b.setAttributes(g.attributes),g.styles&&b.setStyles(g.styles));return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(g){return null}return new CKEDITOR.dom.element(a)},
81getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,g){for(var b=this.$.documentElement,e=0;b&&e<a.length;e++){var c=a[e];if(g)for(var m=-1,h=0;h<b.childNodes.length;h++){var d=b.childNodes[h];if(!0!==g||3!=d.nodeType||!d.previousSibling||3!=d.previousSibling.nodeType)if(m++,m==c){b=d;break}}else b=b.childNodes[c]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,g){CKEDITOR.env.ie&&8>=document.documentMode||!g||(a=g+":"+
82a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!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(a){this.$.open("text/html",
83"replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,
84!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}},CKEDITOR.dom.element=function(a,g){"string"==typeof a&&(a=(g?g.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,
85a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,g){var b=new CKEDITOR.dom.element("div",g);b.setHtml(a);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,g,b,e){var c=g.getCustomData("list_marker_id")||g.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),
86m=g.getCustomData("list_marker_names")||g.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[c]=g;m[b]=1;return g.setCustomData(b,e)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var g in a)CKEDITOR.dom.element.clearMarkers(a,a[g],1)},CKEDITOR.dom.element.clearMarkers=function(a,g,b){var e=g.getCustomData("list_marker_names"),c=g.getCustomData("list_marker_id"),m;for(m in e)g.removeCustomData(m);g.removeCustomData("list_marker_names");b&&(g.removeCustomData("list_marker_id"),
87delete a[c])},function(){function a(d,a){return-1<(" "+d+" ").replace(m," ").indexOf(" "+a+" ")}function g(d){var a=!0;d.$.id||(d.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),a=!1);return function(){a||d.removeAttribute("id")}}function b(d,a){var b=CKEDITOR.tools.escapeCss(d.$.id);return"#"+b+" "+a.split(/,\s*/).join(", #"+b+" ")}function e(d){for(var a=0,b=0,f=h[d].length;b<f;b++)a+=parseFloat(this.getComputedStyle(h[d][b])||0,10)||0;return a}var c=document.createElement("_").classList,c="undefined"!==
88typeof c&&null!==String(c.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:c?function(d){this.$.classList.add(d);return this}:function(d){var b=this.$.className;b&&(a(b,d)||(b+=" "+d));this.$.className=b||d;return this},removeClass:c?function(d){var a=this.$;a.classList.remove(d);a.className||a.removeAttribute("class");return this}:function(d){var b=this.getAttribute("class");b&&a(b,d)&&((b=b.replace(new RegExp("(?:^|\\s+)"+
89d+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",b):this.removeAttribute("class"));return this},hasClass:function(d){return a(this.$.className,d)},append:function(d,a){"string"==typeof d&&(d=this.getDocument().createElement(d));a?this.$.insertBefore(d.$,this.$.firstChild):this.$.appendChild(d.$);return d},appendHtml:function(d){if(this.$.childNodes.length){var a=new CKEDITOR.dom.element("div",this.getDocument());a.setHtml(d);a.moveChildren(this)}else this.setHtml(d)},appendText:function(d){null!=
90this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=d:this.append(new CKEDITOR.dom.text(d))},appendBogus:function(d){if(d||CKEDITOR.env.needsBrFiller){for(d=this.getLast();d&&d.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(d.getText());)d=d.getPrevious();d&&d.is&&d.is("br")||(d=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&d.setAttribute("type","_moz"),this.append(d))}},breakParent:function(d,a){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(d);
91var f=b.extractContents(!1,a||!1),c;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");c=f.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),b.append(c);b.insertAfter(this);b.remove(!0)}else f.insertAfterNode(this)},contains:document.compareDocumentPosition?function(d){return!!(this.$.compareDocumentPosition(d.$)&16)}:function(d){var a=this.$;return d.type!=CKEDITOR.NODE_ELEMENT?a.contains(d.getParent().$):
92a!=d.$&&a.contains(d.$)},focus:function(){function a(){try{this.$.focus()}catch(d){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(a){var b=CKEDITOR.tools.extend({},
93this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),b):b},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(f){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));
94return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,
952),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,f;a=CKEDITOR.tools.isArray(a)?
96a:[];for(f=0;f<c.length;f++)-1===CKEDITOR.tools.indexOf(a,c[f].name)&&(b[c[f].name]=c[f].value);return b},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?b.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=
97function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-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 a=this.$.nodeName.toLowerCase();
98if(CKEDITOR.env.ie&&8>=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},
99is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;b<arguments.length;b++)if(arguments[b]==a)return!0;return!1},isEditable:function(a){var b=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[b]||
100CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var b=this.clone(0,1);a=a.clone(0,1);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(b.$.isEqualNode)return b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),b.$.isEqualNode(a.$);b=b.getOuterHtml();a=
101a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"
vendor: 5,020 bytes, lines 101-110
101!=this.getComputedStyle("visibility"),b,c;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;
102for(var a=this.getChildren(),b=0,c=a.count();b<c;b++){var f=a.getItem(b);if(f.type!=CKEDITOR.NODE_ELEMENT||!f.data("cke-bookmark"))if(f.type==CKEDITOR.NODE_ELEMENT&&!f.isEmptyInlineRemoveable()||f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var c=a[b];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
103default:if(c.specified)return!0}}return!1}:function(){var a=this.$.attributes,b=a.length,c={"data-cke-expando":1,_moz_dirty:1};return 0<b&&(2<b||!c[a[0].nodeName]||2==b&&!c[a[1].nodeName])},hasAttribute:function(){function a(b){var d=this.$.attributes.getNamedItem(b);if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return d?
104d.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var f;if(b)for(;f=c.lastChild;)a.insertBefore(c.removeChild(f),a.firstChild);else for(;f=c.firstChild;)a.appendChild(c.removeChild(f))}},mergeSiblings:function(){function a(b,d,f){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var c=
105[];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(c.push(d),d=f?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(d)){for(var e=f?b.getLast():b.getFirst();c.length;)c.shift().move(b,!f);d.moveChildren(b,!f);d.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
106visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this,
107arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=
1080;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a=a||this.getAttributes(),a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var b=[],e=0;e<c.length;e++)if(f)for(var g=
1090;g<f.length;g++)b.push([a,c[e],f[g]].join("-"));else b.push([a,c[e]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select",
110"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,f=b.count();c<f;c++)a=b.getItem(c),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,f=this.getDocument(),e=f.getBody(),g="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
vendor: 13,483 bytes, lines 111-137
1118!==CKEDITOR.env.version:1)){var m=this.$.getBoundingClientRect(),h=f.$.documentElement,p=h.clientTop||e.$.clientTop||0,u=h.clientLeft||e.$.clientLeft||0,x=!0;CKEDITOR.env.ie&&(x=f.getDocumentElement().contains(this),f=f.getBody().contains(this),x=g&&f||!g&&x);x&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=e.$.scrollLeft||h.scrollLeft,c=e.$.scrollTop||h.scrollTop):(c=g?e.$:h,b=c.scrollLeft,c=c.scrollTop),b=m.left+b-u,c=m.top+c-p)}else for(p=this,u=null;p&&"body"!=p.getName()&&
112"html"!=p.getName();){b+=p.$.offsetLeft-p.$.scrollLeft;c+=p.$.offsetTop-p.$.scrollTop;p.equals(this)||(b+=p.$.clientLeft||0,c+=p.$.clientTop||0);for(;u&&!u.equals(p);)b-=u.$.scrollLeft,c-=u.$.scrollTop,u=u.getParent();u=p;p=(m=p.$.offsetParent)?new CKEDITOR.dom.element(m):null}a&&(m=this.getWindow(),p=a.getWindow(),!m.equals(p)&&m.$.frameElement&&(a=(new CKEDITOR.dom.element(m.$.frameElement)).getDocumentPosition(a),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
113g||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var c=b.getWindow();try{var f=c.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(e){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var f,e,g,m;function h(f,b){/body|html/.test(a.getName())?
114a.getWindow().$.scrollBy(f,b):(a.$.scrollLeft+=f,a.$.scrollTop+=b)}function p(a,f){var b={x:0,y:0};if(!a.is(x?"body":"html")){var d=a.$.getBoundingClientRect();b.x=d.left;b.y=d.top}d=a.getWindow();d.equals(f)||(d=p(CKEDITOR.dom.element.get(d.$.frameElement),f),b.x+=d.x,b.y+=d.y);return b}function u(a,f){return parseInt(a.getComputedStyle("margin-"+f)||0,10)||0}!a&&(a=this.getWindow());g=a.getDocument();var x="BackCompat"==g.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=x?g.getBody():g.getDocumentElement());
115CKEDITOR.env.webkit&&(g=this.getEditor(!1))&&(g._.previousScrollTop=null);g=a.getWindow();e=p(this,g);var q=p(a,g),y=this.$.offsetHeight;f=this.$.offsetWidth;var r=a.$.clientHeight,z=a.$.clientWidth;g=e.x-u(this,"left")-q.x||0;m=e.y-u(this,"top")-q.y||0;f=e.x+f+u(this,"right")-(q.x+z)||0;e=e.y+y+u(this,"bottom")-(q.y+r)||0;(0>m||0<e)&&h(0,!0===b?m:!1===b?e:0>m?m:e);c&&(0>g||0<f)&&h(0>g?g:f,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
116"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},
117getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var f=0;f<c.length;f++){var e=c[f],g=e.nodeName.toLowerCase(),m;if(!(g in b))if("checked"==g&&(m=this.getAttribute(g)))a.setAttribute(g,m);else if(!CKEDITOR.env.ie||this.hasAttribute(g))m=this.getAttribute(g),null===m&&(m=e.nodeValue),a.setAttribute(g,m)}""!==this.$.style.cssText&&
118(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,c){var f=b.childNodes;if(0<=c&&c<f.length)return f[c]}return function(b){var c=this.$;if(b.slice)for(b=b.slice();0<b.length&&c;)c=a(c,
119b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
120"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,c,f,e;a=a||void 0===a;for(c in b)if(f=b[c],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(e=f.editable())&&(e.equals(this)||e.contains(this)))return f;return null},find:function(a){var c=g(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this,
121a)));c();return a},findOne:function(a){var c=g(this);a=this.$.querySelector(b(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var f=a(this);if(!1!==f){c=this.getChildren();for(var e=0;e<c.count();e++)f=c.getItem(e),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}}});var h={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
122CKEDITOR.dom.element.prototype.setSize=function(a,b,c){"number"==typeof b&&(!c||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=e.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var c=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(c-=e.call(this,a));return c}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,
123CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.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,
124getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,f){var b=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(b.collapsed)return this.end(),null;b.optimize()}var c,d=b.startContainer;c=b.endContainer;var e=b.startOffset,n=b.endOffset,l,g=this.guard,m=this.type,h=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var k=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),C=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(n):c.getNext();this._.guardLTR=function(a,
125f){return(!f||!k.equals(a))&&(!C||!a.equals(C))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(b.root))}}if(a&&!this._.guardRTL){var G=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),F=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,f){return(!f||!G.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(b.root))}}var J=a?this._.guardRTL:this._.guardLTR;l=g?function(a,f){return!1===J(a,f)?!1:g(a,f)}:J;this.current?c=this.current[h](!1,
126m,l):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<n?c.getChild(n-1):!1===l(c,!0)?null:c.getPreviousSourceNode(!0,m,l)):(c=d,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(e))||(c=!1===l(d,!0)?null:d.getNextSourceNode(!0,m,l)))),c&&!1===l(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!f)return c}else if(f&&this.evaluator)return!1;c=c[h](!1,m,l)}this.end();return this.current=null}function g(f){for(var b,c=null;b=a.call(this,f);)c=b;return c}CKEDITOR.dom.walker=
127CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return g.call(this)},lastBackward:function(){return g.call(this,1)},reset:function(){delete this.current;this._={}}}});var b={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,
128"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},e={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in e||!b[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(f){return!(f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
129function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,f){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(c){var d,e;d=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(e=c.getParent())&&b(e);d=a?d:d||b(c);return!!(f^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(f){var b;f&&f.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(f.getText())||CKEDITOR.env.webkit&&f.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
130return!!(a^b)}};CKEDITOR.dom.walker.invisible=function(a){var f=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(c){f(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent()),c=c.$.offsetWidth<=b);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,f){return function(b){return!!(f^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function f(a){return!m(a)&&!h(a)}return function(b){var d=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&c.test(b.getText());d&&(d=b.getParent(),
131b=b.getNext(f),d=d.isBlockBoundary()&&(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^d)}};CKEDITOR.dom.walker.temp=function(a){return function(f){f.type!=CKEDITOR.NODE_ELEMENT&&(f=f.getParent());f=f&&f.hasAttribute("data-cke-temp");return!!(a^f)}};var c=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),d=CKEDITOR.dom.walker.temp(),k=function(a){return h(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
132CKEDITOR.dom.walker.ignored=function(a){return function(f){f=m(f)||h(f)||d(f);return!!(a^f)}};var l=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(f){for(var b=0,c=f.getChildCount();b<c;++b)if(!l(f.getChild(b)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var f={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(f[b]=1);return f}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
133function(a){return function(b){b=l(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(k(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&c.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
134this.startOffset=this.startContainer=null;this.collapsed=!0;var g=a instanceof CKEDITOR.dom.document;this.document=g?a:a.getDocument();this.root=g?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function g(a,b,c,d,e){function l(a,f,b,c){var d=b?a.getPrevious():a.getNext();if(c&&h)return d;r||c?f.append(a.clone(!0,e),b):(a.remove(),k&&f.append(a,b));return d}function g(){var a,f,b,c=Math.min(E.length,
135D.length);for(a=0;a<c;a++)if(f=E[a],b=D[a],!f.equals(b))return a;return a-1}function m(){var b=O-1,c=J&&H&&!z.equals(A);b<S-1||b<Q-1||c?(c?a.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START):Q==b+1&&F?a.moveToPosition(D[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(D[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=E[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),
136b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var h=0===b,k=1==b,r=2==b;b=r||k;var z=a.startContainer,A=a.endContainer,B=a.startOffset,C=a.endOffset,G,F,J,H,I,L;if(r&&A.type==CKEDITOR.NODE_TEXT&&(z.equals(A)||z.type===CKEDITOR.NODE_ELEMENT&&z.getFirst().equals(A)))c.append(a.document.createText(A.substring(B,C)));else{A.type==CKEDITOR.NODE_TEXT?r?L=!0:A=A.split(C):0<A.getChildCount()?C>=A.getChildCount()?(A=A.getChild(C-1),F=!0):A=A.getChild(C):H=F=!0;z.type==
137CKEDITOR.NODE_TEXT?r?I=!0:z.split(B):0<z.getChildCount()?0===B?(z=z.getChild(B),G=!0):z=z.getChild(B-1):J=G=!0;
vendor: 20,465 bytes, lines 137-176
137for(var E=z.getParents(),D=A.getParents(),O=g(),S=E.length-1,Q=D.length-1,K=c,V,U,X,ga=-1,N=O;N<=S;N++){U=E[N];X=U.getNext();for(N!=S||U.equals(D[N])&&S<Q?b&&(V=K.append(U.clone(0,e))):G?l(U,K,!1,J):I&&K.append(a.document.createText(U.substring(B)));X;){if(X.equals(D[N])){ga=N;break}X=l(X,K)}K=V}K=c;for(N=O;N<=Q;N++)if(c=D[N],X=c.getPrevious(),c.equals(E[N]))b&&(K=K.getChild(0));else{N!=
138Q||c.equals(E[N])&&Q<S?b&&(V=K.append(c.clone(0,e))):F?l(c,K,!1,H):L&&K.append(a.document.createText(c.substring(0,C)));if(N>ga)for(;X;)X=l(X,K,!0);K=V}r||m()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(m)?!1:!0}}function e(a){var b=CKEDITOR.dom.walker.whitespaces(),
139c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&h(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function c(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&l(a)&&(b=a);return k(a)&&!(h(a)&&a.equals(b))})}}var m={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},h=CKEDITOR.dom.walker.bogus(),
140d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,k=CKEDITOR.dom.walker.editable(),l=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),
141this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||g(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,e,l=this.collapsed;b=this.document.createElement("span");
142b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",d+(l?"C":"S")));l||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",d+"E"),e=this.clone(),e.collapse(),e.insertNode(c));e=this.clone();e.collapse(!0);e.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(l?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:l}},createBookmark2:function(){function a(f){var b=
143f.container,d=f.offset,e;e=b;var l=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===l||l==e.getChildCount()?0:e.getChild(l-1).type==CKEDITOR.NODE_TEXT&&e.getChild(l).type==CKEDITOR.NODE_TEXT;e&&(b=b.getChild(d-1),d=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(e=b;d--;)if(l=e.getChild(d).getIndex(!0),0<=l){d=l;break a}d=-1}d+=1}if(b.type==CKEDITOR.NODE_TEXT){e=b;for(l=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)l+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
144e=l;b.getText()?d+=e:(l=b.getPrevious(c),e?(d=e,b=l?l.getNext():b.getParent().getFirst()):(b=b.getParent(),d=l?l.getIndex(!0)+1:0))}f.container=b;f.offset=d}function b(a,f){var c=f.getCustomData("cke-fillingChar");if(c){var d=a.container;c.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,e={container:this.startContainer,
145offset:this.startOffset},l={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root),d||(a(l),b(l,this.root)));return{start:e.container.getAddress(c),end:d?null:l.container.getAddress(c),startOffset:e.offset,endOffset:l.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=
146(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=
147a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):
148c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);
149b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var l=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(l,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();
150this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var l=function(a,b){var f=new CKEDITOR.dom.range(m);
151f.setStart(a,b);f.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);var f=new CKEDITOR.dom.walker(f),c;for(f.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};c=f.next();){if(c.type!=CKEDITOR.NODE_TEXT)return!1;G=c!=a?c.getText():c.substring(b);if(d.test(G))return!1}return!0};if(this.collapsed)break;var g=this.getCommonAncestor(),m=this.root,h,k,r,z,A,B=!1,C,G;C=this.startContainer;var F=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(F&&(C=!CKEDITOR.tools.trim(C.substring(0,F)).length&&
152C,B=!!C),C&&((z=C.getPrevious())||(r=C.getParent()))):(F&&(z=C.getChild(F-1)||C.getLast()),z||(r=C));for(r=c(r);r||z;){if(r&&!z){!A&&r.equals(g)&&(A=!0);if(e?r.isBlockBoundary():!m.contains(r))break;B&&"inline"==r.getComputedStyle("display")||(B=!1,A?h=r:this.setStartBefore(r));z=r.getPrevious()}for(;z;)if(C=!1,z.type==CKEDITOR.NODE_COMMENT)z=z.getPrevious();else{if(z.type==CKEDITOR.NODE_TEXT)G=z.getText(),d.test(G)&&(z=null),C=/[\s\ufeff]$/.test(G);else if((z.$.offsetWidth>(CKEDITOR.env.webkit?1:
1530)||b&&z.is("br"))&&!z.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[z.getName()]){G=z.getText();if(d.test(G))z=null;else for(var F=z.$.getElementsByTagName("*"),J=0,H;H=F[J++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){z=null;break}z&&(C=!!G.length)}else z=null;C&&(B?A?h=r:r&&this.setStartBefore(r):B=!0);if(z){C=z.getPrevious();if(!r&&!C){r=z;z=null;break}z=C}else r=null}r&&(r=c(r.getParent()))}C=this.endContainer;F=this.endOffset;r=z=null;A=B=!1;C.type==CKEDITOR.NODE_TEXT?
154CKEDITOR.tools.trim(C.substring(F)).length?B=!0:(B=!C.getLength(),F==C.getLength()?(z=C.getNext())||(r=C.getParent()):l(C,F)&&(r=C.getParent())):(z=C.getChild(F))||(r=C);for(;r||z;){if(r&&!z){!A&&r.equals(g)&&(A=!0);if(e?r.isBlockBoundary():!m.contains(r))break;B&&"inline"==r.getComputedStyle("display")||(B=!1,A?k=r:r&&this.setEndAfter(r));z=r.getNext()}for(;z;){C=!1;if(z.type==CKEDITOR.NODE_TEXT)G=z.getText(),l(z,0)||(z=null),C=/^[\s\ufeff]/.test(G);else if(z.type==CKEDITOR.NODE_ELEMENT){if((0<z.$.offsetWidth||
155b&&z.is("br"))&&!z.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[z.getName()]){G=z.getText();if(d.test(G))z=null;else for(F=z.$.getElementsByTagName("*"),J=0;H=F[J++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){z=null;break}z&&(C=!!G.length)}else z=null}else C=1;C&&B&&(A?k=r:this.setEndAfter(r));if(z){C=z.getNext();if(!r&&!C){r=z;z=null;break}z=C}else r=null}r&&(r=c(r.getParent()))}h&&k&&(g=h.contains(k)?k:h,this.setStartBefore(g),this.setEndAfter(g));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=
156new CKEDITOR.dom.range(this.root);m=this.root;r.setStartAt(m,CKEDITOR.POSITION_AFTER_START);r.setEnd(this.startContainer,this.startOffset);r=new CKEDITOR.dom.walker(r);var I,L,E=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,O=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(D){if(D.equals(a)){D=null;return}}else D=a;else if(D)return;var b=E(a);b||(I=a);return b},e=function(a){var b=O(a);!b&&a.is&&a.is("br")&&
157(L=a);return b};r.guard=O;r=r.lastBackward();I=I||m;this.setStartAt(I,!I.is("br")&&(!r&&this.checkStartOfBlock()||r&&I.contains(r))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){r=this.clone();r=new CKEDITOR.dom.walker(r);var S=CKEDITOR.dom.walker.whitespaces(),Q=CKEDITOR.dom.walker.bookmark();r.evaluator=function(a){return!S(a)&&!Q(a)};if((r=r.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br"))break}r=this.clone();r.collapse();r.setEndAt(m,
158CKEDITOR.POSITION_BEFORE_END);r=new CKEDITOR.dom.walker(r);r.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:O;I=D=L=null;r=r.lastForward();I=I||m;this.setEndAt(I,!r&&this.checkEndOfBlock()||r&&I.contains(r)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);L&&this.setEndAfter(L)}},shrink:function(a,b,c){var d="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:!0,e=c&&c.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var l=this.clone(),g=
159this.startContainer,m=this.endContainer,h=this.startOffset,k=this.endOffset,r=c=1;g&&g.type==CKEDITOR.NODE_TEXT&&(h?h>=g.getLength()?l.setStartAfter(g):(l.setStartBefore(g),c=0):l.setStartBefore(g));m&&m.type==CKEDITOR.NODE_TEXT&&(k?k>=m.getLength()?l.setEndAfter(m):(l.setEndAfter(m),r=0):l.setEndBefore(m));var l=new CKEDITOR.dom.walker(l),z=CKEDITOR.dom.walker.bookmark(),A=CKEDITOR.dom.walker.bogus();l.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
160var B;l.guard=function(b,c){if(e&&A(b)||z(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(B)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(B=b);return!0};c&&(g=l[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);r&&(l.reset(),(l=l[a==CKEDITOR.SHRINK_ELEMENT?
161"lastBackward":"previous"]())&&this.setEndAt(l,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!c&&!r)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);
162this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+
1631,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);
164break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);
165break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var e=d.getBogus();e&&e.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),
166e=c.block,l=d.block,g=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),l=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),l||(l=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=l&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(l)&&(d?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(l,CKEDITOR.POSITION_AFTER_END),l=null):c?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,
167CKEDITOR.POSITION_BEFORE_START),e=null):(l=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:l,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:g}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(f){return function(a){return b(a)||
168c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||f.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,l;e&&!e.equals(d.root)&&!e.getFirst(a(e));)l=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=l;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,
169this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var c=b==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt":"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=e(c);return d[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,
170c)),d.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),d.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,
171this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);
172c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,
173b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&d.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&
174this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,g=c,m=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(m=e[b?"getLast":"getFirst"](l));g||m||(m=e[b?"getPrevious":"getNext"](l));a=m}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,e,l,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),
175c.moveToPosition(a,g[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(l=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&l&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,g[b?1:0]);d&&this.moveToRange(c);
176return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespace
vendor: 14,368 bytes, lines 176-204
176s(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();
177a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:c(),getPreviousEditableNode:c(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.startContainer,c=
178this.endContainer,d=b.getAscendant("table",!0),e=c.getAscendant("table",!0);return d&&!this.root.contains(d)?null:CKEDITOR.env.safari&&d&&c.equals(this.root)?b.getAscendant(a,!0):this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&e&&(d.equals(e)||d.contains(e)||e.contains(d))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==
179CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c),b.remove());a.remove()},getClientRects:function(){function a(b,c){var f=CKEDITOR.tools.array.map(b,function(a){return a}),d=new CKEDITOR.dom.range(c.root),e,l,g;c.startContainer instanceof CKEDITOR.dom.element&&(l=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&
180(g=(g=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));l&&d.setStart(c.startContainer.getParent(),c.startContainer.getIndex());g&&d.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(l||g)c=d;d=c.cloneContents();d=CKEDITOR.dom.document.prototype.find.call(d,"[data-cke-widget-id]").toArray();if(d=CKEDITOR.tools.array.map(d,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");
181return b.widgets.instances[a].element}))return d=CKEDITOR.tools.array.map(d,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;e=this.root.getDocument().$.createRange();e.setStart(b.getParent().$,b.getIndex());e.setEnd(b.getParent().$,b.getIndex()+1);b=e.getClientRects();b.widgetRect=a.getClientRect();return b},c),CKEDITOR.tools.array.forEach(d,function(a){function b(d){CKEDITOR.tools.array.forEach(f,function(b,e){var l=CKEDITOR.tools.objectCompare(a[d],b);l||(l=CKEDITOR.tools.objectCompare(a.widgetRect,
182b));l&&(Array.prototype.splice.call(f,e,a.length-d,a.widgetRect),c=!0)});c||(d<f.length-1?b(d+1):f.push(a.widgetRect))}var c;b(0)}),f}function b(a,c,f){var e;c.collapsed?f.startContainer instanceof CKEDITOR.dom.element?(a=f.checkStartOfBlock(),e=new CKEDITOR.dom.text("\u200b"),a?f.startContainer.append(e,!0):0===f.startOffset?e.insertBefore(f.startContainer.getFirst()):(f=f.startContainer.getChildren().getItem(f.startOffset-1),e.insertAfter(f)),c.setStart(e.$,0),c.setEnd(e.$,0),a=c.getClientRects(),
183e.remove()):f.startContainer instanceof CKEDITOR.dom.text&&(""===f.startContainer.getText()?(f.startContainer.setText("\u200b"),a=c.getClientRects(),f.startContainer.setText("")):a=[d(f.createBookmark())]):a=[d(f.createBookmark())];return a}function c(a,b,f){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(f.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function d(a){var b=a.startNode;a=a.endNode;var c;b.setText("\u200b");
184b.removeStyle("display");a?(a.setText("\u200b"),a.removeStyle("display"),c=[b.getClientRect(),a.getClientRect()],a.remove()):c=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(c[0].right,c[1].right),bottom:Math.max(c[0].bottom,c[1].bottom),left:Math.min(c[0].left,c[1].left),top:Math.min(c[0].top,c[1].top),width:Math.abs(c[0].left-c[1].left),height:Math.max(c[0].bottom,c[1].bottom)-Math.min(c[0].top,c[1].top)}}return void 0!==this.document.getSelection?function(d){var e=this.root.getDocument().$.createRange(),
185l;e.setStart(this.startContainer.$,this.startOffset);e.setEnd(this.endContainer.$,this.endOffset);l=e.getClientRects();l=a(l,this);l.length||(l=b(l,e,this));return CKEDITOR.tools.array.map(l,function(a){return c(a,d,this)},this)}:function(a){return[c(d(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],l,g,m,h;if(c&&c.find)for(g=
186c.find(a),l=0;l<g.count();l++)if(c=g.getItem(l),b||!c.isReadOnly())m=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(c),h=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||d.endNode.equals(c),m&&h&&e.push(c);return e}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],f=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var d=new CKEDITOR.dom.range(b.root),f=new CKEDITOR.dom.walker(d),
187e=CKEDITOR.dom.walker.whitespaces();d.setStart(c.endContainer,c.endOffset);d.setEnd(b.startContainer,b.startOffset);for(d=f.next();e(d)||b.endContainer.equals(d);)d=f.next();f=!d}f?c.setEnd(b.endContainer,b.endOffset):a.push(b);return a},[])}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=
1881,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function g(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,d,e){a:{null==e&&(e=g(d));for(var m;m=e.shift();)if(m.getDtd().p){e={element:m,remaining:e};break a}e=null}if(!e)return 0;
189if((m=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!m.check(c))return b(a,c,d,e.remaining);c=new CKEDITOR.dom.range(e.element);c.selectNodeContents(e.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=m;a._.nestedEditable={element:e.element,container:d,remaining:e.remaining,iterator:c};return 1}function e(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}
190var c=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),h=CKEDITOR.dom.walker.whitespaces(!0),d=function(a){return m(a)&&h(a)},k={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var f,g,h,v,t;a=a||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,f;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,
191this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var p=this.range.clone();g=p.startPath();var u=p.endPath(),x=!p.collapsed&&e(p,g.block),q=!p.collapsed&&e(p,u.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);x&&p.setStartAt(g.block,CKEDITOR.POSITION_BEFORE_END);q&&p.setEndAt(u.block,CKEDITOR.POSITION_AFTER_START);g=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&
192!g||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);p.collapsed||(g=new CKEDITOR.dom.walker(p.clone()),u=CKEDITOR.dom.walker.bookmark(!0,!0),g.evaluator=u,this._.nextNode=g.next(),g=new CKEDITOR.dom.walker(p.clone()),g.evaluator=u,g=g.previous(),this._.lastNode=g.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(u=this.range.clone(),
193u.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),u.checkEndOfBlock()&&(u=new CKEDITOR.dom.elementPath(u.endContainer,u.root),this._.lastNode=(u.block||u.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(g)),p=null);this._.started=1;g=p}u=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;u;){var x=0,q=u.hasAscendant("pre"),y=u.type!=CKEDITOR.NODE_ELEMENT,
194r=0;if(y)u.type==CKEDITOR.NODE_TEXT&&c.test(u.getText())&&(y=0);else{var z=u.getName();if(CKEDITOR.dtd.$block[z]&&"false"==u.getAttribute("contenteditable")){f=u;b(this,a,f);break}else if(u.isBlockBoundary(this.forceBrBreak&&!q&&{br:1})){if("br"==z)y=1;else if(!g&&!u.getChildCount()&&"hr"!=z){f=u;h=u.equals(p);break}g&&(g.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),"br"!=z&&(this._.nextNode=u));x=1}else{if(u.getFirst()){g||(g=this.range.clone(),g.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));u=u.getFirst();
195continue}y=1}}y&&!g&&(g=this.range.clone(),g.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));h=(!x||y)&&u.equals(p);if(g&&!x)for(;!u.getNext(d)&&!h;){z=u.getParent();if(z.isBlockBoundary(this.forceBrBreak&&!q&&{br:1})){x=1;y=0;h||z.equals(p);g.setEndAt(z,CKEDITOR.POSITION_BEFORE_END);break}u=z;y=1;h=u.equals(p);r=1}y&&g.setEndAt(u,CKEDITOR.POSITION_AFTER_END);u=this._getNextSourceNode(u,r,p);if((h=!u)||x&&g)break}if(!f){if(!g)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=
196null;f=new CKEDITOR.dom.elementPath(g.startContainer,g.root);u=f.blockLimit;x={div:1,th:1,td:1};f=f.block;!f&&u&&!this.enforceRealBlocks&&x[u.getName()]&&g.checkStartOfBlock()&&g.checkEndOfBlock()&&!u.equals(g.root)?f=u:!f||this.enforceRealBlocks&&f.is(k)?(f=this.range.document.createElement(a),g.extractContents().appendTo(f),f.trim(),g.insertNode(f),v=t=!0):"li"!=f.getName()?g.checkStartOfBlock()&&g.checkEndOfBlock()||(f=f.clone(!1),g.extractContents().appendTo(f),f.trim(),t=g.splitBlock(),v=!t.wasStartOfBlock,
197t=!t.wasEndOfBlock,g.insertNode(f)):h||(this._.nextNode=f.equals(p)?null:this._getNextSourceNode(g.getBoundaryNodes().endNode,1,p))}v&&(v=f.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());t&&(v=f.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(m)||v.getNext(m))&&v.remove();this._.nextNode||(this._.nextNode=h||f.equals(p)||!p?null:this._getNextSourceNode(f,
1981,p));return f},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(e))}var e=this.range.root;for(a=a.getNextSourceNode(b,null,d);!m(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,g){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==g.exec.call(this,
199a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:b})?!0:g.refresh&&!1!==g.refresh.apply(this,arguments)};var b;this.checkAllowed=function(e){return e||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,g,{modes:{wysiwyg:1},
200editorFocus:1,contextSensitive:!!g.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(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=
201this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,
202docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,f){var e,l;a=[];for(e in b){l=b[e];l="boolean"==typeof l?{}:"function"==typeof l?{match:l}:J(l);"$"!=e.charAt(0)&&(l.elements=e);c&&(l.featureName=c.toLowerCase());var g=l;g.elements=h(g.elements,
203/\s+/)||null;g.propertiesOnly=g.propertiesOnly||!0===g.elements;var m=/\s*,\s*/,k=void 0;for(k in L){g[k]=h(g[k],m)||null;var r=g,n=E[k],u=h(g[E[k]],m),D=g[k],q=[],A=!0,z=void 0;u?A=!1:u={};for(z in D)"!"==z.charAt(0)&&(z=z.slice(1),q.push(z),u[z]=!0,A=!1);for(;z=q.pop();)D[z]=D["!"+z],delete D["!"+z];r[n]=(A?!1:u)||null}g.match=g.match||null;d.push(l);a.push(l)}b=f.elements;f=f.generic;var w;c=0;for(d=a.length;c<d;++c){e=J(a[c]);l=!0===e.classes||!0===e.styles||!0===e.attributes;g=e;k=n=m=void 0;
204for(m in L)g[m]=x(g[m]);r=!0;for(k in E){m=E[k];n=g[m];u=[];D=void 0;for(D in n)-1<D.indexOf("*")?u.push(new RegExp("^"+D.replace(/\*/g,".*")+"$")):u.push(D);n=u;n.length&&(g[m]=n,r=!1)}g.nothingRequired=r;g.noProperties=!(g.attributes||g.classes||g.styles);if(!0===e.elements||null===e.elements)f[l?"unshift":"push"](e);else for(w in g=e.elements,delete e.elements,g)if(b[w])b[w][l?"unshift":"push"](e);else b[w]=[e]}}
vendor: 4,540 bytes, lines 204-213
204function g(a,c,f,e){if(!a.match||a.match(c))if(e||d(a,c))if(a.propertiesOnly||(f.valid=
205!0),f.allAttributes||(f.allAttributes=b(a.attributes,c.attributes,f.validAttributes)),f.allStyles||(f.allStyles=b(a.styles,c.styles,f.validStyles)),!f.allClasses){a=a.classes;c=c.classes;e=f.validClasses;if(a)if(!0===a)a=!0;else{for(var g=0,l=c.length,m;g<l;++g)m=c[g],e[m]||(e[m]=a(m));a=!1}else a=!1;f.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var f in b)c[f]||(c[f]=a(f));return!1}function e(a,b,f){if(!a.match||a.match(b)){if(a.noProperties)return!1;f.hadInvalidAttribute=
206c(a.attributes,b.attributes)||f.hadInvalidAttribute;f.hadInvalidStyle=c(a.styles,b.styles)||f.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=!1,e=!0===a,g=b.length;g--;)if(e||a(b[g]))b.splice(g,1),d=!0;a=d}else a=!1;f.hadInvalidClass=a||f.hadInvalidClass}}function c(a,b){if(!a)return!1;var c=!1,f=!0===a,d;for(d in b)if(f||a(d))delete b[d],c=!0;return c}function m(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function h(a,b){if(!a)return!1;if(!0===a)return a;
207if("string"==typeof a)return a=H(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},f=0,d;for(d in a)c[d]=a[d],f++;return f?c:!1}function d(a,b){if(a.nothingRequired)return!0;var c,f,d,e;if(d=a.requiredClasses)for(e=b.classes,c=0;c<d.length;++c)if(f=d[c],"string"==typeof f){if(-1==CKEDITOR.tools.indexOf(e,f))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(e,f))return!1;return k(b.styles,
208a.requiredStyles)&&k(b.attributes,a.requiredAttributes)}function k(a,b){if(!b)return!0;for(var c=0,f;c<b.length;++c)if(f=b[c],"string"==typeof f){if(!(f in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,f))return!1;return!0}function l(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,c,f,d,e={},g=1;for(a=H(a);b=a.match(D);)(c=b[2])?(f=n(c,"styles"),d=n(c,"attrs"),c=n(c,"classes")):f=d=c=null,e["$"+g++]=
209{elements:b[1],classes:c,styles:f,attributes:d},a=a.slice(b[0].length);return e}function n(a,b){var c=a.match(O[b]);return c?H(c[1]):null}function w(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function v(a,b,c,f){var d=0,l;f.toHtml&&(b.name=b.name.replace(S,"$1"));if(f.doCallbacks&&a.elementCallbacks){a:{l=a.elementCallbacks;for(var m=0,h=l.length,k;m<h;++m)if(k=
210l[m](b)){l=k;break a}l=void 0}if(l)return l}if(f.doTransform&&(l=a._.transformations[b.name])){w(b);for(m=0;m<l.length;++m)z(a,b,l[m]);p(b)}if(f.doFilter){a:{m=b.name;h=a._;a=h.allowedRules.elements[m];l=h.allowedRules.generic;m=h.disallowedRules.elements[m];h=h.disallowedRules.generic;k=f.skipRequired;var r={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},n,D;if(a||l){w(b);if(m)for(n=
2110,D=m.length;n<D;++n)if(!1===e(m[n],b,r)){a=null;break a}if(h)for(n=0,D=h.length;n<D;++n)e(h[n],b,r);if(a)for(n=0,D=a.length;n<D;++n)g(a[n],b,r,k);if(l)for(n=0,D=l.length;n<D;++n)g(l[n],b,r,k);a=r}else a=null}if(!a||!a.valid)return c.push(b),1;D=a.validAttributes;var q=a.validStyles;l=a.validClasses;var m=b.attributes,A=b.styles,h=b.classes;k=b.classBackup;var x=b.styleBackup,E,y,J=[],r=[],B=/^data-cke-/;n=!1;delete m.style;delete m["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(E in m)D[E]||
212(B.test(E)?E==(y=E.replace(/^data-cke-saved-/,""))||D[y]||(delete m[E],n=!0):(delete m[E],n=!0));if(!a.allStyles||a.hadInvalidStyle){for(E in A)a.allStyles||q[E]?J.push(E+":"+A[E]):n=!0;J.length&&(m.style=J.sort().join("; "))}else x&&(m.style=x);if(!a.allClasses||a.hadInvalidClass){for(E=0;E<h.length;++E)(a.allClasses||l[h[E]])&&r.push(h[E]);r.length&&(m["class"]=r.sort().join(" "));k&&r.length<k.split(/\s+/).length&&(n=!0)}else k&&(m["class"]=k);n&&(d=1);if(!f.skipFinalValidation&&!u(b))return c.push(b),
2131}f.toHtml&&(b.name=b.name.replace(Q,"cke:$1"));return d}function t(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function p(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}
vendor: 69,249 bytes, lines 213-347
213function u(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}
214function x(a){if(!a)return!1;if(!0===a)return!0;var b=t(a);return function(c){return c in a||b&&c.match(b)}}function q(){return new CKEDITOR.htmlParser.element("br")}function y(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||F.$block[a.name])}function r(a,b,c){var f=a.name;if(F.$empty[f]||!a.children.length)"hr"==f&&"br"==b?a.replaceWith(q()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(F.$block[f]||"tr"==f)if("br"==b)a.previous&&!y(a.previous)&&(b=q(),b.insertBefore(a)),
215a.next&&!y(a.next)&&(b=q(),b.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,d;b:{d=F[b];for(var e=0,l=f.length,g;e<l;++e)if(g=f[e],g.type==CKEDITOR.NODE_ELEMENT&&!d[g.name]){d=!1;break b}d=!0}if(d)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{d=a.parent;for(var e=d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==d.name,m,h,l=f.length;0<l;)g=f[--l],e&&(g.type==CKEDITOR.NODE_TEXT||g.type==CKEDITOR.NODE_ELEMENT&&F.$inline[g.name])?(m||(m=new CKEDITOR.htmlParser.element(b),
216m.insertAfter(a),c.push({check:"parent-down",el:m})),m.add(g,0)):(m=null,h=F[d.name]||F.span,g.insertAfter(a),d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||g.type!=CKEDITOR.NODE_ELEMENT||h[g.name]||c.push({check:"el-up",el:g}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function z(a,b,c){var f,d;for(f=0;f<c.length;++f)if(d=c[f],!(d.check&&!a.check(d.check,!1)||d.left&&!d.left(b))){d.right(b,K);break}}function A(a,b){var c=b.getDefinition(),
217f=c.attributes,d=c.styles,e,l,g,m;if(a.name!=c.element)return!1;for(e in f)if("class"==e)for(c=f[e].split(/\s+/),g=a.classes.join("|");m=c.pop();){if(-1==g.indexOf(m))return!1}else if(a.attributes[e]!=f[e])return!1;for(l in d)if(a.styles[l]!=d[l])return!1;return!0}function B(a,b){var c,f;"string"==typeof a?c=a:a instanceof CKEDITOR.style?f=a:(c=a[0],f=a[1]);return[{element:c,left:f,right:function(a,c){c.transform(a,b)}}]}function C(a){return function(b){return A(b,a)}}function G(a){return function(b,
218c){c[a](b)}}var F=CKEDITOR.dtd,J=CKEDITOR.tools.copy,H=CKEDITOR.tools.trim,I=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,b){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}};CKEDITOR.filter.instances[this.id]=this;var c=this.editor=a instanceof
219CKEDITOR.editor?a:null;if(c&&!b){this.customConfig=!0;var f=c.config.allowedContent;!0===f?this.disabled=!0:(f||(this.customConfig=!1),this.allow(f,"config",1),this.allow(c.config.extraAllowedContent,"extra",1),this.allow(I[c.enterMode]+" "+I[c.shiftEnterMode],"default",1),this.disallow(c.config.disallowedContent))}else this.customConfig=!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!m(this,b,d))return!1;var e,l;if("string"==typeof b)b=
220f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);e=b.getDefinition();b={};d=e.attributes;b[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.objectKeys(e.styles)};d&&(d=J(d),e.classes=d["class"]?d["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete d["class"],e.attributes=d,e.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)l=this.allow(b[e],
221c,d);return l}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,f){if(this.disabled)return!1;var d=this,e=[],l=this.editor&&this.editor.config.protectedSource,g,m=!1,h={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(g=v(d,a,e,h),g&1)m=!0;else if(g&2)return!1}else if(a.type==
222CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var f=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var k,r,n;if(l)for(r=0;r<l.length;++r)if((n=f.match(l[r]))&&n[0].length==f.length){c=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(k=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&v(d,k,c,h);c=!c.length}c||e.push(a)}},null,!0);e.length&&(m=!0);var k;a=[];f=I[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c=
223e.pop();)c.type==CKEDITOR.NODE_ELEMENT?r(c,f,a):c.remove();for(;k=a.pop();)if(c=k.el,c.parent)switch(n=F[c.parent.name]||F.span,k.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?r(c,f,a):u(c)||r(c,f,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||r(c,f,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||r(c.parent,f,a)}return m},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));
224return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!m(this,b,!0))return!1;"string"==typeof b&&(b=f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,f=[],d;for(b=0;b<a.length&&!d;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(d=c);if(d){for(b=0;b<a.length;++b)f.push(B(a[b],d));this.addTransformations(f)}}},addElementCallback:function(a){this.elementCallbacks||
225(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var f=this._.transformations,d;for(d=0;d<a.length;++d){b=
226a[d];var e=void 0,l=void 0,g=void 0,m=void 0,h=void 0,k=void 0;c=[];for(l=0;l<b.length;++l)g=b[l],"string"==typeof g?(g=g.split(/\s*:\s*/),m=g[0],h=null,k=g[1]):(m=g.check,h=g.left,k=g.right),e||(e=g,e=e.element?e.element:m?m.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),h instanceof CKEDITOR.style&&(h=C(h)),c.push({check:m==e?null:m,left:h,right:"string"==typeof k?G(k):k});b=e;f[b]||(f[b]=[]);f[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=
227a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var e,g;if("string"==typeof a){g=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(g in this._.cachedChecks)return this._.cachedChecks[g];e=f(a).$1;var m=e.styles,d=e.classes;e.name=e.elements;e.classes=d=d?d.split(/\s*,\s*/):[];e.styles=l(m);e.attributes=l(e.attributes);e.children=[];d.length&&(e.attributes["class"]=d.join(" "));m&&(e.attributes.style=CKEDITOR.tools.writeCssText(e.styles))}else e=a.getDefinition(),m=e.styles,d=e.attributes||{},
228m&&!CKEDITOR.tools.isEmpty(m)?(m=J(m),d.style=CKEDITOR.tools.writeCssText(m,!0)):m={},e={name:e.element,attributes:d,classes:d["class"]?d["class"].split(/\s+/):[],styles:m,children:[]};var m=CKEDITOR.tools.clone(e),h=[],k;if(!1!==b&&(k=this._.transformations[e.name])){for(d=0;d<k.length;++d)z(this,e,k[d]);p(e)}v(this,m,h,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});0<h.length?c=!1:((b=e.attributes["class"])&&(e.attributes["class"]=e.attributes["class"].split(" ").sort().join(" ")),
229c=CKEDITOR.tools.objectCompare(e.attributes,m.attributes,!0),b&&(e.attributes["class"]=b));"string"==typeof a&&(this._.cachedChecks[g]=c);return c},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,f){var d=a.slice(),e;if(this.check(I[c]))return c;for(f||(d=d.reverse());e=d.pop();)if(this.check(e))return b[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=
230b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var L={styles:1,attributes:1,classes:1},E={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},
231D=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,O={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},S=/^cke:(object|embed|param)$/,Q=/^(object|embed|param)$/,K;K=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||
232b;if(!(c in a.styles)){var f=a.attributes[b];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[c]=f)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var f=a.styles[b],d=f&&f.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[c]=d[1]:"cke-test"==f&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in
233a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var b=CKEDITOR.tools.style.parse.border(a.styles.border);b.color&&(a.styles["border-color"]=b.color);b.style&&(a.styles["border-style"]=b.style);b.width&&(a.styles["border-width"]=b.width);delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";
234break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(f){a.styles["margin-top"]=c[f[0]];a.styles["margin-right"]=c[f[1]];a.styles["margin-bottom"]=c[f[2]];a.styles["margin-left"]=c[f[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||
235["0px"];switch(c.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:A,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),f=c.styles,d=c.attributes,e,g,l,m;a.name=c.element;for(e in d)if("class"==e)for(c=a.classes.join("|"),l=d[e].split(/\s+/);m=l.pop();)-1==c.indexOf(m)&&a.classes.push(m);else a.attributes[e]=d[e];for(g in f)a.styles[g]=f[g]}}}}(),function(){CKEDITOR.focusManager=
236function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},
237blur:function(a){function g(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?g.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;g.call(this)},b,this)}},add:function(a,g){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b="focus",e="blur";g&&(CKEDITOR.env.ie?(b="focusin",
238e="focusout"):CKEDITOR.event.useCapture=1);var c={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,c.focus,this);a.on(e,c.blur,this);g&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",c)}},remove:function(a){a.removeCustomData("focusmanager");var g=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",g.blur);a.removeListener("focus",g.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;
239this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this},function(){var a,g=function(b){b=b.data;var c=b.getKeystroke(),g=this.keystrokes[c],h=this._.editor;a=!1===h.fire("key",{keyCode:c,domEvent:b});a||(g&&(a=!1!==h.execCommand(g,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[c]));a&&b.preventDefault(!0);return!a},b=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",g,this);if(CKEDITOR.env.gecko&&
240CKEDITOR.env.mac)a.on("keypress",b,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,
241ku:1,ug:1},load:function(a,g,b){a&&CKEDITOR.lang.languages[a]||(a=this.detect(g,a));var e=this;g=function(){e[a].dir=e.rtl[a]?"rtl":"ltr";b(a,e[a])};this[a]?g():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),g,this)},detect:function(a,g){var b=this.languages;g=g||navigator.userLanguage||navigator.language||a;var e=g.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),c=e[1],e=e[2];b[c+"-"+e]?c=c+"-"+e:b[c]||(c=null);CKEDITOR.lang.detect=c?function(){return c}:function(a){return a};return c||
242a}}}(),CKEDITOR.scriptLoader=function(){var a={},g={};return{load:function(b,e,c,m){var h="string"==typeof b;h&&(b=[b]);c||(c=CKEDITOR);var d=b.length,k=[],l=[],f=function(a){e&&(h?e.call(c,a):e.call(c,k,l))};if(0===d)f(!0);else{var n=function(a,b){(b?k:l).push(a);0>=--d&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),f(b))},w=function(b,c){a[b]=1;var f=g[b];delete g[b];for(var d=0;d<f.length;d++)f[d](b,c)},v=function(b){if(a[b])n(b,!0);else{var c=g[b]||(g[b]=[]);c.push(n);if(!(1<
243c.length)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:b});e&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,w(b,!0)}:(f.$.onload=function(){setTimeout(function(){f.$.onload=null;f.$.onerror=null;w(b,!0)},0)},f.$.onerror=function(){f.$.onload=null;f.$.onerror=null;w(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};m&&
244CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<d;t++)v(b[t])}},queue:function(){function a(){var b;(b=e[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var e=[];return function(c,g){var h=this;e.push({scriptUrl:c,callback:function(){g&&g.apply(this,arguments);e.shift();a.call(h)}});1==e.length&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,g){this.basePath=a;this.fileName=g;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype=
245{add:function(a,g){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var b=this.registered[a]=g||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var g=this.externals[a];return CKEDITOR.getUrl(g&&g.dir||this.basePath+a+"/")},getFilePath:function(a){var g=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+
246(g?g.file:this.fileName+".js"))},addExternal:function(a,g,b){a=a.split(",");for(var e=0;e<a.length;e++){var c=a[e];b||(g=g.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[c]={dir:g,file:b||this.fileName+".js"}}},load:function(a,g,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var e=this.loaded,c=this.registered,m=[],h={},d={},k=0;k<a.length;k++){var l=a[k];if(l)if(e[l]||c[l])d[l]=this.get(l);else{var f=this.getFilePath(l);m.push(f);f in h||(h[f]=[]);h[f].push(l)}}CKEDITOR.scriptLoader.load(m,
247function(a,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+h[c[0]].join(",")+'" was not found at "'+c[0]+'".');for(var f=0;f<a.length;f++)for(var l=h[a[f]],m=0;m<l.length;m++){var k=l[m];d[k]=this.get(k);e[k]=1}g.call(b,d)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var g={};return function(b,e,c){var m={},h=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(m,
248a);var b=[],f;for(f in a){var d=a[f],w=d&&d.requires;if(!g[f]){if(d.icons)for(var v=d.icons.split(","),t=v.length;t--;)CKEDITOR.skin.addIcon(v[t],d.path+"icons/"+(CKEDITOR.env.hidpi&&d.hidpi?"hidpi/":"")+v[t]+".png");g[f]=1}if(w)for(w.split&&(w=w.split(",")),d=0;d<w.length;d++)m[w[d]]||b.push(w[d])}if(b.length)h.call(this,b);else{for(f in m)d=m[f],d.onLoad&&!d.onLoad._called&&(!1===d.onLoad()&&delete m[f],d.onLoad._called=1);e&&e.call(c||window,m)}},this)};h.call(this,b)}}),CKEDITOR.plugins.setLang=
249function(a,g,b){var e=this.get(a);a=e.langEntries||(e.langEntries={});e=e.lang||(e.lang=[]);e.split&&(e=e.split(","));-1==CKEDITOR.tools.indexOf(e,g)&&e.push(g);a[g]=b},CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,g,b){b.name=a.toLowerCase();var e=this.items[a]={type:g,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(e,b)},get:function(a){return this.instances[a]},
250create:function(a){var g=this.items[a],b=g&&this._.handlers[g.type],e=g&&g.command&&this.editor.getCommand(g.command),b=b&&b.create.apply(this,g.args);this.instances[a]=b;e&&e.uiItems.push(b);b&&!b.type&&(b.type=g.type);return b},addHandler:function(a,g){this._.handlers[a]=g},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,c,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);
251if(void 0!==c){if(!(c instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!b(c,f))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&
252(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||g();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",e);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",
253function(){m(this,this.elementPath(),!0)});this.on("mode",e);this.on("instanceReady",function(){if(this.config.startupFocus){if("end"===this.config.startupFocus){var a=this.createRange();a.selectNodeContents(this.editable());a.shrink(CKEDITOR.SHRINK_ELEMENT,!0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?d(this,a):CKEDITOR.warn("editor-incorrect-destroy")},
2540,this)}function g(){do var a="editor"+ ++t;while(CKEDITOR.instances[a]);return a}function b(a,b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function e(){var a=this.commands,b;for(b in a)c(this,a[b])}function c(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function m(a,b,c){if(b){var f,d,e=a.commands;for(d in e)f=e[d],(c||f.contextSensitive)&&
255f.refresh(a,b)}}function h(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=p[b]||(p[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&h(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};h(a)});return!0}function d(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}c=
256a.config;a.readOnly=c.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||
2570;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;c.skin&&(CKEDITOR.skinName=c.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);k(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);h(a)||a.fireOnce("customConfigLoaded")}function k(a){CKEDITOR.skin.loadPart("editor",function(){l(a)})}function l(a){CKEDITOR.lang.load(a.config.language,
258a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");f(a)})}function f(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);n(a)})}function n(a){function b(a){if(!a)return"";
259CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,f=b(c.plugins),d=b(c.extraPlugins),e=b(c.removePlugins);if(d)var g=new RegExp("(?:^|,)(?:"+d.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(g,""),f=f+(","+d);if(e)var l=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(l,"");CKEDITOR.env.air&&(f+=",adobeair");CKEDITOR.plugins.load(f.split(","),function(b){var f=[],d=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var g in b){var m=
260b[g],h=m.lang,k=null,r=m.requires,n;CKEDITOR.tools.isArray(r)&&(r=r.join(","));if(r&&(n=r.match(l)))for(;r=n.pop();)CKEDITOR.error("editor-plugin-required",{plugin:r.replace(",",""),requiredBy:g});h&&!a.lang[g]&&(h.split&&(h=h.split(",")),0<=CKEDITOR.tools.indexOf(h,a.langCode)?k=a.langCode:(k=a.langCode.replace(/-.*/,""),k=k!=a.langCode&&0<=CKEDITOR.tools.indexOf(h,k)?k:0<=CKEDITOR.tools.indexOf(h,"en")?"en":h[0]),m.langEntries&&m.langEntries[k]?(a.lang[g]=m.langEntries[k],k=null):e.push(CKEDITOR.getUrl(m.path+
261"lang/"+k+".js")));d.push(k);f.push(m)}CKEDITOR.scriptLoader.load(e,function(){for(var b=["beforeInit","init","afterInit"],e=0;e<b.length;e++)for(var g=0;g<f.length;g++){var l=f[g];0===e&&d[g]&&l.lang&&l.langEntries&&(a.lang[l.name]=l.langEntries[d[g]]);if(l[b[e]])l[b[e]](a)}a.fireOnce("pluginsLoaded");c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");
262CKEDITOR.fire("instanceLoaded",null,a)})})}function w(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function v(a,b){function c(a){var b=a.startContainer,f=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(f)&&a.endOffset===b.getChildCount())?!0:!1}function f(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():
263b.clone(!0)}for(var d=new CKEDITOR.dom.documentFragment,e,g,l,m=0;m<a.length;m++){var h=a[m],k=h.startContainer.getAscendant("tr",!0);c(h)?(e||(e=k.getAscendant("table").clone(),e.append(k.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),d.append(e),e=e.findOne("thead, tbody, tfoot")),g&&g.equals(k)||(g=k,l=k.clone(),e.append(l)),l.append(f(h))):d.append(h.cloneContents())}return e?d:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var t=0,p={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
264{plugins:{detectConflict:function(a,b){for(var c=0;c<b.length;c++){var f=b[c];if(this[f])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:f}),!0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var f=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&c(this,f);return this.commands[a]=f},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!f.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&
265a.apply)}var c=this,f=c.element,d=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&d&&(d.on("submit",a),b(d.$.submit)&&(d.$.submit=CKEDITOR.tools.override(d.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){d.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,c=this;this.fire("beforeDestroy");!a&&w.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.objectKeys(b),
266function(a){a=b[a];c===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),
267f={name:a,commandData:b||{},command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",f)&&(f.returnValue=c.exec(f.commandData),!c.async&&!1!==this.fire("afterCommandExec",f))?f.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",
268b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var f=!0,d=b;b&&"object"==typeof b&&(c=b.internal,d=b.callback,f=!b.noSnapshot);!c&&f&&this.fire("saveSnapshot");if(d||!c)this.once("dataReady",function(a){!c&&f&&this.fire("saveSnapshot");d&&d.call(a.editor)});
269a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,c){this.fire("insertHtml",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),
270c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;b=v(c,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),f=this.getSelection().getRanges(),d=new CKEDITOR.dom.documentFragment,e;if(!c||0===f.length)return null;for(e=0;e<f.length;e++)d.append(c.extractHtmlFromRange(f[e],b));b||this.getSelection().selectRanges([f[0]]);return a?d.getHtml():d},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==
271this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return w.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,f,d=b.length;d--;)c=b[d],f=0,CKEDITOR.tools.isArray(c)&&(f=c[1],c=c[0]),f?a[c]=f:delete a[c]},getCommandKeystroke:function(a,b){var c="string"===typeof a?this.getCommand(a):a,f=[];if(c){var d=CKEDITOR.tools.object.findKey(this.commands,
272c),e=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)f.push(c.fakeKeystroke);else for(var g in e)e[g]===d&&f.push(g)}return b?f:f[0]||null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,
273b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},
274function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,g={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var e,c,m=0,h;e=this._.htmlPartsRegex.exec(b);){c=e.index;if(c>m)if(m=b.substring(m,c),h)h.push(m);else this.onText(m);
275m=this._.htmlPartsRegex.lastIndex;if(c=e[1])if(c=c.toLowerCase(),h&&CKEDITOR.dtd.$cdata[c]&&(this.onCDATA(h.join("")),h=null),!h){this.onTagClose(c);continue}if(h)h.push(e[0]);else if(c=e[3]){if(c=c.toLowerCase(),!/="/.test(c)){var d={},k,l=e[4];e=!!e[5];if(l)for(;k=a.exec(l);){var f=k[1].toLowerCase();k=k[2]||k[3]||k[4]||"";d[f]=!k&&g[f]?f:CKEDITOR.tools.htmlDecodeAttr(k)}this.onTagOpen(c,d,e);!h&&CKEDITOR.dtd.$cdata[c]&&(h=[])}}else if(c=e[2])this.onComment(c)}if(b.length>m)this.onText(b.substring(m,
276b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,g){g?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,g){"string"==typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g));this._.output.push(" ",a,'\x3d"',g,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",
277a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var g=this._.output.join("");a&&this.reset();return g}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,g=CKEDITOR.tools.indexOf(a,this),b=this.previous,e=this.next;b&&(b.next=e);e&&(e.previous=b);a.splice(g,1);this.parent=null},replaceWith:function(a){var g=this.parent.children,
278b=CKEDITOR.tools.indexOf(g,this),e=a.previous=this.previous,c=a.next=this.next;e&&(e.next=a);c&&(c.previous=a);g[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var g=a.parent.children,b=CKEDITOR.tools.indexOf(g,a),e=a.next;g.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;e&&(e.previous=this);this.parent=a.parent},insertBefore:function(a){var g=a.parent.children,b=CKEDITOR.tools.indexOf(g,a);g.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=
279this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var g="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(g(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=
280function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,g){var b=this.value;if(!(b=a.onComment(g,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,g){g&&this.filter(g);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=
281CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,g){if(!(this.value=a.onText(g,this.value,this)))return this.remove(),!1},writeHtml:function(a,g){g&&this.filter(g);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict",
282CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var g=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),c={ul:"li",
283ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,h,d){function k(a){var b;if(0<u.length)for(var c=0;c<u.length;c++){var f=u[c],d=f.name,e=CKEDITOR.dtd[d],g=q.name&&CKEDITOR.dtd[q.name];g&&!g[d]||a&&e&&!e[a]&&CKEDITOR.dtd[a]?d==q.name&&(n(q,q.parent,1),c--):(b||(l(),b=1),f=f.clone(),f.parent=q,q=f,u.splice(c,1),c--)}}function l(){for(;x.length;)n(x.shift(),q)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=
284a.children.length,c=a.children[b-1],f;c&&c.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(c.value))?c.value=f:a.children.length=b-1)}}function n(b,c,e){c=c||q||p;var g=q;void 0===b.previous&&(w(c,b)&&(q=c,t.onTagOpen(d,{}),b.returnPoint=c=q),f(b),a(b)&&!b.children.length||c.add(b),"pre"==b.name&&(r=!1),"textarea"==b.name&&(y=!1));b.returnPoint?(q=b.returnPoint,delete b.returnPoint):q=e?c:g}function w(a,b){if((a==p||"body"==a.name)&&d&&(!a.name||CKEDITOR.dtd[a.name][d])){var c,f;return(c=b.attributes&&
285(f=b.attributes["data-cke-real-element-type"])?f:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function v(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var t=new CKEDITOR.htmlParser,p=h instanceof CKEDITOR.htmlParser.element?h:"string"==typeof h?new CKEDITOR.htmlParser.element(h):new CKEDITOR.htmlParser.fragment,u=[],x=[],q=p,y="textarea"==p.name,r="pre"==p.name;t.onTagOpen=
286function(c,f,d,m){f=new CKEDITOR.htmlParser.element(c,f);f.isUnknown&&d&&(f.isEmpty=!0);f.isOptionalClose=m;if(a(f))u.push(f);else{if("pre"==c)r=!0;else{if("br"==c&&r){q.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==c&&(y=!0)}if("br"==c)x.push(f);else{for(;!(m=(d=q.name)?CKEDITOR.dtd[d]||(q._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e,f.isUnknown||q.isUnknown||m[c]);)if(q.isOptionalClose)t.onTagClose(d);else if(c in b&&d in b)d=q.children,(d=d[d.length-1])&&"li"==d.name||n(d=new CKEDITOR.htmlParser.element("li"),
287q),!f.returnPoint&&(f.returnPoint=q),q=d;else if(c in CKEDITOR.dtd.$listItem&&!v(c,d))t.onTagOpen("li"==c?"ul":"dl",{},0,1);else if(d in g&&!v(c,d))!f.returnPoint&&(f.returnPoint=q),q=q.parent;else if(d in CKEDITOR.dtd.$inline&&u.unshift(q),q.parent)n(q,q.parent,1);else{f.isOrphan=1;break}k(c);l();f.parent=q;f.isEmpty?n(f):q=f}}};t.onTagClose=function(a){for(var b=u.length-1;0<=b;b--)if(a==u[b].name){u.splice(b,1);return}for(var c=[],f=[],e=q;e!=p&&e.name!=a;)e._.isBlockLike||f.unshift(e),c.push(e),
288e=e.returnPoint||e.parent;if(e!=p){for(b=0;b<c.length;b++){var g=c[b];n(g,g.parent)}q=e;e._.isBlockLike&&l();n(e,e.parent);e==q&&(q=q.parent);u=u.concat(f)}"body"==a&&(d=!1)};t.onText=function(a){if(!(q._.hasInlineStarted&&!x.length||r||y)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=q.name,f=b?CKEDITOR.dtd[b]||(q._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!y&&!f["#"]&&b in g)t.onTagOpen(c[b]||""),t.onText(a);else{l();k();r||y||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=
289new CKEDITOR.htmlParser.text(a);if(w(q,a))this.onTagOpen(d,{},0,1);q.add(a)}};t.onCDATA=function(a){q.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){l();k();q.add(new CKEDITOR.htmlParser.comment(a))};t.parse(m);for(l();q!=p;)n(q,q.parent,1);f(p);return p};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),
2900===c.value.length)){this.children.pop();this.add(a);return}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;
291for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,c)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var e=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,!1,e);b=0;c=this.children;for(e=c.length;b<e;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var e=a(this);if(!1!==e){c=this.children;for(var g=0;g<c.length;g++)e=c[g],e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,
292b):b&&e.type!=b||a(e)}},getFilterContext:function(a){return a||{}}}}(),"use strict",function(){function a(){this.rules=[]}function g(b,e,c,g){var h,d;for(h in e)(d=b[h])||(d=b[h]=new a),d.add(e[h],c,g)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},
293proto:{addRules:function(a,e){var c;"number"==typeof e?c=e:e&&"priority"in e&&(c=e.priority);"number"!=typeof c&&(c=10);"object"!=typeof e&&(e={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,c,e);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,c,e);a.elements&&g(this.elementsRules,a.elements,c,e);a.attributes&&g(this.attributesRules,a.attributes,c,e);a.text&&this.textRules.add(a.text,c,e);a.comment&&this.commentRules.add(a.comment,c,e);a.root&&this.rootRules.add(a.root,
294c,e)},applyTo:function(a){a.filter(this)},onElementName:function(a,e){return this.elementNameRules.execOnName(a,e)},onAttributeName:function(a,e){return this.attributeNameRules.execOnName(a,e)},onText:function(a,e,c){return this.textRules.exec(a,e,c)},onComment:function(a,e,c){return this.commentRules.exec(a,e,c)},onRoot:function(a,e){return this.rootRules.exec(a,e)},onElement:function(a,e){for(var c=[this.elementsRules["^"],this.elementsRules[e.name],this.elementsRules.$],g,h=0;3>h;h++)if(g=c[h]){g=
295g.exec(a,e,this);if(!1===g)return null;if(g&&g!=e)return this.onNode(a,g);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var c=e.type;return c==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):c==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,e.value)):c==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value)):null},onAttribute:function(a,e,c,g){return(c=this.attributesRules[c])?c.exec(a,g,e,this):g}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype=
296{add:function(a,e,c){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,options:c})},addMany:function(a,e,c){for(var g=[this.findIndex(e),0],h=0,d=a.length;h<d;h++)g.push({value:a[h],priority:e,options:c});this.rules.splice.apply(this.rules,g)},findIndex:function(a){for(var e=this.rules,c=e.length-1;0<=c&&a<e[c].priority;)c--;return c+1},exec:function(a,e){var c=e instanceof CKEDITOR.htmlParser.node||e instanceof CKEDITOR.htmlParser.fragment,g=Array.prototype.slice.call(arguments,1),h=this.rules,
297d=h.length,k,l,f,n;for(n=0;n<d;n++)if(c&&(k=e.type,l=e.name),f=h[n],!(a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,g);if(!1===f||c&&f&&(f.name!=l||f.type!=k))return f;null!=f&&(g[0]=e=f)}return e},execOnName:function(a,e){for(var c=0,g=this.rules,h=g.length,d;e&&c<h;c++)d=g[c],a.nonEditable&&!d.options.applyToAll||a.nestedEditable&&d.options.excludeNestedEditable||(e=e.replace(d.value[0],d.value[1]));return e}}}(),function(){function a(a,
298f){function d(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text("\u00a0"):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function g(a,c){return function(f){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],h=b(f),k,r;if(h)for(l(h,1)&&g.push(h);h;)m(h)&&(k=e(h))&&l(k)&&((r=e(k))&&!m(r)?g.push(k):(d(n).insertAfter(k),k.remove())),h=h.previous;for(h=0;h<g.length;h++)g[h].remove();if(g=!a||!1!==("function"==typeof c?c(f):c))n||CKEDITOR.env.needsBrFiller||f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?
299n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||f.name in CKEDITOR.dtd.tr||f.name in CKEDITOR.dtd.$listItem)?(g=b(f),g=!g||"form"==f.name&&"input"==g.name):g=!1:g=!1;g&&f.add(d(a))}}}function l(a,b){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(q))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&
300n&&(!b||a.parent.name in D)||!n&&((c=a.previous)&&"br"==c.name||!c||m(c)))?!0:!1}var k={elements:{}},n="html"==f,D=CKEDITOR.tools.extend({},A),E;for(E in D)"#"in r[E]||delete D[E];for(E in D)k.elements[E]=g(n,a.config.fillEmptyBlocks);k.root=g(n,!1);k.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=b.attributes;if("data-cke-bogus"in f||"data-cke-eol"in f)delete f["data-cke-bogus"];else{for(f=b.next;f&&c(f);)f=f.next;var g=e(b);!f&&m(b.parent)?h(b.parent,
301d(a)):m(f)&&g&&!m(g)&&d(a).insertBefore(f)}}}}(n);return k}function g(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&c(a);)a=a.previous;return a}function e(a){for(a=a.previous;a&&c(a);)a=a.previous;return a}function c(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
302A||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function h(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function d(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function k(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function l(a){return a.replace(J,function(a,b,c){return"\x3c"+b+c.replace(H,
303function(a,b){return I.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+p(c).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(D,function(a,b){return decodeURIComponent(b)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
304function(a){return"\x3c!--"+y+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,b){var c=b.toLowerCase(),f=b.toUpperCase(),d=t(c);c!==f&&(d+="|"+t(f));return a+("("+d+")")},"")}function t(a){var b;b=a.charCodeAt(0);var c=b.toString(16);b={htmlCode:"\x26#"+b+";?",hex:"\x26#x0*"+c+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var f in b)b[f]&&(a+="|"+b[f]);return a}function p(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,
305function(a,b){return decodeURIComponent(b)})}function u(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function x(a,b){var c=[],f=b.config.protectedSource,d=b._.dataStore||(b._.dataStore={id:1}),e=/\x3c!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,f=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(f);a=
306a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-1)+"--\x3e"});for(var g=0;g<f.length;g++)a=a.replace(f[g],function(a){a=a.replace(e,function(a,b,f){return c[f]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,b,f){return"\x3c!--"+y+(b?"{C}":"")+encodeURIComponent(c[f]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,
307function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){d[d.id]=decodeURIComponent(b);return"{cke_protected_"+d.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,f,d){return"\x3c"+c+f+"\x3e"+u(p(d),b)+"\x3c/"+c+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c,d,e=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;
308c.addRules(B);c.addRules(C,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});d.addRules(G);d.addRules(F,{applyToAll:!0});d.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,d,c=c.replace(O,""),c=x(c,b),c=f(c,E),c=l(c),c=f(c,L),c=c.replace(S,"$1cke:$2"),c=c.replace(K,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");d=a.context||b.editable().getName();
309var e;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==d&&(d="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",e=1);d=b.document.createElement(d);d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");e&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(Q,"$1$2");c=n(c);c=p(c);d=!1===a.fixForBody?!1:g(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,d);d&&(e=c,!e.children.length&&CKEDITOR.dtd[e.name][d]&&(d=new CKEDITOR.htmlParser.element(d),
310e.add(d)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=w(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=
311CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,g(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,f=e.writer;f.reset();c.writeChildrenHtml(f);c=f.getHtml(!0);c=p(c);c=u(c,b);
312a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,f){var d=this.editor,e,g,l,m;b&&"object"==typeof b?(e=b.context,c=b.fixForBody,f=b.dontFilter,g=b.filter,l=b.enterMode,m=b.protectedWhitespaces):e=b;e||null===e||(e=d.editable().getName());return d.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:f,filter:g||d.filter,enterMode:l||d.enterMode,protectedWhitespaces:m}).dataValue},toDataFormat:function(a,b){var c,f,d;b&&(c=b.context,f=b.filter,d=
313b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:f||this.editor.filter,context:c,enterMode:d||this.editor.enterMode}).dataValue}};var q=/(?:&nbsp;|\xa0)$/,y="{cke_protected}",r=CKEDITOR.dtd,z="caption colgroup col thead tfoot tbody".split(" "),A=CKEDITOR.tools.extend({},r.$blockLimit,r.$block),B={elements:{input:d,textarea:d}},C={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,
314""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},G={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||
315a.attributes["data-cke-saved-name"]))return!1}}},F={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],f,d=0;d<c.length;d++)f="data-cke-saved-"+c[d],f in b&&delete b[c[d]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,f;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(z,
316a.name),f=CKEDITOR.tools.indexOf(z,b.name));-1<c&&-1<f&&c!=f||(c=a.parent?a.getIndex():-1,f=b.parent?b.getIndex():-1);return c>f?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));
317a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&h(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:k,textarea:k},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(F.attributes.style=function(a){return a.replace(/(^|;)([^:]+)/g,function(a){return a.toLowerCase()})});var J=/<(a|area|img|input|source)\b([^>]*)>/gi,H=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,
318I=/^(href|src|name)$/i,L=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,E=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,D=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,O=new RegExp("("+v("\x3ccke:encoded\x3e")+"(.*?)"+v("\x3c/cke:encoded\x3e")+")|("+v("\x3c")+v("/")+"?"+v("cke:encoded\x3e")+")","gi"),S=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,Q=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,K=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),
319"use strict",CKEDITOR.htmlParser.element=function(a,g){this.name=a;this.attributes=g||{};this.children=[];var b=a||"",e=b.match(/^cke:(.*)/);e&&(b=e[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}},CKEDITOR.htmlParser.cssStyle=function(a){var g={};((a instanceof
320CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,c){"font-family"==e&&(c=c.replace(/["']/g,""));g[e.toLowerCase()]=c});return{rules:g,populate:function(a){var e=this.toString();e&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",e):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=e:a.style=e)},toString:function(){var a=[],e;for(e in g)g[e]&&a.push(e,":",g[e],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==
321CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var g=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var g=this,h,d;b=g.getFilterContext(b);if(!g.parent)a.onRoot(b,g);for(;;){h=g.name;if(!(d=a.onElementName(b,
322h)))return this.remove(),!1;g.name=d;if(!(g=a.onElement(b,g)))return this.remove(),!1;if(g!==this)return this.replaceWith(g),!1;if(g.name==h)break;if(g.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(g),!1;if(!g.name)return this.replaceWithChildren(),!1}h=g.attributes;var k,l;for(k in h){for(d=h[k];;)if(l=a.onAttributeName(b,k))if(l!=k)delete h[k],k=l;else break;else{delete h[k];break}l&&(!1===(d=a.onAttribute(b,g,l,d))?delete h[l]:h[l]=d)}g.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,
323writeHtml:function(a,b){b&&this.filter(b);var m=this.name,h=[],d=this.attributes,k,l;a.openTag(m,d);for(k in d)h.push([k,d[k]]);a.sortAttributes&&h.sort(g);k=0;for(l=h.length;k<l;k++)d=h[k],a.attribute(d[0],d[1]);a.openTagClose(m,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(m)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?
324this.children[0]:null;"function"!=typeof b&&(b=a(b));for(var c=0,g=this.children.length;c<g;++c)if(b(this.children[c]))return this.children[c];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var b=0,g=a.length;b<g;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},
325split:function(a){for(var b=this.children.splice(a,this.children.length-a),g=this.clone(),h=0;h<b.length;++h)b[h].parent=g;g.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(g,this.getIndex()+1);return g},find:function(a,b){void 0===b&&(b=!1);var g=[],h;for(h=0;h<this.children.length;h++){var d=this.children[h];"function"==typeof a&&a(d)?g.push(d):"string"==typeof a&&d.name===a&&g.push(d);b&&d.find&&(g=g.concat(d.find(a,b)))}return g},addClass:function(a){if(!this.hasClass(a)){var b=
326this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?
327a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var g=0;g<b.length;g+=2)a[b[g]]=b[g+1]}return a}},!0)}(),function(){var a=/{([^}]+)}/g;CKEDITOR.template=function(a){this.source=String(a)};CKEDITOR.template.prototype.output=function(g,b){var e=this.source.replace(a,function(a,b){return void 0!==g[b]?g[b]:a});return b?b.push(e):e}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances=
328{},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){function g(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",g);a.on("destroy",g);CKEDITOR.fire("instance",null,a)},CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=
329function(g,b){var e=a[g];if(e)return e;e={name:g,source:b};CKEDITOR.fire("template",e);return a[g]=new CKEDITOR.template(e.source)};CKEDITOR.getTemplate=function(g){return a[g]}}(),function(){var a=[];CKEDITOR.addCss=function(g){a.push(g)};CKEDITOR.getCss=function(){return a.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=
330function(a,g){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(g,a,CKEDITOR.ELEMENT_MODE_INLINE),e=a.is("textarea")?a:null;e?(b.setData(e.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!b.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+e.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(e),
331e.hide(),e.$.form&&b._attachToForm()):b.setData(a.getHtml(),null,!0);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){e&&(b.container.clearCustomData(),b.container.remove(),e.show());b.element.clearCustomData();delete b.element});return b};
332CKEDITOR.inlineAll=function(){var a,g,b;for(b in CKEDITOR.dtd.$editable)for(var e=CKEDITOR.document.getElementsByTag(b),c=0,m=e.count();c<m;c++)a=e.getItem(c),"true"==a.getAttribute("contenteditable")&&(g={element:a,config:{}},!1!==CKEDITOR.fire("inline",g)&&CKEDITOR.inline(a,g.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function a(a,c,m,h){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);
333if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var d=new CKEDITOR.editor(c,a,h);h==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),d._.required=a.hasAttribute("required"),a.removeAttribute("required"));m&&d.setData(m,null,!0);d.on("loaded",function(){b(d);h==CKEDITOR.ELEMENT_MODE_REPLACE&&d.config.autoUpdateElement&&a.$.form&&d._attachToForm();d.setMode(d.config.startupMode,function(){d.resetDirty();d.status="ready";
334d.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,d)})});d.on("destroy",g);return d}function g(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,g=a.element,h=a.elementMode,d=a.fire("uiSpace",{space:"top",html:""}).html,k=a.fire("uiSpace",{space:"bottom",html:""}).html,l=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+
335CKEDITOR.env.cssClass+'"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
336b=CKEDITOR.dom.element.createFromHtml(l.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:d?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+d+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:k?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+k+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));h==CKEDITOR.ELEMENT_MODE_REPLACE?
337(g.hide(),b.insertAfter(g)):g.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");d&&a.ui.space("top").unselectable();k&&a.ui.space("bottom").unselectable();g=a.config.width;h=a.config.height;g&&b.setStyle("width",CKEDITOR.tools.cssLength(g));h&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(h));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,c){return a(b,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
338CKEDITOR.appendTo=function(b,c,g){return a(b,c,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var g=null,h=a[b];if(h.name||h.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(h.className))continue}else if("function"==typeof arguments[0]&&(g={},!1===arguments[0](h,g)))continue;this.replace(h,g)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes=
339{}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var g=this,h=this._.modes;if(a!=g.mode&&h&&h[a]){g.fire("beforeSetMode",a);if(g.mode){var d=g.checkDirty(),h=g._.previousModeData,k,l=0;g.fire("beforeModeUnload");g.editable(0);g._.previousMode=g.mode;g._.previousModeData=k=g.getData(1);"source"==g.mode&&h==k&&(g.fire("lockSnapshot",{forceUpdate:!0}),l=1);g.ui.space("contents").setHtml("");g.mode=""}else g._.previousModeData=g.getData(1);this._.modes[a](function(){g.mode=a;void 0!==d&&!d&&
340g.resetDirty();l?g.fire("unlockSnapshot"):"wysiwyg"==a&&g.fire("saveSnapshot");setTimeout(function(){g.fire("mode");b&&b.call(g)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,g,h){var d=this.container,k=this.ui.space("contents"),l=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;h=h?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):d;h.setSize("width",a,!0);l&&(l.style.width="1%");var f=(h.$.offsetHeight||0)-(k.$.clientHeight||
3410),d=Math.max(b-(g?0:f),0);b=g?b+f:b;k.setStyle("height",d+"px");l&&(l.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:d,outerWidth:a||h.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var b=a.editor,c=a.data.path,f=c.blockLimit,d=a.data.selection,
342l=d.getRanges()[0],m;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(d=g(d,c))d.appendBogus(),m=CKEDITOR.env.ie;h(b,c.block,f)&&l.collapsed&&!l.getCommonAncestor().isReadOnly()&&(c=l.clone(),c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(c),f.guard=function(a){return!e(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock())&&(b=l.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
343(b=b.getFirst(e))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),m=1,a.cancel());m&&l.select()}function g(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,f=c&&c.getLast(e);if(!(!c||!c.isBlockBoundary()||f&&f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()||c.is("pre")||c.getBogus()))return c}function b(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function e(a){return f(a)&&
344n(a)}function c(a,b){return function(c){var f=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(f=f&&f.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(f):null)&&(b.equals(f)||b.contains(f))||a.call(this,c)}}function m(a){function b(a){return function(b,f){f&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(d)&&(c=b);if(!(f||!e(b)||a&&v(b)))return!1}}var c,f=a.getRanges()[0];a=a.root;var d={table:1,ul:1,ol:1,dl:1};if(f.startPath().contains(d)){var g=f.clone();g.collapse(1);g.setStartAt(a,
345CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=b();a.checkBackward();if(c)return g=f.clone(),g.collapse(),g.setEndAt(c,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=b(!0),c=!1,a.checkForward(),c}return null}function h(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function d(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?
346a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function k(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function l(a,b,c){var f=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!f.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var f,n,w,v,t,p,u,x,q,y;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;
347if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var b=this.$.scrollTop;
vendor: 4,651 bytes, lines 347-356
347this.$.focus();this.$.scrollTop=b}else this.$.focus();
348else this.$.setActive()}catch(c){if(!CKEDITOR.env.ie)throw c;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var f=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=c(b,this),f[0]=a,f[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,f)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,
3491);if(a)b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,b){var c=this.getAttribute(a);
350b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,c){var f=this.editor;f.focus();f.fire("saveSnapshot");
351c||(c=f.getSelection().getRanges()[0]);p(this,b||"html",a,c);c.select();k(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){p(this,c||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,b){var c=this.editor;c.focus();c.fire("saveSnapshot");var f=c.activeEnterMode,c=c.getSelection(),d=a.getName(),d=CKEDITOR.dtd.$block[d];b||(b=c.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),d&&((d=
352a.getNext(function(a){return e(a)&&!v(a)}))&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$block)?d.getDtd()["#"]?b.moveToElementEditStart(d):b.moveToElementEditEnd(a):d||f==CKEDITOR.ENTER_BR||(d=b.fixBlock(!0,f==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(d))));c.selectRanges([b]);k(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,f=c.config.enterMode,d=a.getName(),e=CKEDITOR.dtd.$block[d];if(b.checkReadOnly())return!1;
353b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?u(b):b.startContainer.is(CKEDITOR.dtd.$list)&&x(b));var g,l;if(e)for(;(g=b.getCommonAncestor(0,1))&&(l=CKEDITOR.dtd[g.getName()])&&(!l||!l[d]);)g.getName()in CKEDITOR.dtd.span?b.splitElement(g):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(g),b.collapse(!0),g.remove()):b.splitBlock(f==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return!0},setData:function(a,
354b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},
355fixInitialSelection:function(){function a(){var b=c.getDocument().$,f=b.getSelection(),d;a:if(f.anchorNode&&f.anchorNode==c.$)d=!0;else{if(CKEDITOR.env.webkit&&(d=c.getDocument().getActive())&&d.equals(c)&&!f.anchorNode){d=!0;break a}d=void 0}d&&(d=new CKEDITOR.dom.range(c),d.moveToElementEditStart(c),b=b.createRange(),b.setStart(d.startContainer.$,d.startOffset),b.collapse(!0),f.removeAllRanges(),f.addRange(b))}function b(){var a=c.getDocument().$,f=a.selection,d=c.getDocument().getActive();"None"==
356f.type&&d.equals(c)&&(f=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),f.moveToElementEditStart(c),f=f.startContainer,f.type!=CKEDITOR.NODE_ELEMENT&&(f=f.getParent()),a.moveToElementText(f.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)}
vendor: 7,323 bytes, lines 356-371
356,getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);
357a={doc:this.getDocument(),range:a.clone()};q.eol.detect(a,this);q.bogus.exclude(a);q.cell.shrink(a);a.fragment=a.range.cloneContents();q.tree.rebuild(a,this);q.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=y,f={range:a,doc:a.document},d=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),d;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(f);f.bookmark=a.createBookmark();delete f.range;var e=this.editor.createRange();
358e.moveToPosition(f.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);f.targetBookmark=e.createBookmark();c.list.detectMerge(f,this);c.table.detectRanges(f,this);c.block.detectMerge(f,this);f.tableContentsRanges?(c.table.deleteRanges(f),a.moveToBookmark(f.bookmark),f.range=a):(a.moveToBookmark(f.bookmark),f.range=a,a.extractContents(c.detectExtractMerge(f)));a.moveToBookmark(f.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(f,this);c.table.purge(f,this);c.block.merge(f,this);
359if(b){c=a.startPath();if(f=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var f=c.block.getElementsByTag("span"),e=0,g;if(f)for(;g=f.getItem(e++);)if(!n(g)){f=!0;break a}f=!1}f=!f}f&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),w(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return d},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=
360this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(t,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},
361this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||
362this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var c=function(){var b=a.editable();
363null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",c))};this.on("scroll",c)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",
364!a.config.disableNativeSpellChecker);var g=a.config.contentsLangDirection;this.getDirection(1)!=g&&this.changeAttr("dir",g);var h=CKEDITOR.getCss();if(h){var g=d.getHead(),k=g.getCustomData("stylesheet");k?h!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText=h:k.setText(h)):(h=d.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),g.setCustomData("stylesheet",h),h.data("cke-temp",1))}g=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",
365g+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;b=a.getSelection();if(0!==b.getRanges().length){if(c in n){var e,g=b.getRanges()[0],l=g.startPath(),h,k,q,c=8==c;CKEDITOR.env.ie&&
36611>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=m(b))?(a.fire("saveSnapshot"),g.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),g.select(),a.fire("saveSnapshot"),d=1):g.collapsed&&((h=l.block)&&(q=h[c?"getPrevious":"getNext"](f))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),g[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),g["moveToElementEdit"+(c?"End":"Start")](q),g.select(),a.fire("saveSnapshot"),
367d=1):l.blockLimit&&l.blockLimit.is("td")&&(k=l.blockLimit.getAscendant("table"))&&g.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(q=k[c?"getPrevious":"getNext"](f))?(a.fire("saveSnapshot"),g["moveToElementEdit"+(c?"End":"Start")](q),g.checkStartOfBlock()&&g.checkEndOfBlock()?q.remove():g.select(),a.fire("saveSnapshot"),d=1):(k=l.contains(["td","th","caption"]))&&g.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
368this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in n&&!this.getFirst(e)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr",
369"input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&!b.isReadOnly()&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getAscendant("table")&&!b.getOuterHtml().replace(t,""))){var c=a.createRange();c.moveToElementEditStart(b);
370c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey();if(c in n&&(b=a.getSelection(),0!==b.getRanges().length)){var c=8==c,f=b.getRanges()[0];b=f.startPath();if(f.collapsed)a:{var d=
371b.block;if(d&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()&&f.moveToClose
vendor: 14,535 bytes, lines 371-399
371stEditablePosition(d,!c)&&f.collapsed){if(f.startContainer.type==CKEDITOR.NODE_ELEMENT){var e=f.startContainer.getChild(f.startOffset-(c?1:0));if(e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("hr")){a.fire("saveSnapshot");e.remove();b=!0;break a}}f=f.startPath().block;if(!f||f&&f.contains(d))b=void 0;else{a.fire("saveSnapshot");var g;(g=(c?f:d).getBogus())&&g.remove();g=a.getSelection();e=g.createBookmarks();(c?d:f).moveChildren(c?
372f:d,!1);b.lastElement.mergeSiblings();l(d,f,!c);g.selectBookmarks(e);b=!0}}else b=!1}else c=f,g=b.block,f=c.endPath().block,g&&f&&!g.equals(f)?(a.fire("saveSnapshot"),(d=g.getBogus())&&d.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),f.getParent()&&(f.moveChildren(g,!1),b.lastElement.mergeSiblings(),l(g,f,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();
373a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");
374delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?
375"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(b){if(!c.readOnly){var f=c.getSelection();f&&!f.isLocked&&(f=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),!f&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var f=
376b.fire("ariaEditorHelpLabel",{}).label;if(f&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var d=CKEDITOR.tools.getNextId(),f=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+d+'" class\x3d"cke_voice_label"\x3e'+f+"\x3c/span\x3e");c.append(f);a.changeAttr("aria-describedby",d)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");f=CKEDITOR.dom.walker.whitespaces(!0);n=CKEDITOR.dom.walker.bookmark(!1,
377!0);w=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();t=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,f){var d,e,g,l,h=[],m=f.range.startContainer;d=f.range.startPath();for(var m=k[m.getName()],n=0,q=c.getChildren(),w=q.count(),u=-1,x=-1,y=0,A=d.contains(k.$list);n<w;++n)d=q.getItem(n),a(d)?(g=d.getName(),A&&g in CKEDITOR.dtd.$list?
378h=h.concat(b(d,f)):(l=!!m[g],"br"!=g||!d.data("cke-eol")||n&&n!=w-1||(y=(e=n?h[n-1].node:q.getItem(n+1))&&(!a(e)||!e.is("br")),e=e&&a(e)&&k.$block[e.getName()]),-1!=u||l||(u=n),l||(x=n),h.push({isElement:1,isLineBreak:y,isBlock:d.isBlockBoundary(),hasBlockSibling:e,node:d,name:g,allowed:l}),e=y=0)):h.push({isElement:0,node:d,allowed:1});-1<u&&(h[u].firstNotAllowed=1);-1<x&&(h[x].lastNotAllowed=1);return h}function c(b,f){var d=[],e=b.getChildren(),g=e.count(),l,h=0,m=k[f],n=!b.is(k.$inline)||b.is("br");
379for(n&&d.push(" ");h<g;h++)l=e.getItem(h),a(l)&&!l.is(m)?d=d.concat(c(l,f)):d.push(l);n&&d.push(" ");return d}function f(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function g(b){return b&&a(b)&&(b.is(k.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function l(b,c,f,d){var e=b.clone(),g,h;e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(g=(new CKEDITOR.dom.walker(e)).next())&&a(g)&&n[g.getName()]&&(h=g.getPrevious())&&a(h)&&!h.getParent().equals(b.startContainer)&&f.contains(h)&&
380d.contains(g)&&g.isIdentical(h)&&(g.moveChildren(h),g.remove(),l(b,c,f,d))}function m(b,c){function f(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var d=c.endContainer.getChild(c.endOffset),e=c.endContainer.getChild(c.endOffset-1);d&&f(d,b[b.length-1]);e&&f(e,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var k=CKEDITOR.dtd,n={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,
381h6:1},w=CKEDITOR.tools.extend({},k.$inline);delete w.br;return function(n,D,u,x){var y=n.editor,v=!1;"unfiltered_html"==D&&(D="html",v=!0);if(!x.checkReadOnly()){var t=(new CKEDITOR.dom.elementPath(x.startContainer,x.root)).blockLimit||x.root;n={type:D,dontFilter:v,editable:n,editor:y,range:x,blockLimit:t,mergeCandidates:[],zombies:[]};D=n.range;x=n.mergeCandidates;var H,p;"text"==n.type&&D.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(H=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
382D.document),D.insertNode(H),D.setStartAfter(H));v=new CKEDITOR.dom.elementPath(D.startContainer);n.endPath=t=new CKEDITOR.dom.elementPath(D.endContainer);if(!D.collapsed){var y=t.block||t.blockLimit,ga=D.getCommonAncestor();y&&!y.equals(ga)&&!y.contains(ga)&&D.checkEndOfBlock()&&n.zombies.push(y);D.deleteContents()}for(;(p=f(D))&&a(p)&&p.isBlockBoundary()&&v.contains(p);)D.moveToPosition(p,CKEDITOR.POSITION_BEFORE_END);l(D,n.blockLimit,v,t);H&&(D.setEndBefore(H),D.collapse(),H.remove());H=D.startPath();
383if(y=H.contains(g,!1,1))D.splitElement(y),n.inlineStylesRoot=y,n.inlineStylesPeak=H.lastElement;H=D.createBookmark();(y=H.startNode.getPrevious(e))&&a(y)&&g(y)&&x.push(y);(y=H.startNode.getNext(e))&&a(y)&&g(y)&&x.push(y);for(y=H.startNode;(y=y.getParent())&&g(y);)x.push(y);D.moveToBookmark(H);if(H=u){H=n.range;if("text"==n.type&&n.inlineStylesRoot){p=n.inlineStylesPeak;D=p.getDocument().createText("{cke-peak}");for(x=n.inlineStylesRoot.getParent();!p.equals(x);)D=D.appendTo(p.clone()),p=p.getParent();
384u=D.getOuterHtml().split("{cke-peak}").join(u)}p=n.blockLimit.getName();if(/^\s+|\s+$/.test(u)&&"span"in CKEDITOR.dtd[p]){var N='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';u=N+u+N}u=n.editor.dataProcessor.toHtml(u,{context:null,fixForBody:!1,protectedWhitespaces:!!N,dontFilter:n.dontFilter,filter:n.editor.activeFilter,enterMode:n.editor.activeEnterMode});p=H.document.createElement("body");p.setHtml(u);N&&(p.getFirst().remove(),p.getLast().remove());if((N=H.startPath().block)&&(1!=
385N.getChildCount()||!N.getBogus()))a:{var P;if(1==p.getChildCount()&&a(P=p.getFirst())&&P.is(q)&&!P.hasAttribute("contenteditable")){N=P.getElementsByTag("*");H=0;for(x=N.count();H<x;H++)if(D=N.getItem(H),!D.is(w))break a;P.moveChildren(P.getParent(1));P.remove()}}n.dataWrapper=p;H=u}if(H){P=n.range;H=P.document;var M;p=n.blockLimit;x=0;var T,N=[],R,aa;u=y=0;var W,ba;D=P.startContainer;var v=n.endPath.elements[0],ca,t=v.getPosition(D),ga=!!v.getCommonAncestor(D)&&t!=CKEDITOR.POSITION_IDENTICAL&&!(t&
386CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);D=b(n.dataWrapper,n);for(m(D,P);x<D.length;x++){t=D[x];if(M=t.isLineBreak){M=P;W=p;var Z=void 0,da=void 0;t.hasBlockSibling?M=1:(Z=M.startContainer.getAscendant(k.$block,1))&&Z.is({div:1,p:1})?(da=Z.getPosition(W),da==CKEDITOR.POSITION_IDENTICAL||da==CKEDITOR.POSITION_CONTAINS?M=0:(W=M.splitElement(Z),M.moveToPosition(W,CKEDITOR.POSITION_AFTER_START),M=1)):M=0}if(M)u=0<x;else{M=P.startPath();!t.isBlock&&h(n.editor,M.block,M.blockLimit)&&(aa=
387d(n.editor))&&(aa=H.createElement(aa),aa.appendBogus(),P.insertNode(aa),CKEDITOR.env.needsBrFiller&&(T=aa.getBogus())&&T.remove(),P.moveToPosition(aa,CKEDITOR.POSITION_BEFORE_END));if((M=P.startPath().block)&&!M.equals(R)){if(T=M.getBogus())T.remove(),N.push(M);R=M}t.firstNotAllowed&&(y=1);if(y&&t.isElement){M=P.startContainer;for(W=null;M&&!k[M.getName()][t.name];){if(M.equals(p)){M=null;break}W=M;M=M.getParent()}if(M)W&&(ba=P.splitElement(W),n.zombies.push(ba),n.zombies.push(W));else{W=p.getName();
388ca=!x;M=x==D.length-1;W=c(t.node,W);for(var Z=[],da=W.length,ea=0,ha=void 0,ia=0,fa=-1;ea<da;ea++)ha=W[ea]," "==ha?(ia||ca&&!ea||(Z.push(new CKEDITOR.dom.text(" ")),fa=Z.length),ia=1):(Z.push(ha),ia=0);M&&fa==Z.length&&Z.pop();ca=Z}}if(ca){for(;M=ca.pop();)P.insertNode(M);ca=0}else P.insertNode(t.node);t.lastNotAllowed&&x<D.length-1&&((ba=ga?v:ba)&&P.setEndAt(ba,CKEDITOR.POSITION_AFTER_START),y=0);P.collapse()}}1!=D.length?T=!1:(T=D[0],T=T.isElement&&"false"==T.node.getAttribute("contenteditable"));
389T&&(u=!0,M=D[0].node,P.setStartAt(M,CKEDITOR.POSITION_BEFORE_START),P.setEndAt(M,CKEDITOR.POSITION_AFTER_END));n.dontMoveCaret=u;n.bogusNeededBlocks=N}T=n.range;var Y;ba=n.bogusNeededBlocks;for(ca=T.createBookmark();R=n.zombies.pop();)R.getParent()&&(aa=T.clone(),aa.moveToElementEditStart(R),aa.removeEmptyBlocksAtEnd());if(ba)for(;R=ba.pop();)CKEDITOR.env.needsBrFiller?R.appendBogus():R.append(T.document.createText("\u00a0"));for(;R=n.mergeCandidates.pop();)R.mergeSiblings();T.moveToBookmark(ca);
390if(!n.dontMoveCaret){for(R=f(T);R&&a(R)&&!R.is(k.$empty);){if(R.isBlockBoundary())T.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END);else{if(g(R)&&R.getHtml().match(/(\s|&nbsp;)$/g)){Y=null;break}Y=T.clone();Y.moveToPosition(R,CKEDITOR.POSITION_BEFORE_END)}R=R.getLast(e)}Y&&T.moveToRange(Y)}}}}();u=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==
391CKEDITOR.NODE_ELEMENT};return b}function b(a,c,f){c=a.getDocument().createElement(c);a.append(c,f);return c}function c(a){var b=a.count(),f;for(b;0<b--;)f=a.getItem(b),CKEDITOR.tools.trim(f.getHtml())||(f.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&f.getChildCount()&&f.getFirst().remove())}return function(f){var d=f.startContainer,e=d.getAscendant("table",1),g=!1;c(e.getElementsByTag("td"));c(e.getElementsByTag("th"));e=f.clone();e.setStart(d,0);e=a(e).lastBackward();e||(e=f.clone(),e.setEndAt(d,
392CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),g=!0);e||(e=d);e.is("table")?(f.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),f.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",g)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",g)),(d=e.getBogus())&&d.remove(),f.moveToPosition(e,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();x=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||
393a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,f=!1,d;d=b.clone();d.setStart(c,0);d=a(d).lastBackward();d||(d=b.clone(),d.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),d=a(d).lastForward(),f=!0);d||(d=c);d.is(CKEDITOR.dtd.$list)?(b.setStartAt(d,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),d.remove()):((c=d.getBogus())&&c.remove(),b.moveToPosition(d,f?CKEDITOR.POSITION_AFTER_START:
394CKEDITOR.POSITION_BEFORE_END),b.select())}}();q={eol:{detect:function(a,b){var c=a.range,f=c.clone(),d=c.clone(),e=new CKEDITOR.dom.elementPath(c.startContainer,b),g=new CKEDITOR.dom.elementPath(c.endContainer,b);f.collapse(1);d.collapse();e.block&&f.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(c.setStartAfter(e.block),a.prependEolBr=1);g.block&&d.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(c.setEndBefore(g.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),f;a.appendEolBr&&(f=
395this.createEolBr(c),a.fragment.append(f));!a.prependEolBr||f&&!f.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!v(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,f=c.getCommonAncestor(),d=new CKEDITOR.dom.elementPath(f,b),e=new CKEDITOR.dom.elementPath(c.startContainer,b),
396c=new CKEDITOR.dom.elementPath(c.endContainer,b),g;f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent());if(d.blockLimit.is({tr:1,table:1})){var l=d.contains("table").getParent();g=function(a){return!a.equals(l)}}else if(d.block&&d.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!e.equals(c))){var h=d.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(h)}}g||(g=function(a){return!a.equals(d.block)&&!a.equals(d.blockLimit)});this.rebuildFragment(a,
397b,f,g)},rebuildFragment:function(a,b,c,f){for(var d;c&&!c.equals(b)&&f(c);)d=c.clone(0,1),a.fragment.appendTo(d),a.fragment=d,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,f=a.startOffset,d=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++f==d&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};y=function(){function a(b,c){var f=b.getParent();if(f.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](f)}function b(c,f,d){a(f);a(d,1);for(var e;e=
398d.getNext();)e.insertAfter(f),f=e;w(c)&&c.remove()}function c(a,b){var f=new CKEDITOR.dom.range(a);f.setStartAfter(b.startNode);f.setEndBefore(b.endNode);return f}return{list:{detectMerge:function(a,b){var f=c(b,a.bookmark),d=f.startPath(),e=f.endPath(),g=d.contains(CKEDITOR.dtd.$list),l=e.contains(CKEDITOR.dtd.$list);a.mergeList=g&&l&&g.getParent().equals(l.getParent())&&!g.equals(l);a.mergeListItems=d.block&&e.block&&d.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||
399a.mergeListItems)f=f.clone(),f.setStartBefore(a.bookmark.startNode),f.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=f.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var f=a.mergeListBookmark.startNode,d=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(f,c),g=new CKEDITOR.dom.elementPath(d,c
vendor: 14,985 bytes, lines 399-428
399);if(a.mergeList){var l=e.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);l.equals(h)||(h.moveChildren(l),h.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),
400g=g.contains(CKEDITOR.dtd.$listItem),e.equals(g)||b(g,f,d));f.remove();d.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var f=a.mergeBlockBookmark.startNode,d=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(f,c),g=new CKEDITOR.dom.elementPath(d,
401c),e=e.block,g=g.block;e&&g&&!e.equals(g)&&b(g,f,d);f.remove();d.remove()}}},table:function(){function a(c){var d=[],e,g=new CKEDITOR.dom.walker(c),l=c.startPath().contains(f),h=c.endPath().contains(f),m={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var k="visited_"+(g?"out":"in");if(a.getCustomData(k))return;CKEDITOR.dom.element.setMarker(m,a,k,1)}if(g&&l&&a.equals(l))e=c.clone(),e.setEndAt(l,CKEDITOR.POSITION_BEFORE_END),d.push(e);else if(!g&&h&&a.equals(h))e=c.clone(),e.setStartAt(h,
402CKEDITOR.POSITION_AFTER_START),d.push(e);else{if(k=!g)k=a.type==CKEDITOR.NODE_ELEMENT&&a.is(f)&&(!l||b(a,l))&&(!h||b(a,h));if(!k&&(k=g))if(a.is(f))var k=l&&l.getAscendant("table",!0),n=h&&h.getAscendant("table",!0),q=a.getAscendant("table",!0),k=k&&k.contains(q)||n&&n.contains(q);else k=void 0;k&&(e=c.clone(),e.selectNodeContents(a),d.push(e))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(m);return d}function b(a,c){var f=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,d=a.getPosition(c);
403return d===CKEDITOR.POSITION_IDENTICAL?!1:0===(d&f)}var f={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),d=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(f)&&++d};c.checkForward();if(1<d){var c=b.startPath().contains("table"),e=b.endPath().contains("table");c&&e&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(e,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),
404b.setEndAfter(e),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(d,e){var g=c(e,d.bookmark),l=g.clone(),h,m,k=g.getCommonAncestor();k.is(CKEDITOR.dtd.$tableContent)&&!k.is(f)&&(k=k.getAscendant("table",!0));m=k;k=new CKEDITOR.dom.elementPath(g.startContainer,m);m=new CKEDITOR.dom.elementPath(g.endContainer,m);k=k.contains("table");m=m.contains("table");if(k||m)k&&m&&b(k,m)?(d.tableSurroundingRange=l,l.setStartAt(k,CKEDITOR.POSITION_AFTER_END),l.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),
405l=g.clone(),l.setEndAt(k,CKEDITOR.POSITION_AFTER_END),h=g.clone(),h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START),h=a(l).concat(a(h))):k?m||(d.tableSurroundingRange=l,l.setStartAt(k,CKEDITOR.POSITION_AFTER_END),g.setEndAt(k,CKEDITOR.POSITION_AFTER_END)):(d.tableSurroundingRange=l,l.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),g.setStartAt(m,CKEDITOR.POSITION_AFTER_START)),d.tableContentsRanges=h?h:a(g)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),w(b.startContainer)&&
406b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},
407fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),f;h(a,c.block,c.blockLimit)&&(f=d(a))&&(f=b.document.createElement(f),f.appendBogus(),b.insertNode(f),b.moveToPosition(f,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function g(b,c){if(0===b.length||a(b[0].getEnclosedNode()))return!1;var f,d;if((f=!c&&
4081===b.length)&&!(f=b[0].collapsed)){var e=b[0];f=e.startContainer.getAscendant({td:1,th:1},!0);var g=e.endContainer.getAscendant({td:1,th:1},!0);d=CKEDITOR.tools.trim;f&&f.equals(g)&&!f.findOne("td, th, tr, tbody, table")?(e=e.cloneContents(),f=e.getFirst()?d(e.getFirst().getText())!==d(f.getText()):!0):f=!1}if(f)return!1;for(d=0;d<b.length;d++)if(f=b[d]._getTableElement(),!f)return!1;return!0}function b(a){function b(a){a=a.find("td, th");var c=[],f;for(f=0;f<a.count();f++)c.push(a.getItem(f));return c}
409var c=[],f,d;for(d=0;d<a.length;d++)f=a[d]._getTableElement(),f.is&&f.is({td:1,th:1})?c.push(f):c=c.concat(b(f));return c}function e(a){a=b(a);var c="",f=[],d,e;for(e=0;e<a.length;e++)d&&!d.equals(a[e].getAscendant("tr"))?(c+=f.join("\t")+"\n",d=a[e].getAscendant("tr"),f=[]):0===e&&(d=a[e].getAscendant("tr")),f.push(a[e].getText());return c+=f.join("\t")}function c(a){var b=this.root.editor,c=b.getSelection(1);this.reset();r=!0;c.root.once("selectionchange",function(a){a.cancel()},null,null,0);c.selectRanges([a[0]]);
410c=this._.cache;c.ranges=new CKEDITOR.dom.rangeList(a);c.type=CKEDITOR.SELECTION_TEXT;c.selectedElement=a[0]._getTableElement();c.selectedText=e(a);c.nativeSel=null;this.isFake=1;this.rev=x++;b._.fakeSelection=this;r=!1;this.root.fire("selectionchange")}function m(){var b=this._.fakeSelection,c;if(b){c=this.getSelection(1);var f;if(!(f=!c)&&(f=!c.isHidden())){f=b;var d=c.getRanges(),e=f.getRanges(),l=d.length&&d[0]._getTableElement()&&d[0]._getTableElement().getAscendant("table",!0),h=e.length&&e[0]._getTableElement()&&
411e[0]._getTableElement().getAscendant("table",!0),m=1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table"),k=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table");if(a(f.getSelectedElement()))f=!1;else{var n=1===d.length&&d[0].collapsed,e=g(d,!!CKEDITOR.env.webkit)&&g(e);l=l&&h?l.equals(h)||h.contains(l):!1;l&&(n||e)?(m&&!k&&f.selectRanges(d),f=!0):f=!1}f=!f}f&&(b.reset(),b=0)}if(!b&&(b=c||this.getSelection(1),!b||b.getType()==CKEDITOR.SELECTION_NONE))return;
412this.fire("selectionCheck",b);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(f=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||f||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:b,path:c}))}function h(){A=!0;z||(d.call(this),z=CKEDITOR.tools.setTimeout(d,200,this))}function d(){z=null;A&&(CKEDITOR.tools.setTimeout(m,0,this),A=
413!1)}function k(a){return B(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function l(a){function b(c,f){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(f?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var c=a.startContainer,f=a.getPreviousNode(k,null,c),d=a.getNextNode(k,null,c);return b(f)||b(d,1)||!(f||d||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?!0:!1}function f(a){n(a,!1);var b=a.getDocument().createText(q);
414a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var f=a.getDocument().getSelection().getNative(),d=f&&"None"!=f.type&&f.getRangeAt(0),e=q.length;if(c.getLength()>e&&d&&d.intersectsNode(c.$)){var g=[{node:f.anchorNode,offset:f.anchorOffset},{node:f.focusNode,offset:f.focusOffset}];f.anchorNode==c.$&&f.anchorOffset>e&&(g[0].offset-=e);f.focusNode==c.$&&f.focusOffset>e&&(g[1].offset-=e)}}c.setText(w(c.getText(),1));g&&(c=a.getDocument().$,
415f=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),f.removeAllRanges(),f.addRange(c),f.extend(g[1].node,g[1].offset))}}function w(a,b){return b?a.replace(y,function(a,b){return b?"\u00a0":""}):a.replace(q,"")}function v(a,b){var c=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+
416'"\x3e'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var f=a.getSelection(1),d=a.createRange(),e=f.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(c,CKEDITOR.POSITION_AFTER_START);d.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);f.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function t(a){var b={37:1,39:1,8:1,46:1};return function(c){var f=c.data.getKeystroke();if(b[f]){var d=a.getSelection().getRanges(),
417e=d[0];1==d.length&&e.collapsed&&(f=e[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&f.type==CKEDITOR.NODE_ELEMENT&&"false"==f.getAttribute("contenteditable")&&(a.getSelection().fake(f),c.data.preventDefault(),c.cancel())}}}function p(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var f=c.startContainer,d;f&&!((d=f.type==CKEDITOR.NODE_ELEMENT)&&f.is("body")||!f.isReadOnly());)d&&"false"==
418f.getAttribute("contentEditable")&&c.setStartAfter(f),f=f.getParent();f=c.startContainer;d=c.endContainer;var e=c.startOffset,g=c.endOffset,l=c.clone();f&&f.type==CKEDITOR.NODE_TEXT&&(e>=f.getLength()?l.setStartAfter(f):l.setStartBefore(f));d&&d.type==CKEDITOR.NODE_TEXT&&(g?l.setEndAfter(d):l.setEndBefore(d));f=new CKEDITOR.dom.walker(l);f.evaluator=function(f){if(f.type==CKEDITOR.NODE_ELEMENT&&f.isReadOnly()){var d=c.clone();c.setEndBefore(f);c.collapsed&&a.splice(b--,1);f.getPosition(l.endContainer)&
419CKEDITOR.POSITION_CONTAINS||(d.setStartAfter(f),d.collapsed||a.splice(b+1,0,d));return!0}return!1};f.next()}}return a}var u="function"!=typeof window.getSelection,x=1,q=CKEDITOR.tools.repeat("\u200b",7),y=new RegExp(q+"( )?","g"),r,z,A,B=CKEDITOR.dom.walker.invisible(1),C=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return!1}}function b(a){return function(b){var c=b.editor,f=c.createRange(),
420d;if(!c.readOnly)return(d=f.moveToClosestEditablePosition(b.selected,a))||(d=f.moveToClosestEditablePosition(b.selected,!a)),d&&c.getSelection().selectRanges([f]),c.fire("saveSnapshot"),b.selected.remove(),d||(f.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([f])),c.fire("saveSnapshot"),!1}}var c=a(),f=a(1);return{37:c,38:c,39:f,40:f,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",
421function(){function a(){r=new CKEDITOR.dom.selection(c.getSelection());r.lock()}function b(){e.removeListener("mouseup",b);k.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==d.$&&c.select()}function f(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?
422a:null:null}var d=c.document,e=CKEDITOR.document,g=c.editable(),l=d.getBody(),k=d.getDocumentElement(),q=g.isInline(),w,r;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();0!==w&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=c.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){w=c._.previousActive&&
423c._.previousActive.equals(d.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=g.$.scrollTop;CKEDITOR.env.webkit&&w&&a&&(g.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(w);w=0},null,null,-1);g.attachListener(g,"mousedown",function(){w=0});if(CKEDITOR.env.ie||q)u?g.attachListener(g,"beforedeactivate",a,null,null,-1):g.attachListener(c,"selectionCheck",a,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){c.lockSelection(r);
424w=1},null,null,-1),g.attachListener(g,"mousedown",function(){w=0});if(CKEDITOR.env.ie&&!q){var y;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(y=c.window.getScrollPosition()))});g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&y&&(c.document.$.documentElement.scrollLeft=y.x,c.document.$.documentElement.scrollTop=y.y);y=null});if("BackCompat"!=d.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var x,
425v;k.on("mousedown",function(a){function b(a){a=a.data.$;if(x){var c=l.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(f){}x.setEndPoint(0>v.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);x.select()}}function c(){k.removeListener("mousemove",b);e.removeListener("mouseup",c);k.removeListener("mouseup",c);x.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<k.$.clientHeight&&a.$.x<k.$.clientWidth){x=l.$.createTextRange();try{x.moveToPoint(a.$.clientX,a.$.clientY)}catch(f){}v=
426x.duplicate();k.on("mousemove",b);e.on("mouseup",c);k.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)k.on("mousedown",function(a){a.data.getTarget().is("html")&&(e.on("mouseup",b),k.on("mouseup",b))})}}g.attachListener(g,"selectionchange",m,c);g.attachListener(g,"keyup",h,c);g.attachListener(g,"touchstart",h,c);g.attachListener(g,"touchend",h,c);CKEDITOR.env.ie&&g.attachListener(g,"keydown",function(a){var b=this.getSelection(1),c=f(b);c&&!c.equals(g)&&(b.selectElement(c),a.data.preventDefault())},
427c);g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(q&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var A;g.attachListener(g,"mousedown",function(){A=1});g.attachListener(d.getDocumentElement(),"mouseup",function(){A&&h.call(c);A=0})}else g.attachListener(CKEDITOR.env.ie?g:d.getDocumentElement(),"mouseup",h,c);CKEDITOR.env.webkit&&g.attachListener(d,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:g.hasFocus&&
428n(g)}},null,null,-1);g.attachListener(g,"keydown",t(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});
vendor: 9,825 bytes, lines 428-447
428c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&
429(b.remove(),CKEDITOR.env.gecko&&(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var f=C[a.data.keyCode];if(f)return f({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar");
430c&&(c.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:h).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||
431a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};
432CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;
433this.rev=b?b.rev:x++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var f,d;if(a)if(a.getRangeAt)f=(d=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(d.commonAncestorContainer);else{try{d=a.createRange()}catch(e){}f=d&&CKEDITOR.dom.element.get(d.item&&d.item(0)||d.parentElement())}if(!f||
434f.type!=CKEDITOR.NODE_ELEMENT&&f.type!=CKEDITOR.NODE_TEXT||!this.root.equals(f)&&!this.root.contains(f))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var G={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:w,
435_createFillingCharSequenceNode:f,FILLING_CHAR_SEQUENCE:q});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=u?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:u?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),f=c.type;"Text"==f&&(b=CKEDITOR.SELECTION_TEXT);"Control"==f&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&
436(b=CKEDITOR.SELECTION_TEXT)}catch(d){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),f=c.startContainer;f==c.endContainer&&1==f.nodeType&&1==c.endOffset-c.startOffset&&G[f.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=u?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}
437var b=function(b,c){b=b.duplicate();b.collapse(c);var f=b.parentElement();if(!f.hasChildNodes())return{container:f,offset:0};for(var d=f.children,e,g,l=b.duplicate(),h=0,k=d.length-1,m=-1,n,q;h<=k;)if(m=Math.floor((h+k)/2),e=d[m],l.moveToElementText(e),n=l.compareEndPoints("StartToStart",b),0<n)k=m-1;else if(0>n)h=m+1;else return{container:f,offset:a(e)};if(-1==m||m==d.length-1&&0>n){l.moveToElementText(f);l.setEndPoint("StartToStart",b);l=l.text.replace(/(\r\n|\r)/g,"\n").length;d=f.childNodes;if(!l)return e=
438d[d.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:f,offset:d.length}:{container:e,offset:e.nodeValue.length};for(f=d.length;0<l&&0<f;)g=d[--f],g.nodeType==CKEDITOR.NODE_TEXT&&(q=g,l-=g.nodeValue.length);return{container:q,offset:-l}}l.collapse(0<n?!0:!1);l.setEndPoint(0<n?"StartToStart":"EndToStart",b);l=l.text.replace(/(\r\n|\r)/g,"\n").length;if(!l)return{container:f,offset:a(e)+(0<n?0:1)};for(;0<l;)try{g=e[0<n?"previousSibling":"nextSibling"],g.nodeType==CKEDITOR.NODE_TEXT&&(l-=g.nodeValue.length,
439q=g),e=g}catch(w){return{container:f,offset:a(e)}}return{container:q,offset:0<n?-l:q.nodeValue.length+l}};return function(){var a=this.getNative(),c=a&&a.createRange(),f=this.getType();if(!a)return[];if(f==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),f=b(c,!0),a.setStart(new CKEDITOR.dom.node(f.container),f.offset),f=b(c),a.setEnd(new CKEDITOR.dom.node(f.container),f.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
440a.collapse(),[a];if(f==CKEDITOR.SELECTION_ELEMENT){for(var f=[],d=0;d<c.length;d++){for(var e=c.item(d),g=e.parentNode,l=0,a=new CKEDITOR.dom.range(this.root);l<g.childNodes.length&&g.childNodes[l]!=e;l++);a.setStart(new CKEDITOR.dom.node(g),l);a.setEnd(new CKEDITOR.dom.node(g),l+1);f.push(a)}return f}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var f=0;f<c.rangeCount;f++){var d=c.getRangeAt(f);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(d.startContainer),
441d.startOffset);b.setEnd(new CKEDITOR.dom.node(d.endContainer),d.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,f=c.ranges;f||(c.ranges=f=new CKEDITOR.dom.rangeList(a.call(this)));return b?p(new CKEDITOR.dom.rangeList(f.slice())):f}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];
442if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=c.startContainer,c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?
443new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,f,d=2;d&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&G[c.getName()]&&(f=c));d--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return f&&f.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=
444this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=u?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),f=this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||f[0]&&f[0].getCommonAncestor())&&a.getAscendant("body",
4451)&&(g(f)?c.call(this,f):d?this.fake(b):b?this.selectElement(b):this.selectRanges(f))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=x++},selectElement:function(a){var b=
446new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,d=b&&b._.hiddenSelectionContainer;this.reset();if(d)for(var d=this.root,e,h=0;h<a.length;++h)e=a[h],e.endContainer.equals(d)&&(e.endOffset=Math.min(e.endOffset,d.getChildCount()));if(a.length)if(this.isLocked){var m=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();m&&!m.equals(this.root)&&m.focus()}else{var k;a:{var q,w;if(1==a.length&&
447!(w=a[0]).collapsed&&(k=w.getEnclosedNode())&&k.type==CKEDITOR.NODE_ELEMENT&&(w=w.clone(),w.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(q=w.getEnclosedNode())&&q.type==CKEDITOR.NODE_ELEMENT&&(k=q),"false"==k.getAttribute("contenteditable")))break a;k=void 0}if(k)this.fake(k);else if(b&&b.plugins.tableselection&&CKEDITOR.plugins.tableselection.isSupportedEnvironment&&g(a)&&!r)c.call(this,a);
vendor: 29,243 bytes, lines 447-504
447else{if(u){q=CKEDITOR.dom.walker.whitespaces(!0);k=/\ufeff|\u00a0/;w={table:1,tbody:1,tr:1};1<a.length&&(b=a[a.length-
4481],a[0].setEnd(b.endContainer,b.endOffset));b=a[0];a=b.collapsed;var x,y,v;if((d=b.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in G&&(!d.is("a")||!d.getText()))try{v=d.$.createControlRange();v.addElement(d.$);v.select();return}catch(t){}if(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in w||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in w)b.shrink(CKEDITOR.NODE_ELEMENT,!0),a=b.collapsed;v=b.createBookmark();w=v.startNode;a||(m=v.endNode);
449v=b.document.$.body.createTextRange();v.moveToElementText(w.$);v.moveStart("character",1);m?(k=b.document.$.body.createTextRange(),k.moveToElementText(m.$),v.setEndPoint("EndToEnd",k),v.moveEnd("character",-1)):(x=w.getNext(q),y=w.hasAscendant("pre"),x=!(x&&x.getText&&x.getText().match(k))&&(y||!w.hasPrevious()||w.getPrevious().is&&w.getPrevious().is("br")),y=b.document.createElement("span"),y.setHtml("\x26#65279;"),y.insertBefore(w),x&&b.document.createText("\ufeff").insertBefore(w));b.setStartBefore(w);
450w.remove();a?(x?(v.moveStart("character",-1),v.select(),b.document.$.selection.clear()):v.select(),b.moveToPosition(y,CKEDITOR.POSITION_BEFORE_START),y.remove()):(b.setEndBefore(m),m.remove(),v.select())}else{m=this.getNative();if(!m)return;this.removeAllRanges();for(v=0;v<a.length;v++){if(v<a.length-1&&(x=a[v],y=a[v+1],k=x.clone(),k.setStart(x.endContainer,x.endOffset),k.setEnd(y.startContainer,y.startOffset),!k.collapsed&&(k.shrink(CKEDITOR.NODE_ELEMENT,!0),b=k.getCommonAncestor(),k=k.getEnclosedNode(),
451b.isReadOnly()||k&&k.isReadOnly()))){y.setStart(x.startContainer,x.startOffset);a.splice(v--,1);continue}b=a[v];y=this.document.$.createRange();b.collapsed&&CKEDITOR.env.webkit&&l(b)&&(k=f(this.root),b.insertNode(k),(x=k.getNext())&&!k.getPrevious()&&x.type==CKEDITOR.NODE_ELEMENT&&"br"==x.getName()?(n(this.root),b.moveToPosition(x,CKEDITOR.POSITION_BEFORE_START)):b.moveToPosition(k,CKEDITOR.POSITION_AFTER_END));y.setStart(b.startContainer.$,b.startOffset);try{y.setEnd(b.endContainer.$,b.endOffset)}catch(A){if(0<=
452A.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))b.collapse(1),y.setEnd(b.endContainer.$,b.endOffset);else throw A;}m.addRange(y)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();v(c,b);var f=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);f.ranges=new CKEDITOR.dom.rangeList(d);f.selectedElement=f.startElement=a;f.type=CKEDITOR.SELECTION_ELEMENT;
453f.selectedText=f.nativeSel=null;this.isFake=1;this.rev=x++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return g(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=
454this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,f=0;f<a.length;f++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[f]);b.push(d)}a.isFake&&(c=g(b)?b[0]._getTableElement():b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!g(b)?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-
4551].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[u?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,f;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!f){var d=a.getAttribute("contentEditable");
456"false"==d?c=a:"true"==d&&(f=1)}return c}function g(a,b,c,f){return(a.getPosition(b)|f)==f&&(!c.childRule||c.childRule(a))}function b(f){var d=f.document;if(f.collapsed)d=x(this,d),f.insertNode(d),f.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var e=this.element,l=this._.definition,h,k=l.ignoreReadonly,m=k||l.includeReadonly;null==m&&(m=f.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[e];n||(h=!0,n=CKEDITOR.dtd.span);f.enlarge(CKEDITOR.ENLARGE_INLINE,1);f.trim();var q=f.createBookmark(),
457w=q.startNode,u=q.endNode,r=w,y;if(!k){var v=f.getCommonAncestor(),k=a(w,v),v=a(u,v);k&&(r=k.getNextSourceNode(!0));v&&(u=v)}for(r.getPosition(u)==CKEDITOR.POSITION_FOLLOWING&&(r=0);r;){k=!1;if(r.equals(u))r=null,k=!0;else{var A=r.type==CKEDITOR.NODE_ELEMENT?r.getName():null,v=A&&"false"==r.getAttribute("contentEditable"),p=A&&r.getAttribute("data-nostyle");if(A&&r.data("cke-bookmark")||r.type===CKEDITOR.NODE_COMMENT){r=r.getNextSourceNode(!0);continue}if(v&&m&&CKEDITOR.dtd.$block[A])for(var z=r,
458B=c(z),C=void 0,G=B.length,ea=0,z=G&&new CKEDITOR.dom.range(z.getDocument());ea<G;++ea){var C=B[ea],J=CKEDITOR.filter.instances[C.data("cke-filter")];if(J?J.check(this):1)z.selectNodeContents(C),b.call(this,z)}B=A?!n[A]||p?0:v&&!m?0:g(r,u,l,L):1;if(B)if(C=r.getParent(),B=l,G=e,ea=h,!C||!(C.getDtd()||CKEDITOR.dtd.span)[G]&&!ea||B.parentRule&&!B.parentRule(C))k=!0;else{if(y||A&&CKEDITOR.dtd.$removeEmpty[A]&&(r.getPosition(u)|L)!=L||(y=f.clone(),y.setStartBefore(r)),A=r.type,A==CKEDITOR.NODE_TEXT||v||
459A==CKEDITOR.NODE_ELEMENT&&!r.getChildCount()){for(var A=r,F;(k=!A.getNext(H))&&(F=A.getParent(),n[F.getName()])&&g(F,w,l,E);)A=F;y.setEndAfter(A)}}else k=!0;r=r.getNextSourceNode(p||v)}if(k&&y&&!y.collapsed){for(var k=x(this,d),v=k.hasAttributes(),p=y.getCommonAncestor(),A={},B={},C={},G={},fa,Y,I;k&&p;){if(p.getName()==e){for(fa in l.attributes)!G[fa]&&(I=p.getAttribute(Y))&&(k.getAttribute(fa)==I?B[fa]=1:G[fa]=1);for(Y in l.styles)!C[Y]&&(I=p.getStyle(Y))&&(k.getStyle(Y)==I?A[Y]=1:C[Y]=1)}p=p.getParent()}for(fa in B)k.removeAttribute(fa);
460for(Y in A)k.removeStyle(Y);v&&!k.hasAttributes()&&(k=null);k?(y.extractContents().appendTo(k),y.insertNode(k),t.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),y.extractContents().appendTo(k),y.insertNode(k),t.call(this,k),k.remove(!0));y=null}}f.moveToBookmark(q);f.shrink(CKEDITOR.SHRINK_TEXT);f.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function e(a){function b(){for(var a=new CKEDITOR.dom.elementPath(f.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),
461d=null,e=null,g=0;g<a.elements.length;g++){var l=a.elements[g];if(l==a.block||l==a.blockLimit)break;n.checkElementRemovable(l,!0)&&(d=l)}for(g=0;g<c.elements.length;g++){l=c.elements[g];if(l==c.block||l==c.blockLimit)break;n.checkElementRemovable(l,!0)&&(e=l)}e&&m.breakParent(e);d&&f.breakParent(d)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),f=c.startNode,d=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(f.getParent(),a.root),g,l=0,k;l<
462e.elements.length&&(k=e.elements[l])&&k!=e.block&&k!=e.blockLimit;l++)if(this.checkElementRemovable(k)){var h;!d&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(h=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(g=k,g.match=h?"start":"end"):(k.mergeSiblings(),k.is(this.element)?v.call(this,k):p(k,r(this)[k.getName()]))}if(g){d=f;for(l=0;;l++){k=e.elements[l];if(k.equals(g))break;else if(k.match)continue;else k=k.clone();k.append(d);d=k}d["start"==g.match?"insertBefore":"insertAfter"](g)}}else{var m=
463c.endNode,n=this;b();for(e=f;!e.equals(m);)g=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?v.call(this,e):p(e,r(this)[e.getName()]),g.type==CKEDITOR.NODE_ELEMENT&&g.contains(f)&&(b(),g=f.getNext())),e=g}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function c(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function m(a){var b=a.getEnclosedNode()||
464a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&q(a,this)}function h(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var f in c)a.removeAttribute(f,c[f]);if(b.styles)for(var d in b.styles)b.styles.hasOwnProperty(d)&&a.removeStyle(d)}}function d(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&
465(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var f,d=a.document,e;f=c.getNextParagraph();)!f.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(e=x(this,d,f),l(f,e));a.moveToBookmark(b)}function k(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var f,d;f=c.getNextParagraph();)this.checkElementRemovable(f)&&(f.is("pre")?((d=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==
466CKEDITOR.ENTER_P?"p":"div"))&&f.copyAttributes(d),l(f,d)):v.call(this,f));a.moveToBookmark(b)}function l(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),g=!d&&e;if(d&&!e){e=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=n(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g," ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var l=a.getDocument().createElement("div");
467l.append(e);e.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";e.copyAttributes(l.getFirst());e=l.getFirst().remove()}else e.setHtml(g);b=e}else g?b=w(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(I))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=n(k.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":c.setHtml(d),k.remove())}else c&&u(b)}function f(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
468function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function n(a,b,c){var f="",d="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(f=b);c&&(d=c);return""});return f+a.replace(b,c)+d}function w(a,b){var c;1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var f=0;f<a.length;f++){var d=a[f],d=d.replace(/(\r\n|\r)/g,"\n"),d=n(d,/^[ \t]*\n/,
469""),d=n(d,/\n$/,""),d=n(d,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),d=d.replace(/\n/g,"\x3cbr\x3e"),d=d.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var e=b.clone();e.setHtml(d);c.append(e)}else b.setHtml(d)}return c||b}function v(a,b){var c=this._.definition,f=c.attributes,c=c.styles,d=r(this)[a.getName()],e=CKEDITOR.tools.isEmpty(f)&&
470CKEDITOR.tools.isEmpty(c),g;for(g in f)if("class"!=g&&!this._.definition.fullMatch||a.getAttribute(g)==z(g,f[g]))b&&"data-"==g.slice(0,5)||(e=a.hasAttribute(g),a.removeAttribute(g));for(var l in c)this._.definition.fullMatch&&a.getStyle(l)!=z(l,c[l],!0)||(e=e||!!a.getStyle(l),a.removeStyle(l));p(a,d,C[a.getName()]);e&&(this._.definition.alwaysRemoveElement?u(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?u(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?
471"p":"div"))}function t(a){for(var b=r(this),c=a.getElementsByTag(this.element),f,d=c.count();0<=--d;)f=c.getItem(d),f.isReadOnly()||v.call(this,f,!0);for(var e in b)if(e!=this.element)for(c=a.getElementsByTag(e),d=c.count()-1;0<=d;d--)f=c.getItem(d),f.isReadOnly()||p(f,b[e])}function p(a,b,c){if(b=b&&b.attributes)for(var f=0;f<b.length;f++){var d=b[f][0],e;if(e=a.getAttribute(d)){var g=b[f][1];(null===g||g.test&&g.test(e)||"string"==typeof g&&e==g)&&a.removeAttribute(d)}}c||u(a)}function u(a,b){if(!a.hasAttributes()||
472b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(I),f=a.getNext(I);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!f||f.type!=CKEDITOR.NODE_TEXT&&f.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),f=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),f&&!c.equals(f)&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings())}function x(a,b,c){var f;f=a.element;"*"==f&&(f="span");f=new CKEDITOR.dom.element(f,b);c&&c.copyAttributes(f);
473f=q(f,a);b.getCustomData("doc_processing_style")&&f.hasAttribute("id")?f.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return f}function q(a,b){var c=b._.definition,f=c.attributes,c=CKEDITOR.style.getStyleText(c);if(f)for(var d in f)a.setAttribute(d,f[d]);c&&a.setAttribute("style",c);a.getDocument().removeCustomData("doc_processing_style");return a}function y(a,b){for(var c in a)a[c]=a[c].replace(J,function(a,c){return b[c]})}function r(a){if(a._.overrides)return a._.overrides;var b=
474a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var f=0;f<c.length;f++){var d=c[f],e,g;"string"==typeof d?e=d.toLowerCase():(e=d.element?d.element.toLowerCase():a.element,g=d.attributes);d=b[e]||(b[e]={});if(g){var d=d.attributes=d.attributes||[],l;for(l in g)d.push([l.toLowerCase(),g[l]])}}}return b}function z(a,b,c){var f=new CKEDITOR.dom.element("span");f[c?"setStyle":"setAttribute"](a,b);return f[c?"getStyle":"getAttribute"](a)}function A(a,b){function c(a,
475b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var f in a)if(!(f in b)||c(b[f],f)!=c(a[f],f)&&"inherit"!=a[f]&&"inherit"!=b[f])return!1;return!0}function B(a,b,c){var f=a.getRanges();b=b?this.removeFromRange:this.applyToRange;var d,e;if(a.isFake&&a.isInTable())for(d=[],e=0;e<f.length;e++)d.push(f[e].clone());for(var g=f.createIterator();e=g.getNextRange();)b.call(this,
476e,c);a.selectRanges(d||f)}var C={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},G={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},F=/\s*(?:;\s*|$)/,J=/#\((.+?)\)/g,H=CKEDITOR.dom.walker.bookmark(0,1),I=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=
477function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),y(a.attributes,b),y(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(C[c]?CKEDITOR.STYLE_BLOCK:G[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&
478(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return B.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);B.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return B.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;
479b||(this._.enterMode=a.activeEnterMode);B.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?d:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?k:this.type==CKEDITOR.STYLE_OBJECT?h:null;return this.removeFromRange(a)},applyToObject:function(a){q(a,this)},
480checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,f=0,d;f<c.length;f++)if(d=c[f],this.type!=CKEDITOR.STYLE_INLINE||d!=a.block&&d!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var e=d.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(d,!0,b))return!0}}return!1},checkApplicable:function(a,
481b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var f=a.getName();if("string"==typeof this.element?f==this.element:f in this.element){if(!b&&!a.hasAttributes())return!0;if(f=c._AC)c=f;else{var f={},d=0,e=c.attributes;
482if(e)for(var g in e)d++,f[g]=e[g];if(g=CKEDITOR.style.getStyleText(c))f.style||d++,f.style=g;f._length=d;c=c._AC=f}if(c._length){for(var l in c)if("_length"!=l)if(f=a.getAttribute(l)||"","style"==l?A(c[l],f):c[l]==f){if(!b)return!0}else if(b)return!1;if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=r(this)[a.getName()]){var f;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(f=b[c][0],f=a.getAttribute(f)){var d=b[c][1];
483if(null===d)return!0;if("string"==typeof d){if(f==d)return!0}else if(d.test(f))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],f=b.element;"bdo"==f&&(f="span");var c=["\x3c",f],d=b.attributes;if(d)for(var e in d)c.push(" ",e,'\x3d"',d[e],'"');(d=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',d,'"');c.push("\x3e",a||b.name,"\x3c/",f,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;
484var b=a.styles,c=a.attributes&&a.attributes.style||"",f="";c.length&&(c=c.replace(F,";"));for(var d in b){var e=b[d],g=(d+":"+e).replace(F,";");"inherit"==e?f+=g:c+=g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+f};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},
485a,!0);return this.customHandlers[a.type]=b};var L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,E=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,g){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,g,!0)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&
486a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,g,b){CKEDITOR.stylesSet.addExternal(a,g,"");CKEDITOR.stylesSet.load(a,b)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,g){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var c=0;c<
487b.length;c++){var g=b[c],h=g.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,h)}}));b.push({style:a,fn:g})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var g=this,b=g.config.stylesCombo_stylesSet||g.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)g._.stylesDefinitions=b,a(b);else{b||(b="default");var b=b.split(":"),e=b[0];
488CKEDITOR.stylesSet.addExternal(e,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(e,function(b){g._.stylesDefinitions=b[e];a(g._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(a,g){"string"==typeof a&&(a=(g?g.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+
489"--\x3e"}}),"use strict",function(){var a={},g={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(g[b]=1);CKEDITOR.dom.elementPath=function(b,c){var m=null,h=null,d=[],k=b,l;c=c||b.getDocument().getBody();k||(k=c);do if(k.type==CKEDITOR.NODE_ELEMENT){d.push(k);if(!this.lastElement&&(this.lastElement=k,k.is(CKEDITOR.dtd.$object)||"false"==k.getAttribute("contenteditable")))continue;if(k.equals(c))break;
490if(!h&&(l=k.getName(),"true"==k.getAttribute("contenteditable")?h=k:!m&&g[l]&&(m=k),a[l])){if(l=!m&&"div"==l){a:{l=k.getChildren();for(var f=0,n=l.count();f<n;f++){var w=l.getItem(f);if(w.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[w.getName()]){l=!0;break a}}l=!1}l=!l}l?m=k:h=k}}while(k=k.getParent());h||(h=c);this.block=m;this.blockLimit=h;this.root=c;this.elements=d}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var g=this.elements;a=a&&a.elements;if(!a||g.length!=a.length)return!1;
491for(var b=0;b<g.length;b++)if(!g[b].equals(a[b]))return!1;return!0},contains:function(a,g,b){var e=0,c;"string"==typeof a&&(c=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?c=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?c=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:"function"==typeof a?c=a:"object"==typeof a&&(c=function(b){return b.getName()in a});var m=this.elements,h=m.length;g&&(b?e+=1:--h);b&&(m=Array.prototype.slice.call(m,0),m.reverse());
492for(;e<h;e++)if(c(m[e]))return m[e];return null},isContextFor:function(a){var g;return a in CKEDITOR.dtd.$block?(g=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!g.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(a,g){"string"==typeof a&&(a=(g?g.$:document).createTextNode(a));this.$=a},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,
493{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var g=this.$.parentNode,b=g.childNodes.length,e=this.getLength(),c=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(a),c);g.childNodes.length==b&&(a>=e?(m=c.createText(""),m.insertAfter(this)):(a=c.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,g){return"number"!=typeof g?this.$.nodeValue.substr(a):
494this.$.nodeValue.substring(a,g)}}),function(){function a(a,e,c){var g=a.serializable,h=e[c?"endContainer":"startContainer"],d=c?"endOffset":"startOffset",k=g?e.document.getById(a.startNode):a.startNode;a=g?e.document.getById(a.endNode):a.endNode;h.equals(k.getPrevious())?(e.startOffset=e.startOffset-h.getLength()-a.getPrevious().getLength(),h=a.getNext()):h.equals(a.getPrevious())&&(e.startOffset-=h.getLength(),h=a.getNext());h.equals(k.getParent())&&e[d]++;h.equals(a.getParent())&&e[d]++;e[c?"endContainer":
495"startContainer"]=h;return e}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,g)};var g={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),c=[],g;return{getNextRange:function(h){g=void 0===g?0:g+1;var d=a[g];if(d&&1<a.length){if(!g)for(var k=a.length-1;0<=k;k--)c.unshift(a[k].createBookmark(!0));if(h)for(var l=0;a[g+l+1];){var f=d.document;h=0;k=f.getById(c[l].endNode);
496for(f=f.getById(c[l+1].startNode);;){k=k.getNextSourceNode(!1);if(f.equals(k))h=1;else if(e(k)||k.type==CKEDITOR.NODE_ELEMENT&&k.isBlockBoundary())continue;break}if(!h)break;l++}for(d.moveToBookmark(c.shift());l--;)k=a[++g],k.moveToBookmark(c.shift()),d.setEnd(k.endContainer,k.endOffset)}return d}}},createBookmarks:function(b){for(var e=[],c,g=0;g<this.length;g++){e.push(c=this[g].createBookmark(b,!0));for(var h=g+1;h<this.length;h++)this[h]=a(c,this[h]),this[h]=a(c,this[h],!0)}return e},createBookmarks2:function(a){for(var e=
497[],c=0;c<this.length;c++)e.push(this[c].createBookmark2(a));return e},moveToBookmarks:function(a){for(var e=0;e<this.length;e++)this[e].moveToBookmark(a[e])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function g(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,g;e<c.length;e++)if(g=c[e],d.ie&&(g.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==
498g)&&(g="ie"),d[g]){b+="_"+c[e];break}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){m[a]||(CKEDITOR.document.appendStyleSheet(g(a)),m[a]=1);b&&b()}function e(a){var b=a.getById(h);b||(b=a.getHead().append("style"),b.setAttribute("id",h),b.setAttribute("type","text/css"));return b}function c(a,b,c){var d,e,g;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),e=0;e<b.length;e++)b[e]=b[e].split("{");for(var k=0;k<a.length;k++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){g=b[e][1];for(d=0;d<
499c.length;d++)g=g.replace(c[d][0],c[d][1]);a[k].$.sheet.addRule(b[e][0],g)}else{g=b;for(d=0;d<c.length;d++)g=g.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[k].$.styleSheet.cssText+=g:a[k].$.innerHTML+=g}}var m={};CKEDITOR.skin={path:a,loadPart:function(c,f){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,f)}):b(c,f)},getPath:function(a){return CKEDITOR.getUrl(g(a))},icons:{},addIcon:function(a,b,c,d){a=
500a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,e){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]),g||(g=this.icons[a]));a=c||g&&g.path||"";d=d||g&&g.offset;e=e||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=
501e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var e=CKEDITOR.skin.chameleon,g="",l="";"function"==typeof e&&(g=e(this,"editor"),l=e(this,"panel"));a=[[k,a]];c([b],g,a);c(d,l,a)}).call(this,a)}});var h="cke_ui_color",d=[],k=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){var g=e(a);
502d.push(g);b.on("destroy",function(){d=CKEDITOR.tools.array.filter(d,function(a){return g!==a})});(a=b.getUiColor())&&c([g],CKEDITOR.skin.chameleon(b,"panel"),[[k,a]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);
503a.appendTo(CKEDITOR.document.getHead());try{var g=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!g||g!=b)}catch(e){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,g=0;g<a.length;g++)CKEDITOR.editor.prototype.constructor.apply(a[g][0],a[g][1]),CKEDITOR.add(a[g][0])}(),
504CKEDITOR.skin.name="moono-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,e){for(var c=a.match(/[^#]./g),g=0;3>g;g++){var h=g,d;d=parseInt(c[g],16);d=("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2);c[h]=d}return"#"+c.join("")}}(),g
vendor: 2,839 bytes, lines 504-506
504={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),
505panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
506return function(
vendor: 10,323 bytes, lines 506-525
506b,e){var c=a(b.uiColor,.4),c={id:"."+b.id,defaultBorder:a(c,-.2),toolbarElementsBorder:a(c,-.25),defaultBackground:c,lightBackground:a(c,.8),darkBackground:a(c,-.15),ckeButtonOn:a(c,.4),ckeResizer:a(c,-.4),ckeColorauto:a(c,.8),dialogBody:a(c,.7),dialogTab:a(c,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:a(c,-.6),menubuttonHover:a(c,.1),menubuttonIcon:a(c,.5),menubuttonIconHover:a(c,.3)};return g[e].output(c).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
507CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},g={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},b={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},e={isChanged:function(){return this.getValue()!=
508this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},c=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
509this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},!0),m=/^on([A-Z]\w+)/,h=function(a){for(var b in a)(m.test(b)||"title"==b||"type"==b)&&delete a[b];return a},d=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,f,d){if(!(4>arguments.length)){var e=a.call(this,c);e.labelId=CKEDITOR.tools.getNextId()+
510"_label";this._.children=[];var g={role:c.role||"presentation"};c.includeLabel&&(g["aria-labelledby"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"div",null,g,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+e.labelId+'"',e.inputId?' for\x3d"'+e.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
511c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',d.call(this,b,c),"\x3c/div\x3e"):(f={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" id\x3d"'+e.labelId+'" for\x3d"'+e.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(c.controlStyle?' style\x3d"'+c.controlStyle+
512'"':"")+"\x3e"+d.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",g={"class":"cke_dialog_ui_input_"+c.type,id:e,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(g.maxlength=c.maxLength);c.size&&(g.size=c.size);c.inputStyle&&(g.style=c.inputStyle);var h=this,m=!1;b.on("load",function(){h.getInputElement().on("keydown",
513function(a){13==a.data.getKeystroke()&&(m=!0)});h.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&m&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),m=!1);h.bidi&&d.call(h,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");g["aria-labelledby"]=this._.labelId;this._.required&&
514(g["aria-required"]=this._.required);for(var b in g)a.push(b+'\x3d"'+g[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);var e=this,g=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};c.validate&&(this.validate=c.validate);h.rows=c.rows||5;h.cols=c.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(h.style=c.inputStyle);c.dir&&(h.dir=c.dir);if(e.bidi)b.on("load",
515function(){e.getInputElement().on("keyup",d)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',g,'" '],b;for(b in h)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,
516c,f){if(!(3>arguments.length)){var d=a.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),f=[],e=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":e};h(a);c["default"]&&(g.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);
517d.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,f,"input",null,g);f.push(' \x3clabel id\x3d"',e,'" for\x3d"',g.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return f.join("")})}},radio:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var d=[],e=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,
518b,c,f,function(){for(var a=[],f=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",m=0;m<c.items.length;m++){var x=c.items[m],q=void 0!==x[2]?x[2]:x[0],y=void 0!==x[1]?x[1]:x[0],r=CKEDITOR.tools.getNextId()+"_radio_input",z=r+"_label",r=CKEDITOR.tools.extend({},c,{id:r,title:null,type:null},!0),q=CKEDITOR.tools.extend({},r,{title:q},!0),A={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:y,"aria-labelledby":z},B=[];e._["default"]==y&&(A.checked="checked");h(r);h(q);"undefined"!=typeof r.inputStyle&&
519(r.style=r.inputStyle);r.keyboardFocusable=!0;d.push(new CKEDITOR.ui.dialog.uiElement(b,r,B,"input",null,A));B.push(" ");new CKEDITOR.ui.dialog.uiElement(b,q,B,"label",null,{id:z,"for":A.id},x[0]);a.push(B.join(""))}new CKEDITOR.ui.dialog.hbox(b,d,a,f);return f.join("")});this._.children=d}},button:function(b,c,f){if(arguments.length){"function"==typeof c&&(c=c(b.getParentEditor()));a.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);var d=this;b.on("load",function(){var a=this.getElement();
520(function(){a.on("click",function(a){d.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(d.click(),a.data.preventDefault())})})();a.unselectable()},this);var e=CKEDITOR.tools.extend({},c);delete e.style;var g=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,e,f,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":g},'\x3cspan id\x3d"'+g+'" class\x3d"cke_dialog_ui_button"\x3e'+
521CKEDITOR.tools.htmlEncode(c.label)+"\x3c/span\x3e")}},select:function(b,c,f){if(!(3>arguments.length)){var d=a.call(this,c);c.validate&&(this.validate=c.validate);d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),f=[],e=[],g={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};f.push('\x3cdiv class\x3d"cke_dialog_ui_input_',
522c.type,'" role\x3d"presentation"');c.width&&f.push('style\x3d"width:'+c.width+'" ');f.push("\x3e");void 0!==c.size&&(g.size=c.size);void 0!==c.multiple&&(g.multiple=c.multiple);h(a);for(var m=0,x;m<c.items.length&&(x=c.items[m]);m++)e.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==x[1]?x[1]:x[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(x[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);d.select=new CKEDITOR.ui.dialog.uiElement(b,a,f,"select",null,
523g,e.join(""));f.push("\x3c/div\x3e");return f.join("")})}},file:function(b,c,f){if(!(3>arguments.length)){void 0===c["default"]&&(c["default"]="");var d=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",function(){CKEDITOR.document.getById(d.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){d.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',
524d.frameId,'" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,c,f){var d=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var e=CKEDITOR.tools.extend({},c),g=e.onClick;e.className=(e.className?e.className+" ":"")+"cke_dialog_ui_button";e.onClick=function(a){var f=
525c["for"];a=g?g.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(f[0],f[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(d)});CKEDITOR.ui.dialog.button.call(this,b,e,f)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(d,e,g){if(!(3>arguments.length)){var h=[],m=e.html;"\x3c"!=m.charAt(0)&&(m="\x3cspan\x3e"+m+"\x3c/span\x3e");
vendor: 8,323 bytes, lines 525-541
525var u=e.focus;if(u){var x=this.focus;
526this.focus=function(){("function"==typeof u?u:x).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,d,e,h,"span",null,null,"");h=h.join("").match(a);m=m.match(b)||["","",""];c.test(m[1])&&(m[1]=m[1].slice(0,-1),m[2]="/"+m[2]);g.push([m[1]," ",h[1]||"",m[2]].join(""))}}}(),fieldset:function(a,b,c,d,e){var g=e.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,e,d,"fieldset",null,null,function(){var a=
527[];g&&a.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var b=0;b<c.length;b++)a.push(c[b]);return a.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(a){var b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=
528a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:c},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},
529isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!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)},
530focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="\u202a"==b?"ltr":"\u202b"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,
531arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"\u202a":"\u202b")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.textarea.prototype=
532new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,c){var d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;d.$.text=a;d.$.value=void 0===b||null===b?a:b;void 0===c||null===c?CKEDITOR.env.ie?e.add(d.$):e.add(d.$,null):e.add(d.$,c);return this},remove:function(a){this.getInputElement().$.remove(a);
533return this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,
534b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return c.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,d,e=0;e<c.length&&(d=c[e]);e++)d.getElement().$.checked=
535d.getValue()==a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return c.onChange.apply(this,arguments);a.on("load",function(){for(var a=
536this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b);return null}}},e,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,e,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):
537this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,f){a.on("formLoaded",function(){a.getInputElement().on(c,f,a)})},e;for(e in a)if(c=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},reset:function(){function a(){c.$.open();
538var k="";d.size&&(k=d.size-(CKEDITOR.env.ie?7:0));var q=b.frameId+"_input";c.$.write(['\x3chtml dir\x3d"'+m+'" lang\x3d"'+u+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+m+'" lang\x3d"'+u+'" action\x3d"',CKEDITOR.tools.htmlEncode(d.action),'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',q,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(d.label),
539'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',q,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(d.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<k?k:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+g+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+h+")}","\x3c/script\x3e"].join(""));
540c.$.close();for(k=0;k<e.length;k++)e[k].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),d=b.definition,e=b.buttons,g=this.formLoadedNumber,h=this.formUnloadNumber,m=b.dialog._.editor.lang.dir,u=b.dialog._.editor.langCode;g||(g=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),h=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(g);
541CKEDITOR.tools.removeFunction(h)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){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",b)}}
vendor: 11,241 bytes, lines 541-562
541,keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=
542new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",g);CKEDITOR.dialog.addUIElement("password",g);CKEDITOR.dialog.addUIElement("tel",g);CKEDITOR.dialog.addUIElement("textarea",b);CKEDITOR.dialog.addUIElement("checkbox",b);CKEDITOR.dialog.addUIElement("radio",b);CKEDITOR.dialog.addUIElement("button",b);CKEDITOR.dialog.addUIElement("select",b);CKEDITOR.dialog.addUIElement("file",b);CKEDITOR.dialog.addUIElement("fileButton",
543b);CKEDITOR.dialog.addUIElement("html",b);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,c){for(var d=b.children,e,g=[],h=[],m=0;m<d.length&&(e=d[m]);m++){var u=[];g.push(u);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,u))}return new CKEDITOR.ui.dialog[b.type](a,h,g,c,b)}})}}),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 a(){for(var a=
544this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function g(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function b(a,b){for(var c=a.$.getElementsByTagName("input"),f=0,d=c.length;f<
545d;f++){var e=new CKEDITOR.dom.element(c[f]);"text"==e.getAttribute("type").toLowerCase()&&(b?(e.setAttribute("value",e.getCustomData("fake_value")||""),e.removeCustomData("fake_value")):(e.setCustomData("fake_value",e.getAttribute("value")),e.setAttribute("value","")))}}function e(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function c(){var a=
546this.getInputElement();a&&a.removeAttribute("aria-invalid")}function m(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",p).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=b.getChild([0,0,0,0,0]),f=c.getChild(0),d=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);
547!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));f.unselectable();d.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:f,close:d,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),
548footer:c.getChild([3,0,1,0])}}}function h(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function d(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();
549c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function k(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function l(a){function b(c){var l=a.getSize(),m=CKEDITOR.document.getWindow().getViewPaneSize(),k=c.data.$.screenX,n=c.data.$.screenY,q=k-f.x,r=n-f.y;f={x:k,y:n};d.x+=q;d.y+=r;a.move(d.x+h[3]<g?-h[3]:d.x-h[1]>m.width-l.width-g?m.width-l.width+("rtl"==e.lang.dir?0:h[1]):d.x,d.y+h[0]<g?-h[0]:d.y-h[2]>m.height-l.height-g?m.height-l.height+h[2]:d.y,1);c.data.preventDefault()}
550function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var f=null,d=null,e=a.getParentEditor(),g=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(e){f={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",
551c);d=a.getPosition();if(CKEDITOR.env.ie6Compat){var g=B.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",c)}e.data.preventDefault()},a)}function f(a){function b(c){var n="rtl"==e.lang.dir,q=k.width,r=k.height,u=q+(c.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),y=r+(c.data.$.screenY-m.y)*(a._.moved?1:2),x=a._.element.getFirst(),x=n&&x.getComputedStyle("right"),w=a.getPosition();w.y+y>l.height&&(y=l.height-w.y);(n?x:w.x)+u>l.width&&(u=l.width-(n?x:w.x));if(d==CKEDITOR.DIALOG_RESIZE_WIDTH||
552d==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(f.minWidth||0,u-g);if(d==CKEDITOR.DIALOG_RESIZE_HEIGHT||d==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(f.minHeight||0,y-h);a.resize(q,r);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var f=a.definition,d=f.resizable;
553if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),g,h,l,m,k,n,q=CKEDITOR.tools.addFunction(function(f){k=a.getSize();var d=a.parts.contents;d.$.getElementsByTagName("iframe").length&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),d.append(n));h=k.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=k.width-a.parts.contents.getSize("width",
5541);m={x:f.screenX,y:f.screenY};l=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(d=B.getChild(0).getFrameDocument(),d.on("mousemove",b),d.on("mouseup",c));f.preventDefault&&f.preventDefault()});a.on("load",function(){var b="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+
555b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event )"\x3e'+("ltr"==e.lang.dir?"\u25e2":"\u25e3")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(q)})}}function n(a){a.data.preventDefault(1)}function w(a){var b=CKEDITOR.document.getWindow(),c=a.config,f=CKEDITOR.skinName||a.config.skin,d=c.dialog_backgroundCoverColor||("moono-lisa"==f?"black":"white"),
556f=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,f,e),g=A[c];g?g.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),
557e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(e.join("")),g.setOpacity(void 0!==f?f:.5),g.on("keydown",n),g.on("keypress",n),g.on("keyup",n),g.appendTo(CKEDITOR.document.getBody()),
558A[c]=g);a.focusManager.add(g);B=g;a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};z=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var l=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){l.prevScrollHandler=
559window.onscroll||function(){};window.onscroll=l},0);h()}}function v(a){B&&(a.focusManager.remove(B),a=CKEDITOR.document.getWindow(),B.hide(),B=null,a.removeListener("resize",z),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),z=null)}var t=CKEDITOR.tools.cssLength,p='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+
560CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e';
561CKEDITOR.dialog=function(b,d){function h(){var a=B._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function k(a){var b=B._.focusList;a=a||0;if(!(1>b.length)){var c=B._.currentFocusIndex;B._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(f){}var d=c,e=1<B._.pageCount;do{d+=a;if(e&&!B._.tabBarMode&&(d==b.length||-1==d)){B._.tabBarMode=!0;B._.tabs[B._.currentTabId][0].focus();
562B._.currentFocusIndex=-1;return}d=(d+b.length)%b.length;if(d==c)break}while(a&&!b[d].isFocusable());b[d].focus();"text"==b[d].type&&b[d].select()}}function n(c){if(B==CKEDITOR.dialog._.currentTop){var f=c.data.getKeystroke(),d="rtl"==b.lang.dir,e=[37,38,39,40];t=z=0;
vendor: 37,526 bytes, lines 562-635
562if(9==f||f==CKEDITOR.SHIFT+9)k(f==CKEDITOR.SHIFT+9?-1:1),t=1;else if(f==CKEDITOR.ALT+121&&!B._.tabBarMode&&1<B.getPageCount())B._.tabBarMode=!0,B._.tabs[B._.currentTabId][0].focus(),B._.currentFocusIndex=-1,t=1;else if(-1!=CKEDITOR.tools.indexOf(e,
563f)&&B._.tabBarMode)f=-1!=CKEDITOR.tools.indexOf([d?39:37,38],f)?a.call(B):g.call(B),B.selectPage(f),B._.tabs[f][0].focus(),t=1;else if(13!=f&&32!=f||!B._.tabBarMode)if(13==f)f=c.data.getTarget(),f.is("a","button","select","textarea")||f.is("input")&&"button"==f.$.type||((f=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(f.click,0,f),t=1),z=1;else if(27==f)(f=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(f.click,0,f):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),z=1;else return;else this.selectPage(this._.currentTabId),
564this._.tabBarMode=!1,this._.currentFocusIndex=-1,k(1),t=1;q(c)}}function q(a){t?a.data.preventDefault(1):z&&a.data.stopPropagation()}var y=CKEDITOR.dialog._.dialogDefinitions[d],x=CKEDITOR.tools.clone(u),w=b.config.dialog_buttonsOrder||"OS",A=b.lang.dir,v={},t,z;("OS"==w&&CKEDITOR.env.mac||"rtl"==w&&"ltr"==A||"ltr"==w&&"rtl"==A)&&x.buttons.reverse();y=CKEDITOR.tools.extend(y(b),x);y=CKEDITOR.tools.clone(y);y=new r(this,y);x=m(b);this._={editor:b,element:x.element,name:d,contentSize:{width:0,height:0},
565size:{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=x.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);x={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};x["rtl"==A?"right":"left"]=0;this.parts.dialog.setStyles(x);CKEDITOR.event.call(this);this.definition=y=CKEDITOR.fire("dialogDefinition",
566{name:d,definition:y},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){x=b.config.removeDialogTabs.split(";");for(A=0;A<x.length;A++)if(w=x[A].split(":"),2==w.length){var p=w[0];v[p]||(v[p]=[]);v[p].push(w[1])}b._.removeDialogTabs=v}if(b._.removeDialogTabs&&(v=b._.removeDialogTabs[d]))for(A=0;A<v.length;A++)y.removeContents(v[A]);if(y.onLoad)this.on("load",y.onLoad);if(y.onShow)this.on("show",y.onShow);if(y.onHide)this.on("hide",y.onHide);if(y.onOk)this.on("ok",function(a){b.fire("saveSnapshot");
567setTimeout(function(){b.fire("saveSnapshot")},0);!1===y.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(y.onCancel)this.on("cancel",function(a){!1===y.onCancel.call(this,a)&&(a.data.hide=!1)});var B=this,C=function(a){var b=B._.contents,c=!1,f;for(f in b)for(var d in b[f])if(c=a.call(this,b[f][d]))return};this.on("ok",function(a){C(function(b){if(b.validate){var c=b.validate(this),f="string"==typeof c||!1===c;f&&(a.data.hide=!1,a.stop());e.call(b,!f,"string"==typeof c?
568c:void 0);return f}})},this,null,0);this.on("cancel",function(a){C(function(c){if(c.isChanged())return b.config.dialog_noConfirmCancel||confirm(b.lang.common.confirmCancel)||(a.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=k;var G=this._.element;b.focusManager.add(G,1);this.on("show",function(){G.on("keydown",n,this);if(CKEDITOR.env.gecko)G.on("keypress",q,this)});this.on("hide",
569function(){G.removeListener("keydown",n);CKEDITOR.env.gecko&&G.removeListener("keypress",q);C(function(a){c.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",n,this,null,0)});this.on("show",function(){h();var a=1<B._.pageCount;b.config.dialog_startupFocusTab&&a?(B._.tabBarMode=!0,B._.tabs[B._.currentTabId][0].focus(),B._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-1,y.onFocus?
570(a=y.onFocus.call(this))&&a.focus():k(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);l(this);f(this);(new CKEDITOR.dom.text(y.title,CKEDITOR.document)).appendTo(this.parts.title);for(A=0;A<y.contents.length;A++)(v=y.contents[A])&&this.addPage(v);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
571this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,k(1)),a.data.preventDefault())},this);A=[];v=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:y.buttons},A).getChild();this.parts.footer.setHtml(A.join(""));for(A=0;A<v.length;A++)this._.buttons[v[A].id]=v[A]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){this._.contentSize&&this._.contentSize.width==
572a&&this._.contentSize.height==b||(CKEDITOR.dialog.fire("resize",{dialog:this,width:a,height:b},this._.editor),this.fire("resize",{width:a,height:b},this._.editor),this.parts.contents.setStyles({width:a+"px",height:b+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:a,height:b})}}(),getSize:function(){var a=this._.element.getFirst();
573return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var f=this._.element.getFirst(),d="rtl"==this._.editor.lang.dir,e="fixed"==f.getComputedStyle("position");CKEDITOR.env.ie&&f.setStyle("zoom","100%");e&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},e||(e=CKEDITOR.document.getWindow().getScrollPosition(),a+=e.x,b+=e.y),d&&(e=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-e.width-a),b={top:(0<b?b:0)+"px"},
574b[d?"right":"left"]=(0<a?a:0)+"px",f.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition;a.getParent()&&a.getParent().equals(CKEDITOR.document.getBody())?a.setStyle("display","block"):a.appendTo(CKEDITOR.document.getBody());this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();null===
575this._.currentTabId&&this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,w(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/
5762),CKEDITOR.dialog._.currentTop=this);a.on("keydown",G);a.on("keyup",F);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],f=this._.tabs[a.id],e=a.requiredContent,g=0;if(f){for(var h in this._.contents[a.id]){var l=this._.contents[a.id][h];"hbox"!=l.type&&"vbox"!=l.type&&l.getInputElement()&&(l.requiredContent&&!this._.editor.activeFilter.check(l.requiredContent)?l.disable():(l.enable(),g++))}!g||e&&!this._.editor.activeFilter.check(e)?f[0].addClass("cke_dialog_tab_disabled"):
577f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();d(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=this.parts.dialog,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),f=
578(c.width-b.width)/2,d=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<d?d:0)>c.height||b.width+(0<f?f:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:f,this._.moved?this._.position.y:d)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),
579setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility",
580"hidden");for(H(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",G);a.removeListener("keyup",F);var c=this._.editor;
581c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",f=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",
582children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),d=this._.contents[a.id]={},e=f.getChild(),g=0;f=e.shift();)f.notAllowed||"hbox"==f.type||"vbox"==f.type||g++,d[f.id]=f,"function"==typeof f.getChild&&e.push.apply(e,f.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");f=CKEDITOR.env;d="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',
5830<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',d,'"',f.gecko&&!f.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",d);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&
584(J(this,this,"CTRL+"+a.accessKey,L,I),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var c in this._.tabs){var f=this._.tabs[c][0],d=this._.tabs[c][1];c!=a&&(f.removeClass("cke_dialog_tab_selected"),d.hide());d.setAttribute("aria-hidden",c!=a)}var e=this._.tabs[a];e[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||
585CKEDITOR.env.ie7Compat?(b(e[1]),e[1].show(),setTimeout(function(){b(e[1],1)},0)):e[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(b){var c=this._.tabs[b]&&this._.tabs[b][0];c&&1!=this._.pageCount&&c.isVisible()&&(b==this._.currentTabId&&this.selectPage(a.call(this)),c.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=
586this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},
587enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new h(this,a,b));else{this._.focusList.splice(b,0,new h(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},
588setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]="8px";this.parts.spinner=CKEDITOR.document.createElement("div",c);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok").disable()}else a==
589CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",a)}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){this._.dialogDefinitions[a]&&"function"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+c+"(?:$|;)",
590"i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,
591"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);
592var u={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},x=function(a,b,c){for(var f=0,d;d=a[f];f++)if(d.id==b||c&&d[c]&&(d=x(d[c],b,c)))return d;return null},q=function(a,b,c,f,d){if(c){for(var e=0,g;g=a[e];e++){if(g.id==c)return a.splice(e,0,b),b;if(f&&g[f]&&(g=q(g[f],b,c,f,!0)))return g}if(d)return null}a.push(b);return b},y=function(a,b,c){for(var f=0,d;d=a[f];f++){if(d.id==b)return a.splice(f,1);if(c&&d[c]&&(d=y(d[c],
593b,c)))return d}return null},r=function(a,b){this.dialog=a;for(var c=b.contents,f=0,d;d=c[f];f++)c[f]=d&&new k(a,d);CKEDITOR.tools.extend(this,b)};r.prototype={getContents:function(a){return x(this.contents,a)},getButton:function(a){return x(this.buttons,a)},addContents:function(a,b){return q(this.contents,a,b)},addButton:function(a,b){return q(this.buttons,a,b)},removeContents:function(a){y(this.contents,a)},removeButton:function(a){y(this.buttons,a)}};k.prototype={get:function(a){return x(this.elements,
594a,"children")},add:function(a,b){return q(this.elements,a,b,"children")},remove:function(a){y(this.elements,a,"children")}};var z,A={},B,C={},G=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,f=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=C[(b?"CTRL+":"")+(c?"ALT+":"")+(f?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},F=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,
595f=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=C[(b?"CTRL+":"")+(c?"ALT+":"")+(f?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))},J=function(a,b,c,f,d){(C[c]||(C[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:d||a.accessKeyUp,keydown:f||a.accessKeyDown})},H=function(a){for(var b in C){for(var c=C[b],f=c.length-1;0<=f;f--)c[f].dialog!=a&&c[f].uiElement!=a||c.splice(f,1);0===c.length&&delete C[b]}},I=function(a,
596b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},L=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,f,d,e,g){if(!(4>arguments.length)){var h=(f.call?f(b):f)||"div",l=["\x3c",h," "],m=(d&&d.call?d(b):d)||{},k=(e&&e.call?e(b):e)||{},n=(g&&g.call?g.call(this,a,b):g)||"",q=this.domId=k.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);k.id=q;var r={};b.type&&(r["cke_dialog_ui_"+
597b.type]=1);b.className&&(r[b.className]=1);b.disabled&&(r.cke_disabled=1);for(var y=k["class"]&&k["class"].split?k["class"].split(" "):[],q=0;q<y.length;q++)y[q]&&(r[y[q]]=1);y=[];for(q in r)y.push(q);k["class"]=y.join(" ");b.title&&(k.title=b.title);r=(b.style||"").split(";");b.align&&(y=b.align,m["margin-left"]="left"==y?0:"auto",m["margin-right"]="right"==y?0:"auto");for(q in m)r.push(q+":"+m[q]);b.hidden&&r.push("display:none");for(q=r.length-1;0<=q;q--)""===r[q]&&r.splice(q,1);0<r.length&&(k.style=
598(k.style?k.style+"; ":"")+r.join("; "));for(q in k)l.push(q+'\x3d"'+CKEDITOR.tools.htmlEncode(k[q])+'" ');l.push("\x3e",n,"\x3c/",h,"\x3e");c.push(l.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}}));"function"==typeof b.getValue&&
599(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&J(this,a,"CTRL+"+b.accessKey);var u=this;a.on("load",function(){var b=u.getInputElement();if(b){var c=u.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;u.fire("focus");
600c&&this.addClass(c)});b.on("blur",function(){u.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=u.focusIndex}))}},hbox:function(a,b,c,f,d){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,g=d&&d.widths||null,h=d&&d.height||null,l,m={role:"presentation"};d&&d.align&&(m.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this,
601a,d||{type:"hbox"},f,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(l=0;l<c.length;l++){var b="cke_dialog_ui_hbox_child",f=[];0===l&&(b="cke_dialog_ui_hbox_first");l==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');g?g[l]&&f.push("width:"+t(g[l])):f.push("width:"+Math.floor(100/c.length)+"%");h&&f.push("height:"+t(h));d&&void 0!==d.padding&&f.push("padding:"+t(d.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&
602e[l].align&&f.push("text-align:"+e[l].align);0<f.length&&a.push('style\x3d"'+f.join("; ")+'" ');a.push("\x3e",c[l],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,f,d){if(!(3>arguments.length)){this._||(this._={});var e=this._.children=b,g=d&&d.width||null,h=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},f,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];
603b.push('style\x3d"');d&&d.expand&&b.push("height:100%;");b.push("width:"+t(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var f=0;f<c.length;f++){var l=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');g&&l.push("width:"+t(g||"100%"));h?l.push("height:"+t(h[f])):d&&d.expand&&l.push("height:"+Math.floor(100/c.length)+"%");
604d&&void 0!==d.padding&&l.push("padding:"+t(d.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[f].align&&l.push("text-align:"+e[f].align);0<l.length&&b.push('style\x3d"',l.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[f],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},
605setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();
606return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,f=function(a,b,c,f){b.on("load",function(){a.getInputElement().on(c,f,a)})},d;for(d in a)if(c=d.match(b))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,a[d]):f(this,this._.dialog,c[1].toLowerCase(),a[d]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},
607disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
608{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var f=b.children,d,e=[],g=[],h=0;h<f.length&&(d=f[h]);h++){var l=[];e.push(l);g.push(CKEDITOR.dialog._.uiElementBuilders[d.type].build(a,d,l))}return new CKEDITOR.ui.dialog[b.type](a,
609g,e,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|%)?)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|%)?)?$/i,e=
610/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c,f=CKEDITOR.VALIDATE_AND,d=[],e;for(e=0;e<a.length;e++)if("function"==typeof a[e])d.push(a[e]);else break;e<a.length&&"string"==typeof a[e]&&(c=a[e],e++);e<a.length&&"number"==typeof a[e]&&(f=a[e]);var g=f==CKEDITOR.VALIDATE_AND?!0:!1;for(e=0;e<d.length;e++)g=f==CKEDITOR.VALIDATE_AND?g&&
611d[e](b):g||d[e](b);return g?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},
612a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in A)A[c].remove();A={}}a=a.editor._.storedDialogs;for(var f in a)a[f].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,f=CKEDITOR.dialog._.dialogDefinitions[a];
613null===CKEDITOR.dialog._.currentTop&&w(this);if("function"==typeof f)c=this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,c),c.show();else{if("failed"==f)throw v(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof f&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,
614b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){a.on("doubleclick",function(g){g.data.dialog&&a.openDialog(g.data.dialog)},null,null,999)}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,
615ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(a){var g=this;a.addCommand("a11yHelp",{exec:function(){var b=a.langCode,b=g.availableLangs[b]?b:g.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(g.path+"dialogs/lang/"+b+".js"),function(){a.lang.a11yhelp=g.langEntries[b];a.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},
616readOnly:1,canUndo:!1});a.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");a.on("ariaEditorHelpLabel",function(b){b.data.label=a.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var g=a.addCommand("about",new CKEDITOR.dialogCommand("about"));g.modes={wysiwyg:1,source:1};g.canUndo=!1;g.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.dlgTitle,command:"about",toolbar:"about"});
617CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("basicstyles",{init:function(a){var g=0,b=function(b,c,m,l){if(l){l=new CKEDITOR.style(l);var f=e[m];f.unshift(l);a.attachStyleStateChange(l,function(b){!a.readOnly&&a.getCommand(m).setState(b)});a.addCommand(m,new CKEDITOR.styleCommand(l,{contentForms:f}));a.ui.addButton&&a.ui.addButton(b,{label:c,command:m,toolbar:"basicstyles,"+(g+=10)})}},e={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==
618a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},c=a.config,m=a.lang.basicstyles;b("Bold",m.bold,"bold",c.coreStyles_bold);b("Italic",m.italic,"italic",c.coreStyles_italic);b("Underline",m.underline,"underline",c.coreStyles_underline);b("Strike",
619m.strike,"strike",c.coreStyles_strike);b("Subscript",m.subscript,"subscript",c.coreStyles_subscript);b("Superscript",m.superscript,"superscript",c.coreStyles_superscript);a.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",
620overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){function a(a,b,c,d){if(!a.isReadOnly()&&!a.equals(c.editable())){CKEDITOR.dom.element.setMarker(d,a,"bidi_processed",1);d=a;for(var e=c.editable();(d=d.getParent())&&!d.equals(e);)if(d.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}d="useComputedState"in c.config?c.config.useComputedState:1;(d?a.getComputedStyle("direction"):
621a.getStyle("direction")||a.hasAttribute("dir"))!=b&&(a.removeStyle("direction"),d?(a.removeAttribute("dir"),b!=a.getComputedStyle("direction")&&a.setAttribute("dir",b)):a.setAttribute("dir",b),c.forceNextSelectionCheck())}}function g(a,b,c){var d=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(c==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(d,CKEDITOR.START)&&a.checkBoundaryOfElement(d,CKEDITOR.END)){for(var e;d&&d.type==CKEDITOR.NODE_ELEMENT&&
622(e=d.getParent())&&1==e.getChildCount()&&!(d.getName()in b);)d=e;return d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in b&&d}}function b(b){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(a,b){var c=a.config.useComputedState,f,c=void 0===c||c;if(!c){f=b.lastElement;for(var d=a.editable();f&&!(f.getName()in h||f.equals(d));){var e=f.getParent();if(!e)break;f=e}}f=f||b.block||
623b.blockLimit;f.equals(a.editable())&&(d=a.getSelection().getRanges()[0].getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&(f=d);f&&(c=c?f.getComputedStyle("direction"):f.getStyle("direction")||f.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==c?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));c=(b.block||b.blockLimit||a.editable()).getDirection(1);c!=(a._.selDir||a.lang.dir)&&(a._.selDir=c,a.fire("contentDirChanged",
624c))},exec:function(d){var e=d.getSelection(),h=d.config.enterMode,l=e.getRanges();if(l&&l.length){for(var k={},u=e.createBookmarks(),l=l.createIterator(),x,q=0;x=l.getNextRange(1);){var y=x.getEnclosedNode();y&&(!y||y.type==CKEDITOR.NODE_ELEMENT&&y.getName()in m)||(y=g(x,c,h));y&&a(y,b,d,k);var r=new CKEDITOR.dom.walker(x),z=u[q].startNode,A=u[q++].endNode;r.evaluator=function(a){var b=h==CKEDITOR.ENTER_P?"p":"div",f;if(f=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in c){if(b=a.is(b))b=(b=a.getParent())?
625b.type==CKEDITOR.NODE_ELEMENT:!1;f=!(b&&a.getParent().is("blockquote"))}return!!(f&&a.getPosition(z)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(A)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;y=r.next();)a(y,b,d,k);x=x.createIterator();for(x.enlargeBr=h!=CKEDITOR.ENTER_BR;y=x.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)a(y,b,d,k)}CKEDITOR.dom.element.clearAllMarkers(k);d.forceNextSelectionCheck();e.selectBookmarks(u);d.focus()}}}}function e(a){var b=
626a==d.setAttribute,c=a==d.removeAttribute,e=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(d,g){if(!this.isReadOnly()){var h;if(h=d==(b||c?"dir":"direction")||"style"==d&&(c||e.test(g))){a:{h=this;for(var l=h.getDocument().getBody().getParent();h;){if(h.equals(l)){h=!1;break a}h=h.getParent()}h=!0}h=!h}if(h&&(h=this.getDirection(1),l=a.apply(this,arguments),h!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),l}return a.apply(this,arguments)}}var c={table:1,ul:1,ol:1,blockquote:1,
627div:1},m={},h={};CKEDITOR.tools.extend(m,c,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(h,m,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function c(b,d,e,g,h){a.addCommand(e,new CKEDITOR.command(a,g));a.ui.addButton&&a.ui.addButton(b,{label:d,command:e,toolbar:"bidi,"+h})}if(!a.blockless){var d=a.lang.bidi;c("BidiLtr",d.ltr,"bidiltr",b("ltr"),10);c("BidiRtl",d.rtl,"bidirtl",b("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(b){a.fire("dirChanged",{node:b.data,dir:b.data.getDirection(1)})})});
628a.on("contentDirChanged",function(b){b=(a.lang.dir!=b.data?"add":"remove")+"Class";var c=a.ui.space(a.config.toolbarLocation);if(c)c[b]("cke_mixed_dir_content")})}}});for(var d=CKEDITOR.dom.element.prototype,k=["setStyle","removeStyle","setAttribute","removeAttribute"],l=0;l<k.length;l++)d[k[l]]=CKEDITOR.tools.override(d[k[l]],e)}(),function(){var a={exec:function(a){var b=a.getCommand("blockquote").state,e=a.getSelection(),c=e&&e.getRanges()[0];if(c){var m=e.createBookmarks();if(CKEDITOR.env.ie){var h=
629m[0].startNode,d=m[0].endNode,k;if(h&&"blockquote"==h.getParent().getName())for(k=h;k=k.getNext();)if(k.type==CKEDITOR.NODE_ELEMENT&&k.isBlockBoundary()){h.move(k,!0);break}if(d&&"blockquote"==d.getParent().getName())for(k=d;k=k.getPrevious();)if(k.type==CKEDITOR.NODE_ELEMENT&&k.isBlockBoundary()){d.move(k);break}}var l=c.createIterator();l.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(h=[];b=l.getNextParagraph();)h.push(b);1>h.length&&(b=a.document.createElement(a.config.enterMode==
630CKEDITOR.ENTER_P?"p":"div"),d=m.shift(),c.insertNode(b),b.append(new CKEDITOR.dom.text("\ufeff",a.document)),c.moveToBookmark(d),c.selectNodeContents(b),c.collapse(!0),d=c.createBookmark(),h.push(b),m.unshift(d));k=h[0].getParent();c=[];for(d=0;d<h.length;d++)b=h[d],k=k.getCommonAncestor(b.getParent());for(b={table:1,tbody:1,tr:1,ol:1,ul:1};b[k.getName()];)k=k.getParent();for(d=null;0<h.length;){for(b=h.shift();!b.getParent().equals(k);)b=b.getParent();b.equals(d)||c.push(b);d=b}for(;0<c.length;)if(b=
631c.shift(),"blockquote"==b.getName()){for(d=new CKEDITOR.dom.documentFragment(a.document);b.getFirst();)d.append(b.getFirst().remove()),h.push(d.getLast());d.replace(b)}else h.push(b);c=a.document.createElement("blockquote");for(c.insertBefore(h[0]);0<h.length;)b=h.shift(),c.append(b)}else if(b==CKEDITOR.TRISTATE_ON){d=[];for(k={};b=l.getNextParagraph();){for(h=c=null;b.getParent();){if("blockquote"==b.getParent().getName()){c=b.getParent();h=b;break}b=b.getParent()}c&&h&&!h.getCustomData("blockquote_moveout")&&
632(d.push(h),CKEDITOR.dom.element.setMarker(k,h,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(k);b=[];h=[];for(k={};0<d.length;)l=d.shift(),c=l.getParent(),l.getPrevious()?l.getNext()?(l.breakParent(l.getParent()),h.push(l.getNext())):l.remove().insertAfter(c):l.remove().insertBefore(c),c.getCustomData("blockquote_processed")||(h.push(c),CKEDITOR.dom.element.setMarker(k,c,"blockquote_processed",!0)),b.push(l);CKEDITOR.dom.element.clearAllMarkers(k);for(d=h.length-1;0<=d;d--){c=h[d];
633a:{k=c;for(var l=0,f=k.getChildCount(),n=void 0;l<f&&(n=k.getChild(l));l++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){k=!1;break a}k=!0}k&&c.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(c=!0;b.length;)if(l=b.shift(),"div"==l.getName()){d=new CKEDITOR.dom.documentFragment(a.document);!c||!l.getPrevious()||l.getPrevious().type==CKEDITOR.NODE_ELEMENT&&l.getPrevious().isBlockBoundary()||d.append(a.document.createElement("br"));for(c=l.getNext()&&!(l.getNext().type==CKEDITOR.NODE_ELEMENT&&
634l.getNext().isBlockBoundary());l.getFirst();)l.getFirst().remove().appendTo(d);c&&d.append(a.document.createElement("br"));d.replace(l);c=!1}}e.selectBookmarks(m);a.focus()}},refresh:function(a,b){this.setState(a.elementPath(b.block||b.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(g){g.blockless||(g.addCommand("blockquote",a),g.ui.addButton&&
635g.ui.addButton("Blockquote",{label:g.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function a(a,e){CKEDITOR.tools.extend(this,e,{editor:a,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:a._.notificationArea});
vendor: 13,247 bytes, lines 635-660
635e.type||(this.type="info");this.element=this._createElement();a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function g(a){var e=this;this.editor=a;this.notifications=[];this.element=this._createElement();
636this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);a.on("destroy",function(){e._removeListeners();e.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(a){function e(a){var b=new CKEDITOR.dom.element("div");b.setStyles({position:"fixed","margin-left":"-9999px"});b.setAttributes({"aria-live":"assertive","aria-atomic":"true"});b.setText(a);CKEDITOR.document.getBody().append(b);setTimeout(function(){b.remove()},
637100)}a._.notificationArea=new g(a);a.showNotification=function(c,e,g){var d,k;"progress"==e?d=g:k=g;c=new CKEDITOR.plugins.notification(a,{message:c,type:e,progress:d,duration:k});c.show();return c};a.on("key",function(c){if(27==c.data.keyCode){var g=a._.notificationArea.notifications;g.length&&(e(a.lang.notification.closed),g[g.length-1].hide(),c.cancel())}})}});a.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},
638update:function(a){var e=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:a})&&(e=!1);var c=this.element,g=c.findOne(".cke_notification_message"),h=c.findOne(".cke_notification_progress"),d=a.type;c.removeAttribute("role");a.progress&&"progress"!=this.type&&(d="progress");d&&(c.removeClass(this._getClass()),c.removeAttribute("aria-label"),this.type=d,c.addClass(this._getClass()),c.setAttribute("aria-label",this.type),"progress"!=this.type||h?"progress"!=this.type&&h&&h.remove():
639(h=this._createProgressElement(),h.insertBefore(g)));void 0!==a.message&&(this.message=a.message,g.setHtml(this.message));void 0!==a.progress&&(this.progress=a.progress,h&&h.setStyle("width",this._getPercentageProgress()));e&&a.important&&(c.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=a.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,
640this)},_createElement:function(){var a=this,e,c,g=this.editor.lang.common.close;e=new CKEDITOR.dom.element("div");e.addClass("cke_notification");e.addClass(this._getClass());e.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&e.append(this._createProgressElement());c=new CKEDITOR.dom.element("p");c.addClass("cke_notification_message");c.setHtml(this.message);e.append(c);c=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+
641g+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');e.append(c);c.on("click",function(){a.editor.focus();a.hide()});return e},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var a=new CKEDITOR.dom.element("span");a.addClass("cke_notification_progress");a.setStyle("width",this._getPercentageProgress());return a},_getPercentageProgress:function(){return Math.round(100*
642(this.progress||0))+"%"},_hideAfterTimeout:function(){var a=this,e;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)e=this.duration;else if("info"==this.type||"success"==this.type)e="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;e&&(a._hideTimeoutId=setTimeout(function(){a.hide()},e))}};g.prototype={add:function(a){this.notifications.push(a);this.element.append(a.element);1==this.element.getChildCount()&&
643(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(a){var e=CKEDITOR.tools.indexOf(this.notifications,a);0>e||(this.notifications.splice(e,1),a.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var a=this.editor,e=a.config,c=new CKEDITOR.dom.element("div");c.addClass("cke_notifications_area");c.setAttribute("id","cke_notifications_area_"+a.name);c.setStyle("z-index",e.baseFloatZIndex-
6442);return c},_attachListeners:function(){var a=CKEDITOR.document.getWindow(),e=this.editor;a.on("scroll",this._uiBuffer.input);a.on("resize",this._uiBuffer.input);e.on("change",this._changeBuffer.input);e.on("floatingSpaceLayout",this._layout,this,null,20);e.on("blur",this._layout,this,null,20)},_removeListeners:function(){var a=CKEDITOR.document.getWindow(),e=this.editor;a.removeListener("scroll",this._uiBuffer.input);a.removeListener("resize",this._uiBuffer.input);e.removeListener("change",this._changeBuffer.input);
645e.removeListener("floatingSpaceLayout",this._layout);e.removeListener("blur",this._layout)},_layout:function(){function a(){e.setStyle("left",x(q+g.width-n-w))}var e=this.element,c=this.editor,g=c.ui.contentsElement.getClientRect(),h=c.ui.contentsElement.getDocumentPosition(),d,k,l=e.getClientRect(),f,n=this._notificationWidth,w=this._notificationMargin;f=CKEDITOR.document.getWindow();var v=f.getScrollPosition(),t=f.getViewPaneSize(),p=CKEDITOR.document.getBody(),u=p.getDocumentPosition(),x=CKEDITOR.tools.cssLength;
646n&&w||(f=this.element.getChild(0),n=this._notificationWidth=f.getClientRect().width,w=this._notificationMargin=parseInt(f.getComputedStyle("margin-left"),10)+parseInt(f.getComputedStyle("margin-right"),10));c.toolbar&&(d=c.ui.space("top"),k=d.getClientRect());d&&d.isVisible()&&k.bottom>g.top&&k.bottom<g.bottom-l.height?e.setStyles({position:"fixed",top:x(k.bottom)}):0<g.top?e.setStyles({position:"absolute",top:x(h.y)}):h.y+g.height-l.height>v.y?e.setStyles({position:"fixed",top:0}):e.setStyles({position:"absolute",
647top:x(h.y+g.height-l.height)});var q="fixed"==e.getStyle("position")?g.left:"static"!=p.getComputedStyle("position")?h.x-u.x:h.x;g.width<n+w?h.x+n+w>v.x+t.width?a():e.setStyle("left",x(q)):h.x+n+w>v.x+t.width?e.setStyle("left",x(q)):h.x+g.width/2+n/2+w>v.x+t.width?e.setStyle("left",x(q-h.x+v.x+t.width-n-w)):0>g.left+g.width-n-w?a():0>g.left+g.width/2-n/2?e.setStyle("left",x(q-h.x+v.x)):e.setStyle("left",x(q+g.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=a}(),function(){var a='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+
648(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var g="";CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');
649var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+g+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',
650b=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),e=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};
651CKEDITOR.ui.button.prototype={render:function(a,g){function h(){var b=a.mode;b&&(b=this.modes[b]?void 0!==d[b]?d[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var d=null,k=CKEDITOR.env,l=this._.id=CKEDITOR.tools.getNextId(),f="",n=this.command,w,v,t;this._.editor=a;var p={id:l,button:this,editor:a,focus:function(){CKEDITOR.document.getById(l).focus()},execute:function(){this.button.click(a)},
652attach:function(a){this.button.attach(a)}},u=CKEDITOR.tools.addFunction(function(a){if(p.onkey)return a=new CKEDITOR.dom.event(a),!1!==p.onkey(p,a.getKeystroke())}),x=CKEDITOR.tools.addFunction(function(a){var b;p.onfocus&&(b=!1!==p.onfocus(p,new CKEDITOR.dom.event(a)));return b}),q=0;p.clickFn=w=CKEDITOR.tools.addFunction(function(){q&&(a.unlockSelection(1),q=0);p.execute();k.iOS&&a.focus()});this.modes?(d={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(d[a.mode]=
653this._.state)},this),a.on("activeFilterChange",h,this),a.on("mode",h,this),!this.readOnly&&a.on("readOnly",h,this)):n&&(n=a.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),f+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var y;if(this.directional)a.on("contentDirChanged",function(b){var f=CKEDITOR.document.getById(this._.id),d=f.getFirst();b=b.data;b!=a.lang.dir?f.addClass("cke_"+b):f.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",
654CKEDITOR.skin.getIconStyle(y,"rtl"==b,this.icon,this.iconOffset))},this);n?(v=a.getCommandKeystroke(n))&&(t=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,v)):f+="off";v=this.name||this.command;var r=null,z=this.icon;y=v;this.icon&&!/\./.test(this.icon)?(y=this.icon,z=null):(this.icon&&(r=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(r=this.iconHiDpi));r?(CKEDITOR.skin.addIcon(r,r),z=null):r=y;f={id:l,name:v,iconName:y,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||
655""),state:f,ariaDisabled:"disabled"==f?"true":"false",title:this.title+(t?" ("+t.display+")":""),ariaShortcut:t?a.lang.common.keyboardShortcut+" "+t.aria:"",titleJs:k.gecko&&!k.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:u,focusFn:x,clickFn:w,style:CKEDITOR.skin.getIconStyle(r,"rtl"==a.lang.dir,z,this.iconOffset),arrowHtml:this.hasArrow?b.output():""};e.output(f,g);if(this.onRender)this.onRender();return p},
656setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?b.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||
657this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function a(a){function b(){for(var f=e(),l=CKEDITOR.tools.clone(a.config.toolbarGroups)||g(a),m=0;m<l.length;m++){var k=l[m];if("/"!=k){"string"==typeof k&&(k=l[m]={name:k});var p,u=k.groups;if(u)for(var x=0;x<u.length;x++)p=u[x],(p=f[p])&&d(k,p);(p=f[k.name])&&d(k,p)}}return l}function e(){var b={},f,d,g;for(f in a.ui.items)d=
658a.ui.items[f],g=d.toolbar||"others",g=g.split(","),d=g[0],g=parseInt(g[1]||-1,10),b[d]||(b[d]=[]),b[d].push({name:f,order:g});for(d in b)b[d]=b[d].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function d(b,f){if(f.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var d;d=f.shift();)d="string"==typeof d?d:d.name,l&&-1!=CKEDITOR.tools.indexOf(l,d)||(d=a.ui.create(d))&&a.addFeature(d)&&b.items.push(d)}}function k(a){var b=[],c,f,e;for(c=
6590;c<a.length;++c)f=a[c],e={},"/"==f?b.push(f):CKEDITOR.tools.isArray(f)?(d(e,CKEDITOR.tools.clone(f)),b.push(e)):f.items&&(d(e,CKEDITOR.tools.clone(f.items)),e.name=f.name,b.push(e));return b}var l=a.config.removeButtons,l=l&&l.split(","),f=a.config.toolbar;"string"==typeof f&&(f=a.config["toolbar_"+f]);return a.toolbar=f?k(f):b()}function g(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",
660groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var b=function(){this.toolbars=[];this.focusCommandExecuted=!1};
vendor: 4,396 bytes, lines 660-669
660b.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var e=0,d;d=b.items[e++];)if(d.focus){d.focus();return}};var e={modes:{wysiwyg:1,
661source:1},readOnly:1,exec:function(a){a.toolbox&&(a.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(c){var g,h=function(a,b){var e,f="rtl"==c.lang.dir,n=c.config.toolbarGroupCycling,w=f?37:39,f=f?39:37,n=void 0===n||n;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!e||!e.items.length;)if(e=9==b?(e?e.next:a.toolbar.next)||c.toolbox.toolbars[0]:(e?e.previous:
662a.toolbar.previous)||c.toolbox.toolbars[c.toolbox.toolbars.length-1],e.items.length)for(a=e.items[g?e.items.length-1:0];a&&!a.focus;)(a=g?a.previous:a.next)||(e=0);a&&a.focus();return!1;case w:e=a;do e=e.next,!e&&n&&(e=a.toolbar.items[0]);while(e&&!e.focus);e?e.focus():h(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():h(a,40==b?w:f),!1;case f:case 38:e=a;do e=e.previous,!e&&n&&(e=a.toolbar.items[a.toolbar.items.length-1]);while(e&&!e.focus);e?e.focus():(g=1,h(a,CKEDITOR.SHIFT+
6639),g=0);return!1;case 27:return c.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};c.on("uiSpace",function(d){if(d.data.space==c.config.toolbarLocation){d.removeListener();c.toolbox=new b;var e=CKEDITOR.tools.getNextId(),g=['\x3cspan id\x3d"',e,'" class\x3d"cke_voice_label"\x3e',c.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+c.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',e,'" onmousedown\x3d"return false;"\x3e'],e=!1!==c.config.toolbarStartupExpanded,
664f,m;c.config.toolbarCanCollapse&&c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&g.push('\x3cspan class\x3d"cke_toolbox_main"'+(e?"\x3e":' style\x3d"display:none"\x3e'));for(var w=c.toolbox.toolbars,v=a(c),t=v.length,p=0;p<t;p++){var u,x=0,q,y=v[p],r="/"!==y&&("/"===v[p+1]||p==t-1),z;if(y)if(f&&(g.push("\x3c/span\x3e"),m=f=0),"/"===y)g.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{z=y.items||y;for(var A=0;A<z.length;A++){var B=z[A],C;if(B){var G=function(a){a=a.render(c,g);F=x.items.push(a)-
6651;0<F&&(a.previous=x.items[F-1],a.previous.next=a);a.toolbar=x;a.onkey=h;a.onfocus=function(){c.toolbox.focusCommandExecuted||c.focus()}};if(B.type==CKEDITOR.UI_SEPARATOR)m=f&&B;else{C=!1!==B.canGroup;if(!x){u=CKEDITOR.tools.getNextId();x={id:u,items:[]};q=y.name&&(c.lang.toolbar.toolbarGroups[y.name]||y.name);g.push('\x3cspan id\x3d"',u,'" class\x3d"cke_toolbar'+(r?' cke_toolbar_last"':'"'),q?' aria-labelledby\x3d"'+u+'_label"':"",' role\x3d"toolbar"\x3e');q&&g.push('\x3cspan id\x3d"',u,'_label" class\x3d"cke_voice_label"\x3e',
666q,"\x3c/span\x3e");g.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var F=w.push(x)-1;0<F&&(x.previous=w[F-1],x.previous.next=x)}C?f||(g.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),f=1):f&&(g.push("\x3c/span\x3e"),f=0);m&&(G(m),m=0);G(B)}}}f&&(g.push("\x3c/span\x3e"),m=f=0);x&&g.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}c.config.toolbarCanCollapse&&g.push("\x3c/span\x3e");if(c.config.toolbarCanCollapse&&c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var J=
667CKEDITOR.tools.addFunction(function(){c.execCommand("toolbarCollapse")});c.on("destroy",function(){CKEDITOR.tools.removeFunction(J)});c.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),f=a.ui.space("contents"),d=c.getParent(),e=parseInt(f.$.style.height,10),g=d.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");h?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),
668b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(h?"\u25b2":"\u25c0");f.setStyle("height",e-(d.$.offsetHeight-g)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:f.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});c.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");g.push('\x3ca title\x3d"'+(e?c.lang.toolbar.toolbarCollapse:c.lang.toolbar.toolbarExpand)+
669'" id\x3d"'+c.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
vendor: 25,726 bytes, lines 669-719
669e||g.push(" cke_toolbox_collapser_min");g.push('" onclick\x3d"CKEDITOR.tools.callFunction('+J+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}g.push("\x3c/span\x3e");d.data.html+=g.join("")}});c.on("destroy",function(){if(this.toolbox){var a,b=0,c,f,e;for(a=this.toolbox.toolbars;b<a.length;b++)for(f=a[b].items,c=0;c<f.length;c++)e=f[c],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),
670e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});c.on("uiReady",function(){var a=c.ui.space("toolbox");a&&c.focusManager.add(a,1)});c.addCommand("toolbarFocus",e);c.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");c.ui.add("-",CKEDITOR.UI_SEPARATOR,{});c.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,
671e){var d=g(this.editor),k=0===b,l={name:a};if(e){if(e=CKEDITOR.tools.search(d,function(a){return a.name==e})){!e.groups&&(e.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(e.groups,b),0<=b)){e.groups.splice(b+1,0,a);return}k?e.groups.splice(0,0,a):e.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(d,function(a){return a.name==b}));k?d.splice(0,0,a):"number"==typeof b?d.splice(b+1,0,l):d.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function a(a,
672b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});return a.fire("paste",b)}function g(b){function c(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.getSelection().isCollapsed()||(b.readOnly&&"cut"==a.name||C.initPasteDataTransfer(a,b),a.data.preventDefault())};
673a.on("copy",d);a.on("cut",d);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(C.mainPasteEvent,function(a){"beforepaste"==C.mainPasteEvent&&G||z(a)});"beforepaste"==C.mainPasteEvent&&(a.on("paste",function(a){F||(g(),a.data.preventDefault(),z(a),l("paste"))}),a.on("contextmenu",h,null,null,0),a.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));a.on("beforecut",function(){!G&&m(b)});var e;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),
674"mouseup",function(){e=setTimeout(A,0)});b.on("destroy",function(){clearTimeout(e)});a.on("keyup",A)}function d(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&m();var a;var c=this.type;if(CKEDITOR.env.ie)a=l(c);else try{a=b.document.$.execCommand(c,!1,null)}catch(d){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function e(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+
67586,exec:function(b,c){function f(c,g){g="undefined"!==typeof g?g:!0;c?(c.method="paste",c.dataTransfer||(c.dataTransfer=C.initPasteDataTransfer()),a(b,c,g)):e&&!b._.forcePasteDialog&&b.showNotification(l,"info",b.config.clipboard_notificationDuration);b._.forcePasteDialog=!1;b.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!c})}c="undefined"!==typeof c&&null!==c?c:{};var d=this,e="undefined"!==typeof c.notification?c.notification:!0,g=c.type,h=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,
676b.getCommandKeystroke(this)),l="string"===typeof e?e:b.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+h.aria+'"\x3e'+h.display+"\x3c/kbd\x3e"),h="string"===typeof c?c:c.dataValue;g&&!0!==b.config.forcePasteAsPlainText&&"allow-word"!==b.config.forcePasteAsPlainText?b._.nextPasteType=g:delete b._.nextPasteType;"string"===typeof h?f({dataValue:h}):b.getClipboardData(f)}}}function g(){F=1;setTimeout(function(){F=0},100)}function h(){G=1;setTimeout(function(){G=0},10)}function l(a){var c=
677b.document,d=c.getBody(),e=!1,g=function(){e=!0};d.on(a,g);7<CKEDITOR.env.version?c.$.execCommand(a):c.$.selection.createRange().execCommand(a);d.removeListener(a,g);return e}function m(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,e;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],e=b.document.createText(""),e.insertBefore(c),d.setStartBefore(e),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(e.remove(),a.selectElement(c))},
6780))}}function k(a,c){var d=b.document,e=b.editable(),g=function(a){a.cancel()},h;if(!d.getById("cke_pastebin")){var l=b.getSelection(),m=l.createBookmarks();CKEDITOR.env.ie&&l.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var q=0,d=d.getWindow();CKEDITOR.env.webkit?(e.append(n),n.addClass("cke_editable"),e.is("body")||(q="static"!=e.getComputedStyle("position")?
679e:CKEDITOR.dom.element.get(e.$.offsetParent),q=q.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(n);n.setStyles({position:"absolute",top:d.getScrollPosition().y-q+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(q=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==b.config.contentsLangDirection?
680"left":"right","-10000px");b.on("selectionChange",g,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)h=e.once("blur",g,null,null,-100);q&&n.focus();q=new CKEDITOR.dom.range(n);q.selectNodeContents(n);var r=q.select();CKEDITOR.env.ie&&(h=e.once("blur",function(){b.lockSelection(r)}));var y=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=y);h&&h.removeListener();CKEDITOR.env.ie&&e.focus();l.selectBookmarks(m);
681n.remove();var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&(n=a);b.removeListener("selectionChange",g);c(n.getHtml())},0)}}function y(){if("paste"==C.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();g();var a=b.focusManager;a.lock();if(b.editable().fire(C.mainPasteEvent)&&!l("paste"))return a.unlock(),!1;a.unlock();return!0}function r(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=
682b.editable();g();"paste"==C.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function z(c){var d={type:"auto",method:"paste",dataTransfer:C.initPasteDataTransfer(c)};d.dataTransfer.cacheData();var e=!1!==b.fire("beforePaste",d);e&&C.canClipboardApiBeTrusted(d.dataTransfer,b)?(c.data.preventDefault(),setTimeout(function(){a(b,d)},0)):k(c,function(c){d.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,
683"");e&&a(b,d)})}function A(){if("wysiwyg"==b.mode){var a=B("paste");b.getCommand("cut").setState(B("cut"));b.getCommand("copy").setState(B("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function B(a){var c=b.getSelection(),c=c&&c.getRanges()[0];if((b.readOnly||c&&c.checkReadOnly())&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();c=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?
684CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,G=0,F=0;(function(){b.on("key",r);b.on("contentDom",c);b.on("selectionChange",A);if(b.contextMenu){b.contextMenu.addListener(function(){return{cut:B("cut"),copy:B("copy"),paste:B("paste")}});var a=null;b.on("menuShow",function(){a&&(a.removeListener(),a=null);var c=b.contextMenu.findItemByCommandName("paste");c&&c.element&&(a=c.element.on("touchend",function(){b._.forcePasteDialog=!0}))})}if(b.ui.addButton)b.once("instanceReady",
685function(){b._.pasteButtons&&CKEDITOR.tools.array.forEach(b._.pasteButtons,function(a){if(a=b.ui.get(a))if(a=CKEDITOR.document.getById(a._.id))a.on("touchend",function(){b._.forcePasteDialog=!0})})})})();(function(){function a(c,d,e,g,h){var l=b.lang.clipboard[d];b.addCommand(d,e);b.ui.addButton&&b.ui.addButton(c,{label:l,command:d,toolbar:"clipboard,"+g});b.addMenuItems&&b.addMenuItem(d,{label:l,command:d,group:"clipboard",order:h})}a("Cut","cut",d("cut"),10,1);a("Copy","copy",d("copy"),20,4);a("Paste",
686"paste",e(),30,8);b._.pasteButtons||(b._.pasteButtons=[]);b._.pasteButtons.push("Paste")})();b.getClipboardData=function(a,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();c({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var g=!1,h="auto";c||(c=a,a=null);b.on("beforePaste",function(a){a.removeListener();g=!0;h=a.data.type},null,null,1E3);b.on("paste",d,null,null,0);!1===y()&&(b.removeListener("paste",d),b._.forcePasteDialog&&
687g&&b.fire("pasteDialog")?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);a.data._.committed||c(null)})):c(null))}}function b(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";
688return"htmlifiedtext"}function e(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),
689b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return h(a,b)}function c(a){function b(){var a=
690{},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=c&&(a[c]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function m(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,
691!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function h(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function d(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function k(b){var c=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function d(c,e,g){e.select();a(b,{dataTransfer:g,
692method:"drop"},1);g.sourceEditor.fire("saveSnapshot");g.sourceEditor.editable().extractHtmlFromRange(c);g.sourceEditor.getSelection().selectRanges([c]);g.sourceEditor.fire("saveSnapshot")}function e(d,g){d.select();a(b,{dataTransfer:g,method:"drop"},1);c.resetDragDataTransfer()}function g(a,c,d){var e={$:a.data.$,target:a.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===b.fire(a.name,e)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
693var l=b.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(b),k=b.ui.space("top"),y=b.ui.space("bottom");c.preventDefaultDropOnElement(k);c.preventDefaultDropOnElement(y);l.attachListener(m,"dragstart",g);l.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);l.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);l.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=
694a?h(a.startContainer):null,c.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);l.attachListener(m,"dragend",g);l.attachListener(b,"dragend",c.initDragDataTransfer,c,null,1);l.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);l.attachListener(m,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&
695a.data.preventDefault()}});l.attachListener(m,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var d=a.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(a,b),e=c.dragRange;d&&g(a,e,d)}}},null,null,9999);l.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);l.attachListener(b,"drop",function(a){if(a=a.data){var g=a.dropRange,h=a.dragRange,l=a.dataTransfer;l.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?
696setTimeout(function(){c.internalDrop(h,g,l,b)},0):l.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(h,g,l):e(g,l)}},null,null,9999)})}var l;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){var d,h=c(a);a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content");a.pasteFilter=h.get(d);g(a);k(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+
697"dialogs/paste.js"));if(CKEDITOR.env.gecko){var l=["image/png","image/jpeg","image/gif"],t;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d&&1==d.getFilesCount()&&t!=d.id&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(l,d.type))){var e=new FileReader;e.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';a.fire("paste",b.data)},!1);e.addEventListener("abort",function(){a.fire("paste",b.data)},!1);e.addEventListener("error",
698function(){a.fire("paste",b.data)},!1);e.readAsDataURL(d);t=c.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,
699c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));
700if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)e=f=d;f&&(b=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in
701c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(c){c=c.data;var d=a._.nextPasteType||c.type,g=c.dataValue,l,k=a.config.clipboard_defaultContentType||"html",n=c.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,z=!0===a.config.forcePasteAsPlainText;l="html"==d||"html"==c.preSniffing?"html":b(g);delete a._.nextPasteType;"htmlifiedtext"==l&&(g=e(a.config,g));if("text"==d&&"html"==l)g=
702m(a,g,h.get("plain-text"));else if(n&&a.pasteFilter&&!c.dontFilter||z)g=m(a,g,a.pasteFilter);c.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);c.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==l||"html"==k?"html":"text");c.type=d;c.dataValue=g;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,
7031E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:(!CKEDITOR.env.ie||16<=CKEDITOR.env.version)&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",addPasteButton:function(a,b,c){a.ui.addButton&&(a.ui.addButton(b,c),a._.pasteButtons||
704(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,
705b,c,d){function e(a,c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var g=b.startContainer;"number"==typeof d&&"number"==typeof c&&g.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,g,c)||e(a.endContainer,
706g,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,c,d,e){var g=CKEDITOR.plugins.clipboard,h=e.editable(),l,m;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,g.dragStartContainerChildCount,
707g.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(b,c))||(l=b.createBookmark(!1));g=c.clone().createBookmark(!1);m&&(l=b.createBookmark(!1));b=l.startNode;c=l.endNode;m=g.startNode;c&&b.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(b);b=e.createRange();b.moveToBookmark(l);h.extractHtmlFromRange(b,1);c=e.createRange();g.startNode.getCommonAncestor(h)||(g=e.getSelection().createBookmarks()[0]);c.moveToBookmark(g);a(e,{dataTransfer:d,
708method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,e=c.clientY,g=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,e))c=b.document.$.caretRangeFromPoint(d,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);
709else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&g&&b.editable().hasFocus)return g;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var l=!1,m=0;20>m&&!l;m++){if(!l)try{c.moveToPoint(d,e-m),l=!0}catch(k){}if(!l)try{c.moveToPoint(d,e+m),l=!0}catch(r){}}if(l){var z="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+z+'"\x3e\u200b\x3c/span\x3e');var A=b.document.getById(z);h.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START);A.remove()}else{var B=
710b.document.$.elementFromPoint(d,e),C=new CKEDITOR.dom.element(B),G;if(C.equals(b.editable())||"html"==C.getName())return g&&g.startContainer&&!g.startContainer.equals(b.editable())?g:null;G=C.getClientRect();d<G.left?h.setStartAt(C,CKEDITOR.POSITION_AFTER_START):h.setStartAt(C,CKEDITOR.POSITION_BEFORE_END);h.collapse(!0)}}catch(F){return null}}else return null}return h},initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);"dragstart"===a.name&&
711d.storeId();c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var c=a.data.$.clipboardData,d=new this.dataTransfer(c,b);"copy"!==a.name&&"cut"!==a.name||d.storeId();this.copyCutData&&d.id==this.copyCutData.id?(d=this.copyCutData,d.$=c):this.copyCutData=d;return d}return new this.dataTransfer(null,
712b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",d)}};l=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=
713a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(l);this.id||(this.id="Text"==l?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==l||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=
7143;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var e=c.indexOf("\x3c/html\x3e"),
715c=-1!==e?c.substring(0,e+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==l&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!==l&&this.setData(l,this.id)},getTransferType:function(a){return this.sourceEditor?
716this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);"text/html"==c&&(b._.nativeHtmlCache=b.getData(c,!0),d=b._stripHtml(d));d&&(b._.data[c]=d)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");d=this._getImageFromClipboard();if(this.$&&
717this.$.files||d){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length?this.$.files[a]:0===a?this._getImageFromClipboard():
718void 0},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.objectKeys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=0;c<this.$.types.length;c++)a[this.$.types[c]]=1}else a.Text=1,a.URL=1;"Text"!=l&&(a[l]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},_getImageFromClipboard:function(){var a;try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&
719a.type)return a}catch(b){}}
719,_stripHtml:function(a){if(a&&a.length){a=a.replace(this._.metaRegExp,"");var b=this._.bodyRegExp.exec(a);b&&b.length&&(a=b[1],a=a.replace(this._.fragmentRegExp,""))}return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype=
720{isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1;return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,
721!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,e=this._dataTransfer.$;try{e.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(g){if(this._isUnsupportedMimeTypeError(g)){c=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,
722a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=d;try{d=this._applyDataComment(c,h),e.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(l){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a=this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,
723!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||
724""};if(a&&16<a.length){var c;(c=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&c[1]&&(b.data=JSON.parse(decodeURIComponent(c[1])),b.content=a.replace(c[0],""))}return b},_applyDataComment:function(a,b){var c="";b&&CKEDITOR.tools.objectKeys(b).length&&(c="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return c+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function a(a){var b=this._;b.state!=
725CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(a),b.on?b.panel.hide():b.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(g){var b=g.panel||{};delete g.panel;this.base(g);this.document=b.parent&&b.parent.getDocument()||CKEDITOR.document;b.block={attributes:b.attributes};b.toolbarRelated=!0;this.hasArrow="listbox";this.click=a;this._={panelDefinition:b}},statics:{handler:{create:function(a){return new CKEDITOR.ui.panelButton(a)}}},
726proto:{createPanel:function(a){var b=this._;if(!b.panel){var e=this._.panelDefinition,c=this._.panelDefinition.block,m=e.parent||CKEDITOR.document.getBody(),h=this._.panel=new CKEDITOR.ui.floatPanel(a,m,e),e=h.addBlock(b.id,c),d=this;h.onShow=function(){d.className&&this.element.addClass(d.className+"_panel");d.setState(CKEDITOR.TRISTATE_ON);b.on=1;d.editorFocus&&a.focus();if(d.onOpen)d.onOpen()};h.onHide=function(c){d.className&&this.element.getFirst().removeClass(d.className+"_panel");d.setState(d.modes&&
727d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b.on=0;if(!c&&d.onClose)d.onClose()};h.onEscape=function(){h.hide(1);d.document.getById(b.id).focus()};if(this.onBlock)this.onBlock(h,e);e.onHide=function(){b.on=0;d.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,
728CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=a;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var a=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),
729g=CKEDITOR.addTemplate("panel-frame",'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),b=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e');CKEDITOR.ui.panel.prototype={render:function(e,
730c){var m={editorId:e.id,id:this.id,langCode:e.langCode,dir:e.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":e.config.baseFloatZIndex+1};this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),c=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&c.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},
731this));a.write(b.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+c+");"},m)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");
vendor: 9,811 bytes, lines 731-750
731if("input"!==a.data.getTarget().getName()||37!==b&&39!==b)this._.onKeyDown&&!1===this._.onKeyDown(b)?"input"===a.data.getTarget().getName()&&32===b||a.data.preventDefault():(27==b||b==("rtl"==c?39:37))&&
732this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else a=this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var h=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";m.frame=g.output({id:this.id+"_frame",src:h})}h=a.output(m);c&&
733c.push(h);return h},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var b=this._.currentBlock,g=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",g);a._.focusIndex=-1;this._.onKeyDown=
734a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||
735this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){-1!=a&&(a=this._.getItems().getItem(this._.focusIndex=a),CKEDITOR.env.webkit&&a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var b=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},g=this._.getItems(),h,d,k=g.count()-1;0<=k;k--)if(h=g.getItem(k),h.getAscendant(b)||(d=h,this._.focusIndex=
736k),"true"==h.getAttribute("aria-selected")){d=h;this._.focusIndex=k;break}d&&(a&&a(),CKEDITOR.env.webkit&&d.getDocument().getWindow().focus(),d.focus(),this.onMark&&this.onMark(d))},getItems:function(){return this.element.find("a,input")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(a,b){var g=this.keys[a];switch(g){case "next":for(var h=this._.focusIndex,g=this._.getItems(),
737d;d=g.getItem(++h);)if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=h;d.focus(!0);break}return d||b?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":h=this._.focusIndex;for(g=this._.getItems();0<h&&(d=g.getItem(--h));){if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=h;d.focus(!0);break}d=null}return d||b?!1:(this._.focusIndex=g.count(),this.onKeyDown(a,1));case "click":case "mouseup":return h=this._.focusIndex,(d=0<=h&&this._.getItems().getItem(h))&&
738(d.$[g]?d.$[g]():d.$["on"+g]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function a(a,e,c,m,h){h=CKEDITOR.tools.genKey(e.getUniqueId(),c.getUniqueId(),a.lang.dir,a.uiColor||"",m.css||"",h||"");var d=g[h];d||(d=g[h]=new CKEDITOR.ui.panel(e,m),d.element=c.append(CKEDITOR.dom.element.createFromHtml(d.render(a),e)),d.element.setStyles({display:"none",position:"absolute"}));return d}var g={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(b,e,c,
739g){function h(){f.hide()}c.forceIFrame=1;c.toolbarRelated&&b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(e=CKEDITOR.document.getById("cke_"+b.name));var d=e.getDocument();g=a(b,d,e,c,g||0);var k=g.element,l=k.getFirst(),f=this;k.disableContextMenu();this.element=k;this._={editor:b,panel:g,parentElement:e,definition:c,document:d,iframe:l,children:[],dir:b.lang.dir,showBlockParams:null,markFirst:void 0!==c.markFirst?c.markFirst:!0};b.on("mode",h);b.on("resize",h);d.getWindow().on("resize",function(){this.reposition()},
740this)},proto:{addBlock:function(a,e){return this._.panel.addBlock(a,e)},addListBlock:function(a,e){return this._.panel.addListBlock(a,e)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,e,c,g,h,d){var k=this._.panel,l=k.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var f=this._.editor.editable();this._.returnFocus=f.hasFocus?f:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,f=this._.iframe,
741f=CKEDITOR.env.ie&&!CKEDITOR.env.edge?f:new CKEDITOR.dom.window(f.$.contentWindow),w=n.getDocument(),v=this._.parentElement.getPositionedAncestor(),t=e.getDocumentPosition(w),w=v?v.getDocumentPosition(w):{x:0,y:0},p="rtl"==this._.dir,u=t.x+(g||0)-w.x,x=t.y+(h||0)-w.y;!p||1!=c&&4!=c?p||2!=c&&3!=c||(u+=e.$.offsetWidth-1):u+=e.$.offsetWidth;if(3==c||4==c)x+=e.$.offsetHeight-1;this._.panel._.offsetParentId=e.getId();n.setStyles({top:x+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");
742this._.editor.focusManager.add(f);this._.blurSet||(CKEDITOR.event.useCapture=!0,f.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),f.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(f.on("touchstart",function(){clearTimeout(this._.hideTimeout)},
743this),f.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);k.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&!1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(l.autoSize){var b=l.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?l.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||
7440)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=l.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");k._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");p&&(u-=n.$.offsetWidth);n.setStyle("left",u+"px");var b=k.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,f=a.height||a.bottom-a.top,e=p?a.right:
745b.width-a.left,g=p?b.width-a.right:a.left;p?e<c&&(u=g>c?u+c:b.width>c?u-a.left:u-a.right+b.width):e<c&&(u=g>c?u-c:b.width>c?u-a.right+b.width:u-a.left);c=a.top;b.height-a.top<f&&(x=c>f?x-f:b.height>f?x-a.bottom+b.height:x-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&(b=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==b.getName()&&(b=b.getDocument().getBody()),"rtl"==b.getComputedStyle("direction")&&(u=CKEDITOR.env.ie8Compat?u-2*n.getDocument().getDocumentElement().$.scrollLeft:u-(a.$.scrollWidth-
746a.$.clientWidth)));var a=n.getFirst(),h;(h=a.getCustomData("activePanel"))&&h.onHide&&h.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:x+"px",left:u+"px"});n.setOpacity(1);d&&d()},this);k.isLoaded?a():k.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();l.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?
747CKEDITOR.tools.setTimeout(function(){l.markFirstDisplayed?l.markFirstDisplayed():l._.markFirstDisplayed()},0):l.markFirstDisplayed?l.markFirstDisplayed():l._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();
748a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");
749if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var e=this._.panel;void 0!==a&&(e.allowBlur=a);return e.allowBlur},showAsChild:function(a,e,c,g,h,d){if(this._.activeChild!=a||a._.panel._.offsetParentId!=c.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},
750this),this._.activeChild=a,this._.focused=!1,a.showBlock(e,c,g,h,d),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var e=this._.activeChild;e&&(delete e.onHide,delete this._.activeChild,e.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),e;
750for(e in g){var c=g[e];a?c.destroy():c.element.hide()}a&&(g={})})}(),CKEDITOR.plugins.add("colorbutton",
751{requires:"panelbutton,floatpanel",init:function(a){function g(d,f,e,g,k){var t=new CKEDITOR.style(m["colorButton_"+f+"Style"]),p=CKEDITOR.tools.getNextId()+"_colorBox",u;k=k||{};a.ui.add(d,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+g,allowedContent:t,requiredContent:t,contentTransformations:k.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":h.panelTitle}},onBlock:function(c,d){u=d;d.autoSize=
752!0;d.element.addClass("cke_colorblock");d.element.setHtml(b(c,f,p));d.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=d.keys,g="rtl"==a.lang.dir;e[g?37:39]="next";e[40]="next";e[9]="next";e[g?39:37]="prev";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]="click"},refresh:function(){a.activeFilter.check(t)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var b=a.getSelection(),d=b&&b.getStartElement(),e=a.elementPath(d);if(e){d=e.block||
753e.blockLimit||a.document.getBody();do e=d&&d.getComputedStyle("back"==f?"background-color":"color")||"transparent";while("back"==f&&"transparent"==e&&d&&(d=d.getParent()));e&&"transparent"!=e||(e="#ffffff");!1!==m.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(p).setStyle("background-color",e);if(d=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(d),g=d.collapsed?d.startContainer:b.next(),d="";g;){g.type!==CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=c(g.getComputedStyle("back"==
754f?"background-color":"color"));d=d||g;if(d!==g){d="";break}g=b.next()}b=d;d=u._.getItems();for(g=0;g<d.count();g++){var h=d.getItem(g);h.removeAttribute("aria-selected");b&&b==c(h.getAttribute("data-value"))&&h.setAttribute("aria-selected",!0)}}return e}}})}function b(b,c,d){b=[];var g=m.colorButton_colors.split(","),k=m.colorButton_colorsPerRow||6,t=a.plugins.colordialog&&!1!==m.colorButton_enableMore,p=g.length+(t?2:1),u=CKEDITOR.tools.addFunction(function(b,c){function d(b){var f=m["colorButton_"+
755c+"Style"];a.removeStyle(new CKEDITOR.style(f,{color:"inherit"}));f.childRule="back"==c?function(a){return e(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||e(a)};a.focus();b&&a.applyStyle(new CKEDITOR.style(f,{color:b}));a.fire("saveSnapshot")}a.focus();a.fire("saveSnapshot");if("?"==b)a.getColorFromDialog(function(a){if(a)return d(a)});else return d(b)});!1!==m.colorButton_enableAutomatic&&b.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
756h.auto,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',u,",null,'",c,"');return false;\" href\x3d\"javascript:void('",h.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',p,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+k+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',d,'"\x3e\x3c/span\x3e',h.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");
757b.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(d=0;d<g.length;d++){0===d%k&&b.push("\x3c/tr\x3e\x3ctr\x3e");var x=g[d].split("/"),q=x[0],y=x[1]||q;x[1]?x=q:(q="#"+q.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"),x=a.lang.colorbutton.colors[y]||y);b.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',x,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',u,",'",q,"','",c,
758"'); return false;\" href\x3d\"javascript:void('",x,'\')" data-value\x3d"'+y+'" role\x3d"option" aria-posinset\x3d"',d+2,'" aria-setsize\x3d"',p,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',y,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}t&&b.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+k+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',h.more,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',
759u,",'?','",c,"');return false;\" href\x3d\"javascript:void('",h.more,"')\"",' role\x3d"option" aria-posinset\x3d"',p,'" aria-setsize\x3d"',p,'"\x3e',h.more,"\x3c/a\x3e\x3c/td\x3e");b.push("\x3c/tr\x3e\x3c/table\x3e");return b.join("")}function e(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function c(a){return CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}var m=a.config,h=a.lang.colorbutton;if(!CKEDITOR.env.hc){g("TextColor",
760"fore",h.textColorTitle,10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var d={}
760,k=a.config.colorButton_normalizeBackground;if(void 0===k||k)d.contentTransformations=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);
761return a.color&&1===b.objectKeys(a).length},right:function(b){var c=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=c.element;b.styles=c.styles;b.attributes=c.attributes||{};return b}}]];g("BGColor","back",h.bgColorTitle,20,d)}}}),CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",CKEDITOR.config.colorButton_foreStyle=
762{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(a){var g=new CKEDITOR.dialogCommand("colordialog");g.editorFocus=!1;a.addCommand("colordialog",g);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(b,e){var c,g,h;c=function(a){g(this);a="ok"==a.name?
763this.getValueOf("picker","selectedColor"):null;/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a)&&(a="#"+a);b.call(e,a)};g=function(a){a.removeListener("ok",c);a.removeListener("cancel",c)};h=function(a){a.on("ok",c);a.on("cancel",c)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)h(a._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,
764function(a){return function(){h(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var g=a.config.menu_groups.split(","),b=a._.menuGroups={},e=a._.menuItems={},c=0;c<g.length;c++)b[g[c]]=c+1;a.addMenuGroup=function(a,c){b[a]=c||100};a.addMenuItem=function(a,c){b[c.group]&&(e[a]=new CKEDITOR.menuItem(this,a,c))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,
765a[b])};a.getMenuItem=function(a){return e[a]};a.removeMenuItem=function(a){delete e[a]}}}),function(){function a(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var g='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"';
766CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(g+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(g+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var g=g+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),b=CKEDITOR.addTemplate("menuItem",
767g+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e'),e=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),
768c=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),e=c.block.attributes=c.attributes||{};!e.role&&(e.role="menu");this._.panelDefinition=
769c}
vendor: 1,923 bytes, lines 769-772
769,_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),e=this._.listeners;this.removeAll();for(var g=0;g<e.length;g++){var f=e[g](b,a,c);if(f)for(var n in f){var w=this.editor.getMenuItem(n);!w||w.command&&!this.editor.getCommand(w.command).state||(w.state=f[n],this.add(w))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):
77027==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var e in c){var g=this.editor.getMenuItem(e);g&&(g.state=c[e],b.add(g))}var f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
771String(a));setTimeout(function(){b.show(f,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,c,d,e){if(!this.parent&&(this._.onShow(),!this.items.length))return;c=c||("rtl"==this.editor.lang.dir?2:1);var g=this.items,f=this.editor,n=this._.panel,w=this._.element;if(!n){n=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
772n.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);n.onShow=function(){n._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};n.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);w=n.addBlock(this.id,this._.panelDefinition.block);w.autoSize=!0;var v=w.keys;v[40]="next";v[9]="next";v[38]="prev";
vendor: 2,655 bytes, lines 772-777
772v[CKEDITOR.SHIFT+9]="prev";v["rtl"==f.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";v[32]=CKEDITOR.env.ie?"mouseup":
773"click";CKEDITOR.env.ie&&(v[13]="mouseup");w=this._.element=w.element;v=w.getDocument();v.getBody().setStyle("overflow","hidden");v.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,f.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);
774this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}a(g);for(var v=f.elementPath(),v=['\x3cdiv class\x3d"cke_menu'+(v&&v.direction()!=f.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],t=g.length,p=t&&g[0].group,u=0;u<t;u++){var x=g[u];p!=x.group&&(v.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),
775p=x.group);x.render(this,u,v)}v.push("\x3c/div\x3e");w.setHtml(v.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(n,this.id,b,c,d,e):n.showBlock(this.id,b,c,d,e);f.fire("menuShow",[n])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)},findItemByCommandName:function(a){var b=CKEDITOR.tools.array.filter(this.items,function(b){return a===b.command});return b.length?(b=b[0],{item:b,
776element:this._.element.findOne("."+b.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,g,d){var k=a.id+String(g),l="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,f="",n=this.editor,w,v,t=l==CKEDITOR.TRISTATE_ON?"on":l==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,
777menuitemradio:1}&&(f=' aria-checked\x3d"'+(l==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var p=this.getItems,u="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",x=this.name;this.icon&&!/\./.test(this.icon)&&(x=this.icon);this.command&&(w=n.getCommand(this.command),(w=n.getCommandKeystroke(w))&&(v=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,w)));a={id:k,name:this.name,iconName:x,label:this.label,cls:this.className||"",state:t,hasPopup:p?"true":"false",disabled:l==CKEDITOR.TRISTATE_DISABLED,
778title:this.label+(v?" ("+v.display+")":""),ariaShortcut:v?n.lang.common.keyboardShortcut+" "+v.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:g,iconStyle:CKEDITOR.skin.getIconStyle(x,"rtl"==this.editor.lang.dir,x==this.icon?null:this.icon,this.iconOffset),shortcutHtml:v?c.output({shortcut:v.display}):"",arrowHtml:p?e.output({label:u}):"",role:this.role?this.role:"menuitem",ariaChecked:f};b.output(a,d)}}})}(),
779CKEDITOR.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(a){this.base.call(this,a,{panel:{css:a.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},
780proto:{addTarget:function(a,g){function b(){c=!1}var e,c;a.on("contextmenu",function(a){a=a.data;var b=CKEDITOR.env.webkit?e:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!g||!b)if(a.preventDefault(),!c){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var b=this.editor,k=(new CKEDITOR.dom.elementPath(a.getTarget(),b.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);k&&"false"==k.getAttribute("contenteditable")&&b.getSelection().fake(k)}var k=a.getTarget().getDocument(),l=a.getTarget().getDocument().getDocumentElement(),
781b=!k.equals(CKEDITOR.document),k=k.getWindow().getScrollPosition(),f=b?a.$.clientX:a.$.pageX||k.x+a.$.clientX,m=b?a.$.clientY:a.$.pageY||k.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(l,null,f,m)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var m=function(){e=0};a.on("keydown",function(a){e=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",m);a.on("contextmenu",m)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(a.on("keydown",function(a){a.data.$.shiftKey&&
782121===a.data.$.keyCode&&(c=!0)},null,null,0),a.on("keyup",b),a.on("contextmenu",b))},open:function(a,g,b,e){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),a=a||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(a,g,b,e))}}})},beforeInit:function(a){var g=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){g.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});
783a.addCommand("contextMenu",{exec:function(a){var e=0,c=0,g=a.getSelection().getRanges(),g=g[g.length-1].getClientRects(a.editable().isInline());if(g=g[g.length-1])e=g["rtl"===a.lang.dir?"left":"right"],c=g.bottom;a.contextMenu.open(a.document.getBody().getParent(),null,e,c)}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function a(a){var b=this.att;a=a&&a.hasAttribute(b)&&a.getAttribute(b)||"";void 0!==a&&this.setValue(a)}
784function g(){for(var a,b=0;b<arguments.length;b++)if(arguments[b]instanceof CKEDITOR.dom.element){a=arguments[b];break}if(a){var b=this.att,g=this.getValue();g?a.setAttribute(b,g):a.removeAttribute(b,g)}}var b={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=b);var c=[];a.id&&c.push("id");a.dir&&c.push("dir");var g="";c.length&&(g+="["+c.join(",")+"]");a.classes&&(g+="(*)");a.styles&&(g+="{*}");return g},createAdvancedTab:function(e,
785c,m){c||(c=b);var h=e.lang.common,d={id:"advanced",label:h.advancedTab,title:h.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},k=[];if(c.id||c.dir)c.id&&k.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:h.id,setup:a,commit:g}),c.dir&&k.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+"[dir]":null,label:h.langDir,"default":"",style:"width:100%",items:[[h.notSet,""],[h.langDirLTR,"ltr"],[h.langDirRTL,"rtl"]],setup:a,commit:g}),d.elements[0].children.push({type:"hbox",
786widths:["50%","50%"],children:[].concat(k)});if(c.styles||c.classes)k=[],c.styles&&k.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:h.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(h.invalidInlineStyle),onChange:function(){},getStyle:function(a,b){var c=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return c?c[1]:b},updateStyle:function(a,b){var c=this.getValue(),d=e.document.createElement("span");d.setAttribute("style",
787c);d.setStyle(a,b);c=CKEDITOR.tools.normalizeCssText(d.getAttribute("style"));this.setValue(c,1)},setup:a,commit:g}),c.classes&&k.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasse
vendor: 5,325 bytes, lines 787-797
787s",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:h.cssClasses,"default":"",setup:a,commit:g}]}),d.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(k)});return d}})}(),function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(a){if(!a.blockless){var g=
788a.lang.div,b="div(*)";CKEDITOR.dialog.isTabEnabled(a,"editdiv","advanced")&&(b+=";div[dir,id,lang,title]{*}");a.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:b,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(a,b){this.setState("div"in(a.config.div_wrapTable?b.root:b.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}}));a.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));
789a.addCommand("removediv",{requiredContent:"div",exec:function(a){function b(c){(c=CKEDITOR.plugins.div.getSurroundDiv(a,c))&&!c.data("cke-div-added")&&(l.push(c),c.data("cke-div-added"))}for(var g=a.getSelection(),h=g&&g.getRanges(),d,k=g.createBookmarks(),l=[],f=0;f<h.length;f++)d=h[f],d.collapsed?b(g.getStartElement()):(d=new CKEDITOR.dom.walker(d),d.evaluator=b,d.lastForward());for(f=0;f<l.length;f++)l[f].remove(!0);g.selectBookmarks(k)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:g.toolbar,
790command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:g.edit,command:"editdiv",group:"div",order:1},removediv:{label:g.remove,command:"removediv",group:"div",order:5}}),a.contextMenu&&a.contextMenu.addListener(function(b){return!b||b.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(a)?{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")}}});
791CKEDITOR.plugins.div={getSurroundDiv:function(a,g){var b=a.elementPath(g);return a.elementPath(b.blockLimit).contains(function(a){return a.is("div")&&!a.isReadOnly()},1)}}}(),function(){function a(a,b){function h(b){b=f.list[b];var d;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(d=a.createRange(),d.selectNodeContents(b),d=d.select()):(d=a.getSelection(),d.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:d,path:new CKEDITOR.dom.elementPath(b)});a.focus()}
792function d(){l&&l.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete f.list}var k=a.ui.spaceId("path"),l,f=a._.elementsPath,n=f.idBase;b.html+='\x3cspan id\x3d"'+k+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+k+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+k+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,
7931)});f.onClick=h;var w=CKEDITOR.tools.addFunction(h),v=CKEDITOR.tools.addFunction(function(b,d){var e=f.idBase,g;d=new CKEDITOR.dom.event(d);g="rtl"==a.lang.dir;switch(d.getKeystroke()){case g?39:37:case 9:return(g=CKEDITOR.document.getById(e+(b+1)))||(g=CKEDITOR.document.getById(e+"0")),g.focus(),!1;case g?37:39:case CKEDITOR.SHIFT+9:return(g=CKEDITOR.document.getById(e+(b-1)))||(g=CKEDITOR.document.getById(e+(f.list.length-1))),g.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return h(b),
794!1}return!0});a.on("selectionChange",function(b){for(var d=[],g=f.list=[],h=[],m=f.filters,y=!0,r=b.data.path.elements,z=r.length;z--;){var A=r[z],B=0;b=A.data("cke-display-name")?A.data("cke-display-name"):A.data("cke-real-element-type")?A.data("cke-real-element-type"):A.getName();(y=A.hasAttribute("contenteditable")?"true"==A.getAttribute("contenteditable"):y)||A.hasAttribute("contenteditable")||(B=1);for(var C=0;C<m.length;C++){var G=m[C](A,b);if(!1===G){B=1;break}b=G||b}B||(g.unshift(A),h.unshift(b))}g=
795g.length;for(m=0;m<g;m++)b=h[m],y=a.lang.elementspath.eleTitle.replace(/%1/,b),b=e.output({id:n+m,label:y,text:b,jsTitle:"javascript:void('"+b+"')",index:m,keyDownFn:v,clickFn:w}),d.unshift(b);l||(l=CKEDITOR.document.getById(k));h=l;h.setHtml(d.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:h})});a.on("readOnly",d);a.on("contentDomUnload",d);a.addCommand("elementsPathFocus",g.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}
796var g={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},b="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var e=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+b+' hidefocus\x3d"true"  draggable\x3d"false"  ondragstart\x3d"return false;" onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e');
797CKEDITOR.plugins.add("elementspath",{init:function(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",f
vendor: 17,553 bytes, lines 797-829
797ilters:[]};b.on("uiSpace",function(e){"bottom"==e.data.space&&a(b,e.data)})}})}(),function(){function a(a,b,c){c=a.config.forceEnterMode||c;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var e=a.elementPath();e&&!e.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,c=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?h(a,b,null,c):d(a,b,null,c);a.fire("saveSnapshot")}}function g(a){a=
798a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function b(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,
799exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var e=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),m,h,d,k;CKEDITOR.plugins.enterkey={enterBlock:function(a,d,m,w){function v(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],x.lastElement.getName())||1!==x.lastElement.getChildCount())return!1;a=x.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?
800!1:!0}if(m=m||g(a)){m=b(m);var t=m.document,p=m.checkStartOfBlock(),u=m.checkEndOfBlock(),x=a.elementPath(m.startContainer),q=x.block,y=d==CKEDITOR.ENTER_DIV?"div":"p",r;if(q&&p&&u){p=q.getParent();if(p.is("li")&&1<p.getChildCount()){t=new CKEDITOR.dom.element("li");r=a.createRange();t.insertAfter(p);q.remove();r.setStart(t,0);a.getSelection().selectRanges([r]);return}if(q.is("li")||q.getParent().is("li")){q.is("li")||(q=q.getParent(),p=q.getParent());r=p.getParent();m=!q.hasPrevious();var z=!q.hasNext();
801w=a.getSelection();var y=w.createBookmarks(),A=q.getDirection(1),u=q.getAttribute("class"),B=q.getAttribute("style"),C=r.getDirection(1)!=A;a=a.enterMode!=CKEDITOR.ENTER_BR||C||B||u;if(r.is("li"))m||z?(m&&z&&p.remove(),q[z?"insertAfter":"insertBefore"](r)):q.breakParent(r);else{if(a)if(x.block.is("li")?(r=t.createElement(d==CKEDITOR.ENTER_P?"p":"div"),C&&r.setAttribute("dir",A),B&&r.setAttribute("style",B),u&&r.setAttribute("class",u),q.moveChildren(r)):r=x.block,m||z)r[m?"insertBefore":"insertAfter"](p);
802else q.breakParent(p),r.insertAfter(p);else if(q.appendBogus(!0),m||z)for(;t=q[m?"getFirst":"getLast"]();)t[m?"insertBefore":"insertAfter"](p);else for(q.breakParent(p);t=q.getLast();)t.insertAfter(p);q.remove()}w.selectBookmarks(y);return}if(q&&q.getParent().is("blockquote")){q.breakParent(q.getParent());q.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||q.getPrevious().remove();q.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||q.getNext().remove();m.moveToElementEditStart(q);m.select();
803return}}else if(q&&q.is("pre")&&!u){h(a,d,m,w);return}if(B=m.splitBlock(y)){a=B.previousBlock;q=B.nextBlock;p=B.wasStartOfBlock;u=B.wasEndOfBlock;q?(z=q.getParent(),z.is("li")&&(q.breakParent(z),q.move(q.getNext(),1))):a&&(z=a.getParent())&&z.is("li")&&(a.breakParent(z),z=a.getNext(),m.moveToElementEditStart(z),a.move(a.getPrevious()));if(p||u)if(v(d))m.moveToElementEditStart(m.getTouchedStartNode());else{if(a){if(a.is("li")||!k.test(a.getName())&&!a.is("pre"))r=a.clone()}else q&&(r=q.clone());r?
804w&&!r.is("li")&&r.renameNode(y):z&&z.is("li")?r=z:(r=t.createElement(y),a&&(A=a.getDirection())&&r.setAttribute("dir",A));if(t=B.elementPath)for(d=0,w=t.elements.length;d<w;d++){y=t.elements[d];if(y.equals(t.block)||y.equals(t.blockLimit))break;CKEDITOR.dtd.$removeEmpty[y.getName()]&&(y=y.clone(),r.moveChildren(y),r.append(y))}r.appendBogus();r.getParent()||m.insertNode(r);r.is("li")&&r.removeAttribute("value");!CKEDITOR.env.ie||!p||u&&a.getChildCount()||(m.moveToElementEditStart(u?a:r),m.select());
805m.moveToElementEditStart(p&&!u?q:r)}else q.is("li")&&(r=m.clone(),r.selectNodeContents(q),r=new CKEDITOR.dom.walker(r),r.evaluator=function(a){return!(c(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(z=r.next())&&z.type==CKEDITOR.NODE_ELEMENT&&z.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?t.createElement("br"):t.createText("\u00a0")).insertBefore(z)),q&&m.moveToElementEditStart(q);m.select();m.scrollIntoView()}}},enterBr:function(a,
806b,c,e){if(c=c||g(a)){var h=c.document,m=c.checkEndOfBlock(),p=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),u=p.block,x=u&&p.block.getName();e||"li"!=x?(!e&&m&&k.test(x)?(m=u.getDirection())?(h=h.createElement("div"),h.setAttribute("dir",m),h.insertAfter(u),c.setStart(h,0)):(h.createElement("br").insertAfter(u),CKEDITOR.env.gecko&&h.createText("").insertAfter(u),c.setStartAt(u.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==x&&
807CKEDITOR.env.ie&&8>CKEDITOR.env.version?h.createText("\r"):h.createElement("br"),c.deleteContents(),c.insertNode(a),CKEDITOR.env.needsBrFiller?(h.createText("\ufeff").insertAfter(a),m&&(u||p.blockLimit).appendBogus(),a.getNext().$.nodeValue="",c.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):d(a,b,c,e)}}};m=CKEDITOR.plugins.enterkey;h=m.enterBr;d=m.enterBlock;k=/^h[1-6]$/}(),function(){function a(a,
808b){var e={},c=[],m={nbsp:"\u00a0",shy:"\u00ad",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,d){var g=b?"\x26"+d+";":m[d];e[g]=b?m[d]:"\x26"+d+";";c.push(g);return""});a=a.replace(/,$/,"");if(!b&&a){a=a.split(",");var h=document.createElement("div"),d;h.innerHTML="\x26"+a.join(";\x26")+";";d=h.innerHTML;h=null;for(h=0;h<d.length;h++){var k=d.charAt(h);e[k]="\x26"+a[h]+";";c.push(k)}}e.regex=c.join(b?"|":"");return e}CKEDITOR.plugins.add("entities",
809{afterInit:function(g){function b(a){return k[a]}function e(a){return"force"!=c.entities_processNumerical&&h[a]?h[a]:"\x26#"+a.charCodeAt(0)+";"}var c=g.config;if(g=(g=g.dataProcessor)&&g.htmlFilter){var m=[];!1!==c.basicEntities&&m.push("nbsp,gt,lt,amp");c.entities&&(m.length&&m.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"),
810c.entities_latin&&m.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"),c.entities_greek&&m.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"),
811c.entities_additional&&m.push(c.entities_additional));var h=a(m.join(",")),d=h.regex?"["+h.regex+"]":"a^";delete h.regex;c.entities&&c.entities_processNumerical&&(d="[^ -~]|"+d);var d=new RegExp(d,"g"),k=a("nbsp,gt,lt,amp,shy",!0),l=new RegExp(k.regex,"g");g.addRules({text:function(a){return a.replace(l,b).replace(d,e)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,
812CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,g,b,e){g=g||"80%";b=b||"70%";"string"==typeof g&&1<g.length&&"%"==g.substr(g.length-1,1)&&(g=parseInt(window.screen.width*parseInt(g,10)/100,10));"string"==typeof b&&1<b.length&&"%"==b.substr(b.length-1,1)&&(b=parseInt(window.screen.height*parseInt(b,10)/100,10));640>g&&(g=640);420>b&&(b=420);var c=parseInt((window.screen.height-b)/2,10),m=parseInt((window.screen.width-
813g)/2,10);e=(e||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+g+",height\x3d"+b+",top\x3d"+c+",left\x3d"+m;var h=window.open("",null,e,!0);if(!h)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(h.moveTo(m,c),h.resizeTo(g,b)),h.focus(),h.location.href=a}catch(d){window.open(a,null,e,!0)}return!0}}),"use strict",function(){function a(a){this.editor=a;this.loaders=
814[]}function g(a,e,g){var d=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof e?(this.data=e,this.file=b(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=e,this.total=this.file.size,this.loaded=0);g?this.fileName=g:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),d&&(a[0]=d),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}
815function b(a){var b=a.match(e)[1];a=a.replace(e,"");a=atob(a);var g=[],d,k,l,f;for(d=0;d<a.length;d+=512){k=a.slice(d,d+512);l=Array(k.length);for(f=0;f<k.length;f++)l[f]=k.charCodeAt(f);k=new Uint8Array(l);g.push(k)}return new Blob(g,{type:b})}CKEDITOR.plugins.add("filetools",{beforeInit:function(b){b.uploadRepository=new a(b);b.on("fileUploadRequest",function(a){var b=a.data.fileLoader;b.xhr.open("POST",b.uploadUrl,!0);a.data.requestData.upload={file:b.file,name:b.fileName}},null,null,5);b.on("fileUploadRequest",
816function(a){var e=a.data.fileLoader,d=new FormData;a=a.data.requestData;var g=b.config.fileTools_requestHeaders,l,f;for(f in a){var n=a[f];"object"===typeof n&&n.file?d.append(f,n.file,n.name):d.append(f,n)}d.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(g)for(l in g)e.xhr.setRequestHeader(l,g[l]);e.xhr.send(d)},null,null,999);b.on("fileUploadResponse",function(a){var b=a.data.fileLoader,c=b.xhr,e=a.data;try{var g=JSON.parse(c.responseText);g.error&&g.error.message&&(e.message=g.error.message);
817if(g.uploaded)for(var f in g)e[f]=g[f];else a.cancel()}catch(n){e.message=b.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:c.responseText}),a.cancel()}},null,null,999)}});a.prototype={create:function(a,b,e){e=e||g;var d=this.loaders.length;a=new e(this.editor,a,b);a.id=d;this.loaders[d]=a;this.fire("instanceCreated",a);return a},isFinished:function(){for(var a=0;a<this.loaders.length;++a)if(!this.loaders[a].isFinished())return!1;return!0}};g.prototype={loadAndUpload:function(a,
818b){var e=this;this.once("loaded",function(d){d.cancel();e.once("update",function(a){a.cancel()},null,null,0);e.upload(a,b)},null,null,0);this.load()},load:function(){var a=this,b=this.reader=new FileReader;a.changeStatus("loading");this.abort=function(){a.reader.abort()};b.onabort=function(){a.changeStatus("abort")};b.onerror=function(){a.message=a.lang.filetools.loadError;a.changeStatus("error")};b.onprogress=function(b){a.loaded=b.loaded;a.update()};b.onload=function(){a.loaded=a.total;a.data=b.result;
819a.changeStatus("loaded")};b.readAsDataURL(this.file)},upload:function(a,b){var e=b||{};a?(this.uploadUrl=a,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:e})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function a(){"error"!=e.status&&(e.message=e.lang.filetools.networkError,e.changeStatus("error"))}function b(){"abort"!=e.status&&
820e.changeStatus("abort")}var e=this,d=this.xhr;e.abort=function(){d.abort();b()};d.onerror=a;d.onabort=b;d.upload?(d.upload.onprogress=function(a){a.lengthComputable&&(e.uploadTotal||(e.uploadTotal=a.total),e.uploaded=a.loaded,e.update())},d.upload.onerror=a,d.upload.onabort=b):(e.uploadTotal=e.total,e.update());d.onload=function(){e.update();if("abort"!=e.status)if(e.uploaded=e.uploadTotal,200>d.status||299<d.status)e.message=e.lang.filetools["httpError"+d.status],e.message||(e.message=e.lang.filetools.httpError.replace("%1",
821d.status)),e.changeStatus("error");else{for(var a={fileLoader:e},b=["message","fileName","url"],c=e.editor.fire("fileUploadResponse",a),g=0;g<b.length;g++){var m=b[g];"string"===typeof a[m]&&(e[m]=a[m])}e.responseData=a;delete e.responseData.fileLoader;!1===c?e.changeStatus("error"):e.changeStatus("uploaded")}}},changeStatus:function(a){this.status=a;if("error"==a||"abort"==a||"loaded"==a||"uploaded"==a)this.abort=function(){};this.fire(a);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};
822CKEDITOR.event.implementOn(a.prototype);CKEDITOR.event.implementOn(g.prototype);var e=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:a,fileLoader:g,getUploadUrl:function(a,b){var e=CKEDITOR.tools.capitalize;return b&&a[b+"UploadUrl"]?a[b+"UploadUrl"]:a.uploadUrl?a.uploadUrl:b&&a["filebrowser"+e(b,1)+"UploadUrl"]?a["filebrowser"+e(b,1)+"UploadUrl"]+"\x26responseType\x3djson":a.filebrowserUploadUrl?a.filebrowserUploadUrl+
823"\x26responseType\x3djson":null},isTypeSupported:function(a,b){return!!a.type.match(b)},isFileUploadSupported:"function"===typeof FileReader&&"function"===typeof(new FileReader).readAsDataURL&&"function"===typeof FormData&&"function"===typeof(new FormData).append&&"function"===typeof XMLHttpRequest&&"function"===typeof Blob})}(),function(){function a(a,b){var c=[];if(b)for(var d in b)c.push(d+"\x3d"+encodeURIComponent(b[d]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function g(b){return!b.match(/command=QuickUpload/)||
824b.match(/(\?|&)responseType=json/)?b:a(b,{responseType:"json"})}function b(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function e(){var c=this.getDialog(),d=c.getParentEditor();d._.filebrowserSe=this;var f=d.config["filebrowser"+b(c.getName())+"WindowWidth"]||d.config.filebrowserWindowWidth||"80%",c=d.config["filebrowser"+b(c.getName())+"WindowHeight"]||d.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=d.name;e.CKEditorFuncNum=d._.filebrowserFn;e.langCode||
825(e.langCode=d.langCode);e=a(this.filebrowser.url,e);d.popup(e,f,c,d.config.filebrowserWindowFeatures||d.config.fileBrowserWindowFeatures)}function c(a){var b=new CKEDITOR.dom.element(a.$.form);b&&((a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a):(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken()))}function m(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],
826this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function h(b,c,d){var f=d.params||{};f.CKEditor=b.name;f.CKEditorFuncNum=b._.filebrowserFn;f.langCode||(f.langCode=b.langCode);c.action=a(d.url,f);c.filebrowser=d}function d(a,l,v,t){if(t&&t.length)for(var p,u=t.length;u--;)if(p=t[u],"hbox"!=p.type&&"vbox"!=p.type&&"fieldset"!=p.type||d(a,l,v,p.children),p.filebrowser)if("string"==typeof p.filebrowser&&(p.filebrowser={action:"fileButton"==
827p.type?"QuickUpload":"Browse",target:p.filebrowser}),"Browse"==p.filebrowser.action){var x=p.filebrowser.url;void 0===x&&(x=a.config["filebrowser"+b(l)+"BrowseUrl"],void 0===x&&(x=a.config.filebrowserBrowseUrl));x&&(p.onClick=e,p.filebrowser.url=x,p.hidden=!1)}else if("QuickUpload"==p.filebrowser.action&&p["for"]&&(x=p.filebrowser.url,void 0===x&&(x=a.config["filebrowser"+b(l)+"UploadUrl"],void 0===x&&(x=a.config.filebrowserUploadUrl)),x)){var q=p.onClick;p.onClick=function(b){var d=b.sender,e=d.getDialog().getContentElement(this["for"][0],
828this["for"][1]).getInputElement(),h=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(q&&!1===q.call(d,b))return!1;if(m.call(d,b)){if("form"!==a.config.filebrowserUploadMethod&&h)return b=a.uploadRepository.create(e.$.files[0]),b.on("uploaded",function(a){var b=a.sender.responseData;f.call(a.sender.editor,b.url,b.message)}),b.on("error",k.bind(this)),b.on("abort",k.bind(this)),b.loadAndUpload(g(x)),"xhr";c(e);return!0}return!1};p.filebrowser.url=x;p.hidden=!1;h(a,v.getContents(p["for"][0]).get(p["for"][1]),
829p.filebrowser)}}function k(a){var b={};try{b=JSON.parse(a.sender.xhr.response)||{}}catch(c){}this.enable();alert(b.error?b.error.message:a.sender.message)}function l(a,b,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var d=0;d<c.length;d++)if(l(a,b,c[d]))return!0;return!1}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function f(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe["for"],f=this._.filebrowserSe.filebrowser.onSelect;
vendor: 10,144 bytes, lines 829-849
829d&&c.getContentElement(d[0],d[1]).reset();if("function"!=
830typeof b||!1!==b.call(this._.filebrowserSe))if(!f||!1!==f.call(this._.filebrowserSe,a,b))if("string"==typeof b&&b&&alert(b),a&&(d=this._.filebrowserSe,c=d.getDialog(),d=d.filebrowser.target||null))if(d=d.split(":"),f=c.getContentElement(d[0],d[1]))f.setValue(a),c.selectPage(d[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(f,a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",
831function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,c,f=0;f<b.contents.length;++f)if(c=b.contents[f])d(a.editor,a.data.name,b,c.elements),c.hidden&&c.filebrowser&&(c.hidden=!l(b,c.id,c.filebrowser))})}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(a){var g=a.addCommand("find",new CKEDITOR.dialogCommand("find")),b=a.addCommand("replace",new CKEDITOR.dialogCommand("find",{tabId:"replace"}));g.canUndo=!1;g.readOnly=1;b.canUndo=!1;a.ui.addButton&&(a.ui.addButton("Find",
832{label:a.lang.find.find,command:"find",toolbar:"find,10"}),a.ui.addButton("Replace",{label:a.lang.find.replace,command:"replace",toolbar:"find,20"}));CKEDITOR.dialog.add("find",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},function(){function a(a,b){var c=e.exec(a),g=e.exec(b);if(c){if(!c[2]&&"px"==g[2])return g[1];if("px"==c[2]&&!g[2])return g[1]+"px"}return b}var g=CKEDITOR.htmlParser.cssStyle,b=CKEDITOR.tools.cssLength,
833e=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,c={elements:{$:function(b){var c=b.attributes;if((c=(c=(c=c&&c["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(c)))&&c.children[0])&&b.attributes["data-cke-resizable"]){var d=(new g(b)).rules;b=c.attributes;var e=d.width,d=d.height;e&&(b.width=a(b.width,e));d&&(b.height=a(b.height,d))}return c}}};CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},
834afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(c,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,c,d,e){var l=this.lang.fakeobjects,l=l[d]||l.unknown;c={"class":c,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,alt:l,title:l,align:a.getAttribute("align")||""};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);d&&(c["data-cke-real-element-type"]=d);e&&(c["data-cke-resizable"]=e,d=new g,e=a.getAttribute("width"),
835a=a.getAttribute("height"),e&&(d.rules.width=b(e)),a&&(d.rules.height=b(a)),d.populate(c));return this.document.createElement("img",{attributes:c})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,c,d,e){var l=this.lang.fakeobjects,l=l[d]||l.unknown,f;f=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(f);f=f.getHtml();c={"class":c,"data-cke-realelement":encodeURIComponent(f),"data-cke-real-node-type":a.type,alt:l,title:l,align:a.attributes.align||""};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);
836d&&(c["data-cke-real-element-type"]=d);e&&(c["data-cke-resizable"]=e,e=a.attributes,a=new g,d=e.width,e=e.height,void 0!==d&&(a.rules.width=b(d)),void 0!==e&&(a.rules.height=b(e)),a.populate(c));return new CKEDITOR.htmlParser.element("img",c)};CKEDITOR.editor.prototype.restoreRealElement=function(b){if(b.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var c=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(b.data("cke-realelement")),this.document);if(b.data("cke-resizable")){var d=
837b.getStyle("width");b=b.getStyle("height");d&&c.setAttribute("width",a(c.getAttribute("width"),d));b&&c.setAttribute("height",a(c.getAttribute("height"),b))}return c}}(),function(){function a(a){a=a.attributes;return"application/x-shockwave-flash"==a.type||b.test(a.src||"")}function g(a,b){return a.createFakeParserElement(b,"cke_flash","flash",!0)}var b=/\.swf(?:$|\?)/i;CKEDITOR.plugins.add("flash",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_flash{background-image: url("+
838CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(a){var b="object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]";CKEDITOR.dialog.isTabEnabled(a,"flash","properties")&&(b+=";object[align]; embed[allowscriptaccess,quality,scale,wmode]");CKEDITOR.dialog.isTabEnabled(a,"flash","advanced")&&(b+=
839";object[id]{*}; embed[bgcolor]{*}(*)");a.addCommand("flash",new CKEDITOR.dialogCommand("flash",{allowedContent:b,requiredContent:"embed"}));a.ui.addButton&&a.ui.addButton("Flash",{label:a.lang.common.flash,command:"flash",toolbar:"insert,20"});CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js");a.addMenuItems&&a.addMenuItems({flash:{label:a.lang.flash.properties,command:"flash",group:"flash"}});a.on("doubleclick",function(a){var b=a.data.element;b.is("img")&&"flash"==b.data("cke-real-element-type")&&
840(a.data.dialog="flash")});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&!a.isReadOnly()&&"flash"==a.data("cke-real-element-type"))return{flash:CKEDITOR.TRISTATE_OFF}})},afterInit:function(b){var c=b.dataProcessor;(c=c&&c.dataFilter)&&c.addRules({elements:{"cke:object":function(c){var h=c.attributes;if(!(h.classid&&String(h.classid).toLowerCase()||a(c))){for(h=0;h<c.children.length;h++)if("cke:embed"==c.children[h].name){if(!a(c.children[h]))break;return g(b,c)}return null}return g(b,
841c)},"cke:embed":function(c){return a(c)?g(b,c):null}}},5)}})}(),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),function(){function a(a){var c=a.config,m=a.fire("uiSpace",{space:"top",html:""}).html,h=function(){function d(a,c,f){k.setStyle(c,b(f));k.setStyle("position",a)}function f(a){var b=m.getDocumentPosition();switch(a){case "top":d("absolute","top",b.y-q-z);break;case "pin":d("fixed","top",B);break;case "bottom":d("absolute","top",b.y+
842(u.height||u.bottom-u.top)+z)}l=a}var l,m,p,u,x,q,y,r=c.floatSpaceDockedOffsetX||0,z=c.floatSpaceDockedOffsetY||0,A=c.floatSpacePinnedOffsetX||0,B=c.floatSpacePinnedOffsetY||0;return function(d){if(m=a.editable()){var n=d&&"focus"==d.name;n&&k.show();a.fire("floatingSpaceLayout",{show:n});k.removeStyle("left");k.removeStyle("right");p=k.getClientRect();u=m.getClientRect();x=g.getViewPaneSize();q=p.height;y="pageXOffset"in g.$?g.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;l?(q+z<=
843u.top?f("top"):q+z>x.height-u.bottom?f("pin"):f("bottom"),d=x.width/2,d=c.floatSpacePreferRight?"right":0<u.left&&u.right<x.width&&u.width>p.width?"rtl"==c.contentsLangDirection?"right":"left":d-u.left>u.right-d?"left":"right",p.width>x.width?(d="left",n=0):(n="left"==d?0<u.left?u.left:0:u.right<x.width?x.width-u.right:0,n+p.width>x.width&&(d="left"==d?"right":"left",n=0)),k.setStyle(d,b(("pin"==l?A:r)+n+("pin"==l?0:"left"==d?y:-y)))):(l="pin",f("pin"),h(d))}}}();if(m){var d=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+
844CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),k=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(d.output({content:m,
845id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(c.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),l=CKEDITOR.tools.eventsBuffer(500,h),f=CKEDITOR.tools.eventsBuffer(100,h);k.unselectable();k.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){h(b);a.on("change",l.input);g.on("scroll",f.input);g.on("resize",f.input)});a.on("blur",function(){k.hide();a.removeListener("change",
846l.input);g.removeListener("scroll",f.input);g.removeListener("resize",f.input)});a.on("destroy",function(){g.removeListener("scroll",f.input);g.removeListener("resize",f.input);k.clearCustomData();k.remove()});a.focusManager.hasFocus&&k.show();a.focusManager.add(k,1)}}var g=CKEDITOR.document.getWindow(),b=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=
847CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),g=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')"  {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),
848b=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),e=/'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var e=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&
849(e["aria-multiselectable"]=!0);!e.role&&(e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";
vendor: 6,250 bytes, lines 849-861
849e[CKEDITOR.SHIFT+9]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);
850delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,h){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=d;var k;k=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:d,val:k,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),
851title:CKEDITOR.tools.htmlEncodeAttr(h||a),text:b||a};this._.pendingList.push(g.output(a))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(b.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&
852a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,e=this.element.getDocument(),d;for(d in a)e.getById(a[d]).setStyle("display","");for(var g in b)a=e.getById(b[g]),d=a.getNext(),a.setStyle("display",""),d&&"ul"==d.getName()&&d.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();
853a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var e=b.getById(a);e.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(e)},
854unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),e;for(e in a){var d=a[e];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),e,d=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++d);){if(a.equals(e)){this._.focusIndex=
855d;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var a='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+
856(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?
857'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),g=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=
858CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{},listeners:[]}},proto:{renderHtml:function(a){var e=[];this.render(a,e);return e.join("")},
859render:function(a,e){function c(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var m=CKEDITOR.env,h="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(c){w&&(a.unlockSelection(1),w=0);l.execute(c)},this),k=this,l={id:h,combo:this,focus:function(){CKEDITOR.document.getById(h).getChild(1).focus()},
860execute:function(c){var d=k._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(k.createPanel(a),d.on)d.panel.hide();else{k.commit();var f=k.getValue();f?d.list.mark(f):d.list.unmarkAll();d.panel.showBlock(k.id,new CKEDITOR.dom.element(c),4)}},clickFn:d};this._.listeners.push(a.on("activeFilterChange",c,this));this._.listeners.push(a.on("mode",c,this));this._.listeners.push(a.on("selectionChange",c,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",c,this));var f=CKEDITOR.tools.addFunction(function(a,
861b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(d,b);break;default:l.onkey(l,c)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()}),w=0;l.keyDownFn=f;
861m={id:h,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:f,focusFn:n,clickFn:d};g.output(m,e);if(this.onRender)this.onRender();return l},createPanel:function(a){if(!this._.panel){var e=
862this._.panelDefinition,c=this._.panelDefinition.block,g=e.parent||CKEDITOR.document.getBody(),h="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(a,g,e),e=d.addListBlock(this.id,c),k=this;d.onShow=function(){this.element.addClass(h);k.setState(CKEDITOR.TRISTATE_ON);k._.on=1;k.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(k.onOpen)k.onOpen()};d.onHide=function(c){this.element.removeClass(h);k.setState(k.modes&&k.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);k._.on=0;
863if(!c&&k.onClose)k.onClose()};d.onEscape=function(){d.hide(1)};e.onClick=function(a,b){k.onClick&&k.onClick.call(k,a,b);d.hide()};this._.panel=d;this._.list=e;d.getBlock(this.id).onHide=function(){k._.on=0;k.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var c=this.document.getById("cke_"+this.id+"_text");c&&(a||e?c.removeClass("cke_combo_inlinelabel"):(e=this.label,c.addClass("cke_combo_inlinelabel")),c.setText("undefined"!=typeof e?e:a))},getValue:function(){return this._.value||
864""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,e,c){this._.items[a]=c||a;this._.list.add(a,e,c)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=
865a){var e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",!0):e.removeAttribute("aria-disabled");this._.state=a}},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))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,
866function(a){a.removeListener()});this._.listeners=[]}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,e){this.add(a,CKEDITOR.UI_RICHCOMBO,e)}}(),function(){function a(a,e,c,m,h,d,k,l){var f=a.config,n=new CKEDITOR.style(k),w=h.split(";");h=[];for(var v={},t=0;t<w.length;t++){var p=w[t];if(p){var p=p.split("/"),u={},x=w[t]=p[0];u[c]=h[t]=p[1]||x;v[x]=new CKEDITOR.style(k,u);v[x]._.definition.name=x}else w.splice(t--,1)}a.ui.addRichCombo(e,
867{label:m.label,title:m.panelTitle,toolbar:"styles,"+l,defaultValue:"cke-default",allowedContent:n,requiredContent:n,contentTransformations:"span"===k.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=
868a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!1,attributes:{"aria-label":m.panelTitle}},init:function(){var c;c="("+a.lang.common.optionDefault+")";this.startGroup(m.panelTitle);this.add(this.defaultValue,c,c);for(var d=0;d<w.length;d++)c=w[d],this.add(c,v[c].buildPreview(),c)},onClick:function(c){a.focus();a.fire("saveSnapshot");
869var d=this.getValue(),f=v[c],e,h,l,k,m;if(d&&c!=d)if(e=v[d],d=a.getSelection().getRanges()[0],d.collapsed){if(h=a.elementPath(),l=h.contains(function(a){return e.checkElementRemovable(a)})){k=d.checkBoundaryOfElement(l,CKEDITOR.START);m=d.checkBoundaryOfElement(l,CKEDITOR.END);if(k&&m){for(k=d.createBookmark();h=l.getFirst();)h.insertBefore(l);l.remove();d.moveToBookmark(k)}else k||m?d.moveToPosition(l,k?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(d.splitElement(l),d.moveToPosition(l,
870CKEDITOR.POSITION_AFTER_END)),g(d,h.elements.slice(),l);
vendor: 12,413 bytes, lines 870-893
870a.getSelection().selectRanges([d])}}else a.removeStyle(e);c===this.defaultValue?e&&a.removeStyle(e):a.applyStyle(f);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var f=this.getValue();c=c.data.path.elements;for(var e=0,g;e<c.length;e++){g=c[e];for(var h in v)if(v[h].checkElementMatch(g,!0,a)){h!=f&&this.setValue(h);return}}this.setValue("",d)},this)},refresh:function(){a.activeFilter.check(n)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}
871function g(a,e,c){var m=e.pop();if(m){if(c)return g(a,e,m.equals(c)?null:c);c=m.clone();a.insertNode(c);a.moveToPosition(c,CKEDITOR.POSITION_AFTER_START);g(a,e)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(b){var e=b.config;a(b,"Font","family",b.lang.font,e.font_names,e.font_defaultLabel,e.font_style,30);a(b,"FontSize","size",b.lang.font.fontSize,e.fontSize_sizes,e.fontSize_defaultLabel,e.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",
872CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("format",
873{requires:"richcombo",init:function(a){if(!a.blockless){for(var g=a.config,b=a.lang.format,e=g.format_tags.split(";"),c={},m=0,h=[],d=0;d<e.length;d++){var k=e[d],l=new CKEDITOR.style(g["format_"+k]);if(!a.filter.customConfig||a.filter.check(l))m++,c[k]=l,c[k]._.enterMode=a.config.enterMode,h.push(l)}0!==m&&a.ui.addRichCombo("Format",{label:b.label,title:b.panelTitle,toolbar:"styles,20",allowedContent:h,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(g.contentsCss),multiSelect:!1,attributes:{"aria-label":b.panelTitle}},
874init:function(){this.startGroup(b.panelTitle);for(var a in c){var d=b["tag_"+a];this.add(a,c[a].buildPreview(d),d)}},onClick:function(b){a.focus();a.fire("saveSnapshot");b=c[b];var d=a.elementPath();b.checkActive(d,a)||a.applyStyle(b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var d=this.getValue();b=b.data.path;this.refresh();for(var e in c)if(c[e].checkActive(b,a)){e!=d&&this.setValue(e,a.lang.format["tag_"+e]);return}this.setValue("")},
875this)},onOpen:function(){this.showAll();for(var b in c)a.activeFilter.check(c[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var d in c)if(a.activeFilter.check(c[d]))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"},
876CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+
877");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}")},init:function(a){var g=a.lang,b=0,e={email:1,password:1,search:1,tel:1,text:1,url:1},c={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]",
878form:"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}"},m={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},h=function(d,f,e){var h={allowedContent:c[f],requiredContent:m[f]};"form"==f&&(h.context="form");a.addCommand(f,new CKEDITOR.dialogCommand(f,h));a.ui.addButton&&a.ui.addButton(d,
879{label:g.common[d.charAt(0).toLowerCase()+d.slice(1)],command:f,toolbar:"forms,"+(b+=10)});CKEDITOR.dialog.add(f,e)},d=this.path+"dialogs/";!a.blockless&&h("Form","form",d+"form.js");h("Checkbox","checkbox",d+"checkbox.js");h("Radio","radio",d+"radio.js");h("TextField","textfield",d+"textfield.js");h("Textarea","textarea",d+"textarea.js");h("Select","select",d+"select.js");h("Button","button",d+"button.js");var k=a.plugins.image;k&&!a.plugins.image2&&h("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+
880"dialogs/image.js");h("HiddenField","hiddenfield",d+"hiddenfield.js");a.addMenuItems&&(h={checkbox:{label:g.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:g.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:g.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:g.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:g.forms.button.title,command:"button",group:"button"},select:{label:g.forms.select.title,
881command:"select",group:"select"},textarea:{label:g.forms.textarea.title,command:"textarea",group:"textarea"}},k&&(h.imagebutton={label:g.image.titleButton,command:"imagebutton",group:"imagebutton"}),!a.blockless&&(h.form={label:g.forms.form.menu,command:"form",group:"form"}),a.addMenuItems(h));a.contextMenu&&(!a.blockless&&a.contextMenu.addListener(function(a,b,c){if((a=c.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),a.contextMenu.addListener(function(a){if(a&&!a.isReadOnly()){var b=
882a.getName();if("select"==b)return{select:CKEDITOR.TRISTATE_OFF};if("textarea"==b)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==b){var c=a.getAttribute("type")||"text";switch(c){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 k?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(e[c])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==b&&"hiddenfield"==
883a.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}}));a.on("doubleclick",function(b){var c=b.data.element;if(!a.blockless&&c.is("form"))b.data.dialog="form";else if(c.is("select"))b.data.dialog="select";else if(c.is("textarea"))b.data.dialog="textarea";else if(c.is("img")&&"hiddenfield"==c.data("cke-real-element-type"))b.data.dialog="hiddenfield";else if(c.is("input")){c=c.getAttribute("type")||"text";switch(c){case "button":case "submit":case "reset":b.data.dialog="button";
884break;case "checkbox":b.data.dialog="checkbox";break;case "radio":b.data.dialog="radio";break;case "image":b.data.dialog="imagebutton"}e[c]&&(b.data.dialog="textfield")}})},afterInit:function(a){var g=a.dataProcessor,b=g&&g.htmlFilter,g=g&&g.dataFilter;CKEDITOR.env.ie&&b&&b.addRules({elements:{input:function(a){a=a.attributes;var b=a.type;b||(a.type="text");"checkbox"!=b&&"radio"!=b||"on"!=a.value||delete a.value}}},{applyToAll:!0});g&&g.addRules({elements:{input:function(b){if("hidden"==b.attributes.type)return a.createFakeParserElement(b,
885"cke_hidden","hiddenfield")}}},{applyToAll:!0})}}),CKEDITOR.plugins.forms={_setupRequiredAttribute:function(a){this.setValue(a.hasAttribute("required"))}},function(){var a={canUndo:!1,exec:function(a){var b=a.document.createElement("hr");a.insertElement(b)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(g){g.blockless||(g.addCommand("horizontalrule",a),g.ui.addButton&&g.ui.addButton("HorizontalRule",{label:g.lang.horizontalrule.toolbar,command:"horizontalrule",
886toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(a){var g=new CKEDITOR.htmlWriter;g.forceSimpleAmpersand=a.config.forceSimpleAmpersand;g.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=g}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=
8870;this._.rules={};var a=CKEDITOR.dtd,g;for(g in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(g,{indent:!a[g]["#"],breakBeforeOpen:1,breakBeforeClose:!a[g]["#"],breakAfterClose:1,needsSpace:g in a.$block&&!(g 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(a){var g=
888this._.rules[a];this._.afterCloser&&g&&g.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():g&&g.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",a);this._.afterCloser=0},openTagClose:function(a,g){var b=this._.rules[a];g?(this._.output.push(this.selfClosingEnd),b&&b.breakAfterClose&&(this._.needsSpace=b.needsSpace)):(this._.output.push("\x3e"),b&&b.indent&&(this._.indentation+=this.indentationChars));b&&b.breakAfterOpen&&this.lineBreak();
889"pre"==a&&(this._.inPre=1)},attribute:function(a,g){"string"==typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g),this.forceSimpleAmpersand&&(g=g.replace(/&amp;/g,"\x26")));this._.output.push(" ",a,'\x3d"',g,'"')},closeTag:function(a){var g=this._.rules[a];g&&g.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():g&&g.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",a,"\x3e");"pre"==a&&(this._.inPre=0);g&&
890g.breakAfterClose&&(this.lineBreak(),this._.needsSpace=g.needsSpace);this._.afterCloser=1},text:function(a){this._.indent&&(this.indentation(),!this._.inPre&&(a=CKEDITOR.tools.ltrim(a)));this._.output.push(a)},comment:function(a){this._.indent&&this.indentation();this._.output.push("\x3c!--",a,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);
891this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(a,g){var b=this._.rules[a];b?CKEDITOR.tools.extend(b,g,!0):this._.rules[a]=g}}}),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;}")},
892init:function(a){var g=a.lang.iframe,b="iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]";a.plugins.dialogadvtab&&(b+=";iframe"+a.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1}));CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");a.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:b,requiredContent:"iframe"}));a.ui.addButton&&a.ui.addButton("Iframe",{label:g.toolbar,command:"iframe",toolbar:"insert,80"});a.on("doubleclick",function(a){var b=
893a.data.element;b.is("img")&&"iframe"==b.data("cke-real-element-type")&&(a.data.dialog="iframe")});a.addMenuItems&&a.addMenuItems({iframe:{label:g.title,command:"iframe",group:"image"}});
vendor: 6,271 bytes, lines 893-905
893a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&"iframe"==a.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(a){var g=a.dataProcessor;(g=g&&g.dataFilter)&&g.addRules({elements:{iframe:function(b){return a.createFakeParserElement(b,"cke_iframe","iframe",
894!0)}}})}})}(),function(){function a(a,e){e||(e=a.getSelection().getSelectedElement());if(e&&e.is("img")&&!e.data("cke-realelement")&&!e.isReadOnly())return e}function g(a){var e=a.getStyle("float");if("inherit"==e||"none"==e)e=0;e||(e=a.getAttribute("align"));return e}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(b){if(!b.plugins.detectConflict("image",["easyimage","image2"])){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var e="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";
895CKEDITOR.dialog.isTabEnabled(b,"image","advanced")&&(e="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");b.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:e,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));b.ui.addButton&&b.ui.addButton("Image",{label:b.lang.common.image,command:"image",toolbar:"insert,10"});b.on("doubleclick",function(a){var b=
896a.data.element;!b.is("img")||b.data("cke-realelement")||b.isReadOnly()||(a.data.dialog="image")});b.addMenuItems&&b.addMenuItems({image:{label:b.lang.image.menu,command:"image",group:"image"}});b.contextMenu&&b.contextMenu.addListener(function(c){if(a(b,c))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(b){function e(c){var e=b.getCommand("justify"+c);if(e){if("left"==c||"right"==c)e.on("exec",function(e){var d=a(b),k;d&&(k=g(d),k==c?(d.removeStyle("float"),c==g(d)&&d.removeAttribute("align")):
897d.setStyle("float",c),e.cancel())});e.on("refresh",function(e){var d=a(b);d&&(d=g(d),this.setState(d==c?CKEDITOR.TRISTATE_ON:"right"==c||"left"==c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),e.cancel())})}}b.plugins.image2||(e("left"),e("right"),e("center"),e("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function a(a,c){var m,h;c.on("refresh",function(a){var c=[g],e;for(e in a.data.states)c.push(a.data.states[e]);this.setState(CKEDITOR.tools.search(c,b)?b:g)},c,null,
898100);c.on("exec",function(b){m=a.getSelection();h=m.createBookmarks(1);b.data||(b.data={});b.data.done=!1},c,null,0);c.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(h)},c,null,100)}var g=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var c=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new c(!0)));a(b,b.addCommand("outdent",new c));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent,command:"indent",
899directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",function(a){var c=b.createRange(),d=a.data.node;c.setStartBefore(d);c.setEndAfter(d);for(var g=new CKEDITOR.dom.walker(c),l;l=g.next();)if(l.type==CKEDITOR.NODE_ELEMENT)if(!l.equals(d)&&l.getDirection())c.setStartAfter(l),g=new CKEDITOR.dom.walker(c);else{var f=b.config.indentClasses;if(f)for(var n="ltr"==a.data.dir?["_rtl",""]:["","_rtl"],
900w=0;w<f.length;w++)l.hasClass(f[w]+n[0])&&(l.removeClass(f[w]+n[0]),l.addClass(f[w]+n[1]));f=l.getStyle("margin-right");n=l.getStyle("margin-left");f?l.setStyle("margin-left",f):l.removeStyle("margin-left");n?l.setStyle("margin-right",n):l.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,g){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;
901this.isIndent=!!g;this.relatedGlobal=g?"indent":"outdent";this.indentKey=g?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),e;for(e in b.jobs)c.on("exec",function(c){c.data.done||(a.fire("lockSnapshot"),b.execJob(a,e)&&(c.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,e),c.on("refresh",function(c){c.data.states||(c.data.states={});
902c.data.states[b.name+"@"+e]=b.refreshJob(a,e,c.data.path)},this,null,e);a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var m=this.jobs[b];if(m.state!=g)return m.exec.call(this,a)},refreshJob:function(a,b,m){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,m):b.state=g;return b.state},getContext:function(a){return a.contains(this.context)}}}(),
903function(){function a(a){function c(g){for(var k=m.startContainer,q=m.endContainer;k&&!k.getParent().equals(g);)k=k.getParent();for(;q&&!q.getParent().equals(g);)q=q.getParent();if(!k||!q)return!1;for(var y=[],r=!1;!r;)k.equals(q)&&(r=!0),y.push(k),k=k.getNext();if(1>y.length)return!1;k=g.getParents(!0);for(q=0;q<k.length;q++)if(k[q].getName&&h[k[q].getName()]){g=k[q];break}for(var k=e.isIndent?1:-1,q=y[0],y=y[y.length-1],r=CKEDITOR.plugins.list.listToArray(g,f),z=r[y.getCustomData("listarray_index")].indent,
904q=q.getCustomData("listarray_index");q<=y.getCustomData("listarray_index");q++)if(r[q].indent+=k,0<k){for(var A=r[q].parent,B=q-1;0<=B;B--)if(r[B].indent===k){A=r[B].parent;break}r[q].parent=new CKEDITOR.dom.element(A.getName(),A.getDocument())}for(q=y.getCustomData("listarray_index")+1;q<r.length&&r[q].indent>z;q++)r[q].indent+=k;k=CKEDITOR.plugins.list.arrayToList(r,f,null,a.config.enterMode,g.getDirection());if(!e.isIndent){var p;if((p=g.getParent())&&p.is("li"))for(var y=k.listNode.getChildren(),
905v=[],t,q=y.count()-1;0<=q;q--)(t=y.getItem(q))&&t.is&&t.is("li")&&v.push(t)}k&&k.listNode.replace(g);if(v&&v.length)for(q=0;q<v.length;q++){for(t=g=v[q];(t=t.getNext())&&t.is&&t.getName()in h;)CKEDITOR.env.needsNbspFiller&&!g.getFirst(b)&&g.append(m.document.createText("\u
vendor: 8,886 bytes, lines 905-922
90500a0")),g.append(t);g.insertAfter(p)}k&&a.fire("contentDomInvalidated");return!0}for(var e=this,f=this.database,h=this.context,m,v=a.getSelection(),v=(v&&v.getRanges()).createIterator();m=v.getNextRange();){for(var t=m.getCommonAncestor();t&&
906(t.type!=CKEDITOR.NODE_ELEMENT||!h[t.getName()]);){if(a.editable().equals(t)){t=!1;break}t=t.getParent()}t||(t=m.startPath().contains(h))&&m.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);if(!t){var p=m.getEnclosedNode();p&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()in h&&(m.setStartAt(p,CKEDITOR.POSITION_AFTER_START),m.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),t=p)}t&&m.startContainer.type==CKEDITOR.NODE_ELEMENT&&m.startContainer.getName()in h&&(p=new CKEDITOR.dom.walker(m),p.evaluator=g,m.startContainer=
907p.next());t&&m.endContainer.type==CKEDITOR.NODE_ELEMENT&&m.endContainer.getName()in h&&(p=new CKEDITOR.dom.walker(m),p.evaluator=g,m.endContainer=p.previous());if(t)return c(t)}return 0}function g(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function b(a){return e(a)&&c(a)}var e=CKEDITOR.dom.walker.whitespaces(!0),c=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,h=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(b){e.specificDefinition.apply(this,
908arguments);this.requiredContent=["ul","ol"];b.on("key",function(a){var c=b.elementPath();if("wysiwyg"==b.mode&&a.data.keyCode==this.indentKey&&c){var d=this.getContext(c);!d||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d)||(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?h:m}:function(a,
909b){return!this.getContext(b)||this.isIndent?m:h},exec:CKEDITOR.tools.bind(a,this)}}var e=CKEDITOR.plugins.indent;e.registerCommands(b,{indentlist:new c(b,"indentlist",!0),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,e.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var f=b.contains(g);c||(c=b.contains(a));return c&&f&&f.equals(c.getFirst(g))}}(),function(){function a(a,b,c){if(!a.getCustomData("indent_processed")){var e=
910this.editor,f=this.isIndent;if(b){e=a.$.className.match(this.classNameRegex);c=0;e&&(e=e[1],c=CKEDITOR.tools.indexOf(b,e)+1);if(0>(c+=f?1:-1))return;c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<c&&a.addClass(b[c-1])}else{b=g(a,c);c=parseInt(a.getStyle(b),10);var m=e.config.indentOffset||40;isNaN(c)&&(c=0);c+=(f?1:-1)*m;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/m)*m;a.setStyle(b,c?c+(e.config.indentUnit||"px"):"");""===
911a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function g(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var b=CKEDITOR.dtd.$listItem,e=CKEDITOR.dtd.$list,c=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(h){function d(){k.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,
912styles:l?null:"margin-left,margin-right",classes:l||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(l?
913"("+l.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,d){var e=d.block||d.blockLimit;if(!e.is(b))var h=e.getAscendant(b),e=h&&d.contains(h)||e;e.is(b)&&(e=e.getParent());if(this.enterBr||this.getContext(d)){if(l){var h=l,e=e.$.className.match(this.classNameRegex),k=this.isIndent,h=e?k?e[1]!=h.slice(-1):!0:k;return h?m:c}return this.isIndent?m:e?CKEDITOR[0>=(parseInt(e.getStyle(g(e)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:c}return c},exec:function(b){var c=b.getSelection(),c=
914c&&c.getRanges()[0],d;if(d=b.elementPath().contains(e))a.call(this,d,l);else for(c=c.createIterator(),b=b.config.enterMode,c.enforceRealBlocks=!0,c.enlargeBr=b!=CKEDITOR.ENTER_BR;d=c.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)d.isReadOnly()||a.call(this,d,l);return!0}}}}var k=CKEDITOR.plugins.indent,l=h.config.indentClasses;k.registerCommands(h,{indentblock:new d(h,"indentblock",!0),outdentblock:new d(h,"outdentblock")});CKEDITOR.tools.extend(d.prototype,k.specificDefinition.prototype,{context:{div:1,
915dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:l?new RegExp("(?:^|\\s+)("+l.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function a(a,b){b=void 0===b||b;var g;if(b)g=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){g=a.getParent();if(!g)break;a=g}g=a.getStyle("text-align")||a.getAttribute("align")||""}g&&(g=g.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!g&&b&&(g="rtl"==a.getComputedStyle("direction")?
916"right":"left");return g}function g(a,b,g){this.editor=a;this.name=b;this.value=g;this.context="p";b=a.config.justifyClasses;var h=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(g){case "left":this.cssClassName=b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=
917h+"{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}};a.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function b(a){var b=a.editor,g=b.createRange();g.setStartBefore(a.data.node);g.setEndAfter(a.data.node);for(var h=new CKEDITOR.dom.walker(g),d;d=h.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(a.data.node)&&d.getDirection())g.setStartAfter(d),h=
918new CKEDITOR.dom.walker(g);else{var k=b.config.justifyClasses;k&&(d.hasClass(k[0])?(d.removeClass(k[0]),d.addClass(k[2])):d.hasClass(k[2])&&(d.removeClass(k[2]),d.addClass(k[0])));k=d.getStyle("text-align");"left"==k?d.setStyle("text-align","right"):"right"==k&&d.setStyle("text-align","left")}}g.prototype={exec:function(b){var c=b.getSelection(),g=b.config.enterMode;if(c){for(var h=c.createBookmarks(),d=c.getRanges(),k=this.cssClassName,l,f,n=b.config.useComputedState,n=void 0===n||n,w=d.length-1;0<=
919w;w--)for(l=d[w].createIterator(),l.enlargeBr=g!=CKEDITOR.ENTER_BR;f=l.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){var v=f.getName(),t;t=b.activeFilter.check(v+"{text-align}");if((v=b.activeFilter.check(v+"("+k+")"))||t){f.removeAttribute("align");f.removeStyle("text-align");var p=k&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),u=this.state==CKEDITOR.TRISTATE_OFF&&(!n||a(f,!0)!=this.value);k&&v?u?f.addClass(k):p||f.removeAttribute("class"):
920u&&t&&f.setStyle("text-align",this.value)}}b.focus();b.forceNextSelectionCheck();c.selectBookmarks(h)}},refresh:function(b,c){var g=c.block||c.blockLimit,h=g.getName(),d=g.equals(b.editable()),h=this.cssClassName?b.activeFilter.check(h+"("+this.cssClassName+")"):b.activeFilter.check(h+"{text-align}");d&&!CKEDITOR.dtd.$list[c.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!d&&h?this.setState(a(g,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):
921this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var c=new g(a,"justifyleft","left"),m=new g(a,"justifycenter","center"),h=new g(a,"justifyright","right"),d=new g(a,"justifyblock","justify");a.addCommand("justifyleft",c);a.addCommand("justifycenter",m);a.addCommand("justifyright",h);a.addCommand("justifyblock",d);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",
922{label:a.lang.common.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",{label:a.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{label:a.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",b)}}})}(),"use strict",function(){function a(a){return a.replace(/'/g,"\\$\x26")}function g(a){for(var b,c=a.length,d=[],f=0;f<c;
vendor: 22,713 bytes, lines 922-966
922f++)b=a.charCodeAt(f),d.push(b);return"String.fromCharCode("+d.join(",")+
923")"}function b(b,c){var d=b.plugins.link,f=d.compiledProtectionFunction.params,e,g;g=[d.compiledProtectionFunction.name,"("];for(var h=0;h<f.length;h++)d=f[h].toLowerCase(),e=c[d],0<h&&g.push(","),g.push("'",e?a(encodeURIComponent(c[d])):"","'");g.push(")");return g.join("")}function e(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,c,d){b.name=c;b.params=[];d.replace(/[^,\s]+/g,function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",
924{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return c.replace(/%1/g,"rtl"==b?"right":"left").replace(/%2/g,"cke_contents_"+b)}var b="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",c=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";
925CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(a){var b="a[!href]";CKEDITOR.dialog.isTabEnabled(a,"link","advanced")&&(b=b.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(b=b.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:b,requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));
926a.addCommand("unlink",new CKEDITOR.unlinkCommand);a.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,"link");a.setKeystroke(CKEDITOR.CTRL+75,"link");a.ui.addButton&&(a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"}),a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"}),a.ui.addButton("Anchor",{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",
927this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");a.on("doubleclick",function(b){var c=b.data.element.getAscendant({a:1,img:1},!0);c&&!c.isReadOnly()&&(c.is("a")?(b.data.dialog=!c.getAttribute("name")||c.getAttribute("href")&&c.getChildCount()?"link":"anchor",b.data.link=c):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c)&&(b.data.dialog="anchor"))},null,null,0);a.on("doubleclick",function(b){b.data.dialog in{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},
928null,null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&
929!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var c={};b.getAttribute("href")&&b.getChildCount()&&(c={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});b&&b.hasAttribute("name")&&(c.anchor=c.removeAnchor=CKEDITOR.TRISTATE_OFF);return c});this.compiledProtectionFunction=e(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&
930a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var c=/^javascript:/,m=/^mailto:([^?]+)(?:\?(.+))?$/,h=/subject=([^;?:@&=$,\/]*)/i,d=/body=([^;?:@&=$,\/]*)/i,k=/^#(.*)$/,l=/^((?:http|https|ftp|news):\/\/)?(.*)$/,f=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,w=/^javascript:([^(]+)\(([^)]+)\)$/,
931v=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,t=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,p=/^tel:(.*)$/,u={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(a,b){var c=a.getSelection(),d=c.getSelectedElement(),f=c.getRanges(),
932e=[],g;if(!b&&d&&d.is("a"))return d;for(d=0;d<f.length;d++)if(g=c.getRanges()[d],g.shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(g=a.elementPath(g.getCommonAncestor()).contains("a",1))&&b)e.push(g);else if(g)return g;return b?e:null},getEditorAnchors:function(a){for(var b=a.editable(),c=b.isInline()&&!a.plugins.divarea?a.document:b,b=c.getElementsByTag("a"),c=c.getElementsByTag("img"),d=[],f=0,e;e=b.getItem(f++);)(e.data("cke-saved-name")||e.hasAttribute("name"))&&d.push({name:e.data("cke-saved-name")||
933e.getAttribute("name"),id:e.getAttribute("id")});for(f=0;e=c.getItem(f++);)(e=this.tryRestoreFakeAnchor(a,e))&&d.push({name:e.getAttribute("name"),id:e.getAttribute("id")});return d},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,b){if(b&&b.data("cke-real-element-type")&&"anchor"==b.data("cke-real-element-type")){var c=a.restoreRealElement(b);if(c.data("cke-saved-name"))return c}},parseLinkAttributes:function(a,b){var e=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",g=a.plugins.link.compiledProtectionFunction,
934z=a.config.emailProtection,A,B={};e.match(c)&&("encode"==z?e=e.replace(n,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):z&&e.replace(w,function(a,b,c){if(b==g.name){B.type="email";a=B.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,f,e,h=0;h<d;h++)f=decodeURIComponent,e=c[h].replace(b,"").replace(/\\'/g,"'"),e=f(e),f=g.params[h].toLowerCase(),a[f]=e;a.address=[a.name,a.domain].join("@")}}));if(!B.type)if(z=e.match(k))B.type=
935"anchor",B.anchor={},B.anchor.name=B.anchor.id=z[1];else if(z=e.match(p))B.type="tel",B.tel=z[1];else if(z=e.match(m)){A=e.match(h);e=e.match(d);B.type="email";var C=B.email={};C.address=z[1];A&&(C.subject=decodeURIComponent(A[1]));e&&(C.body=decodeURIComponent(e[1]))}else e&&(A=e.match(l))&&(B.type="url",B.url={},B.url.protocol=A[1],B.url.url=A[2]);if(b){if(e=b.getAttribute("target"))B.target={type:e.match(f)?e:"frame",name:e};else if(e=(e=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&e.match(v))for(B.target=
936{type:"popup",name:e[1]};z=t.exec(e[2]);)"yes"!=z[2]&&"1"!=z[2]||z[1]in{height:1,width:1,top:1,left:1}?isFinite(z[2])&&(B.target[z[1]]=z[2]):B.target[z[1]]=!0;null!==b.getAttribute("download")&&(B.download=!0);var e={},G;for(G in u)(z=b.getAttribute(G))&&(e[u[G]]=z);if(G=b.data("cke-saved-name")||e.advName)e.advName=G;CKEDITOR.tools.isEmpty(e)||(B.advanced=e)}return B},getLinkAttributes:function(c,d){var f=c.config.emailProtection||"",e={};switch(d.type){case "url":var f=d.url&&void 0!==d.url.protocol?
937d.url.protocol:"http://",h=d.url&&CKEDITOR.tools.trim(d.url.url)||"";e["data-cke-saved-href"]=0===h.indexOf("/")?h:f+h;break;case "anchor":f=d.anchor&&d.anchor.id;e["data-cke-saved-href"]="#"+(d.anchor&&d.anchor.name||f||"");break;case "email":var k=d.email,h=k.address;switch(f){case "":case "encode":var l=encodeURIComponent(k.subject||""),m=encodeURIComponent(k.body||""),k=[];l&&k.push("subject\x3d"+l);m&&k.push("body\x3d"+m);k=k.length?"?"+k.join("\x26"):"";"encode"==f?(f=["javascript:void(location.href\x3d'mailto:'+",
938g(h)],k&&f.push("+'",a(k),"'"),f.push(")")):f=["mailto:",h,k];break;default:f=h.split("@",2),k.name=f[0],k.domain=f[1],f=["javascript:",b(c,k)]}e["data-cke-saved-href"]=f.join("");break;case "tel":e["data-cke-saved-href"]="tel:"+d.tel}if(d.target)if("popup"==d.target.type){for(var f=["window.open(this.href, '",d.target.name||"","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),h=n.length,l=function(a){d.target[a]&&n.push(a+"\x3d"+d.target[a])},k=0;k<
939h;k++)n[k]+=d.target[n[k]]?"\x3dyes":"\x3dno";l("width");l("left");l("height");l("top");f.push(n.join(","),"'); return false;");e["data-cke-pa-onclick"]=f.join("")}else"notSet"!=d.target.type&&d.target.name&&(e.target=d.target.name);d.download&&(e.download="");if(d.advanced){for(var p in u)(f=d.advanced[u[p]])&&(e[p]=f);e.name&&(e["data-cke-saved-name"]=e.name)}e["data-cke-saved-href"]&&(e.href=e["data-cke-saved-href"]);p={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};
940d.advanced&&CKEDITOR.tools.extend(p,u);for(var w in e)delete p[w];return{set:e,removed:CKEDITOR.tools.objectKeys(p)}},showDisplayTextForElement:function(a,b){var c={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},d=b.getSelection();return b.widgets&&b.widgets.focused||d&&1<d.getRanges().length?!1:!a||!a.getName||!a.is(c)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var b=a.getSelection().getRanges()[0],c=b.getPreviousEditableNode()&&
941b.getPreviousEditableNode().getAscendant("a",!0)||b.getNextEditableNode()&&b.getNextEditableNode().getAscendant("a",!0),d;b.collapsed&&c&&(d=b.createBookmark(),b.selectNodeContents(c),b.select())}c=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(c);d&&(b.moveToBookmark(d),b.select())},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant("a",!0);c&&"a"==c.getName()&&c.getAttribute("href")&&c.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):
942this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]",editorFocus:1};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(a){var b=a.getSelection(),c=b.createBookmarks(),d;if(b&&(d=b.getSelectedElement())&&(d.getChildCount()?d.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))d.hasAttribute("href")?(d.removeAttributes({name:1,"data-cke-saved-name":1}),
943d.removeClass("cke_anchor")):d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0})}(),function(){function a(a,b,c,d){for(var f=CKEDITOR.plugins.list.listToArray(b.root,c),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,l,g=0;g<
944e.length;g++){var m=e[g].getCustomData("listarray_index");k=f[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),f[m].parent=l)}c=CKEDITOR.plugins.list.arrayToList(f,c,null,a.config.enterMode);for(var n,f=c.listNode.getChildCount(),g=0;g<f&&(n=c.listNode.getChild(g));g++)n.getName()==this.type&&d.push(n);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function g(a,b,c){var d=b.contents,f=b.root.getDocument(),e=
945[];if(1==d.length&&d[0].equals(b.root)){var g=f.createElement("div");d[0].moveChildren&&d[0].moveChildren(g);d[0].append(g);d[0]=g}b=b.contents[0].getParent();for(g=0;g<d.length;g++)b=b.getCommonAncestor(d[g].getParent());a=a.config.useComputedState;var h,k;a=void 0===a||a;for(g=0;g<d.length;g++)for(var l=d[g],m;m=l.getParent();){if(m.equals(b)){e.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>e.length)){d=e[e.length-1].getNext();g=f.createElement(this.type);
946for(c.push(g);e.length;)c=e.shift(),a=f.createElement("li"),l=c,l.is("pre")||t.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function b(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||
947m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var f=CKEDITOR.plugins.list.listToArray(b.root,c),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<e.length;g++)h=e[g].getCustomData("listarray_index"),f[h].indent=-1;for(g=h+1;g<f.length;g++)if(f[g].indent>f[g-1].indent+1){e=f[g-1].indent+
9481-f[g].indent;for(h=f[g].indent;f[g]&&f[g].indent>=h;)f[g].indent+=e,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(f,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function e(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function c(a,b,c,d){for(var f,e;f=a[d?"getLast":"getFirst"](p);)(e=f.getDirection(1))!==b.getDirection(1)&&f.setAttribute("dir",e),f.remove(),c?f[d?"insertBefore":
949"insertAfter"](c):b.append(f,d),c=f}function m(a){function b(d){var f=a[d?"getPrevious":"getNext"](w);f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(a.getName())&&(c(a,f,null,!d),a.remove(),a=f)}b();b(1)}function h(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function d(a,b,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=d.extractContents();b.trim(!1,!0);var e=b.createBookmark(),
950g=new CKEDITOR.dom.elementPath(b.startContainer),h=g.block,g=g.lastElement.getAscendant("li",1)||h,l=new CKEDITOR.dom.elementPath(d.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);h?(h=h.getBogus())&&h.remove():l&&(h=l.getPrevious(w))&&v(h)&&h.remove();(h=f.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("br")&&h.remove();(h=b.startContainer.getChild(b.startOffset))?f.insertBefore(h):b.startContainer.append(f);n&&(f=k(n))&&(g.contains(n)?(c(f,n.getParent(),n),
951f.remove()):g.append(f));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){l=d.startPath();f=l.block;if(!f)break;f.is("li")&&(g=f.getParent(),f.equals(g.getLast(w))&&f.equals(g.getFirst(w))&&(f=g));d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=a.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return w(a)&&!v(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&m(d);b.moveToBookmark(e);
952b.select();a.fire("saveSnapshot")}function k(a){return(a=a.getLast(w))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in l?a:null}var l={ol:1,ul:1},f=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),w=function(a){return!(f(a)||n(a))},v=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,f){if(!l[a.getName()])return[];d||(d=0);c||(c=[]);for(var e=0,g=a.getChildCount();e<g;e++){var h=a.getChild(e);h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in CKEDITOR.dtd.$list&&
953CKEDITOR.plugins.list.listToArray(h,b,c,d+1);if("li"==h.$.nodeName.toLowerCase()){var k={parent:a,indent:d,element:h,contents:[]};f?k.grandparent=f:(k.grandparent=a.getParent(),k.grandparent&&"li"==k.grandparent.$.nodeName.toLowerCase()&&(k.grandparent=k.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,h,"listarray_index",c.length);c.push(k);for(var m=0,n=h.getChildCount(),p;m<n;m++)p=h.getChild(m),p.type==CKEDITOR.NODE_ELEMENT&&l[p.getName()]?CKEDITOR.plugins.list.listToArray(p,b,c,
954d+1,k.grandparent):k.contents.push(p)}}return c},arrayToList:function(a,b,c,d,f){c||(c=0);if(!a||a.length<c+1)return null;for(var e,g=a[c].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(g),k=null,m=c,p=Math.max(a[c].indent,0),v=null,t,I,L=d==CKEDITOR.ENTER_P?"p":"div";;){var E=a[m];e=E.grandparent;t=E.element.getDirection(1);if(E.indent==p){k&&a[m].parent.getName()==k.getName()||(k=a[m].parent.clone(!1,1),f&&k.setAttribute("dir",f),h.append(k));v=k.append(E.element.clone(0,1));t!=k.getDirection(1)&&
955v.setAttribute("dir",t);for(e=0;e<E.contents.length;e++)v.append(E.contents[e].clone(1,1));m++}else if(E.indent==Math.max(p,0)+1)E=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,d,E!=t?t:null),!v.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=g.$.documentMode&&v.append(g.createText("\u00a0")),v.append(m.listNode),m=m.nextIndex;else if(-1==E.indent&&!c&&e){l[e.getName()]?(v=E.element.clone(!1,!0),t!=e.getDirection(1)&&v.setAttribute("dir",t)):v=new CKEDITOR.dom.documentFragment(g);
956var k=e.getDirection(1)!=t,D=E.element,O=D.getAttribute("class"),S=D.getAttribute("style"),Q=v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||k||S||O),K,V=E.contents.length,U;for(e=0;e<V;e++)if(K=E.contents[e],n(K)&&1<V)Q?U=K.clone(1,1):v.append(K.clone(1,1));else if(K.type==CKEDITOR.NODE_ELEMENT&&K.isBlockBoundary()){k&&!K.getDirection()&&K.setAttribute("dir",t);I=K;var X=D.getAttribute("style");X&&I.setAttribute("style",X.replace(/([^;])$/,"$1;")+(I.getAttribute("style")||""));O&&
957K.addClass(O);I=null;U&&(v.append(U),U=null);v.append(K.clone(1,1))}else Q?(I||(I=g.createElement(L),v.append(I),k&&I.setAttribute("dir",t)),S&&I.setAttribute("style",S),O&&I.setAttribute("class",O),U&&(I.append(U),U=null),I.append(K.clone(1,1))):v.append(K.clone(1,1));U&&((I||v).append(U),U=null);v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(t=v.getLast())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("br")&&t.remove(),(t=v.getLast(w))&&t.type==CKEDITOR.NODE_ELEMENT&&
958t.is(CKEDITOR.dtd.$block)||v.append(g.createElement("br")));t=v.$.nodeName.toLowerCase();"div"!=t&&"p"!=t||v.appendBogus();h.append(v);k=null;m++}else return null;I=null;if(a.length<=m||Math.max(a[m].indent,0)<p)break}if(b)for(a=h.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,g=f=d=void 0,d=c.getDirection()))){for(f=c.getParent();f&&!(g=f.getDirection());)f=f.getParent();d==g&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:h,
959nextIndex:m}}};var t=/^h[1-6]$/,p=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);e.prototype={exec:function(c){function d(a){return l[a.root.getName()]&&!f(a.root,[CKEDITOR.NODE_COMMENT])}function f(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function e(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(c,c.elementPath());
960var h=c.config,k=c.getSelection(),n=k&&k.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var p=c.editable();if(p.getFirst(w)){var v=1==n.length&&n[0];(h=v&&v.getEnclosedNode())&&h.is&&this.type==h.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else h.enterMode==CKEDITOR.ENTER_BR?p.appendBogus():n[0].fixBlock(1,h.enterMode==CKEDITOR.ENTER_P?"p":"div"),k.selectRanges(n)}for(var h=k.createBookmarks(!0),p=[],t={},n=n.createIterator(),F=0;(v=n.getNextRange())&&++F;){var J=v.getBoundaryNodes(),H=J.startNode,
961I=J.endNode;H.type==CKEDITOR.NODE_ELEMENT&&"td"==H.getName()&&v.setStartAt(J.startNode,CKEDITOR.POSITION_AFTER_START);I.type==CKEDITOR.NODE_ELEMENT&&"td"==I.getName()&&v.setEndAt(J.endNode,CKEDITOR.POSITION_BEFORE_END);v=v.createIterator();for(v.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;J=v.getNextParagraph();)if(!J.getCustomData("list_block")&&!e(J)){CKEDITOR.dom.element.setMarker(t,J,"list_block",1);for(var L=c.elementPath(J),H=L.elements,I=0,L=L.blockLimit,E,D=H.length-1;0<=D&&(E=H[D]);D--)if(l[E.getName()]&&
962L.contains(E)){L.removeCustomData("list_group_object_"+F);(H=E.getCustomData("list_group_object"))?H.contents.push(J):(H={root:E,contents:[J]},p.push(H),CKEDITOR.dom.element.setMarker(t,E,"list_group_object",H));I=1;break}I||(I=L,I.getCustomData("list_group_object_"+F)?I.getCustomData("list_group_object_"+F).contents.push(J):(H={root:I,contents:[J]},CKEDITOR.dom.element.setMarker(t,I,"list_group_object_"+F,H),p.push(H)))}}for(E=[];0<p.length;)H=p.shift(),this.state==CKEDITOR.TRISTATE_OFF?d(H)||(l[H.root.getName()]?
963a.call(this,c,H,t,E):g.call(this,c,H,E)):this.state==CKEDITOR.TRISTATE_ON&&l[H.root.getName()]&&!d(H)&&b.call(this,c,H,t);for(D=0;D<E.length;D++)m(E[D]);CKEDITOR.dom.element.clearAllMarkers(t);k.selectBookmarks(h);c.focus()},refresh:function(a,b){var c=b.contains(l,1),d=b.blockLimit||b.root;c&&d.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||
964(a.addCommand("numberedlist",new e("numberedlist","ol")),a.addCommand("bulletedlist",new e("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var c=b.data.domEvent.getKey(),f;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var e=a.getSelection().getRanges()[0],
965g=e&&e.startPath();if(e&&e.collapsed){var m=8==c,n=a.editable(),p=new CKEDITOR.dom.walker(e.clone());p.evaluator=function(a){return w(a)&&!v(a)};p.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=e.clone();if(m){var t;(t=g.contains(l))&&e.checkBoundaryOfElement(t,CKEDITOR.START)&&(t=t.getParent())&&t.is("li")&&(t=k(t))?(f=t,t=t.getPrevious(w),c.moveToPosition(t&&v(t)?t:f,CKEDITOR.POSITION_BEFORE_START)):(p.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),p.range.setEnd(e.startContainer,
966e.startOffset),(t=p.previous())&&t.type==CKEDITOR.NODE_ELEMENT&&(t.getName()in l||t.is("li"))&&(t.is("li")||(p.range.selectNodeContents(t),p.reset(),p.evaluator=h,t=p.previous()),f=t,c.moveToElementEditEnd(f),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)d(a,c,e),b.cancel();else{var F=g.contains(l);F&&e.checkBoundaryOfElement(F,CKEDITOR.START)&&(f=F.getFirst(w),e.checkBoundaryOfElement(f,CKEDITOR.START)&&(t=F.getPrevious(w),k(f)?t&&(e.moveToElementEditEnd(t),e.select()):
vendor: 14,341 bytes, lines 967-994
967a.execCommand("outdent"),b.cancel()))}}else if(f=g.contains("li")){if(p.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),m=(n=f.getLast(w))&&h(n)?n:f,g=0,(t=p.next())&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in l&&t.equals(n)?(g=1,t=p.next()):e.checkBoundaryOfElement(m,CKEDITOR.END)&&(g=2),g&&t){e=e.clone();e.moveToElementEditStart(t);if(1==g&&(c.optimize(),!c.startContainer.equals(f))){for(f=c.startContainer;f.is(CKEDITOR.dtd.$inline);)F=f,f=f.getParent();F&&c.moveToPosition(F,CKEDITOR.POSITION_AFTER_END)}2==
968g&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),e.endPath().block&&e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_AFTER_START));d(a,c,e);b.cancel()}}else p.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(t=p.next())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(l)&&(t=t.getFirst(w),g.block&&e.checkStartOfBlock()&&e.checkEndOfBlock()?(g.block.remove(),e.moveToElementEditStart(t),e.select()):k(t)?(e.moveToElementEditStart(t),e.select()):(e=e.clone(),e.moveToElementEditStart(t),d(a,
969c,e)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(a){if(!a.blockless){var g;g=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]});g=a.addCommand("numberedListStyle",g);a.addFeature(g);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");
970g=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});g=a.addCommand("bulletedListStyle",g);a.addFeature(g);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");a.addMenuGroup("list",108);a.addMenuItems({numberedlist:{label:a.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});
971a.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;for(;a;){var e=a.getName();if("ol"==e)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==e)return{bulletedlist:CKEDITOR.TRISTATE_OFF};a=a.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function a(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(ba(a)||ca(a)||w(a))}))}function g(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}
972function b(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=h(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function e(a,b,c){r(a,b);r(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function c(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!ba(b)||n(b)&&!w(b)&&!f(a,b)})}function m(a,b,c){return a>b&&a<c}function h(a,b){if(a.data("cke-editable"))return null;
973for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function d(a){var b=a.doc,c=F('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+T+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),d=CKEDITOR.getUrl(this.path+"images/"+(J.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");C(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[C(F('\x3cspan title\x3d"'+
974a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:T+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+d+") center no-repeat "+a.boxColor+";cursor:pointer;"+(J.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(J.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;"]}),C(F(aa,b),{base:R+
975"left:0px;border-left-color:"+a.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),C(F(aa,b),{base:R+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){r(a,this);var b=a.holdDistance,c=this.size;return c&&m(a.mouse.y,
976c.top-b,c.bottom+b)&&m(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,f=d.upper,e=d.lower,g=f||e,h=g.getParent(),k={};this.trigger=d;f&&r(a,f,!0);e&&r(a,e,!0);r(a,h,!0);a.inInlineMode&&z(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x,k.right="");f&&e?
977k.top=f.size.margin.bottom===e.size.margin.top?0|f.size.bottom+f.size.margin.bottom/2:f.size.margin.bottom<e.size.margin.top?f.size.bottom+f.size.margin.bottom:f.size.bottom+f.size.margin.bottom-e.size.margin.top:f?e||(k.top=f.size.bottom+f.size.margin.bottom):k.top=e.size.top-e.size.margin.top;d.is(Q)||m(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(Q)):d.is(K)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+
978b.editable.padding.bottom:b.pane.bottom-1,this.look(K)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(V));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new G("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);
979c.look(V);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();k(a,function(b){var c=a.line.trigger;b[c.is(E)?"insertBefore":"insertAfter"](c.is(E)?c.lower:c.upper)},!0);a.editor.focus();J.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});c.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=c}function k(a,b,c){var d=new CKEDITOR.dom.range(a.doc),f=a.editor,e;J.ie&&a.enterMode==CKEDITOR.ENTER_BR?e=a.doc.createText(U):
980(e=(e=h(a.element,!0))&&e.data("cke-enter-mode")||a.enterMode,e=new G(L[e],a.doc),e.is("br")||a.doc.createText(U).appendTo(e));c&&f.fire("saveSnapshot");b(e);d.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([d]);a.hotNode=e;c&&f.fire("saveSnapshot")}function l(a,d){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function f(b){var c=J.ie&&9>J.version?" ":U,e=a.hotNode&&a.hotNode.getText()==c&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!d;k(a,function(c){e&&
981a.hotNode&&a.hotNode.remove();c[d?"insertAfter":"insertBefore"](b);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!d});a.lastCmdDirection=!!d});J.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(e){e=e.getSelection().getStartElement();var g;e=e.getAscendant(P,1);if(!p(a,e)&&e&&!e.equals(a.editable)&&!e.contains(a.editable)){(g=h(e))&&"false"==g.getAttribute("contenteditable")&&(e=g);a.element=e;g=c(a,e,!d);var k;n(g)&&g.is(a.triggers)&&
982g.is(N)&&(!c(a,g,!d)||(k=c(a,g,!d))&&n(k)&&k.is(a.triggers))?f(g):(k=b(a,e),n(k)&&(c(a,k,!d)?(e=c(a,k,!d))&&n(e)&&e.is(a.triggers)&&f(k):f(k)))}}}()}}function f(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!n(a))return!1;var b;(b=v(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1,
983fixed:1}[a.getComputedStyle("position")]}function t(a,b){return n(b)?b.is(a.triggers):null}function p(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var f=a.tabuList.length;f--;)if(c[d].hasAttribute(a.tabuList[f]))return!0;return!1}function u(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ga)});if(!b)return!1;r(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function x(a){var b=a.editable,c=a.mouse,d=a.view,e=a.triggerOffset;z(a);var h=c.y>
984(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[h?"getLast":"getFirst"](function(a){return!(ba(a)||ca(a))});if(!b)return null;f(a,b)&&(b=a.line.wrap[h?"getPrevious":"getNext"](function(a){return!(ba(a)||ca(a))}));if(!n(b)||w(b)||!t(a,b))return null;r(a,b);return!h&&0<=b.size.top&&m(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?Q:V,new g([null,b,E,S,a])):h&&b.size.bottom<=d.pane.height&&m(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode||
985m(b.size.bottom,d.pane.height-e,d.pane.height)?K:V,new g([b,null,D,S,a])):null}function q(a){var d=a.mouse,f=a.view,e=a.triggerOffset,h=b(a);if(!h)return null;r(a,h);var e=Math.min(e,0|h.size.outerHeight/2),k=[],l,q;if(m(d.y,h.size.top-1,h.size.top+e))q=!1;else if(m(d.y,h.size.bottom-e,h.size.bottom+1))q=!0;else return null;if(w(h)||u(a,h,q)||h.getParent().is(X))return null;var y=c(a,h,!q);if(y){if(y&&y.type==CKEDITOR.NODE_TEXT)return null;if(n(y)){if(w(y)||!t(a,y)||y.getParent().is(X))return null;
986k=[y,h][q?"reverse":"concat"]().concat([O,S])}}else h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?(z(a),q&&m(d.y,h.size.bottom-e,f.pane.height)&&m(h.size.bottom,f.pane.height-e,f.pane.height)?l=K:m(d.y,0,h.size.top+e)&&(l=Q)):l=V,k=[null,h][q?"reverse":"concat"]().concat([q?D:E,S,l,h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?q?K:Q:V]);return 0 in k?new g(k):null}function y(a,b,c,d){for(var f=b.getDocumentPosition(),e={},g={},h={},k={},l=da.length;l--;)e[da[l]]=parseInt(b.getComputedStyle.call(b,
987"border-"+da[l]+"-width"),10)||0,h[da[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+da[l]),10)||0,g[da[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+da[l]),10)||0;c&&!d||A(a,d);k.top=f.y-(c?0:a.view.scroll.y);k.left=f.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+e.top+e.bottom);k.width=k.outerWidth-(h.left+h.right+e.left+e.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,
988left:b.$.scrollLeft});return C({border:e,padding:h,margin:g,ignoreScroll:c},k,!0)}function r(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-M)return null;return C(b.size,y(a,b,c),{date:+new Date},!0)}function z(a,b){a.view.editable=y(a,a.editable,b,!0)}function A(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-M)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();C(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-
989d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function B(a,b,c,d){for(var f=d,e=d,h=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+h<m&&0<n.y-h;){k||(k=b(f,d));l||(l=b(e,d));!k&&0<n.y-h&&(f=c(a,{x:n.x,y:n.y-h}));!l&&n.y+h<m&&(e=c(a,{x:n.x,y:n.y+h}));if(k&&l)break;h+=2}return new g([f,e,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var e=a.config,h=e.magicline_triggerOffset||30,m={editor:a,
990enterMode:e.enterMode,triggerOffset:h,holdDistance:0|h*(e.magicline_holdDistance||.5),boxColor:e.magicline_color||"#ff0000",rtl:"rtl"==e.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(e.magicline_tabuList||[]),triggers:e.magicline_everywhere?P:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},u,r,t;m.isRelevant=function(a){return n(a)&&!f(m,a)&&!w(a)};a.on("contentDom",function(){var h=a.editable(),n=a.document,w=a.window;C(m,{editable:h,inInlineMode:h.isInline(),doc:n,win:w,
991hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();h.is(I.$inline)||(m.inInlineMode&&!v(h)&&h.setStyles({position:"relative",top:null,left:null}),d.call(this,m),A(m),h.attachListener(a,"beforeUndoImage",function(){m.line.detach()}),h.attachListener(a,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),a.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),h.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==
992a.mode)if(m.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;A(m);z(m,!0);var d=m.view.editable,f=m.view.scroll;c>d.left-f.x&&c<d.right-f.x&&b>d.top-f.y&&b<d.bottom-f.y||(clearTimeout(t),t=null,m.line.detach())}else clearTimeout(t),t=null,m.line.detach()}),h.attachListener(h,"keyup",function(){m.hiddenMode=0}),h.attachListener(h,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),h.attachListener(m.inInlineMode?h:n,
993"mousemove",function(b){r=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!t){var c={x:b.data.$.clientX,y:b.data.$.clientY};t=setTimeout(function(){m.mouse=c;t=m.trigger=null;A(m);r&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=W(m,!0))&&((m.trigger=x(m)||q(m)||Z(m))&&!p(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),r=!1)},30)}}),h.attachListener(w,"scroll",function(){"wysiwyg"==a.mode&&(m.line.detach(),J.webkit&&(m.hiddenMode=1,clearTimeout(u),
994u=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),h.attachListener(H?n:w,"mousedown",function(){"wysiwyg"==a.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),h.attachListener(H?n:w,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),a.addCommand("accessPreviousSpace",l(m)),a.addCommand("accessNextSpace",l(m,!0)),a.setKeystroke([[e.magicline_keystrokePrevious,"accessPreviousSpace"],[e.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapsh
vendor: 4,945 bytes, lines 994-1004
994ot",function(){var b,c,d,f;for(f in{p:1,
995br:1,div:1})for(b=a.document.getElementsByTag(f),d=b.count();d--;)if((c=b.getItem(d)).data("cke-magicline-hot")){m.hotNode=c;m.lastCmdDirection="true"===c.data("cke-magicline-dir")?!0:!1;return}}),a._.magiclineBackdoor={accessFocusSpace:k,boxTrigger:g,isLine:f,getAscendantTrigger:b,getNonEmptyNeighbour:c,getSize:y,that:m,triggerEdge:q,triggerEditable:x,triggerExpand:Z})},this)}});var C=CKEDITOR.tools.extend,G=CKEDITOR.dom.element,F=G.createFromHtml,J=CKEDITOR.env,H=CKEDITOR.env.ie&&9>CKEDITOR.env.version,
996I=CKEDITOR.dtd,L={},E=128,D=64,O=32,S=16,Q=4,K=2,V=1,U="\u00a0",X=I.$listItem,ga=I.$tableContent,N=C({},I.$nonEditable,I.$empty),P=I.$block,M=100,T="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",R=T+"border-color:transparent;display:block;border-style:solid;",aa="\x3cspan\x3e"+U+"\x3c/span\x3e";L[CKEDITOR.ENTER_BR]="br";L[CKEDITOR.ENTER_P]="p";L[CKEDITOR.ENTER_DIV]="div";g.prototype={set:function(a,b,c){this.properties=
997a+b+(c||V);return this},is:function(a){return(this.properties&a)==a}};var W=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,g=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&f(b,h)&&(g.hide(),h=a(e,d),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||J.ie&&9>J.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),ba=CKEDITOR.dom.walker.whitespaces(),ca=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
998Z=function(){function b(d){var f=d.element,g,h,k;if(!n(f)||f.contains(d.editable)||f.isReadOnly())return null;k=B(d,function(a,b){return!b.equals(a)},function(a,b){return W(a,!0,b)},f);g=k.upper;h=k.lower;if(a(d,g,h))return k.set(O,8);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return c(d,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return c(d,a)});if(!g||!h)return null;r(d,g);r(d,h);if(!m(d.mouse.y,
999g.size.top,h.size.bottom))return null;for(var f=Number.MAX_VALUE,l,q,u,y;h&&!h.equals(g)&&(q=g.getNext(d.isRelevant));)l=Math.abs(e(d,g,q)-d.mouse.y),l<f&&(f=l,u=g,y=q),g=q,r(d,g);if(!u||!y||!m(d.mouse.y,u.size.top,y.size.bottom))return null;k.upper=u;k.lower=y;return k.set(O,8)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||ca(b)||w(b)||f(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=b(c),f;if(f=d){f=d.upper;var e=d.lower;f=!f||!e||w(e)||w(f)||e.equals(f)||
1000f.equals(e)||e.contains(f)||f.contains(e)?!1:t(c,f)&&t(c,e)&&a(c,f,e)?!0:!1}return f?d:null}}(),da=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||"form"!=a.getName())return[];for(var b=[],c=["style","className"],e=0;e<c.length;e++){var g=a.$.elements.namedItem(c[e]);g&&(g=new CKEDITOR.dom.element(g),b.push([g,
1001g.nextSibling]),g.remove())}return b}function g(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&"form"==a.getName()&&0<b.length)for(var c=b.length-1;0<=c;c--){var e=b[c][0],g=b[c][1];g?e.insertBefore(g):e.appendTo(a)}}function b(b,c){var d=a(b),e={},l=b.$;c||(e["class"]=l.className||"",l.className="");e.inline=l.style.cssText||"";c||(l.style.cssText="position: static; overflow: visible");g(d);return e}function e(b,c){var d=a(b),e=b.$;"class"in c&&(e.className=c["class"]);"inline"in c&&(e.style.cssText=
1002c.inline);g(d)}function c(a){if(!a.editable().isInline()){var b=CKEDITOR.instances,c;for(c in b){var e=b[c];"wysiwyg"!=e.mode||e.readOnly||(e=e.document.getBody(),e.setAttribute("contentEditable",!1),e.setAttribute("contentEditable",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add("maximize",{init:function(a){function g(){var b=l.getViewPaneSize();a.resize(b.width,b.height,null,!0)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var d=a.lang,k=CKEDITOR.document,l=k.getWindow(),
1003f,n,w,v=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var t=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),p=a.ui.space("contents");if("wysiwyg"==a.mode){var u=a.getSelection();f=u&&u.getRanges();n=l.getScrollPosition()}else{var x=a.editable().$;f=!CKEDITOR.env.ie&&[x.selectionStart,x.selectionEnd];n=[x.scrollLeft,x.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){l.on("resize",
1004g);w=l.getScrollPosition();for(u=a.container;u=u.getParent();)u.setCustomData("maximize_saved_styles",b(u)),u.setStyle("z-index",a.config.baseFloatZIndex-5);p.setCustomData("maximize_saved_styles",b(p,!0));t.setCustomData("maximize_saved_styles",b(t,!0));
vendor: 4,121 bytes, lines 1004-1012
1004p={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};k.getDocumentElement().setStyles(p);!CKEDITOR.env.gecko&&k.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||k.getBody().setStyles(p);CKEDITOR.env.ie?
1005setTimeout(function(){l.$.scrollTo(0,0)},0):l.$.scrollTo(0,0);t.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");t.$.offsetLeft;t.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});t.addClass("cke_maximized");g();p=t.getDocumentPosition();t.setStyles({left:-1*p.x+"px",top:-1*p.y+"px"});CKEDITOR.env.gecko&&c(a)}else if(this.state==CKEDITOR.TRISTATE_ON){l.removeListener("resize",g);for(var u=[p,t],q=0;q<u.length;q++)e(u[q],u[q].getCustomData("maximize_saved_styles")),
1006u[q].removeCustomData("maximize_saved_styles");for(u=a.container;u=u.getParent();)e(u,u.getCustomData("maximize_saved_styles")),u.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){l.$.scrollTo(w.x,w.y)},0):l.$.scrollTo(w.x,w.y);t.removeClass("cke_maximized");CKEDITOR.env.webkit&&(t.setStyle("display","inline"),setTimeout(function(){t.setStyle("display","block")},0));a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:p.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState();
1007if(u=this.uiItems[0])p=this.state==CKEDITOR.TRISTATE_OFF?d.maximize.maximize:d.maximize.minimize,u=CKEDITOR.document.getById(u._.id),u.getChild(1).setHtml(p),u.setAttribute("title",p),u.setAttribute("href",'javascript:void("'+p+'");');"wysiwyg"==a.mode?f?(CKEDITOR.env.gecko&&c(a),a.getSelection().selectRanges(f),(x=a.getSelection().getStartElement())&&x.scrollIntoView(!0)):l.$.scrollTo(n.x,n.y):(f&&(x.selectionStart=f[0],x.selectionEnd=f[1]),x.scrollLeft=n[0],x.scrollTop=n[1]);f=n=null;v=this.state;
1008a.fire("maximize",this.state)},canUndo:!1});a.ui.addButton&&a.ui.addButton("Maximize",{label:d.maximize.maximize,command:"maximize",toolbar:"tools,10"});a.on("mode",function(){var b=a.getCommand("maximize");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:v)},null,null,100)}}})}(),CKEDITOR.plugins.add("newpage",{init:function(a){a.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(a){var b=this;a.setData(a.config.newpage_html||"",function(){a.focus();setTimeout(function(){a.fire("afterCommandExec",
1009{name:"newpage",command:b});a.selectionChange()},200)})},async:!0});a.ui.addButton&&a.ui.addButton("NewPage",{label:a.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}}),"use strict",function(){function a(a){return{"aria-label":a,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:a}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var a=("background:url("+CKEDITOR.getUrl(this.path+
1010"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{"+a+"}")},init:function(a){a.blockless||(a.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),a.ui.addButton&&a.ui.addButton("PageBreak",{label:a.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&a.on("contentDom",function(){a.document.on("click",
1011function(b){b=b.data.getTarget();b.is("div")&&b.hasClass("cke_pagebreak")&&a.getSelection().selectElement(b)})}))},afterInit:function(g){function b(b){CKEDITOR.tools.extend(b.attributes,a(g.lang.pagebreak.alt),!0);b.children.length=0}var e=g.dataProcessor,c=e&&e.dataFilter,e=e&&e.htmlFilter,m=/page-break-after\s*:\s*always/i,h=/display\s*:\s*none/i;e&&e.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak","");if(c!=a){var f=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];
1012b.children.length=0;b.add(f);f=b.attributes;delete f["aria-label"];delete f.contenteditable;delete f.title}return c}}},{applyToAll:!0,priority:5});
1012c&&c.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])b(a);else if(m.test(a.attributes.style)){var c=a.children[0];c&&"span"==c.name&&h.test(c.attributes.style)&&b(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(g){var b=g.document.createElement("div",{attributes:a(g.lang.pagebreak.alt)});g.insertElement(b)},context:"div",
1013allowedContent:{div:{styles:"!page-break-after"},span:{match:function(a){return(a=a.parent)&&"div"==a.name&&a.styles&&a.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"}}(),function(){function a(a,b,e){var c=CKEDITOR.cleanWord;c?e():(a=CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||b+"filter/default.js"),CKEDITOR.scriptLoader.load(a,e,null,!0));return!c}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(g){function b(a){var b=CKEDITOR.plugins.pastefromword&&
1014CKEDITOR.plugins.pastefromword.images,c,e=[];if(b&&a.editor.filter.check("img[src]")&&(c=b.extractTagsFromHtml(a.data.dataValue),0!==c.length&&(b=b.extractFromRtf(a.data.dataTransfer["text/rtf"]),0!==b.length&&(CKEDITOR.tools.array.forEach(b,function(a){e.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),c.length===e.length))))for(b=0;b<c.length;b++)0===c[b].indexOf("file://")&&e[b]&&(a.data.dataValue=a.data.dataValue.replace(c[b],
1015e[b]))}var e=0,c=this.path,m=void 0===g.config.pasteFromWord_inlineImages?!0:g.config.pasteFromWord_inlineImages;g.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,b){e=1;a.execCommand("paste",{type:"html",notification:b&&"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(g,"PasteFromWord",{label:g.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});g.on("paste",function(b){var d=b.data,k=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?
1016d.dataTransfer.getData("text/html",!0):null,l=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?d.dataTransfer.getData("text/rtf"):null,k=k||d.dataValue,f={dataValue:k,dataTransfer:{"text/rtf":l}},l=/(class="?Mso|style=(?:"|')[^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,l=/<meta\s*name=(?:"|')?generator(?:"|')?\s*content=(?:"|')?microsoft/gi.test(k)||l.test(k);if(k&&(e||l)&&(!1!==g.fire("pasteFromWord",f)||e)){d.dontFilter=!0;var m=a(g,c,function(){if(m)g.fire("paste",d);else if(!g.config.pasteFromWordPromptCleanup||
1017e||confirm(g.lang.pastefromword.confirmCleanup))f.dataValue=CKEDITOR.cleanWord(f.dataValue,g),g.fire("afterPasteFromWord",f),d.dataValue=f.dataValue,!0===g.config.forcePasteAsPlainText?d.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==g.config.forcePasteAsPlainText||(d.type="html");e=0});m&&b.cancel()}},null,null,3);if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&m)g.on("afterPasteFromWord",b)}})}(),function(){var a={canUndo:!1,async:!0,exec:function(a,b){var e=
1018a.lang,c=CKEDITOR.tools.keystrokeToString(e.common.keyboard,a.getCommandKeystroke(CKEDITOR.env.ie?a.commands.paste:this)),m=b&&"undefined"!==typeof b.notification?b.notification:!b||!b.from||"keystrokeHandler"===b.from&&CKEDITOR.env.ie,e=m&&"string"===typeof m?m:e.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+c.aria+'"\x3e'+c.display+"\x3c/kbd\x3e");a.execCommand("paste",{type:"text",notification:m?e:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(g){var b=
1019CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;g.addCommand("pastetext",a);g.setKeystroke(b,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(g,"PasteText",{label:g.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(g.config.forcePasteAsPlainText)g.on("beforePaste",function(a){"html"!=a.data.type&&(a.data.type="text")});g.on("pasteState",function(a){g.getCommand("pastetext").setState(a.data)})}})}(),function(){var a,g={modes:{wysiwyg:1,
1020source:1},canUndo:!1,readOnly:1,exec:function(b){var e,c=b.config,g=c.baseHref?'\x3cbase href\x3d"'+c.baseHref+'"/\x3e':"";if(c.fullPage)e=b.getData().replace(/<head>/,"$\x26"+g).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+b.lang.preview.preview);else{var c="\x3cbody ",h=b.document&&b.document.getBody();h&&(h.getAttribute("id")&&(c+='id\x3d"'+h.getAttribute("id")+'" '),h.getAttribute("class")&&(c+='class\x3d"'+h.getAttribute("class")+'" '));c+="\x3e";e=b.config.docType+'\x3chtml dir\x3d"'+b.config.contentsLangDirection+
1021'"\x3e\x3chead\x3e'+g+"\x3ctitle\x3e"+b.lang.preview.preview+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(b.config.contentsCss)+"\x3c/head\x3e"+c+b.getData()+"\x3c/body\x3e\x3c/html\x3e"}g=640;c=420;h=80;try{var d=window.screen,g=Math.round(.8*d.width),c=Math.round(.7*d.height),h=Math.round(.1*d.width)}catch(k){}if(!1===b.fire("contentPreview",b={dataValue:e}))return!1;var d="",l;CKEDITOR.env.ie&&(window._cke_htmlToLoad=b.dataValue,l="javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+
1022")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )",d="");CKEDITOR.env.gecko&&(window._cke_htmlToLoad=b.dataValue,d=CKEDITOR.getUrl(a+"preview.html"));d=window.open(d,null,"toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes,width\x3d"+g+",height\x3d"+c+",left\x3d"+h);CKEDITOR.env.ie&&d&&(d.location=l);CKEDITOR.env.ie||CKEDITOR.env.gecko||
1023(l=d.document,l.open(),l.write(b.dataValue),l.close());return!0}};CKEDITOR.plugins.add("preview",{init:function(b){b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(a=this.path,b.addCommand("preview",g),b.ui.addButton&&b.ui.addButton("Preview",{label:b.lang.preview.preview,command:"preview",toolbar:"document,40"}))}})}(),CKEDITOR.plugins.add("print",{init:function(a){a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(a.addCommand("print",CKEDITOR.plugins.print),a.ui.addButton&&a.ui.addButton("Print",{label:a.lang.print.toolbar,
1024command:"print",toolbar:"document,50"}))}}),CKEDITOR.plugins.print={exec:function(a){CKEDITOR.env.gecko?a.window.$.print():a.document.$.execCommand("Print")},canUndo:!1,readOnly:1,modes:{wysiwyg:1}},CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var g=
1025a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),b=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),e=CKEDITOR.plugins.removeformat.filter,c=a.getSelection().getRanges().createIterator(),m=function(a){return a.type==CKEDITOR.NODE_ELEMENT},h=[],d;d=c.getNextRange();){var k=d.createBookmark();d=a.createRange();d.setStartBefore(k.startNode);k.endNode&&d.setEndAfter(k.endNode);d.collapsed||d.enlarge(CKEDITOR.ENLARGE_ELEMENT);
1026var l=d.createBookmark(),f=l.startNode,n=l.endNode,w=function(b){for(var c=a.elementPath(b),d=c.elements,f=1,h;(h=d[f])&&!h.equals(c.block)&&!h.equals(c.blockLimit);f++)g.test(h.getName())&&e(a,h)&&b.breakParent(h)};w(f);if(n)for(w(n),f=f.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);f&&!f.equals(n);)if(f.isReadOnly()){if(f.getPosition(n)&CKEDITOR.POSITION_CONTAINS)break;f=f.getNext(m)}else w=f.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==f.getName()&&f.data("cke-realelement")||f.hasAttribute("data-cke-bookmark")||
1027!e(a,f)||(g.test(f.getName())?f.remove(1):(f.removeAttributes(b),a.fire("removeFormatCleanup",f))),f=w;l.startNode.remove();l.endNode&&l.endNode.remove();d.moveToBookmark(k);h.push(d)}a.forceNextSelectionCheck();a.getSelection().selectRanges(h)}}},filter:function(a,g){for(var b=a._.removeFormatFilters||[],e=0;e<b.length;e++)if(!1===b[e](g))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)},
1028CKEDITOR.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",CKEDITOR.plugins.add("resize",{init:function(a){function g(b){var c=k.width,g=k.height,h=c+(b.data.$.screenX-d.x)*("rtl"==m?-1:1);b=g+(b.data.$.screenY-d.y);l&&(c=Math.max(e.resize_minWidth,Math.min(h,e.resize_maxWidth)));f&&(g=Math.max(e.resize_minHeight,Math.min(b,e.resize_maxHeight)));
1029a.resize(l?c:null,g)}function b(){CKEDITOR.document.removeListener("mousemove",g);CKEDITOR.document.removeListener("mouseup",b);a.document&&(a.document.removeListener("mousemove",g),a.document.removeListener("mouseup",b))}var e=a.config,c=a.ui.spaceId("resizer"),m=a.element?a.element.getDirection(1):"ltr";!e.resize_dir&&(e.resize_dir="vertical");void 0===e.resize_maxWidth&&(e.resize_maxWidth=3E3);void 0===e.resize_maxHeight&&(e.resize_maxHeight=3E3);void 0===e.resize_minWidth&&(e.resize_minWidth=
1030750);void 0===e.resize_minHeight&&(e.resize_minHeight=250);if(!1!==e.resize_enabled){var h=null,d,k,l=("both"==e.resize_dir||"horizontal"==e.resize_dir)&&e.resize_minWidth!=e.resize_maxWidth,f=("both"==e.resize_dir||"vertical"==e.resize_dir)&&e.resize_minHeight!=e.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(c){h||(h=a.getResizable());k={width:h.$.offsetWidth||0,height:h.$.offsetHeight||0};d={x:c.screenX,y:c.screenY};e.resize_minWidth>k.width&&(e.resize_minWidth=k.width);e.resize_minHeight>
1031k.height&&(e.resize_minHeight=k.height);CKEDITOR.document.on("mousemove",g);CKEDITOR.document.on("mouseup",b);a.document&&(a.document.on("mousemove",g),a.document.on("mouseup",b));c.preventDefault&&c.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(b){if("bottom"==b.data.space){var d="";l&&!f&&(d=" cke_resizer_horizontal");!l&&f&&(d=" cke_resizer_vertical");var e='\x3cspan id\x3d"'+c+'" class\x3d"cke_resizer'+d+" cke_resizer_"+m+'" title\x3d"'+
1032CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==m?"\u25e2":"\u25e3")+"\x3c/span\x3e";"ltr"==m&&"ltr"==d?b.data.html+=e:b.data.html=e+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var a={readOnly:1,modes:{wysiwyg:1,source:1}
vendor: 5,281 bytes, lines 1032-1041
1032,exec:function(a){if(a.fire("save")&&(a=a.element.$.form))try{a.submit()}catch(b){a.submit.click&&a.submit.click()}}};
1033CKEDITOR.plugins.add("save",{init:function(g){g.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(g.addCommand("save",a).startDisabled=!g.element.$.form,g.ui.addButton&&g.ui.addButton("Save",{label:g.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})}(),function(){CKEDITOR.plugins.add("selectall",{init:function(a){a.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(a){var b=a.editable();if(b.is("textarea"))a=b.$,CKEDITOR.env.ie&&a.createTextRange?a.createTextRange().execCommand("SelectAll"):
1034(a.selectionStart=0,a.selectionEnd=a.value.length),a.focus();else{if(b.is("body"))a.document.$.execCommand("SelectAll",!1,null);else{var e=a.createRange();e.selectNodeContents(b);e.select()}a.forceNextSelectionCheck();a.selectionChange()}},canUndo:!1});a.ui.addButton&&a.ui.addButton("SelectAll",{label:a.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})}(),function(){var a={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=
1035this.state!=CKEDITOR.TRISTATE_ON||a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!a.focusManager.hasFocus?"removeClass":"attachClass";a.editable()[b]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var a="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),b,e,c,m,h=CKEDITOR.getUrl(this.path),d=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),k=d?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",l,f;for(b=e=c=m="";l=a.pop();)f=a.length?",":"",b+=".cke_show_blocks "+
1036l+k+f,c+=".cke_show_blocks.cke_contents_ltr "+l+k+f,m+=".cke_show_blocks.cke_contents_rtl "+l+k+f,e+=".cke_show_blocks "+l+k+"{background-image:url("+CKEDITOR.getUrl(h+"images/block_"+l+".png")+")}";CKEDITOR.addCss((b+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(e,c+"{background-position:top left;padding-left:8px}",m+"{background-position:top right;padding-right:8px}"));d||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
1037init:function(g){function b(){e.refresh(g)}if(!g.blockless){var e=g.addCommand("showblocks",a);e.canUndo=!1;g.config.startupOutlineBlocks&&e.setState(CKEDITOR.TRISTATE_ON);g.ui.addButton&&g.ui.addButton("ShowBlocks",{label:g.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});g.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(g)});g.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(g.on("focus",b),g.on("blur",b));g.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&
1038e.refresh(g)})}}})}(),function(){var a={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[b]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,
1039"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(g){var b=g.addCommand("showborders",a);b.canUndo=!1;!1!==g.config.startupShowBorders&&b.setState(CKEDITOR.TRISTATE_ON);g.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(g)},null,null,100);g.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(g)});g.on("removeFormatCleanup",function(a){a=a.data;g.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&a.is("table")&&(!a.hasAttribute("border")||
10400>=parseInt(a.getAttribute("border"),10))&&a.addClass("cke_show_border")})},afterInit:function(a){var b=a.dataProcessor;a=b&&b.dataFilter;b=b&&b.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"],g=parseInt(a.border,10);g&&!(0>=g)||b&&-1!=b.indexOf("cke_show_border")||(a["class"]=(b||"")+" cke_show_border")}}});b&&b.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
1041""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.name;if("table"==b||"tableProperties"==b)if(a=a.data.definition,b=a.getContents("info").get("txtBorder"),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,g){a.apply(this,arguments);var h=parseInt(this.getValue(),10);g[!h||0>=h?"addClass":"removeClass"]("cke_show_border")}}
1041),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,
1042arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,g){a.apply(this,arguments);parseInt(g.getAttribute("border"),10)||g.addClass("cke_show_border")}})})}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(a){a.config.smiley_path=a.config.smiley_path||this.path+"images/";a.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));
1043a.ui.addButton&&a.ui.addButton("Smiley",{label:a.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(" "),
1044CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),function(){CKEDITOR.plugins.add("sourcearea",{init:function(g){function b(){var a=c&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=
1045CKEDITOR.plugins.sourcearea;g.addMode("source",function(c){var e=g.ui.space("contents").getDocument().createElement("textarea");
vendor: 22,615 bytes, lines 1045-1087
1045e.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",g.config.sourceAreaTabSize||4)));e.setAttribute("dir","ltr");e.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");g.ui.space("contents").append(e);e=g.editable(new a(g,
1046e));e.setData(g.getData(1));CKEDITOR.env.ie&&(e.attachListener(g,"resize",b,e),e.attachListener(CKEDITOR.document.getWindow(),"resize",b,e),CKEDITOR.tools.setTimeout(b,0,e));g.fire("ariaWidget",this);c()});g.addCommand("source",e.commands.source);g.ui.addButton&&g.ui.addButton("Source",{label:g.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});g.on("mode",function(){g.getCommand("source").setState("source"==g.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var c=CKEDITOR.env.ie&&9==
1047CKEDITOR.env.version}}});var a=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,
1048source:1},editorFocus:!1,readOnly:1,exec:function(a){"wysiwyg"==a.mode&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode("source"==a.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,
1049pt: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},requires:"dialog",init:function(a){var g=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var b=a.langCode,b=g.availableLangs[b]?b:g.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(g.path+"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,
1050g.langEntries[b]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "),
1051function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var g=a.config,b=a.lang.stylescombo,e={},c=[],m=[];a.on("stylesSet",function(b){if(b=b.data.styles){for(var d,k,l,f=0,n=b.length;f<n;f++)(d=b[f],a.blockless&&d.element in CKEDITOR.dtd.$block||"string"==typeof d.type&&!CKEDITOR.style.customHandlers[d.type]||(k=d.name,d=new CKEDITOR.style(d),a.filter.customConfig&&!a.filter.check(d)))||(d._name=k,d._.enterMode=g.enterMode,d._.type=l=d.assignedTo||d.type,d._.weight=
1052f+1E3*(l==CKEDITOR.STYLE_OBJECT?1:l==CKEDITOR.STYLE_BLOCK?2:3),e[k]=d,c.push(d),m.push(d));c.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:b.label,title:b.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(g.contentsCss),multiSelect:!0,attributes:{"aria-label":b.panelTitle}},init:function(){var a,d,e,g,f,m;f=0;for(m=c.length;f<m;f++)a=c[f],d=a._name,g=a._.type,g!=e&&(this.startGroup(b["panelTitle"+String(g)]),
1053e=g),this.add(d,a.type==CKEDITOR.STYLE_OBJECT?d:a.buildPreview(),d);this.commit()},onClick:function(b){a.focus();a.fire("saveSnapshot");b=e[b];var c=a.elementPath();if(b.group&&b.removeStylesFromSameGroup(a))a.applyStyle(b);else a[b.checkActive(c,a)?"removeStyle":"applyStyle"](b);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path.elements;for(var g=0,l=b.length,f;g<l;g++){f=b[g];for(var m in e)if(e[m].checkElementRemovable(f,!0,a)){m!=
1054c&&this.setValue(m);return}}this.setValue("")},this)},onOpen:function(){var c=a.getSelection(),c=c.getSelectedElement()||c.getStartElement()||a.editable(),c=a.elementPath(c),d=[0,0,0,0];this.showAll();this.unmarkAll();for(var g in e){var l=e[g],f=l._.type;l.checkApplicable(c,a,a.activeFilter)?d[f]++:this.hideItem(g);l.checkActive(c,a)&&this.mark(g)}d[CKEDITOR.STYLE_BLOCK]||this.hideGroup(b["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);d[CKEDITOR.STYLE_INLINE]||this.hideGroup(b["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
1055d[CKEDITOR.STYLE_OBJECT]||this.hideGroup(b["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var b=a.elementPath();if(b){for(var c in e)if(e[c].checkApplicable(b,a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){e={};c=[]}})}})}(),function(){function a(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var e=b.getSelection(),d;if(d=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,
1056th:1},1)){var e=b.createRange(),g=CKEDITOR.tools.tryThese(function(){var b=d.getParent().$.cells[d.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=d.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(g||a)if(g)g=new CKEDITOR.dom.element(g),e.moveToElementEditStart(g),e.checkStartOfBlock()&&e.checkEndOfBlock()||e.selectNodeContents(g);else return!0;else{for(var l=d.getAscendant("table").$,g=d.getParent().$.cells,l=
1057new CKEDITOR.dom.element(l.insertRow(-1),b.document),f=0,n=g.length;f<n;f++)l.append((new CKEDITOR.dom.element(g[f],b.document)).clone(!1,!1)).appendBogus();e.moveToElementEditStart(l)}e.select(!0);return!0}}return!1}}}var g={editorFocus:!1,modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},e={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(c){for(var m=!1!==c.config.enableTabKeyTools,h=c.config.tabSpaces||0,
1058d="";h--;)d+="\u00a0";if(d)c.on("key",function(a){9==a.data.keyCode&&(c.insertText(d),a.cancel())});if(m)c.on("key",function(a){(9==a.data.keyCode&&c.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&c.execCommand("selectPreviousCell"))&&a.cancel()});c.addCommand("blur",CKEDITOR.tools.extend(b,g));c.addCommand("blurBack",CKEDITOR.tools.extend(e,g));c.addCommand("selectNextCell",a());c.addCommand("selectPreviousCell",a(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,g){var b=
1059void 0===g?this.getTabIndex():g,e,c,m,h,d,k;if(0>=b)for(d=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);d;){if(d.isVisible()&&0===d.getTabIndex()){m=d;break}d=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(d=this.getDocument().getBody().getFirst();d=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!c&&d.equals(this)){if(c=!0,a){if(!(d=d.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else c&&!this.contains(d)&&(e=1);if(d.isVisible()&&!(0>(k=d.getTabIndex()))){if(e&&k==b){m=
1060d;break}k>b&&(!m||!h||k<h)?(m=d,h=k):m||0!==k||(m=d,h=k)}}m&&m.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,g){for(var b=void 0===g?this.getTabIndex():g,e,c,m,h=0,d,k=this.getDocument().getBody().getLast();k=k.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!c&&k.equals(this)){if(c=!0,a){if(!(k=k.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else c&&!this.contains(k)&&(e=1);if(k.isVisible()&&!(0>(d=k.getTabIndex())))if(0>=b){if(e&&0===d){m=k;break}d>h&&
1061(m=k,h=d)}else{if(e&&d==b){m=k;break}d<b&&(!m||d>h)&&(m=k,h=d)}}m&&m.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function g(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var b=a.lang.table;a.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];"+
1062(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var b;if(a.styles.border)b=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var g=a.styles;g["border-left"]&&g["border-left"]===g["border-right"]&&g["border-right"]===g["border-top"]&&
1063g["border-top"]===g["border-bottom"]&&(b=CKEDITOR.tools.style.parse.border(g["border-top"]))}b&&b.style&&"solid"===b.style&&b.width&&0!==parseFloat(b.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",g()));a.addCommand("tableDelete",g({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var g=b.getParent(),h=a.editable();1!=g.getChildCount()||g.is("td",
1064"th")||g.equals(h)||(b=g);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:b.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:b.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:b.deleteTable,command:"tableDelete",group:"table",
1065order:1}});a.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function a(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){0<f.length||a.type!=CKEDITOR.NODE_ELEMENT||!t.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(e,a,"selected_cell",
1066!0),f.push(a))}var f=[],e={};if(!a)return f;for(var g=a.getRanges(),h=0;h<g.length;h++){var k=g[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&f.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(e,l,"selected_cell",!0),f.push(l))}}CKEDITOR.dom.element.clearAllMarkers(e);return f}
1067function g(b,c){for(var d=p(b)?b:a(b),f=d[0],e=f.getAscendant("table"),f=f.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(e.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(e),e=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,f=f.createElement("tr"),k=0;e[k]&&k<d;k++){var l;1<e[k].rowSpan&&h&&e[k]==h[k]?(l=e[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(e[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),f.append(l),
1068l=l.$);k+=l.colSpan-1}c?f.insertBefore(g):f.insertAfter(g);return f}function b(c){if(c instanceof CKEDITOR.dom.selection){var d=c.getRanges(),f=a(c),e=f[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(e),h=f[0].getParent().$.rowIndex,f=f[f.length-1],k=f.getParent().$.rowIndex+f.$.rowSpan-1,f=[];c.reset();for(c=h;c<=k;c++){for(var l=g[c],m=new CKEDITOR.dom.element(e.$.rows[c]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),t=p.getParent().$.rowIndex;1==p.$.rowSpan?p.remove():(--p.$.rowSpan,
1069t==c&&(t=g[c+1],t[n-1]?p.insertAfter(new CKEDITOR.dom.element(t[n-1])):(new CKEDITOR.dom.element(e.$.rows[c+1])).append(p,1)));n+=p.$.colSpan-1}f.push(m)}g=e.$.rows;d[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||e.$.parentNode);for(c=f.length;0<=c;c--)b(f[c]);return e.$.parentNode?h:(d[0].select(),null)}c instanceof CKEDITOR.dom.element&&(e=c.getAscendant("table"),1==e.$.rows.length?e.remove():c.remove());return null}function e(a){for(var b=
1070a.getParent().$.cells,c=0,d=0;d<b.length;d++){var f=b[d],c=c+f.colSpan;if(f==a.$)break}return c-1}function c(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var f=e(a[d]);if(b?f<c:f>c)c=f}return c}function m(b,d){for(var f=p(b)?b:a(b),e=f[0].getAscendant("table"),g=c(f,1),f=c(f),h=d?g:f,k=CKEDITOR.tools.buildTableMap(e),e=[],g=[],f=[],l=k.length,m=0;m<l;m++)e.push(k[m][h]),g.push(d?k[m][h-1]:k[m][h+1]);for(m=0;m<l;m++)e[m]&&(1<e[m].colSpan&&g[m]==e[m]?(k=e[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(e[m]),
1071k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[d?"insertBefore":"insertAfter"].call(k,h),f.push(k),k=k.$),m+=k.rowSpan-1);return f}function h(b){function c(a){var b,d,f;b=a.getRanges();if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;d=b.endContainer;f=d.getName().toLowerCase();if("td"!==f&&"th"!==f)return a;for((f=d.getPrevious())||(f=d.getParent().getPrevious().getLast());f.type!==CKEDITOR.NODE_TEXT&&"br"!==f.getName().toLowerCase();)if(f=f.getLast(),!f)return a;
1072b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!b.isFake&&(b=c(b));var d=b.getRanges(),f=a(b),e=f[0],g=f[f.length-1],f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k,l,m=[];b.reset();var n=0;for(b=h.length;n<b;n++)for(var p=0,t=h[n].length;p<t;p++)void 0===k&&h[n][p]==e.$&&(k=p),h[n][p]==g.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<h.length;p++)g=h[p],e=new CKEDITOR.dom.element(f.$.rows[p]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,
1073p+=g.$.rowSpan-1,e.$.cells.length||m.push(e));k=h[0].length-1>l?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(f.$.parentNode);m.length==b&&(d[0].moveToPosition(f,CKEDITOR.POSITION_AFTER_END),d[0].select(),f.remove());return k}function d(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function k(b){if(b instanceof CKEDITOR.dom.selection){var c=
1074b.getRanges(),d=a(b),f=d[0]&&d[0].getAscendant("table"),e;a:{var g=0;e=d.length-1;for(var h={},m,n;m=d[g++];)CKEDITOR.dom.element.setMarker(h,m,"delete_cell",!0);for(g=0;m=d[g++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(h);e=n;break a}CKEDITOR.dom.element.clearAllMarkers(h);g=d[0].getParent();(g=g.getPrevious())?e=g.getLast():(g=d[e].getParent(),e=(g=g.getNext())?g.getChild(0):null)}b.reset();for(b=
1075d.length-1;0<=b;b--)k(d[b]);e?l(e,!0):f&&(c[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),c[0].select(),f.remove())}else b instanceof CKEDITOR.dom.element&&(c=b.getParent(),1==c.getChildCount()?c.remove():b.remove())}function l(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function f(a,b,c){a=a[b];
1076if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function n(b,c,d){var e=a(b),g;if((c?1!=e.length:2>e.length)||(g=b.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;var h;b=e[0];g=b.getAscendant("table");var k=CKEDITOR.tools.buildTableMap(g),l=k.length,m=k[0].length,n=b.getParent().$.rowIndex,p=f(k,n,b);if(c){var t;try{var v=parseInt(b.getAttribute("rowspan"),10)||1;
1077h=parseInt(b.getAttribute("colspan"),10)||1;t=k["up"==c?n-v:"down"==c?n+v:n]["left"==c?p-h:"right"==c?p+h:p]}catch(w){return!1}if(!t||b.$==t)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(t))}c=b.getDocument();var L=n,v=t=0,E=!d&&new CKEDITOR.dom.documentFragment(c),D=0;for(c=0;c<e.length;c++){h=e[c];var O=h.getParent(),S=h.getFirst(),Q=h.$.colSpan,K=h.$.rowSpan,O=O.$.rowIndex,V=f(k,O,h),D=D+Q*K,v=Math.max(v,V-p+Q);t=Math.max(t,O-n+K);d||(Q=h,(K=Q.getBogus())&&K.remove(),
1078Q.trim(),h.getChildren().count()&&(O==L||!S||S.isBlockBoundary&&S.isBlockBoundary({br:1})||(L=E.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!L||L.is&&L.is("br")||E.append("br")),h.moveChildren(E)),c?h.remove():h.setHtml(""));L=O}if(d)return t*v==D;E.moveChildren(b);b.appendBogus();v>=m?b.removeAttribute("rowSpan"):b.$.rowSpan=t;t>=l?b.removeAttribute("colSpan"):b.$.colSpan=v;d=new CKEDITOR.dom.nodeList(g.$.rows);e=d.count();for(c=e-1;0<=c;c--)g=d.getItem(c),g.$.cells.length||(g.remove(),e++);return b}
1079function w(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=e.$.rowIndex,l=f(h,k,d),m=d.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),e=k+n,g=new CKEDITOR.dom.element(g.$.rows[e]),h=f(h,e),p,e=d.clone(),k=0;k<h.length;k++)if(p=h[k],p.parentNode==g.$&&k>l){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||g.append(e)}else for(m=n=1,g=e.clone(),g.insertAfter(e),g.append(e=d.clone()),
1080p=f(h,k),l=0;l<p.length;l++)p[l].rowSpan++;e.appendBogus();d.$.rowSpan=n;e.$.rowSpan=m;1==n&&d.removeAttribute("rowSpan");1==m&&e.removeAttribute("rowSpan");return e}function v(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),g=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=f(g,e.$.rowIndex,d),k=d.$.colSpan;if(1<k)e=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=e=1,l=[],m=0;m<g.length;m++){var n=g[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(g=
10810;g<l.length;g++)l[g].colSpan++}g=d.clone();g.insertAfter(d);g.appendBogus();d.$.colSpan=e;g.$.colSpan=k;1==e&&d.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var t=/^(?:td|th)$/,p=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(c){function f(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function e(a,
1082b){var d=c.addCommand(a,b);c.addFeature(d)}var p=c.lang.table,t=CKEDITOR.tools.style.parse,z="td{width} td{height} td{border-color} td{background-color} td{white-space} td{vertical-align} td{text-align} td[colspan] td[rowspan] th".split(" ");e("cellProperties",new CKEDITOR.dialogCommand("cellProperties",f({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:z,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&
1083t.background(a.styles.background).color},right:function(a){a.styles["background-color"]=t.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&
1084(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");e("rowDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();(a=b(a))&&l(a)}}));e("rowInsertBefore",f({requiredContent:"table",exec:function(b){b=
1085b.getSelection();b=a(b);g(b,!0)}}));e("rowInsertAfter",f({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);g(b)}}));e("columnDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();(a=h(a))&&l(a,!0)}}));e("columnInsertBefore",f({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);m(b,!0)}}));e("columnInsertAfter",f({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);m(b)}}));e("cellDelete",f({requiredContent:"table",exec:function(a){a=
1086a.getSelection();k(a)}}));e("cellMerge",f({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());l(b.cell,!0)}}));e("cellMergeRight",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");l(b.cell,!0)}}));e("cellMergeDown",f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");l(b.cell,!0)}}));e("cellVerticalSplit",
1087f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){l
1087(v(a.getSelection()))}}));e("cellHorizontalSplit",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){l(w(a.getSelection()))}}));e("cellInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();d(a,!0)}}));e("cellInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();d(a)}}));c.addMenuItems&&c.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",
1088order:1,getItems:function(){var b=c.getSelection(),d=a(b),b={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(b,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(b,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:v(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
1089tablecell_split_horizontal:w(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};c.filter.check(z)&&(b.tablecell_properties=0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return b}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,
1090group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,
1091group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,
1092group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,
1093group:"tablecolumn",command:"columnDelete",order:15}});c.contextMenu&&c.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:e,insertRow:g,insertColumn:m,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a,g,b,e,c){a=a.$.rows;b=b||0;e="number"===typeof e?e:a.length-
10941;c="number"===typeof c?c:-1;var m=-1,h=[];for(g=g||0;g<=e;g++){m++;!h[m]&&(h[m]=[]);for(var d=-1,k=b;k<=(-1===c?a[g].cells.length-1:c);k++){var l=a[g].cells[k];if(!l)break;for(d++;h[m][d];)d++;for(var f=isNaN(l.colSpan)?1:l.colSpan,l=isNaN(l.rowSpan)?1:l.rowSpan,n=0;n<l&&!(g+n>e);n++){h[m+n]||(h[m+n]=[]);for(var w=0;w<f;w++)h[m+n][d+w]=a[g].cells[k]}d+=f-1;if(-1!==c&&d>=c)break}}return h},function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",
1095CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var a={},g={};CKEDITOR.addTemplates=function(b,e){a[b]=e};CKEDITOR.getTemplates=function(b){return a[b]};CKEDITOR.loadTemplates=function(a,e){for(var c=[],m=0,h=a.length;m<h;m++)g[a[m]]||(c.push(a[m]),g[a[m]]=1);c.length?CKEDITOR.scriptLoader.load(c,e):setTimeout(e,
10960)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,"use strict",function(){var a=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SH
vendor: 8,586 bytes, lines 1096-1113
1096IFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(c){function e(a){f.enabled&&!1!==a.data.command.canUndo&&f.save()}function g(){f.enabled=c.readOnly?!1:"wysiwyg"==c.mode;f.onChange()}var f=c.undoManager=new b(c),h=f.editingHandler=new m(f),w=c.addCommand("undo",
1097{exec:function(){f.undo()&&(c.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),v=c.addCommand("redo",{exec:function(){f.redo()&&(c.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[a[0],"undo"],[a[1],"redo"],[a[2],"redo"]]);f.onChange=function(){w.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);v.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};c.on("beforeCommandExec",e);c.on("afterCommandExec",
1098e);c.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});c.on("contentDom",h.attachListeners,h);c.on("instanceReady",function(){c.fire("saveSnapshot")});c.on("beforeModeUnload",function(){"wysiwyg"==c.mode&&f.save(!0)});c.on("mode",g);c.on("readOnly",g);c.ui.addButton&&(c.ui.addButton("Undo",{label:c.lang.undo.undo,command:"undo",toolbar:"undo,10"}),c.ui.addButton("Redo",{label:c.lang.undo.redo,command:"redo",toolbar:"undo,20"}));c.resetUndo=function(){f.reset();c.fire("saveSnapshot")};
1099c.on("updateSnapshot",function(){f.currentImage&&f.update()});c.on("lockSnapshot",function(a){a=a.data;f.lock(a&&a.dontUpdate,a&&a.forceUpdate)});c.on("unlockSnapshot",f.unlock,f)}});CKEDITOR.plugins.undo={};var b=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this.editor=a;this.reset()};b.prototype={type:function(a,c){var e=b.getKeyGroup(a),f=this.strokesRecorded[e]+1;c=
1100c||f>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());c?(f=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[e]=f;this.previousKeyGroup=e},keyGroupChanged:function(a){return b.getKeyGroup(a)!=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=
1101-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,c){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var g=f.editable();if(!g||"ready"!=g.status)return!1;g=this.snapshots;b||(b=new e(f));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==c&&f.fire("change");g.splice(this.index+
11021,g.length-this.index-1);g.length==this.limit&&g.shift();this.index=g.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];
1103this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,f;if(c)if(a)for(f=this.index-1;0<=f;f--){if(a=b[f],!c.equalsContent(a))return a.index=f,a}else for(f=this.index+1;f<b.length;f++)if(a=b[f],!c.equalsContent(a))return a.index=f,a;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 a=this.getNextImage(!0);if(a)return this.restoreImage(a),
1104!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=this.getNextImage(!1);if(a)return this.restoreImage(a),!0}return!1},update:function(a){if(!this.locked){a||(a=new e(this.editor));for(var b=this.index,c=this.snapshots;0<b&&this.currentImage.equalsContent(c[b-1]);)--b;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var b=this.snapshots,c=b[b.length-1];return c.equalsContent(a)&&!c.equalsSelection(a)?
1105(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var c=null;if(b)c=!0;else{var f=new e(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(f)&&(c=f)}this.locked={update:c,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=new e(this.editor,!0);a.equalsContent(b)||this.update()}}}};b.navigationKeyCodes=
1106{37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};b.keyGroups={PRINTABLE:0,FUNCTIONAL:1};b.isNavigationKey=function(a){return!!b.navigationKeyCodes[a]};b.getKeyGroup=function(a){var c=b.keyGroups;return g[a]?c.FUNCTIONAL:c.PRINTABLE};b.getOppositeKeyGroup=function(a){var c=b.keyGroups;return a==c.FUNCTIONAL?c.PRINTABLE:c.FUNCTIONAL};b.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&b.getKeyGroup(a)==b.keyGroups.FUNCTIONAL};var e=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");
1107var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;b||(this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(!0));a.fire("afterUndoImage")},c=/\b(?:href|src|name)="[^"]*?"/gi;e.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(c,""),a=a.replace(c,""));return b!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||
1108!a||b.length!=a.length)return!1;for(var c=0;c<b.length;c++){var f=b[c],e=a[c];if(f.startOffset!=e.startOffset||f.endOffset!=e.endOffset||!CKEDITOR.tools.arrayCompare(f.start,e.start)||!CKEDITOR.tools.arrayCompare(f.end,e.end))return!1}}return!0}};var m=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new h;this.lastKeydownImage=null};m.prototype={onKeydown:function(c){var g=c.data.getKey();if(229!==g)if(-1<CKEDITOR.tools.indexOf(a,
1109c.data.getKeystroke()))c.data.preventDefault();else if(this.keyEventsStack.cleanUp(c),c=this.undoManager,this.keyEventsStack.getLast(g)||this.keyEventsStack.push(g),this.lastKeydownImage=new e(c.editor),b.isNavigationKey(g)||this.undoManager.keyGroupChanged(g))if(c.strokesRecorded[0]||c.strokesRecorded[1])c.save(!1,this.lastKeydownImage,!1),c.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));
1110this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var c=this.undoManager;a=a.data.getKey();var g=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new e(c.editor,!0))))if(0<g)c.type(a);else if(b.isNavigationKey(a))this.onNavigationKey(!0)},
1111onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new e(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,c=a.editable(),e=this;c.attachListener(c,"keydown",function(a){e.onKeydown(a);if(b.ieFunctionalKeysBug(a.data.getKey()))e.onInput()},null,null,999);c.attachListener(c,CKEDITOR.env.ie?"keypress":
1112"input",e.onInput,e,null,999);c.attachListener(c,"keyup",e.onKeyup,e,null,999);c.attachListener(c,"paste",e.ignoreInputEventListener,e,null,999);c.attachListener(c,"drop",e.ignoreInputEventListener,e,null,999);a.on("afterPaste",e.activateInputEventListener,e,null,999);c.attachListener(c.isInline()?c:a.document.getDocumentElement(),"click",function(){e.onNavigationKey()},null,null,999);c.attachListener(this.undoManager.editor,"blur",function(){e.keyEventsStack.remove(9)},null,null,999)}};var h=CKEDITOR.plugins.undo.KeyEventsStack=
1113function(){this.stack=[]};h.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]}
vendor: 13,159 bytes, lines 1113-1133
1113,getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==
1114typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),function(){function a(a){function b(a){var c=!1;f.attachListener(f,"keydown",function(){var b=d.getBody().getElementsByTag(a);if(!c){for(var e=0;e<b.count();e++)b.getItem(e).setCustomData("retain",
1115!0);c=!0}},null,null,1);f.attachListener(f,"keyup",function(){var b=d.getElementsByTag(a);c&&(1==b.count()&&!b.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(b.getItem(0).getAttributes())&&b.getItem(0).remove(1),c=!1)})}var e=this.editor,d=a.document,k=d.body,l=d.getElementById("cke_actscrpt");l&&l.parentNode.removeChild(l);(l=d.getElementById("cke_shimscrpt"))&&l.parentNode.removeChild(l);(l=d.getElementById("cke_basetagscrpt"))&&l.parentNode.removeChild(l);k.contentEditable=!0;CKEDITOR.env.ie&&
1116(k.hideFocus=!0,k.disabled=!0,k.removeAttribute("disabled"));delete this._.isLoadingData;this.$=k;d=new CKEDITOR.dom.document(d);this.setup();this.fixInitialSelection();var f=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&d.getDocumentElement().addClass(d.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&e.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&e.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)d.getDocumentElement().on("mousedown",
1117function(a){a.data.getTarget().is("html")&&setTimeout(function(){e.editable().focus()})});g(e);try{e.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==e.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){e.getSelection().scrollIntoView()},0);else if(e.window.$.innerHeight>this.$.offsetHeight){var c=e.createRange();c[33==b?"moveToElementEditStart":
1118"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(d,"blur",function(){try{d.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(d,"touchend",function(){a.focus()});k=e.document.getElementsByTag("title").getItem(0);k.data("cke-title",k.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&
1119(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)},0,this)}function g(a){function b(){var d;a.editable().attachListener(a,"selectionChange",function(){var b=a.getSelection().getSelectedElement();b&&(d&&(d.detachEvent("onresizestart",e),d=null),b.$.attachEvent("onresizestart",e),d=b.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var d=a.document.$;d.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);d.execCommand("enableInlineTableEditing",
1120!1,!a.config.disableNativeTableHandles)}catch(g){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function b(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var b=[],e;for(e in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+e+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));
1121a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var e;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(b){function g(d){d&&d.removeListener();a.editable(new e(a,k.$.contentWindow.document.body));a.setData(a.getData(1),b)}var d="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+
1122")();":"")+"document.close();",d=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(d)+"}())":"",k=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+d+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');k.setStyles({width:"100%",height:"100%"});k.addClass("cke_wysiwyg_frame").addClass("cke_reset");d=a.ui.space("contents");d.append(k);var l=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(l)k.on("load",g);var f=a.title,
1123n=a.fire("ariaEditorHelpLabel",{}).label;f&&(CKEDITOR.env.ie&&n&&(f+=", "+n),k.setAttribute("title",f));if(n){var f=CKEDITOR.tools.getNextId(),w=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+n+"\x3c/span\x3e");d.append(w,1);k.setAttribute("aria-describedby",f)}a.on("beforeModeUnload",function(a){a.removeListener();w&&w.remove()});k.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!l&&g();a.fire("ariaWidget",k)})}});CKEDITOR.editor.prototype.addContentsCss=
1124function(a){var b=this.config,e=b.contentsCss;CKEDITOR.tools.isArray(e)||(b.contentsCss=e?[e]:[]);b.contentsCss.push(a)};e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var g=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),g.fire("dataReady");
1125else{this._.isLoadingData=!0;g._.dataStore={id:1};var d=g.config,k=d.fullPage,l=d.docType,f=CKEDITOR.tools.buildStyleHtml(b()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');k||(f+=CKEDITOR.tools.buildStyleHtml(g.config.contentsCss));var n=d.baseHref?'\x3cbase href\x3d"'+d.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";k&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){g.docType=l=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){g.xmlDeclaration=a;return""}));a=g.dataProcessor.toHtml(a);k?(/<body[\s|>]/.test(a)||
1126(a="\x3cbody\x3e"+a),/<html[\s|>]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),n&&(a=a.replace(/<head[^>]*?>/,"$\x26"+n)),a=a.replace(/<\/head\s*>/,f+"$\x26"),a=l+a):a=d.docType+'\x3chtml dir\x3d"'+d.contentsLangDirection+'" lang\x3d"'+(d.contentsLanguage||g.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+
1127this._.docTitle+"\x3c/title\x3e"+n+f+"\x3c/head\x3e\x3cbody"+(d.bodyId?' id\x3d"'+d.bodyId+'"':"")+(d.bodyClass?' class\x3d"'+d.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&(a=a.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));d='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+
1128this._.frameLoadedHandler+",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(d+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');
1129a=a.replace(/(?=\s*<\/(:?head)>)/,d);this.clearCustomData();this.clearListeners();g.fire("contentDomUnload");var w=this.getDocument();try{w.write(a)}catch(v){setTimeout(function(){w.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,e=b.fullPage,d=e&&a.docType,g=e&&a.xmlDeclaration,l=this.getDocument(),e=e?l.getDocumentElement().getOuterHtml():l.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(e=e.replace(/<br>(?=\s*(:?$|<\/body>))/,
1130""));e=a.dataProcessor.toDataFormat(e);g&&(e=g+"\n"+e);d&&(e=d+"\n"+e);return e},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:e.baseProto.focus.call(this)},detach:function(){var a=this.editor,b=a.document,g;try{g=a.window.getFrame()}catch(d){}e.baseProto.detach.call(this);this.clearCustomData();b.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);g&&g.getParent()?(g.clearCustomData(),(a=g.removeCustomData("onResize"))&&a.removeListener(),
1131g.remove()):CKEDITOR.warn("editor-destroy-iframe")}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,menu,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,popup,filetools,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,format,forms,horizontalrule,htmlwriter,iframe,image,indent,indentlist,indentblock,justify,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,save,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,templates,undo,wysiwygarea",
1132CKEDITOR.config.skin="moono-lisa",function(){var a=function(a,b){var e=CKEDITOR.getUrl("plugins/"+b);a=a.split(",");for(var c=0;c<a.length;c++)CKEDITOR.skin.icons[a[c]]={path:e,offset:-a[++c],bgsize:a[++c]}};CKEDITOR.env.hidpi?a("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,,codesnippet,384,,bgcolor,408,,textcolor,432,,copyformatting,456,,creatediv,480,,docprops-rtl,504,,docprops,528,,easyimagealigncenter,552,,easyimagealignleft,576,,easyimagealignright,600,,easyimagealt,624,,easyimagefull,648,,easyimageside,672,,easyimageupload,696,,embed,720,,embedsemantic,744,,emojipanel,768,,find-rtl,792,,find,816,,replace,840,,flash,864,,button,888,,checkbox,912,,form,936,,hiddenfield,960,,imagebutton,984,,radio,1008,,select-rtl,1032,,select,1056,,textarea-rtl,1080,,textarea,1104,,textfield-rtl,1128,,textfield,1152,,horizontalrule,1176,,iframe,1200,,image,1224,,indent-rtl,1248,,indent,1272,,outdent-rtl,1296,,outdent,1320,,justifyblock,1344,,justifycenter,1368,,justifyleft,1392,,justifyright,1416,,language,1440,,anchor-rtl,1464,,anchor,1488,,link,1512,,unlink,1536,,bulletedlist-rtl,1560,,bulletedlist,1584,,numberedlist-rtl,1608,,numberedlist,1632,,mathjax,1656,,maximize,1680,,newpage-rtl,1704,,newpage,1728,,pagebreak-rtl,1752,,pagebreak,1776,,pastefromword-rtl,1800,,pastefromword,1824,,pastetext-rtl,1848,,pastetext,1872,,placeholder,1896,,preview-rtl,1920,,preview,1944,,print,1968,,removeformat,1992,,save,2016,,selectall,2040,,showblocks-rtl,2064,,showblocks,2088,,smiley,2112,,source-rtl,2136,,source,2160,,sourcedialog-rtl,2184,,sourcedialog,2208,,specialchar,2232,,table,2256,,templates-rtl,2280,,templates,2304,,uicolor,2328,,redo-rtl,2352,,redo,2376,,undo-rtl,2400,,undo,2424,,simplebox,4896,auto",
1133"icons_hidpi.png"):a("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,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,copyformatting,456,auto,creatediv,480,auto,docprops-rtl,504,auto,docprops,528,auto,easyimagealigncenter,552,auto,easyimagealignleft,576,auto,easyimagealignright,600,auto,easyimagealt,624,auto,easyimagefull,648,auto,easyimageside,672,auto,easyimageupload,696,auto,embed,720,auto,embedsemantic,744,auto,emojipanel,768,auto,find-rtl,792,auto,find,816,auto,replace,840,auto,flash,864,auto,button,888,auto,checkbox,912,auto,form,936,auto,hiddenfield,960,auto,imagebutton,984,auto,radio,1008,auto,select-rtl,1032,auto,select,1056,auto,textarea-rtl,1080,auto,textarea,1104,auto,textfield-rtl,1128,auto,textfield,1152,auto,horizontalrule,1176,auto,iframe,1200,auto,image,1224,auto,indent-rtl,1248,auto,indent,1272,auto,outdent-rtl,1296,auto,outdent,1320,auto,justifyblock,1344,auto,justifycenter,1368,auto,justifyleft,1392,auto,justifyright,1416,auto,language,1440,auto,anch
1133or-rtl,1464,auto,anchor,1488,auto,link,1512,auto,unlink,1536,auto,bulletedlist-rtl,1560,auto,bulletedlist,1584,auto,numberedlist-rtl,1608,auto,numberedlist,1632,auto,mathjax,1656,auto,maximize,1680,auto,newpage-rtl,1704,auto,newpage,1728,auto,pagebreak-rtl,1752,auto,pagebreak,1776,auto,pastefromword-rtl,1800,auto,pastefromword,1824,auto,pastetext-rtl,1848,auto,pastetext,1872,auto,placeholder,1896,auto,preview-rtl,1920,auto,preview,1944,auto,print,1968,auto,removeformat,1992,auto,save,2016,auto,selectall,2040,auto,showblocks-rtl,2064,auto,showblocks,2088,auto,smiley,2112,auto,source-rtl,2136,auto,source,2160,auto,sourcedialog-rtl,2184,auto,sourcedialog,2208,auto,specialchar,2232,auto,table,2256,auto,templates-rtl,2280,auto,templates,2304,auto,uicolor,2328,auto,redo-rtl,2352,auto,redo,2376,auto,undo-rtl,2400,auto,undo,2424,auto,simplebox,2448,auto",
1134"icons.png")}())})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.